]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-258] Не добавляй товары с отрицательным остатком
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 5 Dec 2024 14:39:09 +0000 (17:39 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 5 Dec 2024 14:39:09 +0000 (17:39 +0300)
erp24/controllers/ShiftTransferController.php

index c852059672b2346212cd33e1bf204773114ab91a..bdd1c5e38a2964af5217ff223549c14d58bb11b6 100644 (file)
@@ -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 {