// Improved Supply Orders threshold when creating a template

This commit is contained in:
bMancone committed 2012-02-27 16:15:50 +00:00
1 parent d1b4008352
commit a93a86b51e
1 file changed
+6
@@ -2023,9 +2023,15 @@ class AdminSupplyOrdersControllerCore extends AdminController
$manager = StockManagerFactory::getManager(); $manager = StockManagerFactory::getManager();
foreach ($items as $item) foreach ($items as $item)
{
if ($supply_order->is_template != 0)
{ {
$real_quantity = (int)$manager->getProductRealQuantities($item['id_product'], $item['id_product_attribute'], $supply_order->id_warehouse, true); $real_quantity = (int)$manager->getProductRealQuantities($item['id_product'], $item['id_product_attribute'], $supply_order->id_warehouse, true);
$diff = (int)$threshold - (int)$real_quantity; $diff = (int)$threshold - (int)$real_quantity;
}
else
$diff = (int)$threshold;
if ($diff > 0) if ($diff > 0)
{ {
// sets supply_order_detail // sets supply_order_detail