// Stock decrementation
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11074 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
a9670d0f85
commit
71b6047692
1 file changed
+3
@@ -87,7 +87,10 @@ class OrderHistoryCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
/* If becoming logable => adding sale */
|
/* If becoming logable => adding sale */
|
||||||
if ($newOS->logable AND (!$oldOrderStatus OR !$oldOrderStatus->logable))
|
if ($newOS->logable AND (!$oldOrderStatus OR !$oldOrderStatus->logable))
|
||||||
|
{
|
||||||
ProductSale::addProductSale($product['id_product'], $product['cart_quantity']);
|
ProductSale::addProductSale($product['id_product'], $product['cart_quantity']);
|
||||||
|
StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']);
|
||||||
|
}
|
||||||
/* If becoming unlogable => removing sale */
|
/* If becoming unlogable => removing sale */
|
||||||
elseif (!$newOS->logable AND ($oldOrderStatus AND $oldOrderStatus->logable))
|
elseif (!$newOS->logable AND ($oldOrderStatus AND $oldOrderStatus->logable))
|
||||||
ProductSale::removeProductSale($product['id_product'], $product['cart_quantity']);
|
ProductSale::removeProductSale($product['id_product'], $product['cart_quantity']);
|
||||||
|
|||||||
Reference in new issue
Block a user