]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-259 Доработка второго шага передачи смен
authormarina <m.zozirova@gmail.com>
Mon, 9 Dec 2024 09:22:09 +0000 (12:22 +0300)
committermarina <m.zozirova@gmail.com>
Mon, 9 Dec 2024 09:22:09 +0000 (12:22 +0300)
erp24/controllers/ShiftTransferController.php

index e670a75dfcf0761d16f455d43a89451e5c0a284c..fc130e81ffca1a7da5c793626e631c1a3d783e14 100644 (file)
@@ -268,7 +268,13 @@ class ShiftTransferController extends Controller
 
         $admins = ArrayHelper::map(Admin::find()->all(), 'id', 'name');
 
-        $products = ArrayHelper::map(Products1c::findAll(['id' => ShiftRemains::find()->where(['shift_transfer_id' => $id])->select('product_guid')->column()]), 'id', 'name');
+        $products = ArrayHelper::map(
+            Products1c::findAll(['id' =>
+                ShiftRemains::find()
+                    ->andWhere(['shift_transfer_id' => $id])
+                    ->andWhere(['<', 'fact_and_1c_diff', 0])
+                    ->select('product_guid')->column()]),
+            'id', 'name');
 
         return $this->render('view',
             compact('shiftTransfer', 'storeNameById', 'admins', 'products'));
@@ -296,7 +302,7 @@ class ShiftTransferController extends Controller
                         ->andWhere(['guid' => $productGuid])
                         ->andWhere(['guid_replacement' => ShiftRemains::find()
                             ->andWhere(['shift_transfer_id' => $shiftTransferId])
-                            ->andWhere(['<>', 'fact_and_1c_diff', 0])
+                            ->andWhere(['>', 'fact_and_1c_diff', 0])
                             ->select('product_guid')
                             ->column()])
                         ->select(['guid_replacement'])