// update stock tab

This commit is contained in:
Sarah Lorenzini
2013-08-05 12:13:43 +02:00
parent 9f11ecfd78
commit 6533ee4bec
11 changed files with 184 additions and 261 deletions
@@ -41,7 +41,7 @@
{if count($stock_cover_warehouses) > 0} {if count($stock_cover_warehouses) > 0}
<div> <div>
<label for="id_warehouse">{l s='Filter by 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_cover_warehouses key=k item=i} {foreach from=$stock_cover_warehouses key=k item=i}
<option {if $i.id_warehouse == $stock_cover_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option> <option {if $i.id_warehouse == $stock_cover_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach} {/foreach}
@@ -44,77 +44,69 @@
<p>&nbsp;</p> <p>&nbsp;</p>
<table class="table_grid"> <table
<tr> id="products_in_supply_order"
<td> class="table"
<table >
id="products_in_supply_order" <thead>
class="table" <tr class="nodrag nodrop">
cellpadding="0" cellspacing="0" <th width="150">{l s='Reference'}</th>
style="width: 100%; margin-bottom:10px;" <th width="50">{l s='EAN13'}</th>
> <th width="50">{l s='UPC'}</th>
<thead> <th width="150">{l s='Supplier Reference'}</th>
<tr class="nodrag nodrop"> <th>{l s='Name'}</th>
<th style="width: 150px">{l s='Reference'}</th> <th width="100">{l s='Unit Price (tax excl.)'}</th>
<th style="width: 50px">{l s='EAN13'}</th> <th width="100">{l s='Quantity'}</th>
<th style="width: 50px">{l s='UPC'}</th> <th width="100">{l s='Discount rate'}</th>
<th style="width: 150px">{l s='Supplier Reference'}</th> <th width="100">{l s='Tax rate'}</th>
<th>{l s='Name'}</th> <th width="40">{l s='Delete'}</th>
<th style="width: 100px">{l s='Unit Price (tax excl.)'}</th> </tr>
<th style="width: 100px">{l s='Quantity'}</th> </thead>
<th style="width: 100px">{l s='Discount rate'}</th> <tbody>
<th style="width: 100px">{l s='Tax rate'}</th> {foreach $products_list AS $product}
<th style="width: 40px">{l s='Delete'}</th> <tr>
</tr> <td>
</thead> {$product.reference}
<tbody> <input type="hidden" name="input_check_{$product.id_product}_{$product.id_product_attribute}" value="{$product.checksum}" />
{foreach $products_list AS $product} <input type="hidden" name="input_reference_{$product.id_product}_{$product.id_product_attribute}" value="{$product.reference}" />
<tr style="height:50px;"> <input type="hidden" name="input_id_{$product.id_product}_{$product.id_product_attribute}" value="{if isset($product.id_supply_order_detail)}{$product.id_supply_order_detail}{/if}" />
<td> </td>
{$product.reference} <td>
<input type="hidden" name="input_check_{$product.id_product}_{$product.id_product_attribute}" value="{$product.checksum}" /> {$product.ean13}
<input type="hidden" name="input_reference_{$product.id_product}_{$product.id_product_attribute}" value="{$product.reference}" /> <input type="hidden" name="input_ean13_{$product.id_product}_{$product.id_product_attribute}" value="{$product.ean13}" />
<input type="hidden" name="input_id_{$product.id_product}_{$product.id_product_attribute}" value="{if isset($product.id_supply_order_detail)}{$product.id_supply_order_detail}{/if}" /> </td>
</td> <td>
<td> {$product.upc}
{$product.ean13} <input type="hidden" name="input_upc_{$product.id_product}_{$product.id_product_attribute}" value="{$product.upc}" />
<input type="hidden" name="input_ean13_{$product.id_product}_{$product.id_product_attribute}" value="{$product.ean13}" /> </td>
</td> <td>
<td> {$product.supplier_reference}
{$product.upc} <input type="hidden" name="input_supplier_reference_{$product.id_product}_{$product.id_product_attribute}" value="{$product.supplier_reference}" />
<input type="hidden" name="input_upc_{$product.id_product}_{$product.id_product_attribute}" value="{$product.upc}" /> </td>
</td> <td>
<td> {$product.name}
{$product.supplier_reference} <input type="hidden" name="input_name_{$product.id_product}_{$product.id_product_attribute}" value="{$product.name}" />
<input type="hidden" name="input_supplier_reference_{$product.id_product}_{$product.id_product_attribute}" value="{$product.supplier_reference}" /> </td>
</td> <td>
<td> {$currency->prefix}&nbsp;<input type="text" name="input_unit_price_te_{$product.id_product}_{$product.id_product_attribute}" value="{$product.unit_price_te|htmlentities}" size="8" />&nbsp;{$currency->suffix}
{$product.name} </td>
<input type="hidden" name="input_name_{$product.id_product}_{$product.id_product_attribute}" value="{$product.name}" /> <td>
</td> <input type="text" name="input_quantity_expected_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity_expected|htmlentities}" size="5" />
<td class="center"> </td>
{$currency->prefix}&nbsp;<input type="text" name="input_unit_price_te_{$product.id_product}_{$product.id_product_attribute}" value="{$product.unit_price_te|htmlentities}" size="8" />&nbsp;{$currency->suffix} <td>
</td> <input type="text" name="input_discount_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.discount_rate, 4)}" size="5" />%
<td class="center"> </td>
<input type="text" name="input_quantity_expected_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity_expected|htmlentities}" size="5" /> <td>
</td> <input type="text" name="input_tax_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.tax_rate, 4)}" size="5" />%
<td class="center"> </td>
<input type="text" name="input_discount_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.discount_rate, 4)}" size="5" />% <td>
</td> <a href="#" id="deletelink|{$product.id_product}_{$product.id_product_attribute}" class="removeProductFromSupplyOrderLink">
<td class="center"> <img src="../img/admin/delete.gif" alt="{l s='Remove this product from the order.'}" title="{l s='Remove this product from the order.'}" />
<input type="text" name="input_tax_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.tax_rate, 4)}" size="5" />% </a>
</td> </td>
<td class="center"> </tr>
<a href="#" id="deletelink|{$product.id_product}_{$product.id_product_attribute}" class="removeProductFromSupplyOrderLink"> {/foreach}
<img src="../img/admin/delete.gif" alt="{l s='Remove this product from the order.'}" title="{l s='Remove this product from the order.'}" /> </tbody>
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</td>
</tr>
</table> </table>
</fieldset> </fieldset>
@@ -37,7 +37,7 @@
{/foreach} {/foreach}
</select> </select>
</div> </div>
<div style="margin-top: 5px;"> <div>
<label for="filter_status">{l s='Choose not to display completed/canceled orders:'}</label> <label for="filter_status">{l s='Choose not to display completed/canceled orders:'}</label>
<input type="checkbox" name="filter_status" class="noborder" onChange="$(this).parent().parent().submit();" {if $filter_status == 1}value="on" checked{/if}></input> <input type="checkbox" name="filter_status" class="noborder" onChange="$(this).parent().parent().submit();" {if $filter_status == 1}value="on" checked{/if}></input>
</div> </div>
@@ -25,10 +25,13 @@
{extends file="helpers/view/view.tpl"} {extends file="helpers/view/view.tpl"}
{block name="override_tpl"} {block name="override_tpl"}
<div style="margin-top: 20px;"> <div class="row">
<fieldset> <fieldset class="col-lg-12">
<legend>{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='General information'}</legend> <h3>
<table style="width: 400px;" classe="table"> <i class="icon-info"></i>
{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='General information'}
</h3>
<table classe="table">
<tr> <tr>
<td>{l s='Creation date:'}</td> <td>{l s='Creation date:'}</td>
<td>{$supply_order_creation_date}</td> <td>{$supply_order_creation_date}</td>
@@ -61,20 +64,26 @@
</fieldset> </fieldset>
</div> </div>
<div style="margin-top: 20px;"> <div class="row">
<fieldset> <fieldset class="col-lg-12">
<legend>{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Products:'}</legend> <h3>
<i class="icon-dropbox"></i>
{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Products:'}
</h3>
{$supply_order_detail_content} {$supply_order_detail_content}
</fieldset> </fieldset>
</div> </div>
<div style="margin-top: 20px;"> <div class="row">
<fieldset> <fieldset class="col-lg-12">
<legend>{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Summary'}</legend> <h3>
<table style="width: 400px;" classe="table"> <i class="icon-th-list"></i>
{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Summary'}
</h3>
<table classe="table">
<tr> <tr>
<th>{l s='Designation'}</th> <th>{l s='Designation'}</th>
<th width="100px">{l s='Value'}</th> <th>{l s='Value'}</th>
</tr> </tr>
<tr> <tr>
<td bgcolor="#000000"></td> <td bgcolor="#000000"></td>
@@ -82,15 +91,15 @@
</tr> </tr>
<tr> <tr>
<td>{l s='Total (tax excl.)'}</td> <td>{l s='Total (tax excl.)'}</td>
<td align="right">{$supply_order_total_te}</td> <td>{$supply_order_total_te}</td>
</tr> </tr>
<tr> <tr>
<td>{l s='Discount'}</td> <td>{l s='Discount'}</td>
<td align="right">{$supply_order_discount_value_te}</td> <td>{$supply_order_discount_value_te}</td>
</tr> </tr>
<tr> <tr>
<td>{l s='Total with discount (tax excl.)'}</td> <td>{l s='Total with discount (tax excl.)'}</td>
<td align="right">{$supply_order_total_with_discount_te}</td> <td>{$supply_order_total_with_discount_te}</td>
</tr> </tr>
<tr> <tr>
<td bgcolor="#000000"></td> <td bgcolor="#000000"></td>
@@ -98,11 +107,11 @@
</tr> </tr>
<tr> <tr>
<td>{l s='Total Tax'}</td> <td>{l s='Total Tax'}</td>
<td align="right">{$supply_order_total_tax}</td> <td>{$supply_order_total_tax}</td>
</tr> </tr>
<tr> <tr>
<td>{l s='Total (tax incl.)'}</td> <td>{l s='Total (tax incl.)'}</td>
<td align="right">{$supply_order_total_ti}</td> <td>{$supply_order_total_ti}</td>
</tr> </tr>
<tr> <tr>
<td bgcolor="#000000"></td> <td bgcolor="#000000"></td>
@@ -110,7 +119,7 @@
</tr> </tr>
<tr> <tr>
<td>{l s='Total to pay.'}</td> <td>{l s='Total to pay.'}</td>
<td align="right">{$supply_order_total_ti}</td> <td>{$supply_order_total_ti}</td>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
@@ -34,6 +34,7 @@ class AdminStockConfigurationControllerCore extends AdminController
*/ */
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->context = Context::getContext(); $this->context = Context::getContext();
$this->table = 'stock_mvt_reason'; $this->table = 'stock_mvt_reason';
$this->className = 'StockMvtReason'; $this->className = 'StockMvtReason';
@@ -45,12 +46,10 @@ class AdminStockConfigurationControllerCore extends AdminController
'id_stock_mvt_reason' => array( 'id_stock_mvt_reason' => array(
'title' => $this->l('ID'), 'title' => $this->l('ID'),
'align' => 'center', 'align' => 'center',
'width' => 40,
'search' => false, 'search' => false,
), ),
'sign' => array( 'sign' => array(
'title' => $this->l('Sign'), 'title' => $this->l('Sign'),
'width' => 100,
'align' => 'center', 'align' => 'center',
'type' => 'select', 'type' => 'select',
'filter_key' => 'a!sign', 'filter_key' => 'a!sign',
@@ -66,8 +65,7 @@ class AdminStockConfigurationControllerCore extends AdminController
), ),
'name' => array( 'name' => array(
'title' => $this->l('Name'), 'title' => $this->l('Name'),
'filter_key' => 'b!name', 'filter_key' => 'b!name'
'width' => 250
), ),
); );
@@ -156,7 +154,7 @@ class AdminStockConfigurationControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Stock Movement label'), 'title' => $this->l('Stock Movement label'),
'image' => '../img/admin/edit.gif' 'icon' => 'icon-pencil'
), ),
'input' => array( 'input' => array(
array( array(
@@ -164,7 +162,6 @@ class AdminStockConfigurationControllerCore extends AdminController
'lang' => true, 'lang' => true,
'label' => $this->l('Name:'), 'label' => $this->l('Name:'),
'name' => 'name', 'name' => 'name',
'size' => 50,
'required' => true 'required' => true
), ),
array( array(
@@ -186,12 +183,12 @@ class AdminStockConfigurationControllerCore extends AdminController
'id' => 'id', 'id' => 'id',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Select the corresponding action: Increase or decrease stock?') 'hint' => $this->l('Select the corresponding action: Increase or decrease stock?')
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save'), 'title' => $this->l('Save'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
} }
@@ -204,7 +201,7 @@ class AdminStockConfigurationControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Supply Order Status'), 'title' => $this->l('Supply Order Status'),
'image' => '../img/admin/edit.gif' 'icon' => 'icon-pencil'
), ),
'input' => array( 'input' => array(
array( array(
@@ -212,22 +209,19 @@ class AdminStockConfigurationControllerCore extends AdminController
'lang' => true, 'lang' => true,
'label' => $this->l('Status:'), 'label' => $this->l('Status:'),
'name' => 'name', 'name' => 'name',
'size' => 50,
'required' => true 'required' => true
), ),
array( array(
'type' => 'color', 'type' => 'color',
'label' => $this->l('Color:'), 'label' => $this->l('Color:'),
'name' => 'color', 'name' => 'color',
'size' => 20, 'hint' => $this->l('The background of the PrestaShop Back Office will be displayed in this color (HTML colors only, please).'),
'desc' => $this->l('The background of the PrestaShop Back Office will be displayed in this color (HTML colors only, please).'),
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Editable:'), 'label' => $this->l('Editable:'),
'name' => 'editable', 'name' => 'editable',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -241,14 +235,13 @@ class AdminStockConfigurationControllerCore extends AdminController
'label' => $this->l('No') 'label' => $this->l('No')
) )
), ),
'desc' => $this->l('Is it is possible to edit the order? Keep in mind that an editable order can not be sent to the supplier.') 'hint' => $this->l('Is it is possible to edit the order? Keep in mind that an editable order can not be sent to the supplier.')
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Delivery note:'), 'label' => $this->l('Delivery note:'),
'name' => 'delivery_note', 'name' => 'delivery_note',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -262,14 +255,13 @@ class AdminStockConfigurationControllerCore extends AdminController
'label' => $this->l('No') 'label' => $this->l('No')
) )
), ),
'desc' => $this->l('Is it possible to generate a delivery note for the order?') 'hint' => $this->l('Is it possible to generate a delivery note for the order?')
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Delivery state:'), 'label' => $this->l('Delivery state:'),
'name' => 'receipt_state', 'name' => 'receipt_state',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -283,14 +275,13 @@ class AdminStockConfigurationControllerCore extends AdminController
'label' => $this->l('No') 'label' => $this->l('No')
) )
), ),
'desc' => $this->l('Define if products have been either partially or completely received. This will allow you to know if ordered products have to be added to the corresponding warehouse.'), 'hint' => $this->l('Define if products have been either partially or completely received. This will allow you to know if ordered products have to be added to the corresponding warehouse.'),
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Pending receipt:'), 'label' => $this->l('Pending receipt:'),
'name' => 'pending_receipt', 'name' => 'pending_receipt',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -304,12 +295,12 @@ class AdminStockConfigurationControllerCore extends AdminController
'label' => $this->l('No') 'label' => $this->l('No')
) )
), ),
'desc' => $this->l('The customer is awaiting delivery.') 'hint' => $this->l('The customer is awaiting delivery.')
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save'), 'title' => $this->l('Save'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
@@ -327,7 +318,7 @@ class AdminStockConfigurationControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Supply order status'), 'title' => $this->l('Supply order status'),
'image' => '../img/admin/edit.gif' 'icon' => 'icon-pencil'
), ),
'input' => array( 'input' => array(
array( array(
@@ -335,20 +326,18 @@ class AdminStockConfigurationControllerCore extends AdminController
'lang' => true, 'lang' => true,
'label' => $this->l('Status:'), 'label' => $this->l('Status:'),
'name' => 'name', 'name' => 'name',
'size' => 50,
'required' => true 'required' => true
), ),
array( array(
'type' => 'color', 'type' => 'color',
'label' => $this->l('Back Office color:'), 'label' => $this->l('Back Office color:'),
'name' => 'color', 'name' => 'color',
'size' => 20,
'desc' => $this->l('The background of PrestaShop\'s Back Office will be displayed in this color (HTML colors only, please).'), 'desc' => $this->l('The background of PrestaShop\'s Back Office will be displayed in this color (HTML colors only, please).'),
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save'), 'title' => $this->l('Save'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
} }
@@ -34,6 +34,7 @@ class AdminStockCoverControllerCore extends AdminController
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->context = Context::getContext(); $this->context = Context::getContext();
$this->table = 'product'; $this->table = 'product';
$this->className = 'Product'; $this->className = 'Product';
@@ -45,19 +46,16 @@ class AdminStockCoverControllerCore extends AdminController
'reference' => array( 'reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'align' => 'center', 'align' => 'center',
'width' => 200,
'filter_key' => 'a!reference' 'filter_key' => 'a!reference'
), ),
'ean13' => array( 'ean13' => array(
'title' => $this->l('EAN13'), 'title' => $this->l('EAN13'),
'align' => 'center', 'align' => 'center',
'width' => 100,
'filter_key' => 'a!ean13' 'filter_key' => 'a!ean13'
), ),
'upc' => array( 'upc' => array(
'title' => $this->l('UPC'), 'title' => $this->l('UPC'),
'align' => 'center', 'align' => 'center',
'width' => 100,
'filter_key' => 'a!upc' 'filter_key' => 'a!upc'
), ),
'name' => array( 'name' => array(
@@ -66,21 +64,18 @@ class AdminStockCoverControllerCore extends AdminController
), ),
'qty_sold' => array( 'qty_sold' => array(
'title' => $this->l('Quantity sold'), 'title' => $this->l('Quantity sold'),
'width' => 160,
'orderby' => false, 'orderby' => false,
'search' => false, 'search' => false,
'hint' => $this->l('Quantity sold during the defined period.'), 'hint' => $this->l('Quantity sold during the defined period.'),
), ),
'coverage' => array( 'coverage' => array(
'title' => $this->l('Coverage'), 'title' => $this->l('Coverage'),
'width' => 160,
'orderby' => false, 'orderby' => false,
'search' => false, 'search' => false,
'hint' => $this->l('Days left before your stock runs out.'), 'hint' => $this->l('Days left before your stock runs out.'),
), ),
'stock' => array( 'stock' => array(
'title' => $this->l('Quantity'), 'title' => $this->l('Quantity'),
'width' => 80,
'orderby' => false, 'orderby' => false,
'search' => false, 'search' => false,
'hint' => $this->l('Physical (usable) quantity.') 'hint' => $this->l('Physical (usable) quantity.')
@@ -33,6 +33,7 @@ class AdminStockInstantStateControllerCore extends AdminController
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->context = Context::getContext(); $this->context = Context::getContext();
$this->table = 'stock'; $this->table = 'stock';
$this->className = 'Stock'; $this->className = 'Stock';
@@ -43,18 +44,15 @@ class AdminStockInstantStateControllerCore extends AdminController
'reference' => array( 'reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'align' => 'center', 'align' => 'center',
'width' => 200,
'havingFilter' => true 'havingFilter' => true
), ),
'ean13' => array( 'ean13' => array(
'title' => $this->l('EAN13'), 'title' => $this->l('EAN13'),
'align' => 'center', 'align' => 'center',
'width' => 100,
), ),
'upc' => array( 'upc' => array(
'title' => $this->l('UPC'), 'title' => $this->l('UPC'),
'align' => 'center', 'align' => 'center',
'width' => 100,
), ),
'name' => array( 'name' => array(
'title' => $this->l('Name'), 'title' => $this->l('Name'),
@@ -62,7 +60,6 @@ class AdminStockInstantStateControllerCore extends AdminController
), ),
'price_te' => array( 'price_te' => array(
'title' => $this->l('Price (tax excl.)'), 'title' => $this->l('Price (tax excl.)'),
'width' => 150,
'orderby' => true, 'orderby' => true,
'search' => false, 'search' => false,
'type' => 'price', 'type' => 'price',
@@ -70,7 +67,6 @@ class AdminStockInstantStateControllerCore extends AdminController
), ),
'valuation' => array( 'valuation' => array(
'title' => $this->l('Valuation'), 'title' => $this->l('Valuation'),
'width' => 150,
'orderby' => true, 'orderby' => true,
'search' => false, 'search' => false,
'type' => 'price', 'type' => 'price',
@@ -94,7 +90,7 @@ class AdminStockInstantStateControllerCore extends AdminController
'width' => 80, 'width' => 80,
'orderby' => true, 'orderby' => true,
'search' => false, 'search' => false,
'hint' => $this->l('Pysical quantity (usable) - Client orders + Supply Orders'), 'hint' => $this->l('Physical quantity (usable) - Client orders + Supply Orders'),
), ),
); );
@@ -31,6 +31,7 @@ class AdminStockManagementControllerCore extends AdminController
{ {
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->context = Context::getContext(); $this->context = Context::getContext();
$this->table = 'product'; $this->table = 'product';
$this->className = 'Product'; $this->className = 'Product';
@@ -41,31 +42,27 @@ class AdminStockManagementControllerCore extends AdminController
'reference' => array( 'reference' => array(
'title' => $this->l('Product reference'), 'title' => $this->l('Product reference'),
'align' => 'center', 'align' => 'center',
'filter_key' => 'a!reference', 'filter_key' => 'a!reference'
'width' => 200
), ),
'ean13' => array( 'ean13' => array(
'title' => $this->l('EAN13'), 'title' => $this->l('EAN13'),
'align' => 'center', 'align' => 'center',
'filter_key' => 'a!ean13', 'filter_key' => 'a!ean13'
'width' => 100
), ),
'upc' => array( 'upc' => array(
'title' => $this->l('UPC'), 'title' => $this->l('UPC'),
'align' => 'center', 'align' => 'center',
'filter_key' => 'a!upc', 'filter_key' => 'a!upc'
'width' => 100
), ),
'name' => array( 'name' => array(
'title' => $this->l('Name'), 'title' => $this->l('Name')
), ),
'stock' => array( 'stock' => array(
'title' => $this->l('Quantity'), 'title' => $this->l('Quantity'),
'hint' => $this->l('Quantitity total for all warehouses.'),
'width' => 100,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
'hint' => $this->l('Quantitity total for all warehouses.')
), ),
); );
@@ -166,7 +163,7 @@ class AdminStockManagementControllerCore extends AdminController
$this->fields_form[]['form'] = array( $this->fields_form[]['form'] = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Add a product to your stock.'), 'title' => $this->l('Add a product to your stock.'),
'image' => '../img/admin/add_stock.png' 'icon' => 'icon-long-arrow-up'
), ),
'input' => array( 'input' => array(
array( array(
@@ -189,49 +186,43 @@ class AdminStockManagementControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'label' => $this->l('Product reference:'), 'label' => $this->l('Product reference:'),
'name' => 'reference', 'name' => 'reference',
'size' => 30,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('EAN13:'), 'label' => $this->l('EAN13:'),
'name' => 'ean13', 'name' => 'ean13',
'size' => 15,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('UPC:'), 'label' => $this->l('UPC:'),
'name' => 'upc', 'name' => 'upc',
'size' => 15,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Name:'), 'label' => $this->l('Name:'),
'name' => 'name', 'name' => 'name',
'size' => 75,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Quantity to add:'), 'label' => $this->l('Quantity to add:'),
'name' => 'quantity', 'name' => 'quantity',
'size' => 10,
'maxlength' => 6, 'maxlength' => 6,
'required' => true, 'required' => true,
'desc' => $this->l('Physical quantity to add'), 'hint' => array(
'hint' => sprintf( $this->l('Physical quantity to add'),
$this->l('Last physical quantity added : %s (%s)'), $this->l('Last physical quantity added : %s (%s)'),
($last_sm_quantity > 0 ? $last_sm_quantity : $this->l('N/A')), ($last_sm_quantity > 0 ? $last_sm_quantity : $this->l('N/A')),
($last_sm_quantity > 0 ? ($last_sm_quantity_is_usable >= 0 ? $this->l('Usable') : $this->l('Not usable')) : $this->l('N/A'))), ($last_sm_quantity > 0 ? ($last_sm_quantity_is_usable >= 0 ? $this->l('Usable') : $this->l('Not usable')) : $this->l('N/A'))),
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Usable for sale?'), 'label' => $this->l('Usable for sale?'),
'name' => 'usable', 'name' => 'usable',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -245,7 +236,7 @@ class AdminStockManagementControllerCore extends AdminController
'label' => $this->l('Disabled') 'label' => $this->l('Disabled')
) )
), ),
'desc' => $this->l('Is this quantity ready to be displayed in your shop, or is it reserved in the warehouse for other purposes?') 'hint' => $this->l('Is this quantity ready to be displayed in your shop, or is it reserved in the warehouse for other purposes?')
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -257,7 +248,7 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_warehouse', 'id' => 'id_warehouse',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Please select the warehouse that you\'ll be adding products to. ') 'hint' => $this->l('Please select the warehouse that you\'ll be adding products to. ')
), ),
array( array(
'type' => 'text', 'type' => 'text',
@@ -266,8 +257,10 @@ class AdminStockManagementControllerCore extends AdminController
'required' => true, 'required' => true,
'size' => 10, 'size' => 10,
'maxlength' => 10, 'maxlength' => 10,
'desc' => $this->l('Unit purchase price or unit manufacturing cost for this product (tax excl.)'), 'hint' => array(
'hint' => sprintf($this->l('Last unit price (tax excl.): %s'), $last_sm_unit_price_te), $this->l('Unit purchase price or unit manufacturing cost for this product (tax excl.)'),
sprintf($this->l('Last unit price (tax excl.): %s'), $last_sm_unit_price_te),
)
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -279,7 +272,7 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_currency', 'id' => 'id_currency',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('The currency associated to the product unit price.'), 'hint' => $this->l('The currency associated to the product unit price.'),
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -293,12 +286,12 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_stock_mvt_reason', 'id' => 'id_stock_mvt_reason',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Label used in stock movements'), 'hint' => $this->l('Label used in stock movements'),
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Add to stock'), 'title' => $this->l('Add to stock'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
$this->fields_value['usable'] = 1; $this->fields_value['usable'] = 1;
@@ -308,7 +301,7 @@ class AdminStockManagementControllerCore extends AdminController
$this->fields_form[]['form'] = array( $this->fields_form[]['form'] = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Remove the product from your stock.'), 'title' => $this->l('Remove the product from your stock.'),
'image' => '../img/admin/remove_stock.png' 'icon' => 'icon-long-arrow-down'
), ),
'input' => array( 'input' => array(
array( array(
@@ -331,38 +324,33 @@ class AdminStockManagementControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'label' => $this->l('Product reference:'), 'label' => $this->l('Product reference:'),
'name' => 'reference', 'name' => 'reference',
'size' => 30,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('EAN13:'), 'label' => $this->l('EAN13:'),
'name' => 'ean13', 'name' => 'ean13',
'size' => 15,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Name:'), 'label' => $this->l('Name:'),
'name' => 'name', 'name' => 'name',
'size' => 75,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Quantity to remove:'), 'label' => $this->l('Quantity to remove:'),
'name' => 'quantity', 'name' => 'quantity',
'size' => 10,
'maxlength' => 6, 'maxlength' => 6,
'required' => true, 'required' => true,
'desc' => $this->l('Physical quantity to remove'), 'hint' => $this->l('Physical quantity to remove'),
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Usable for sale:'), 'label' => $this->l('Usable for sale:'),
'name' => 'usable', 'name' => 'usable',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -376,7 +364,7 @@ class AdminStockManagementControllerCore extends AdminController
'label' => $this->l('Disabled') 'label' => $this->l('Disabled')
) )
), ),
'desc' => $this->l('Do you want to remove this quantity from the usable quantity (yes) or the physical quantity (no)?') 'hint' => $this->l('Do you want to remove this quantity from the usable quantity (yes) or the physical quantity (no)?')
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -388,7 +376,7 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_warehouse', 'id' => 'id_warehouse',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Select the warehouse you\'d like to remove the product from.') 'hint' => $this->l('Select the warehouse you\'d like to remove the product from.')
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -402,12 +390,12 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_stock_mvt_reason', 'id' => 'id_stock_mvt_reason',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Label used in stock movements'), 'hint' => $this->l('Label used in stock movements'),
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Remove from stock'), 'title' => $this->l('Remove from stock'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
break; break;
@@ -416,7 +404,7 @@ class AdminStockManagementControllerCore extends AdminController
$this->fields_form[]['form'] = array( $this->fields_form[]['form'] = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Transfer a product from one warehouse to another'), 'title' => $this->l('Transfer a product from one warehouse to another'),
'image' => '../img/admin/transfer_stock.png' 'icon' => 'icon-share-alt'
), ),
'input' => array( 'input' => array(
array( array(
@@ -439,31 +427,27 @@ class AdminStockManagementControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'label' => $this->l('Product reference:'), 'label' => $this->l('Product reference:'),
'name' => 'reference', 'name' => 'reference',
'size' => 30,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('EAN13:'), 'label' => $this->l('EAN13:'),
'name' => 'ean13', 'name' => 'ean13',
'size' => 15,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Name:'), 'label' => $this->l('Name:'),
'name' => 'name', 'name' => 'name',
'size' => 75,
'disabled' => true, 'disabled' => true,
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Quantity to transfer:'), 'label' => $this->l('Quantity to transfer:'),
'name' => 'quantity', 'name' => 'quantity',
'size' => 10,
'maxlength' => 6, 'maxlength' => 6,
'required' => true, 'required' => true,
'desc' => $this->l('Quantity to transfer:') 'hint' => $this->l('Quantity to transfer:')
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -475,14 +459,13 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_warehouse', 'id' => 'id_warehouse',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Select the warehouse you\'d like to transfer the product from.') 'hint' => $this->l('Select the warehouse you\'d like to transfer the product from.')
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Is this product usable in your source warehouse?'), 'label' => $this->l('Is this product usable in your source warehouse?'),
'name' => 'usable_from', 'name' => 'usable_from',
'required' => true, 'required' => true,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -496,7 +479,7 @@ class AdminStockManagementControllerCore extends AdminController
'label' => $this->l('Disabled') 'label' => $this->l('Disabled')
) )
), ),
'desc' => $this->l('Is this the usable quantity for sale?') 'hint' => $this->l('Is this the usable quantity for sale?')
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -508,10 +491,10 @@ class AdminStockManagementControllerCore extends AdminController
'id' => 'id_warehouse', 'id' => 'id_warehouse',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Select the warehouse you\'d like to transfer your product(s) to. ') 'hint' => $this->l('Select the warehouse you\'d like to transfer your product(s) to. ')
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Is this product for sale in your destination warehouse?'), 'label' => $this->l('Is this product for sale in your destination warehouse?'),
'name' => 'usable_to', 'name' => 'usable_to',
'required' => true, 'required' => true,
@@ -529,12 +512,12 @@ class AdminStockManagementControllerCore extends AdminController
'label' => $this->l('Disabled') 'label' => $this->l('Disabled')
) )
), ),
'desc' => $this->l('Do you want it to be for sale/useable?') 'hint' => $this->l('Do you want it to be for sale/useable?')
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Transfer'), 'title' => $this->l('Transfer'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
break; break;
@@ -31,6 +31,7 @@ class AdminStockMvtControllerCore extends AdminController
{ {
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->context = Context::getContext(); $this->context = Context::getContext();
$this->table = 'stock_mvt'; $this->table = 'stock_mvt';
$this->className = 'StockMvt'; $this->className = 'StockMvt';
@@ -44,17 +45,14 @@ class AdminStockMvtControllerCore extends AdminController
$this->fields_list = array( $this->fields_list = array(
'product_reference' => array( 'product_reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'width' => 100,
'havingFilter' => true 'havingFilter' => true
), ),
'product_ean13' => array( 'product_ean13' => array(
'title' => $this->l('EAN 13'), 'title' => $this->l('EAN 13'),
'width' => 75,
'havingFilter' => true 'havingFilter' => true
), ),
'product_upc' => array( 'product_upc' => array(
'title' => $this->l('UPC'), 'title' => $this->l('UPC'),
'width' => 75,
'havingFilter' => true 'havingFilter' => true
), ),
'product_name' => array( 'product_name' => array(
@@ -84,7 +82,6 @@ class AdminStockMvtControllerCore extends AdminController
), ),
'physical_quantity' => array( 'physical_quantity' => array(
'title' => $this->l('Quantity'), 'title' => $this->l('Quantity'),
'width' => 40,
'filter_key' => 'a!physical_quantity' 'filter_key' => 'a!physical_quantity'
), ),
'price_te' => array( 'price_te' => array(
@@ -97,17 +94,14 @@ class AdminStockMvtControllerCore extends AdminController
), ),
'reason' => array( 'reason' => array(
'title' => $this->l('Label'), 'title' => $this->l('Label'),
'width' => 100,
'havingFilter' => true 'havingFilter' => true
), ),
'employee' => array( 'employee' => array(
'title' => $this->l('Employee'), 'title' => $this->l('Employee'),
'width' => 100,
'havingFilter' => true 'havingFilter' => true
), ),
'date_add' => array( 'date_add' => array(
'title' => $this->l('Date'), 'title' => $this->l('Date'),
'width' => 150,
'align' => 'right', 'align' => 'right',
'type' => 'datetime', 'type' => 'datetime',
'filter_key' => 'a!date_add' 'filter_key' => 'a!date_add'
@@ -37,6 +37,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->context = Context::getContext(); $this->context = Context::getContext();
$this->table = 'supply_order'; $this->table = 'supply_order';
$this->className = 'SupplyOrder'; $this->className = 'SupplyOrder';
@@ -55,28 +56,23 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->fields_list = array( $this->fields_list = array(
'reference' => array( 'reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'width' => 250,
'havingFilter' => true 'havingFilter' => true
), ),
'supplier' => array( 'supplier' => array(
'title' => $this->l('Supplier'), 'title' => $this->l('Supplier'),
'width' => 130,
'filter_key' => 's!name' 'filter_key' => 's!name'
), ),
'warehouse' => array( 'warehouse' => array(
'title' => $this->l('Warehouse'), 'title' => $this->l('Warehouse'),
'width' => 130,
'filter_key' => 'w!name' 'filter_key' => 'w!name'
), ),
'state' => array( 'state' => array(
'title' => $this->l('Status'), 'title' => $this->l('Status'),
'width' => 200,
'filter_key' => 'stl!name', 'filter_key' => 'stl!name',
'color' => 'color', 'color' => 'color',
), ),
'date_add' => array( 'date_add' => array(
'title' => $this->l('Creation'), 'title' => $this->l('Creation'),
'width' => 150,
'align' => 'left', 'align' => 'left',
'type' => 'date', 'type' => 'date',
'havingFilter' => true, 'havingFilter' => true,
@@ -84,7 +80,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
), ),
'date_upd' => array( 'date_upd' => array(
'title' => $this->l('Last modification'), 'title' => $this->l('Last modification'),
'width' => 150,
'align' => 'left', 'align' => 'left',
'type' => 'date', 'type' => 'date',
'havingFilter' => true, 'havingFilter' => true,
@@ -92,7 +87,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
), ),
'date_delivery_expected' => array( 'date_delivery_expected' => array(
'title' => $this->l('Delivery (expected)'), 'title' => $this->l('Delivery (expected)'),
'width' => 150,
'align' => 'left', 'align' => 'left',
'type' => 'date', 'type' => 'date',
'havingFilter' => true, 'havingFilter' => true,
@@ -100,7 +94,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
), ),
'id_export' => array( 'id_export' => array(
'title' => $this->l('Export'), 'title' => $this->l('Export'),
'width' => 80,
'callback' => 'printExportIcons', 'callback' => 'printExportIcons',
'orderby' => false, 'orderby' => false,
'search' => false 'search' => false
@@ -203,16 +196,15 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Order information'), 'title' => $this->l('Order information'),
'image' => '../img/admin/edit.gif' 'icon' => 'icon-pencil'
), ),
'input' => array( 'input' => array(
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Reference:'), 'label' => $this->l('Reference:'),
'name' => 'reference', 'name' => 'reference',
'size' => 50,
'required' => true, 'required' => true,
'desc' => $this->l('Here\'s the reference number for your order.'), 'hint' => $this->l('Here\'s the reference number for your order.'),
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -224,8 +216,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
'id' => 'id_supplier', 'id' => 'id_supplier',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Select the supplier you\'ll be purchasing from.'), 'hint' => array(
'hint' => $this->l('Warning: All products already added to the order will be removed.') $this->l('Select the supplier you\'ll be purchasing from.'),
$this->l('Warning: All products already added to the order will be removed.')
)
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -237,7 +231,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
'id' => 'id_warehouse', 'id' => 'id_warehouse',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Which warehouse will the order be sent to?'), 'hint' => $this->l('Which warehouse will the order be sent to?'),
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -249,8 +243,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
'id' => 'id_currency', 'id' => 'id_currency',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('The currency of the order.'), 'hint' => array(
'hint' => $this->l('Warning: All products already added to the order will be removed.') $this->l('The currency of the order.'),
$this->l('Warning: All products already added to the order will be removed.')
)
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -262,24 +258,24 @@ class AdminSupplyOrdersControllerCore extends AdminController
'id' => 'id_lang', 'id' => 'id_lang',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('The language of the order.') 'hint' => $this->l('The language of the order.')
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Global discount rate (%):'), 'label' => $this->l('Global discount rate (%):'),
'name' => 'discount_rate', 'name' => 'discount_rate',
'size' => 10,
'required' => true, 'required' => true,
'desc' => $this->l('This is the global discount rate in percent for the order.'), 'hint' => $this->l('This is the global discount rate in percent for the order.'),
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Automatically load products:'), 'label' => $this->l('Automatically load products:'),
'name' => 'load_products', 'name' => 'load_products',
'size' => 10,
'required' => false, 'required' => false,
'hint' => $this->l('This will reset the order'), 'hint' => array(
'desc' => $this->l('If specified, each product quantity less than or equal to this value will be loaded.'), $this->l('This will reset the order'),
$this->l('If specified, each product quantity less than or equal to this value will be loaded.'),
),
), ),
), ),
'submit' => array( 'submit' => array(
@@ -307,7 +303,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'type' => 'date', 'type' => 'date',
'label' => $this->l('Expected delivery date:'), 'label' => $this->l('Expected delivery date:'),
'name' => 'date_delivery_expected', 'name' => 'date_delivery_expected',
'size' => 10,
'required' => true, 'required' => true,
'desc' => $this->l('The expected delivery date for this order is...'), 'desc' => $this->l('The expected delivery date for this order is...'),
); );
@@ -695,7 +690,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'supplier_reference' => array( 'supplier_reference' => array(
'title' => $this->l('Supplier Reference'), 'title' => $this->l('Supplier Reference'),
'align' => 'left', 'align' => 'left',
'width' => 50,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -703,7 +697,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'reference' => array( 'reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'align' => 'left', 'align' => 'left',
'width' => 30,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -711,7 +704,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'ean13' => array( 'ean13' => array(
'title' => $this->l('EAN13'), 'title' => $this->l('EAN13'),
'align' => 'left', 'align' => 'left',
'width' => 30,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -719,7 +711,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'upc' => array( 'upc' => array(
'title' => $this->l('UPC'), 'title' => $this->l('UPC'),
'align' => 'left', 'align' => 'left',
'width' => 30,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -727,7 +718,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'name' => array( 'name' => array(
'title' => $this->l('Name'), 'title' => $this->l('Name'),
'align' => 'left', 'align' => 'left',
'width' => 300,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -735,7 +725,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'quantity_received_today' => array( 'quantity_received_today' => array(
'title' => $this->l('Quantity received today?'), 'title' => $this->l('Quantity received today?'),
'align' => 'left', 'align' => 'left',
'width' => 20,
'type' => 'editable', 'type' => 'editable',
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
@@ -745,7 +734,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'quantity_received' => array( 'quantity_received' => array(
'title' => $this->l('Quantity received'), 'title' => $this->l('Quantity received'),
'align' => 'left', 'align' => 'left',
'width' => 20,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -762,7 +750,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'quantity_left' => array( 'quantity_left' => array(
'title' => $this->l('Quantity left'), 'title' => $this->l('Quantity left'),
'align' => 'left', 'align' => 'left',
'width' => 20,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1491,20 +1478,17 @@ class AdminSupplyOrdersControllerCore extends AdminController
$this->fields_list = array( $this->fields_list = array(
'history_date' => array( 'history_date' => array(
'title' => $this->l('Last update'), 'title' => $this->l('Last update'),
'width' => 50,
'align' => 'left', 'align' => 'left',
'type' => 'datetime', 'type' => 'datetime',
'havingFilter' => true 'havingFilter' => true
), ),
'history_employee' => array( 'history_employee' => array(
'title' => $this->l('Employee'), 'title' => $this->l('Employee'),
'width' => 100,
'align' => 'left', 'align' => 'left',
'havingFilter' => true 'havingFilter' => true
), ),
'history_state_name' => array( 'history_state_name' => array(
'title' => $this->l('Status'), 'title' => $this->l('Status'),
'width' => 100,
'align' => 'left', 'align' => 'left',
'color' => 'color', 'color' => 'color',
'havingFilter' => true 'havingFilter' => true
@@ -1726,7 +1710,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'supplier_reference' => array( 'supplier_reference' => array(
'title' => $this->l('Supplier Reference'), 'title' => $this->l('Supplier Reference'),
'align' => 'center', 'align' => 'center',
'width' => 120,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1734,7 +1717,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'reference' => array( 'reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'align' => 'center', 'align' => 'center',
'width' => 120,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1742,7 +1724,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'ean13' => array( 'ean13' => array(
'title' => $this->l('EAN13'), 'title' => $this->l('EAN13'),
'align' => 'center', 'align' => 'center',
'width' => 100,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1750,7 +1731,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'upc' => array( 'upc' => array(
'title' => $this->l('UPC'), 'title' => $this->l('UPC'),
'align' => 'center', 'align' => 'center',
'width' => 100,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1764,7 +1744,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'unit_price_te' => array( 'unit_price_te' => array(
'title' => $this->l('Unit price (tax excl.)'), 'title' => $this->l('Unit price (tax excl.)'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1774,7 +1753,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'quantity_expected' => array( 'quantity_expected' => array(
'title' => $this->l('Quantity'), 'title' => $this->l('Quantity'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1782,7 +1760,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'price_te' => array( 'price_te' => array(
'title' => $this->l('Price (tax excl.)'), 'title' => $this->l('Price (tax excl.)'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1792,7 +1769,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'discount_rate' => array( 'discount_rate' => array(
'title' => $this->l('Discount rate'), 'title' => $this->l('Discount rate'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1801,7 +1777,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'discount_value_te' => array( 'discount_value_te' => array(
'title' => $this->l('Discount value (tax excl.)'), 'title' => $this->l('Discount value (tax excl.)'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1811,7 +1786,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'price_with_discount_te' => array( 'price_with_discount_te' => array(
'title' => $this->l('Price with product discount (tax excl.)'), 'title' => $this->l('Price with product discount (tax excl.)'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1821,7 +1795,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'tax_rate' => array( 'tax_rate' => array(
'title' => $this->l('Tax rate'), 'title' => $this->l('Tax rate'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1830,7 +1803,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'tax_value' => array( 'tax_value' => array(
'title' => $this->l('Tax value'), 'title' => $this->l('Tax value'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -1840,7 +1812,6 @@ class AdminSupplyOrdersControllerCore extends AdminController
'price_ti' => array( 'price_ti' => array(
'title' => $this->l('Price (tax incl.)'), 'title' => $this->l('Price (tax incl.)'),
'align' => 'right', 'align' => 'right',
'width' => 80,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
+17 -23
View File
@@ -31,6 +31,7 @@ class AdminWarehousesControllerCore extends AdminController
{ {
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->table = 'warehouse'; $this->table = 'warehouse';
$this->className = 'Warehouse'; $this->className = 'Warehouse';
$this->deleted = true; $this->deleted = true;
@@ -40,31 +41,26 @@ class AdminWarehousesControllerCore extends AdminController
$this->fields_list = array( $this->fields_list = array(
'reference' => array( 'reference' => array(
'title' => $this->l('Reference'), 'title' => $this->l('Reference'),
'width' => 150,
), ),
'name' => array( 'name' => array(
'title' => $this->l('Name'), 'title' => $this->l('Name'),
), ),
'management_type' => array( 'management_type' => array(
'title' => $this->l('Managment type'), 'title' => $this->l('Managment type'),
'width' => 80,
), ),
'employee' => array( 'employee' => array(
'title' => $this->l('Manager'), 'title' => $this->l('Manager'),
'width' => 200,
'filter_key' => 'employee', 'filter_key' => 'employee',
'havingFilter' => true 'havingFilter' => true
), ),
'location' => array( 'location' => array(
'title' => $this->l('Location'), 'title' => $this->l('Location'),
'width' => 200,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
), ),
'contact' => array( 'contact' => array(
'title' => $this->l('Phone Number'), 'title' => $this->l('Phone Number'),
'width' => 200,
'orderby' => false, 'orderby' => false,
'filter' => false, 'filter' => false,
'search' => false, 'search' => false,
@@ -142,7 +138,7 @@ class AdminWarehousesControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Warehouse information'), 'title' => $this->l('Warehouse information'),
'image' => '../img/admin/edit.gif' 'icon' => 'icon-pencil'
), ),
'input' => array( 'input' => array(
array( array(
@@ -153,34 +149,32 @@ class AdminWarehousesControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'label' => $this->l('Reference:'), 'label' => $this->l('Reference:'),
'name' => 'reference', 'name' => 'reference',
'size' => 30,
'maxlength' => 32, 'maxlength' => 32,
'required' => true, 'required' => true,
'desc' => $this->l('Reference for this warehouse'), 'hint' => $this->l('Reference for this warehouse'),
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Name:'), 'label' => $this->l('Name:'),
'name' => 'name', 'name' => 'name',
'size' => 40,
'maxlength' => 45, 'maxlength' => 45,
'required' => true, 'required' => true,
'desc' => $this->l('Name of this warehouse'), 'hint' => array(
'hint' => $this->l('Invalid characters:').' !<>,;?=+()@#"�{}_$%:', $this->l('Name of this warehouse'),
$this->l('Invalid characters:').' !&lt;&gt;,;?=+()@#"�{}_$%:',
)
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Phone:'), 'label' => $this->l('Phone:'),
'name' => 'phone', 'name' => 'phone',
'size' => 15,
'maxlength' => 16, 'maxlength' => 16,
'desc' => $this->l('Phone number for this warehouse') 'hint' => $this->l('Phone number for this warehouse')
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Address:'), 'label' => $this->l('Address:'),
'name' => 'address', 'name' => 'address',
'size' => 100,
'maxlength' => 128, 'maxlength' => 128,
'required' => true 'required' => true
), ),
@@ -188,15 +182,13 @@ class AdminWarehousesControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'label' => $this->l('Address:').' (2)', 'label' => $this->l('Address:').' (2)',
'name' => 'address2', 'name' => 'address2',
'size' => 100,
'maxlength' => 128, 'maxlength' => 128,
'desc' => $this->l('Address of this warehouse (complementary address is optional).'), 'hint' => $this->l('Address of this warehouse (complementary address is optional).'),
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Postcode/Zip Code:'), 'label' => $this->l('Postcode/Zip Code:'),
'name' => 'postcode', 'name' => 'postcode',
'size' => 10,
'maxlength' => 12, 'maxlength' => 12,
'required' => true, 'required' => true,
), ),
@@ -204,7 +196,6 @@ class AdminWarehousesControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'label' => $this->l('City:'), 'label' => $this->l('City:'),
'name' => 'city', 'name' => 'city',
'size' => 20,
'maxlength' => 32, 'maxlength' => 32,
'required' => true, 'required' => true,
), ),
@@ -219,7 +210,7 @@ class AdminWarehousesControllerCore extends AdminController
'id' => 'id_country', 'id' => 'id_country',
'name' => 'name', 'name' => 'name',
), ),
'desc' => $this->l('Warehouse location country') 'hint' => $this->l('Warehouse location country')
), ),
array( array(
'type' => 'select', 'type' => 'select',
@@ -254,8 +245,11 @@ class AdminWarehousesControllerCore extends AdminController
'id' => 'id_reference', 'id' => 'id_reference',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Associated carriers. Use CTRL+CLICK to select several.').'<br />'.$this->l('You must select at least one carrier, if you do not select a carrier none will be able to ship from this warehouse.'), 'hint' => array(
'hint' => $this->l('You can specify the number of carriers available to ship orders from particular warehouses.'), $this->l('Associated carriers. Use CTRL+CLICK to select several.'),
$this->l('You must select at least one carrier, if you do not select a carrier none will be able to ship from this warehouse.'),
$this->l('You can specify the number of carriers available to ship orders from particular warehouses.'),
)
), ),
), ),
@@ -268,7 +262,7 @@ class AdminWarehousesControllerCore extends AdminController
'type' => 'shop', 'type' => 'shop',
'label' => $this->l('Shops:'), 'label' => $this->l('Shops:'),
'name' => 'checkBoxShopAsso', 'name' => 'checkBoxShopAsso',
'desc' => $this->l('Associated shops'), 'hint' => $this->l('Associated shops'),
'disable_shared' => Shop::SHARE_STOCK 'disable_shared' => Shop::SHARE_STOCK
); );
} }
@@ -301,7 +295,7 @@ class AdminWarehousesControllerCore extends AdminController
'id' => 'id', 'id' => 'id',
'name' => 'name' 'name' => 'name'
), ),
'desc' => $this->l('Inventory valuation method') 'hint' => $this->l('Inventory valuation method')
); );
// adds input valuation currency // adds input valuation currency