// Improved Supply Orders threshold when creating a template

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13640 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-02-27 16:15:50 +00:00
parent 8b35f64f95
commit 9a205b3665
@@ -2024,8 +2024,14 @@ class AdminSupplyOrdersControllerCore extends AdminController
$manager = StockManagerFactory::getManager();
foreach ($items as $item)
{
$real_quantity = (int)$manager->getProductRealQuantities($item['id_product'], $item['id_product_attribute'], $supply_order->id_warehouse, true);
$diff = (int)$threshold - (int)$real_quantity;
if ($supply_order->is_template != 0)
{
$real_quantity = (int)$manager->getProductRealQuantities($item['id_product'], $item['id_product_attribute'], $supply_order->id_warehouse, true);
$diff = (int)$threshold - (int)$real_quantity;
}
else
$diff = (int)$threshold;
if ($diff > 0)
{
// sets supply_order_detail