// Added warning in SupplyOrdersController if there is not a least one warehouse

This commit is contained in:
bMancone
2012-01-31 09:25:27 +00:00
parent b7c9fd1517
commit ad112b5b46
2 changed files with 190 additions and 189 deletions
@@ -408,6 +408,9 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->displayInformation($this->l('This interface allows you to manage supply orders.').'<br />');
$this->displayInformation($this->l('Also, you can create templates that you can later use to generate actual orders.').'<br />');
if (count($this->warehouses) <= 1)
$this->displayWarning($this->l('You must have at least one warehouse before creating supply orders. See Stock/Warehouses'));
// assigns warehouses
$this->tpl_list_vars['warehouses'] = $this->warehouses;
$this->tpl_list_vars['current_warehouse'] = $this->getCurrentWarehouse();