// updated stock for Pack

This commit is contained in:
bMancone
2012-01-09 18:23:01 +00:00
parent 4a1c0cb5ed
commit 4aeaf46e1d
5 changed files with 71 additions and 65 deletions
+2
View File
@@ -95,6 +95,8 @@ class OrderHistoryCore extends ObjectModel
&& $oldOrderStatus->logable))
{
ProductSale::addProductSale($product['product_id'], $product['product_quantity']);
if ($oldOrderStatus->id == Configuration::get('PS_OS_ERROR') || $oldOrderStatus->id == Configuration::get('PS_OS_CANCELED'))
StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], -(int)$product['product_quantity'], $order->id_shop);
}
/* If becoming unlogable => removing sale */
else if (!$newOS->logable