// Stock - interfaces updated : (reason=>label, state=>status)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10700 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
<input type="hidden" name="controller" value="AdminStockCover" />
|
<input type="hidden" name="controller" value="AdminStockCover" />
|
||||||
<input type="hidden" name="token" value="{$token}" />
|
<input type="hidden" name="token" value="{$token}" />
|
||||||
{if count($stock_cover_periods) > 1}
|
{if count($stock_cover_periods) > 1}
|
||||||
<label for="coverage_period">{l s='Select a period and a warehouse:'}</label>
|
<label for="coverage_period">{l s='Filter by period/warehouse:'}</label>
|
||||||
<select name="coverage_period" onChange="$(this).parent().submit();">
|
<select name="coverage_period" onChange="$(this).parent().submit();">
|
||||||
{foreach from=$stock_cover_periods key=k item=i}
|
{foreach from=$stock_cover_periods key=k item=i}
|
||||||
<option {if $i == $stock_cover_cur_period} selected="selected"{/if} value="{$i}">{$k}</option>
|
<option {if $i == $stock_cover_cur_period} selected="selected"{/if} value="{$i}">{$k}</option>
|
||||||
@@ -44,6 +44,6 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
{/if}
|
{/if}
|
||||||
</form>"admin-dev/themes/template/supply_orders/view.tpl"
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<input type="hidden" name="token" value="{$token}" />
|
<input type="hidden" name="token" value="{$token}" />
|
||||||
{if count($stock_instant_state_warehouses) > 0}
|
{if count($stock_instant_state_warehouses) > 0}
|
||||||
<div id="stock_instant_state_form_warehouse">
|
<div id="stock_instant_state_form_warehouse">
|
||||||
<label for="id_warehouse">{l s='Select a warehouse:'}</label>
|
<label for="id_warehouse">{l s='Filter by warehouse:'}</label>
|
||||||
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
|
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
|
||||||
{foreach from=$stock_instant_state_warehouses key=k item=i}
|
{foreach from=$stock_instant_state_warehouses key=k item=i}
|
||||||
<option {if $i.id_warehouse == $stock_instant_state_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
|
<option {if $i.id_warehouse == $stock_instant_state_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
{if count($list_warehouses) > 0}
|
{if count($list_warehouses) > 0}
|
||||||
<div class="filter-stock">
|
<div class="filter-stock">
|
||||||
<form type="get">
|
<form type="get">
|
||||||
<label for="id_warehouse">{l s='Select a warehouse:'}</label>
|
<label for="id_warehouse">{l s='Filter movements by warehouse:'}</label>
|
||||||
<input type="hidden" name="controller" value="AdminStockMvt" />
|
<input type="hidden" name="controller" value="AdminStockMvt" />
|
||||||
<input type="hidden" name="token" value="{$token}" />
|
<input type="hidden" name="token" value="{$token}" />
|
||||||
<select name="id_warehouse" onChange="$(this).parent().submit();">
|
<select name="id_warehouse" onChange="$(this).parent().submit();">
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => $this->l('Reason :'),
|
'label' => $this->l('Label :'),
|
||||||
'name' => 'id_stock_mvt_reason',
|
'name' => 'id_stock_mvt_reason',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
@@ -256,7 +256,7 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
'id' => 'id_stock_mvt_reason',
|
'id' => 'id_stock_mvt_reason',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
),
|
),
|
||||||
'desc' => $this->l('Reason used in stock movements'),
|
'desc' => $this->l('Label used in stock movements'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
@@ -361,7 +361,7 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => $this->l('Reason :'),
|
'label' => $this->l('Label :'),
|
||||||
'name' => 'id_stock_mvt_reason',
|
'name' => 'id_stock_mvt_reason',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
@@ -371,7 +371,7 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
'id' => 'id_stock_mvt_reason',
|
'id' => 'id_stock_mvt_reason',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
),
|
),
|
||||||
'desc' => $this->l('Reason used in stock movements'),
|
'desc' => $this->l('Label used in stock movements'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
'title' => $this->l('Options'),
|
'title' => $this->l('Options'),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'PS_STOCK_MVT_INC_REASON_DEFAULT' => array(
|
'PS_STOCK_MVT_INC_REASON_DEFAULT' => array(
|
||||||
'title' => $this->l('Default reason when incrementing stock:'),
|
'title' => $this->l('Default label when incrementing stock:'),
|
||||||
'cast' => 'intval',
|
'cast' => 'intval',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'list' => $reasons_inc,
|
'list' => $reasons_inc,
|
||||||
@@ -85,7 +85,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
'visibility' => Shop::CONTEXT_ALL
|
'visibility' => Shop::CONTEXT_ALL
|
||||||
),
|
),
|
||||||
'PS_STOCK_MVT_DEC_REASON_DEFAULT' => array(
|
'PS_STOCK_MVT_DEC_REASON_DEFAULT' => array(
|
||||||
'title' => $this->l('Default reason when decrementing stock:'),
|
'title' => $this->l('Default label when decrementing stock:'),
|
||||||
'cast' => 'intval',
|
'cast' => 'intval',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'list' => $reasons_dec,
|
'list' => $reasons_dec,
|
||||||
@@ -93,7 +93,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
'visibility' => Shop::CONTEXT_ALL
|
'visibility' => Shop::CONTEXT_ALL
|
||||||
),
|
),
|
||||||
'PS_STOCK_CUSTOMER_ORDER_REASON' => array(
|
'PS_STOCK_CUSTOMER_ORDER_REASON' => array(
|
||||||
'title' => $this->l('Default reason when decrementing stock when a customer order is shipped:'),
|
'title' => $this->l('Default label when decrementing stock when a customer order is shipped:'),
|
||||||
'cast' => 'intval',
|
'cast' => 'intval',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'list' => $reasons_dec,
|
'list' => $reasons_dec,
|
||||||
@@ -101,7 +101,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
'visibility' => Shop::CONTEXT_ALL
|
'visibility' => Shop::CONTEXT_ALL
|
||||||
),
|
),
|
||||||
'PS_STOCK_MVT_SUPPLY_ORDER' => array(
|
'PS_STOCK_MVT_SUPPLY_ORDER' => array(
|
||||||
'title' => $this->l('Default reason when incrementing stock when a supply order is received:'),
|
'title' => $this->l('Default label when incrementing stock when a supply order is received:'),
|
||||||
'cast' => 'intval',
|
'cast' => 'intval',
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'list' => $reasons_inc,
|
'list' => $reasons_inc,
|
||||||
@@ -115,6 +115,8 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->tpl_list_vars['list_warehouses'] = array();
|
$this->tpl_list_vars['list_warehouses'] = array();
|
||||||
|
|
||||||
|
$this->_where = ' AND a.deleted = 0';
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,11 +126,11 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function initForm()
|
public function initForm()
|
||||||
{
|
{
|
||||||
$this->toolbar_title = $this->l('Stock : Add Stock movement reason');
|
$this->toolbar_title = $this->l('Stock : Add Stock movement label');
|
||||||
|
|
||||||
$this->fields_form = array(
|
$this->fields_form = array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Stock Movement Reason'),
|
'title' => $this->l('Stock Movement Label'),
|
||||||
'image' => '../img/admin/edit.gif'
|
'image' => '../img/admin/edit.gif'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
@@ -178,7 +180,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
public function initList()
|
public function initList()
|
||||||
{
|
{
|
||||||
$this->displayInformation($this->l('This interface allows you to display the stock movements for a selected warehouse.').'<br />');
|
$this->displayInformation($this->l('This interface allows you to display the stock movements for a selected warehouse.').'<br />');
|
||||||
$this->displayInformation($this->l('Also, it allows you to add and edit your own stock movement reasons.'));
|
$this->displayInformation($this->l('Also, it allows you to add and edit your own stock movement labels.'));
|
||||||
|
|
||||||
// access
|
// access
|
||||||
if (!($this->tabAccess['add'] === '1'))
|
if (!($this->tabAccess['add'] === '1'))
|
||||||
@@ -195,7 +197,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
$this->addRowActionSkipList('edit', array(1, 2, 3, 4, 5, 6, 7, 8));
|
$this->addRowActionSkipList('edit', array(1, 2, 3, 4, 5, 6, 7, 8));
|
||||||
$this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6, 7, 8));
|
$this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6, 7, 8));
|
||||||
|
|
||||||
$this->toolbar_title = $this->l('Stock : Stock movements reasons');
|
$this->toolbar_title = $this->l('Stock : Stock movements labels');
|
||||||
$first_list = parent::initList();
|
$first_list = parent::initList();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -232,22 +234,22 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
// redifine fields display
|
// redifine fields display
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'product_reference' => array(
|
'product_reference' => array(
|
||||||
'title' => $this->l('Product Reference'),
|
'title' => $this->l('Reference'),
|
||||||
'width' => 100,
|
'width' => 100,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'product_ean13' => array(
|
'product_ean13' => array(
|
||||||
'title' => $this->l('Product EAN 13'),
|
'title' => $this->l('EAN 13'),
|
||||||
'width' => 75,
|
'width' => 75,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'product_upc' => array(
|
'product_upc' => array(
|
||||||
'title' => $this->l('Product UPC'),
|
'title' => $this->l('UPC'),
|
||||||
'width' => 75,
|
'width' => 75,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'product_name' => array(
|
'product_name' => array(
|
||||||
'title' => $this->l('Product Name'),
|
'title' => $this->l('Name'),
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'sign' => array(
|
'sign' => array(
|
||||||
@@ -279,7 +281,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
'filter_key' => 'a!price_te'
|
'filter_key' => 'a!price_te'
|
||||||
),
|
),
|
||||||
'reason' => array(
|
'reason' => array(
|
||||||
'title' => $this->l('Reason'),
|
'title' => $this->l('Label'),
|
||||||
'width' => 100,
|
'width' => 100,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
@@ -298,6 +300,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
|
|
||||||
// make new query
|
// make new query
|
||||||
|
unset ($this->_where);
|
||||||
$this->_select = '
|
$this->_select = '
|
||||||
CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name,
|
CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name,
|
||||||
CONCAT(a.employee_lastname, \' \', a.employee_firstname) AS employee,
|
CONCAT(a.employee_lastname, \' \', a.employee_firstname) AS employee,
|
||||||
|
|||||||
@@ -153,28 +153,28 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->fields_form = array(
|
$this->fields_form = array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Supply Order State'),
|
'title' => $this->l('Supply Order Status'),
|
||||||
'image' => '../img/admin/edit.gif'
|
'image' => '../img/admin/edit.gif'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'lang' => true,
|
'lang' => true,
|
||||||
'label' => $this->l('Name:'),
|
'label' => $this->l('Status:'),
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'size' => 50,
|
'size' => 50,
|
||||||
'required' => true
|
'required' => true
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'color',
|
'type' => 'color',
|
||||||
'label' => $this->l('Back office color:'),
|
'label' => $this->l('Color:'),
|
||||||
'name' => 'color',
|
'name' => 'color',
|
||||||
'size' => 20,
|
'size' => 20,
|
||||||
'desc' => $this->l('Back office background will be displayed in this color. HTML colors only (e.g.,').' "lightblue", "#CC6600")'
|
'desc' => $this->l('Back office background will be displayed in this color. HTML colors only.'),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'label' => $this->l('Is the order editable in this state?:'),
|
'label' => $this->l('Editable:'),
|
||||||
'name' => 'editable',
|
'name' => 'editable',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'class' => 't',
|
'class' => 't',
|
||||||
@@ -191,12 +191,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'label' => $this->l('No')
|
'label' => $this->l('No')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'desc' => $this->l('You have to define if it is possible to edit the order in this state.
|
'desc' => $this->l('For this status, you have to define if it is possible to edit the order.
|
||||||
An editable order is an order not valid to send to the supplier.')
|
An editable order is an order not valid to send to the supplier.')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'label' => $this->l('Is the delivery note function is available in this state?:'),
|
'label' => $this->l('Delivery note:'),
|
||||||
'name' => 'delivery_note',
|
'name' => 'delivery_note',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'class' => 't',
|
'class' => 't',
|
||||||
@@ -213,12 +213,11 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'label' => $this->l('No')
|
'label' => $this->l('No')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'desc' => $this->l('You have to define if it is possible to generate the delivery note of the order in this state.
|
'desc' => $this->l('For this status, you have to define if it is possible to generate the delivery note of the order.')
|
||||||
The order has to be valid to use this function.')
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'label' => $this->l('This state corresponds to a delivery state ?:'),
|
'label' => $this->l('Delivery state:'),
|
||||||
'name' => 'receipt_state',
|
'name' => 'receipt_state',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'class' => 't',
|
'class' => 't',
|
||||||
@@ -235,12 +234,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'label' => $this->l('No')
|
'label' => $this->l('No')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'desc' => $this->l('You have to define if this state correspond to a product receipt on this order (partial or complete).
|
'desc' => $this->l('For this status, you have to define if products have been partially/completely received.
|
||||||
This permit to know if the concerned products have to be added in stock.')
|
This allows to know if the products ordered have to be added to the corresponding warehouse.'),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'radio',
|
'type' => 'radio',
|
||||||
'label' => $this->l('This state corresponds to a product pending receipt ?:'),
|
'label' => $this->l('Pending receipt:'),
|
||||||
'name' => 'pending_receipt',
|
'name' => 'pending_receipt',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'class' => 't',
|
'class' => 't',
|
||||||
@@ -257,7 +256,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'label' => $this->l('No')
|
'label' => $this->l('No')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'desc' => $this->l('You have to define if some products are pending receipt in this state.')
|
'desc' => $this->l('Does this status mean that you are waiting for the delivery ?')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
@@ -267,10 +266,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (Tools::isSubmit('addsupply_order_state'))
|
if (Tools::isSubmit('addsupply_order_state'))
|
||||||
$this->toolbar_title = $this->l('Stock : Add Supply order state');
|
$this->toolbar_title = $this->l('Stock : Add supply order status');
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->toolbar_title = $this->l('Stock : Update Supply order state');
|
$this->toolbar_title = $this->l('Stock : Update Supply order status');
|
||||||
|
|
||||||
$id_supply_order_state = Tools::getValue('id_supply_order_state', 0);
|
$id_supply_order_state = Tools::getValue('id_supply_order_state', 0);
|
||||||
|
|
||||||
@@ -279,14 +278,14 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->fields_form = array(
|
$this->fields_form = array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Supply Order State'),
|
'title' => $this->l('Supply Order status'),
|
||||||
'image' => '../img/admin/edit.gif'
|
'image' => '../img/admin/edit.gif'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'lang' => true,
|
'lang' => true,
|
||||||
'label' => $this->l('Name:'),
|
'label' => $this->l('Status:'),
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'size' => 50,
|
'size' => 50,
|
||||||
'required' => true
|
'required' => true
|
||||||
@@ -296,7 +295,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'label' => $this->l('Back office color:'),
|
'label' => $this->l('Back office color:'),
|
||||||
'name' => 'color',
|
'name' => 'color',
|
||||||
'size' => 20,
|
'size' => 20,
|
||||||
'desc' => $this->l('Back office background will be displayed in this color. HTML colors only (e.g.,').' "lightblue", "#CC6600")'
|
'desc' => $this->l('Back office background will be displayed in this color. HTML colors only'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
@@ -463,7 +462,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
public function initList()
|
public function initList()
|
||||||
{
|
{
|
||||||
$this->displayInformation($this->l('This interface allows you to manage supply orders.').'<br />');
|
$this->displayInformation($this->l('This interface allows you to manage supply orders.').'<br />');
|
||||||
$this->displayInformation($this->l('Also, it allows you to add and edit your own supply order states.'));
|
$this->displayInformation($this->l('Also, it allows you to add and edit your own supply order status.'));
|
||||||
|
|
||||||
// access
|
// access
|
||||||
if (!($this->tabAccess['add'] === '1'))
|
if (!($this->tabAccess['add'] === '1'))
|
||||||
@@ -479,7 +478,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
$this->addRowAction('delete');
|
$this->addRowAction('delete');
|
||||||
$this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6));
|
$this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6));
|
||||||
|
|
||||||
$this->toolbar_title = $this->l('Stock : Suppliers Orders States');
|
$this->toolbar_title = $this->l('Stock : Suppliers Orders status');
|
||||||
$first_list = parent::initList();
|
$first_list = parent::initList();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -517,28 +516,28 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
// redifine fields display
|
// redifine fields display
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'reference' => array(
|
'reference' => array(
|
||||||
'title' => $this->l('Order Reference'),
|
'title' => $this->l('Reference'),
|
||||||
'width' => 100,
|
'width' => 130,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'supplier' => array(
|
'supplier' => array(
|
||||||
'title' => $this->l('Supplier'),
|
'title' => $this->l('Supplier'),
|
||||||
'width' => 100,
|
'width' => 130,
|
||||||
'filter_key' => 's!name'
|
'filter_key' => 's!name'
|
||||||
),
|
),
|
||||||
'warehouse' => array(
|
'warehouse' => array(
|
||||||
'title' => $this->l('Warehouse'),
|
'title' => $this->l('Warehouse'),
|
||||||
'width' => 100,
|
'width' => 130,
|
||||||
'filter_key' => 'w!name'
|
'filter_key' => 'w!name'
|
||||||
),
|
),
|
||||||
'state' => array(
|
'state' => array(
|
||||||
'title' => $this->l('State'),
|
'title' => $this->l('Status'),
|
||||||
'width' => 200,
|
'width' => 200,
|
||||||
'filter_key' => 'stl!name',
|
'filter_key' => 'stl!name',
|
||||||
'color' => 'color',
|
'color' => 'color',
|
||||||
),
|
),
|
||||||
'date_add' => array(
|
'date_add' => array(
|
||||||
'title' => $this->l('Creation date'),
|
'title' => $this->l('Creation'),
|
||||||
'width' => 150,
|
'width' => 150,
|
||||||
'align' => 'right',
|
'align' => 'right',
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
@@ -546,7 +545,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'filter_key' => 'a!date_add'
|
'filter_key' => 'a!date_add'
|
||||||
),
|
),
|
||||||
'date_upd' => array(
|
'date_upd' => array(
|
||||||
'title' => $this->l('Last modification date'),
|
'title' => $this->l('Last modification'),
|
||||||
'width' => 150,
|
'width' => 150,
|
||||||
'align' => 'right',
|
'align' => 'right',
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
@@ -554,7 +553,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'filter_key' => 'a!date_upd'
|
'filter_key' => 'a!date_upd'
|
||||||
),
|
),
|
||||||
'date_delivery_expected' => array(
|
'date_delivery_expected' => array(
|
||||||
'title' => $this->l('Delivery date'),
|
'title' => $this->l('Delivery (expected)'),
|
||||||
'width' => 150,
|
'width' => 150,
|
||||||
'align' => 'right',
|
'align' => 'right',
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
@@ -563,7 +562,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
'id_pdf' => array(
|
'id_pdf' => array(
|
||||||
'title' => $this->l('PDF'),
|
'title' => $this->l('PDF'),
|
||||||
'width' => 50,
|
'width' => 80,
|
||||||
'callback' => 'printPDFIcons',
|
'callback' => 'printPDFIcons',
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'search' => false
|
'search' => false
|
||||||
@@ -639,7 +638,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
// defines the fields of the form to display
|
// defines the fields of the form to display
|
||||||
$this->fields_form[]['form'] = array(
|
$this->fields_form[]['form'] = array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('Supply Order State'),
|
'title' => $this->l('Supply Order Status'),
|
||||||
'image' => '../img/admin/cms.gif'
|
'image' => '../img/admin/cms.gif'
|
||||||
),
|
),
|
||||||
'input' => array(
|
'input' => array(
|
||||||
@@ -649,7 +648,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => $this->l('New state of the order:'),
|
'label' => $this->l('New status of the order:'),
|
||||||
'name' => 'id_supply_order_state',
|
'name' => 'id_supply_order_state',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
@@ -657,7 +656,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'id' => 'id_supply_order_state',
|
'id' => 'id_supply_order_state',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
),
|
),
|
||||||
'desc' => $this->l('Choose the new state of your order')
|
'desc' => $this->l('Choose the new status of your order')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
@@ -1056,7 +1055,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
$error_str .= '<li>'.$this->l('field ').$e.'</li>';
|
$error_str .= '<li>'.$this->l('field ').$e.'</li>';
|
||||||
$error_str .= '</ul>';
|
$error_str .= '</ul>';
|
||||||
|
|
||||||
$this->_errors[] = Tools::displayError($this->l('Please verify informations of the product: ').$entry->name.' '.$error_str);
|
$this->_errors[] = Tools::displayError($this->l('Please verify the informations of the product: ').$entry->name.' '.$error_str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$entry->save();
|
$entry->save();
|
||||||
@@ -1128,12 +1127,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
&& Tools::isSubmit('id_supply_order_state'))
|
&& Tools::isSubmit('id_supply_order_state'))
|
||||||
{
|
{
|
||||||
if ($this->tabAccess['edit'] != '1')
|
if ($this->tabAccess['edit'] != '1')
|
||||||
$this->_errors[] = Tools::displayError($this->l('You do not have permissions to change order state.'));
|
$this->_errors[] = Tools::displayError($this->l('You do not have permissions to change order status.'));
|
||||||
|
|
||||||
// get state ID
|
// get state ID
|
||||||
$id_state = (int)Tools::getValue('id_supply_order_state', 0);
|
$id_state = (int)Tools::getValue('id_supply_order_state', 0);
|
||||||
if ($id_state <= 0)
|
if ($id_state <= 0)
|
||||||
$this->_errors[] = Tools::displayError($this->l('The selected supply order state is not valid.'));
|
$this->_errors[] = Tools::displayError($this->l('The selected supply order status is not valid.'));
|
||||||
|
|
||||||
// get supply order ID
|
// get supply order ID
|
||||||
$id_supply_order = (int)Tools::getValue('id_supply_order', 0);
|
$id_supply_order = (int)Tools::getValue('id_supply_order', 0);
|
||||||
@@ -1162,7 +1161,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
// special case of validate state - check if there are products in the order and the required state is not an enclosed state
|
// special case of validate state - check if there are products in the order and the required state is not an enclosed state
|
||||||
if ($supply_order->isEditable() && !$supply_order->hasEntries() && !$new_state->enclosed)
|
if ($supply_order->isEditable() && !$supply_order->hasEntries() && !$new_state->enclosed)
|
||||||
$this->_errors[] = Tools::displayError(
|
$this->_errors[] = Tools::displayError(
|
||||||
$this->l('It is not possible to change the state of this order because of no product are present in it')
|
$this->l('It is not possible to change the status of this order because you did not order any products')
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!count($this->_errors))
|
if (!count($this->_errors))
|
||||||
@@ -1397,7 +1396,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'history_state_name' => array(
|
'history_state_name' => array(
|
||||||
'title' => $this->l('State'),
|
'title' => $this->l('Status'),
|
||||||
'width' => 100,
|
'width' => 100,
|
||||||
'align' => 'left',
|
'align' => 'left',
|
||||||
'color' => 'color',
|
'color' => 'color',
|
||||||
|
|||||||
Reference in New Issue
Block a user