From: marina Date: Mon, 9 Dec 2024 09:22:09 +0000 (+0300) Subject: ERP-259 Доработка второго шага передачи смен X-Git-Tag: 1.7~185^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=63427c6cf9c5fb9cf17114da5ec3f0c22fc3b147;p=erp24_rep%2Fyii-erp24%2F.git ERP-259 Доработка второго шага передачи смен --- diff --git a/erp24/controllers/ShiftTransferController.php b/erp24/controllers/ShiftTransferController.php index e670a75d..fc130e81 100644 --- a/erp24/controllers/ShiftTransferController.php +++ b/erp24/controllers/ShiftTransferController.php @@ -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'])