// StockMvt : added the name of the warehouse for the CSV export
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10942 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -228,7 +228,7 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->toolbar_btn['export-csv'] = array(
|
$this->toolbar_btn['export-csv'] = array(
|
||||||
'short' => 'Export this list as CSV',
|
'short' => 'Export this list as CSV',
|
||||||
'href' => $this->context->link->getAdminLink('AdminStockMvt').'&csv',
|
'href' => $this->context->link->getAdminLink('AdminStockMvt').'&csv&id_warehouse='.(int)$this->getCurrentWarehouseId(),
|
||||||
'desc' => $this->l('Export (CSV)'),
|
'desc' => $this->l('Export (CSV)'),
|
||||||
);
|
);
|
||||||
parent::initToolbar();
|
parent::initToolbar();
|
||||||
@@ -244,8 +244,8 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// header
|
// header
|
||||||
if ($this->getCurrentWarehouseId() != -1)
|
if (Tools::getValue('id_warehouse') != -1)
|
||||||
$filename = $this->l('stock_mvt').'_'.Warehouse::getWarehouseNameById($this->getCurrentWarehouseId()).'.csv';
|
$filename = $this->l('stock_mvt').'_'.Warehouse::getWarehouseNameById((int)Tools::getValue('id_warehouse')).'.csv';
|
||||||
else
|
else
|
||||||
$filename = $this->l('stock_mvt').'.csv';
|
$filename = $this->l('stock_mvt').'.csv';
|
||||||
header('Content-type: text/csv');
|
header('Content-type: text/csv');
|
||||||
|
|||||||
Reference in New Issue
Block a user