// 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:
bMancone
2011-11-28 11:12:17 +00:00
parent b957188797
commit 7fd28f56b6
6 changed files with 62 additions and 60 deletions
@@ -30,7 +30,7 @@
<input type="hidden" name="controller" value="AdminStockCover" />
<input type="hidden" name="token" value="{$token}" />
{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();">
{foreach from=$stock_cover_periods key=k item=i}
<option {if $i == $stock_cover_cur_period} selected="selected"{/if} value="{$i}">{$k}</option>
@@ -44,6 +44,6 @@
{/foreach}
</select>
{/if}
</form>"admin-dev/themes/template/supply_orders/view.tpl"
</form>
</div>
{/block}
@@ -31,7 +31,7 @@
<input type="hidden" name="token" value="{$token}" />
{if count($stock_instant_state_warehouses) > 0}
<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();">
{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>
@@ -28,7 +28,7 @@
{if count($list_warehouses) > 0}
<div class="filter-stock">
<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="token" value="{$token}" />
<select name="id_warehouse" onChange="$(this).parent().submit();">
@@ -246,7 +246,7 @@ class AdminStockManagementControllerCore extends AdminController
),
array(
'type' => 'select',
'label' => $this->l('Reason :'),
'label' => $this->l('Label :'),
'name' => 'id_stock_mvt_reason',
'required' => true,
'options' => array(
@@ -256,7 +256,7 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_stock_mvt_reason',
'name' => 'name'
),
'desc' => $this->l('Reason used in stock movements'),
'desc' => $this->l('Label used in stock movements'),
),
),
'submit' => array(
@@ -361,7 +361,7 @@ class AdminStockManagementControllerCore extends AdminController
),
array(
'type' => 'select',
'label' => $this->l('Reason :'),
'label' => $this->l('Label :'),
'name' => 'id_stock_mvt_reason',
'required' => true,
'options' => array(
@@ -371,7 +371,7 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_stock_mvt_reason',
'name' => 'name'
),
'desc' => $this->l('Reason used in stock movements'),
'desc' => $this->l('Label used in stock movements'),
),
),
'submit' => array(
+16 -13
View File
@@ -77,7 +77,7 @@ class AdminStockMvtControllerCore extends AdminController
'title' => $this->l('Options'),
'fields' => 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',
'type' => 'select',
'list' => $reasons_inc,
@@ -85,7 +85,7 @@ class AdminStockMvtControllerCore extends AdminController
'visibility' => Shop::CONTEXT_ALL
),
'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',
'type' => 'select',
'list' => $reasons_dec,
@@ -93,7 +93,7 @@ class AdminStockMvtControllerCore extends AdminController
'visibility' => Shop::CONTEXT_ALL
),
'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',
'type' => 'select',
'list' => $reasons_dec,
@@ -101,7 +101,7 @@ class AdminStockMvtControllerCore extends AdminController
'visibility' => Shop::CONTEXT_ALL
),
'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',
'type' => 'select',
'list' => $reasons_inc,
@@ -115,6 +115,8 @@ class AdminStockMvtControllerCore extends AdminController
$this->tpl_list_vars['list_warehouses'] = array();
$this->_where = ' AND a.deleted = 0';
parent::__construct();
}
@@ -124,11 +126,11 @@ class AdminStockMvtControllerCore extends AdminController
*/
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(
'legend' => array(
'title' => $this->l('Stock Movement Reason'),
'title' => $this->l('Stock Movement Label'),
'image' => '../img/admin/edit.gif'
),
'input' => array(
@@ -178,7 +180,7 @@ class AdminStockMvtControllerCore extends AdminController
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('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
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('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();
/*
@@ -232,22 +234,22 @@ class AdminStockMvtControllerCore extends AdminController
// redifine fields display
$this->fieldsDisplay = array(
'product_reference' => array(
'title' => $this->l('Product Reference'),
'title' => $this->l('Reference'),
'width' => 100,
'havingFilter' => true
),
'product_ean13' => array(
'title' => $this->l('Product EAN 13'),
'title' => $this->l('EAN 13'),
'width' => 75,
'havingFilter' => true
),
'product_upc' => array(
'title' => $this->l('Product UPC'),
'title' => $this->l('UPC'),
'width' => 75,
'havingFilter' => true
),
'product_name' => array(
'title' => $this->l('Product Name'),
'title' => $this->l('Name'),
'havingFilter' => true
),
'sign' => array(
@@ -279,7 +281,7 @@ class AdminStockMvtControllerCore extends AdminController
'filter_key' => 'a!price_te'
),
'reason' => array(
'title' => $this->l('Reason'),
'title' => $this->l('Label'),
'width' => 100,
'havingFilter' => true
),
@@ -298,6 +300,7 @@ class AdminStockMvtControllerCore extends AdminController
);
// make new query
unset ($this->_where);
$this->_select = '
CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name,
CONCAT(a.employee_lastname, \' \', a.employee_firstname) AS employee,
@@ -153,28 +153,28 @@ class AdminSupplyOrdersControllerCore extends AdminController
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Supply Order State'),
'title' => $this->l('Supply Order Status'),
'image' => '../img/admin/edit.gif'
),
'input' => array(
array(
'type' => 'text',
'lang' => true,
'label' => $this->l('Name:'),
'label' => $this->l('Status:'),
'name' => 'name',
'size' => 50,
'required' => true
),
array(
'type' => 'color',
'label' => $this->l('Back office color:'),
'label' => $this->l('Color:'),
'name' => 'color',
'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(
'type' => 'radio',
'label' => $this->l('Is the order editable in this state?:'),
'label' => $this->l('Editable:'),
'name' => 'editable',
'required' => true,
'class' => 't',
@@ -191,12 +191,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
'label' => $this->l('No')
)
),
'desc' => $this->l('You have to define if it is possible to edit the order in this state.
An editable order is an order not valid to send to the supplier.')
'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.')
),
array(
'type' => 'radio',
'label' => $this->l('Is the delivery note function is available in this state?:'),
'label' => $this->l('Delivery note:'),
'name' => 'delivery_note',
'required' => true,
'class' => 't',
@@ -213,12 +213,11 @@ class AdminSupplyOrdersControllerCore extends AdminController
'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.
The order has to be valid to use this function.')
'desc' => $this->l('For this status, you have to define if it is possible to generate the delivery note of the order.')
),
array(
'type' => 'radio',
'label' => $this->l('This state corresponds to a delivery state ?:'),
'label' => $this->l('Delivery state:'),
'name' => 'receipt_state',
'required' => true,
'class' => 't',
@@ -235,12 +234,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
'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).
This permit to know if the concerned products have to be added in stock.')
'desc' => $this->l('For this status, you have to define if products have been partially/completely received.
This allows to know if the products ordered have to be added to the corresponding warehouse.'),
),
array(
'type' => 'radio',
'label' => $this->l('This state corresponds to a product pending receipt ?:'),
'label' => $this->l('Pending receipt:'),
'name' => 'pending_receipt',
'required' => true,
'class' => 't',
@@ -257,7 +256,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'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(
@@ -267,10 +266,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
);
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
{
$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);
@@ -279,14 +278,14 @@ class AdminSupplyOrdersControllerCore extends AdminController
{
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Supply Order State'),
'title' => $this->l('Supply Order status'),
'image' => '../img/admin/edit.gif'
),
'input' => array(
array(
'type' => 'text',
'lang' => true,
'label' => $this->l('Name:'),
'label' => $this->l('Status:'),
'name' => 'name',
'size' => 50,
'required' => true
@@ -296,7 +295,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'label' => $this->l('Back office color:'),
'name' => 'color',
'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(
@@ -463,7 +462,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
public function initList()
{
$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
if (!($this->tabAccess['add'] === '1'))
@@ -479,7 +478,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->addRowAction('delete');
$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();
/*
@@ -517,28 +516,28 @@ class AdminSupplyOrdersControllerCore extends AdminController
// redifine fields display
$this->fieldsDisplay = array(
'reference' => array(
'title' => $this->l('Order Reference'),
'width' => 100,
'title' => $this->l('Reference'),
'width' => 130,
'havingFilter' => true
),
'supplier' => array(
'title' => $this->l('Supplier'),
'width' => 100,
'width' => 130,
'filter_key' => 's!name'
),
'warehouse' => array(
'title' => $this->l('Warehouse'),
'width' => 100,
'width' => 130,
'filter_key' => 'w!name'
),
'state' => array(
'title' => $this->l('State'),
'title' => $this->l('Status'),
'width' => 200,
'filter_key' => 'stl!name',
'color' => 'color',
),
'date_add' => array(
'title' => $this->l('Creation date'),
'title' => $this->l('Creation'),
'width' => 150,
'align' => 'right',
'type' => 'date',
@@ -546,7 +545,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'filter_key' => 'a!date_add'
),
'date_upd' => array(
'title' => $this->l('Last modification date'),
'title' => $this->l('Last modification'),
'width' => 150,
'align' => 'right',
'type' => 'date',
@@ -554,7 +553,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'filter_key' => 'a!date_upd'
),
'date_delivery_expected' => array(
'title' => $this->l('Delivery date'),
'title' => $this->l('Delivery (expected)'),
'width' => 150,
'align' => 'right',
'type' => 'date',
@@ -563,7 +562,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
),
'id_pdf' => array(
'title' => $this->l('PDF'),
'width' => 50,
'width' => 80,
'callback' => 'printPDFIcons',
'orderby' => false,
'search' => false
@@ -639,7 +638,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
// defines the fields of the form to display
$this->fields_form[]['form'] = array(
'legend' => array(
'title' => $this->l('Supply Order State'),
'title' => $this->l('Supply Order Status'),
'image' => '../img/admin/cms.gif'
),
'input' => array(
@@ -649,7 +648,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
),
array(
'type' => 'select',
'label' => $this->l('New state of the order:'),
'label' => $this->l('New status of the order:'),
'name' => 'id_supply_order_state',
'required' => true,
'options' => array(
@@ -657,7 +656,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'id' => 'id_supply_order_state',
'name' => 'name'
),
'desc' => $this->l('Choose the new state of your order')
'desc' => $this->l('Choose the new status of your order')
),
),
'submit' => array(
@@ -1056,7 +1055,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
$error_str .= '<li>'.$this->l('field ').$e.'</li>';
$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
$entry->save();
@@ -1128,12 +1127,12 @@ class AdminSupplyOrdersControllerCore extends AdminController
&& Tools::isSubmit('id_supply_order_state'))
{
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
$id_state = (int)Tools::getValue('id_supply_order_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
$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
if ($supply_order->isEditable() && !$supply_order->hasEntries() && !$new_state->enclosed)
$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))
@@ -1397,7 +1396,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'havingFilter' => true
),
'history_state_name' => array(
'title' => $this->l('State'),
'title' => $this->l('Status'),
'width' => 100,
'align' => 'left',
'color' => 'color',