From: Alexander Smirnov Date: Thu, 5 Dec 2024 14:39:09 +0000 (+0300) Subject: [ERP-258] Не добавляй товары с отрицательным остатком X-Git-Tag: 1.7~189^2~8 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=d6d31746f71090e5dd897b6867e7ca322bf842c0;p=erp24_rep%2Fyii-erp24%2F.git [ERP-258] Не добавляй товары с отрицательным остатком --- diff --git a/erp24/controllers/ShiftTransferController.php b/erp24/controllers/ShiftTransferController.php index c8520596..bdd1c5e3 100644 --- a/erp24/controllers/ShiftTransferController.php +++ b/erp24/controllers/ShiftTransferController.php @@ -60,7 +60,7 @@ class ShiftTransferController extends Controller ->where(['store_id' => $storeGuid])->all(), 'product_id', 'quantity'); $productGuids = []; foreach ($products as $key => $name) { - if (isset($balance[$key])) { + if (isset($balance[$key]) && $balance[$key] > 0) { $productGuids[$key] = $name . ' (' . $balance[$key] . ' шт.)'; } // else {