// Stock: cleaned
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9741 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
5a7fa97b95
commit
4b3c1bca94
1 file changed
+10
-5
+10
-5
@@ -73,7 +73,7 @@ class StockCore extends ObjectModel
|
|||||||
$fields['price_te'] = (float)round($this->price_te, 6);
|
$fields['price_te'] = (float)round($this->price_te, 6);
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For a given id_product and id_product_attribute update the quantity in stock
|
* For a given id_product and id_product_attribute update the quantity in stock
|
||||||
*/
|
*/
|
||||||
@@ -83,7 +83,7 @@ class StockCore extends ObjectModel
|
|||||||
// Update quantity of the pack products
|
// Update quantity of the pack products
|
||||||
if (Pack::isPack($id_product))
|
if (Pack::isPack($id_product))
|
||||||
{
|
{
|
||||||
$products_pack = Pack::getItems((int)($product['id_product']), (int)(Configuration::get('PS_LANG_DEFAULT')));
|
$products_pack = Pack::getItems((int)$product['id_product'], (int)Configuration::get('PS_LANG_DEFAULT'));
|
||||||
foreach ($products_pack as $product_pack)
|
foreach ($products_pack as $product_pack)
|
||||||
{
|
{
|
||||||
$pack_id_product_attribute = Product::getDefaultAttribute($tab_product_pack['id_product'], 1);
|
$pack_id_product_attribute = Product::getDefaultAttribute($tab_product_pack['id_product'], 1);
|
||||||
@@ -94,8 +94,13 @@ class StockCore extends ObjectModel
|
|||||||
$id_stock_mvt_reason = Configuration::get('PS_STOCK_MVT_INC_REASON_DEFAULT');
|
$id_stock_mvt_reason = Configuration::get('PS_STOCK_MVT_INC_REASON_DEFAULT');
|
||||||
else
|
else
|
||||||
$id_stock_mvt_reason = Configuration::get('PS_STOCK_MVT_DEC_REASON_DEFAULT');
|
$id_stock_mvt_reason = Configuration::get('PS_STOCK_MVT_DEC_REASON_DEFAULT');
|
||||||
|
|
||||||
StockManagerFactory::getManager()
|
StockManagerFactory::getManager()->removeProduct($id_product,
|
||||||
->removeProduct($id_product, $id_product_attribute, $warehouse, $delta_quantity, $id_stock_mvt_reason, true, (int)$id_order);
|
$id_product_attribute,
|
||||||
|
$warehouse,
|
||||||
|
$delta_quantity,
|
||||||
|
$id_stock_mvt_reason,
|
||||||
|
true,
|
||||||
|
(int)$id_order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user