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

This commit is contained in:
bMancone
2011-11-16 14:12:58 +00:00
parent 1fc88d3d17
commit 73c2a7d75b
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();
}