From c0606a54e9dbecab3348d02fc22ba6d94635992d Mon Sep 17 00:00:00 2001 From: Almaz Bazarov Date: Tue, 2 Jul 2024 14:52:58 +0200 Subject: [PATCH] Review fix --- retailcrm/lib/RetailcrmHistory.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/retailcrm/lib/RetailcrmHistory.php b/retailcrm/lib/RetailcrmHistory.php index 4839e51..dc641bb 100755 --- a/retailcrm/lib/RetailcrmHistory.php +++ b/retailcrm/lib/RetailcrmHistory.php @@ -1174,10 +1174,13 @@ class RetailcrmHistory $isStockEnough = $product->checkQty($orderDetail->product_quantity); + // переменная используется для передачи разницы количества товара в метод StockAvailable::updateQuantity + $deltaQuantity = -1 * $orderDetail->product_quantity; + StockAvailable::updateQuantity( $product_id, $product_attribute_id, - -1 * $orderDetail->product_quantity, + $deltaQuantity, Context::getContext()->shop->id );