// Stock movement fix export button on select filter
This commit is contained in:
+2
-2
@@ -28,13 +28,13 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<h3><i class="icon-cogs"></i> {l s='Filters'}</h3>
|
<h3><i class="icon-cogs"></i> {l s='Filters'}</h3>
|
||||||
<div class="filter-stock">
|
<div class="filter-stock">
|
||||||
<form type="get" class="form-horizontal">
|
<form type="get" id="stock-movement-filter" class="form-horizontal">
|
||||||
<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}" />
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="id_warehouse" class="control-label col-lg-3">{l s='Filter movements by warehouse:'}</label>
|
<label for="id_warehouse" class="control-label col-lg-3">{l s='Filter movements by warehouse:'}</label>
|
||||||
<div class="col-lg-9">
|
<div class="col-lg-9">
|
||||||
<select name="id_warehouse" onChange="$(this).parent().submit();">
|
<select name="id_warehouse" onChange="$('#stock-movement-filter').submit();">
|
||||||
{foreach $list_warehouses as $warehouse}
|
{foreach $list_warehouses as $warehouse}
|
||||||
<option {if $warehouse.id_warehouse == $current_warehouse}selected="selected"{/if} value="{$warehouse.id_warehouse}">{$warehouse.name}</option>
|
<option {if $warehouse.id_warehouse == $current_warehouse}selected="selected"{/if} value="{$warehouse.id_warehouse}">{$warehouse.name}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|||||||
@@ -113,6 +113,15 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Stock mouvement');
|
$this->page_header_toolbar_title = $this->l('Stock mouvement');
|
||||||
|
|
||||||
|
if (Tools::isSubmit('id_warehouse') && (int)Tools::getValue('id_warehouse') != -1)
|
||||||
|
$this->page_header_toolbar_btn['export-stock-mvt-csv'] = array(
|
||||||
|
'short' => 'Export this list as CSV',
|
||||||
|
'href' => $this->context->link->getAdminLink('AdminStockMvt').'&csv&id_warehouse='.(int)$this->getCurrentWarehouseId(),
|
||||||
|
'desc' => $this->l('Export (CSV)'),
|
||||||
|
'imgclass' => 'export'
|
||||||
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,13 +253,13 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
public function initToolbar()
|
public function initToolbar()
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit('id_warehouse') && (int)Tools::getValue('id_warehouse') != -1)
|
if (Tools::isSubmit('id_warehouse') && (int)Tools::getValue('id_warehouse') != -1)
|
||||||
{
|
|
||||||
$this->toolbar_btn['export-stock-mvt-csv'] = array(
|
$this->toolbar_btn['export-stock-mvt-csv'] = array(
|
||||||
'short' => 'Export this list as CSV',
|
'short' => 'Export this list as CSV',
|
||||||
'href' => $this->context->link->getAdminLink('AdminStockMvt').'&csv&id_warehouse='.(int)$this->getCurrentWarehouseId(),
|
'href' => $this->context->link->getAdminLink('AdminStockMvt').'&csv&id_warehouse='.(int)$this->getCurrentWarehouseId(),
|
||||||
'desc' => $this->l('Export (CSV)'),
|
'desc' => $this->l('Export (CSV)'),
|
||||||
|
'imgclass' => 'export'
|
||||||
);
|
);
|
||||||
}
|
|
||||||
parent::initToolbar();
|
parent::initToolbar();
|
||||||
unset($this->toolbar_btn['new']);
|
unset($this->toolbar_btn['new']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user