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

index 7b6cf5e834cb9c4c0d0c90d430b5675e907dae77..8ee8c107dbf7aa8b31b097fe42d339f0efb46bd2 100644 (file)
@@ -80,8 +80,8 @@ class WaybillIncomingProducts extends \yii\db\ActiveRecord
                     return;
                 }
 
-                $count = $er->product_count < $itemCount
-                    ? $itemCount - $er->product_count
+                $count = $er->product_count > $itemCount
+                    ? $er->product_count - $itemCount
                     : $er->product_count;
             } else {
                 $count = $itemCount;
index c755cd2017cdafd3dc848f5cfcaf27815ec4a85e..6f9bec6011f9d341e3f8788b3315d0a202fcbdc2 100644 (file)
@@ -82,8 +82,8 @@ class WaybillWriteOffsProducts extends \yii\db\ActiveRecord
                     return;
                 }
 
-                $count = $er->product_count < $itemCount
-                    ? $itemCount - $er->product_count
+                $count = $er->product_count > $itemCount
+                    ? $er->product_count - $itemCount
                     : $er->product_count;
             } else {
                 $count = $itemCount;