// Warehouse: it is not possible to delete a warehouse of it has pending supply orders.

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10173 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2011-11-16 14:12:58 +00:00
parent 4b858a2bed
commit 41f81bf5ae
5 changed files with 37 additions and 8 deletions
@@ -440,6 +440,8 @@ class AdminWarehousesControllerCore extends AdminController
return;
else if ($obj->getQuantitiesOfProducts() > 0)
$this->_errors[] = $this->l('It is not possible to delete a Warehosue when there are products in it.');
else if (SupplyOrder::warehouseHasPendingOrders($obj->id))
$this->_errors[] = $this->l('It is not possible to delete a Warehouse if it has pending supply orders.');
else
return parent::postProcess();
}