// Fixed Supply Orders
This commit is contained in:
+1
-1
@@ -24,5 +24,5 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
<a href="{$href}" onclick="return confirm('{$confirm}');" title="{$action}">
|
<a href="{$href}" onclick="return confirm('{$confirm}');" title="{$action}">
|
||||||
<img src="../img/admin/copy_files.gif" alt="{$action}" />
|
<img src="../img/admin/duplicate.png" alt="{$action}" />
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ class CSVCore
|
|||||||
public function headers()
|
public function headers()
|
||||||
{
|
{
|
||||||
header('Content-type: text/csv');
|
header('Content-type: text/csv');
|
||||||
|
header('Content-Type: application/force-download; charset=UTF-8');
|
||||||
header('Cache-Control: no-store, no-cache');
|
header('Cache-Control: no-store, no-cache');
|
||||||
header('Content-disposition: attachment; filename="'.$this->filename.'.csv"');
|
header('Content-disposition: attachment; filename="'.$this->filename.'.csv"');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'reference' => array(
|
'reference' => array(
|
||||||
'title' => $this->l('Reference'),
|
'title' => $this->l('Reference'),
|
||||||
'width' => 130,
|
'width' => 250,
|
||||||
'havingFilter' => true
|
'havingFilter' => true
|
||||||
),
|
),
|
||||||
'supplier' => array(
|
'supplier' => array(
|
||||||
@@ -477,10 +477,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
unset($this->toolbar_btn['export-csv-orders']);
|
unset($this->toolbar_btn['export-csv-orders']);
|
||||||
unset($this->toolbar_btn['export-csv-details']);
|
unset($this->toolbar_btn['export-csv-details']);
|
||||||
// adds actions
|
// adds actions
|
||||||
$this->addRowAction('delete');
|
|
||||||
$this->addRowAction('view');
|
$this->addRowAction('view');
|
||||||
$this->addRowAction('edit');
|
$this->addRowAction('edit');
|
||||||
$this->addRowAction('createsupplyorder');
|
$this->addRowAction('createsupplyorder');
|
||||||
|
$this->addRowAction('delete');
|
||||||
// unsets some fields
|
// unsets some fields
|
||||||
unset($this->fieldsDisplay['state'],
|
unset($this->fieldsDisplay['state'],
|
||||||
$this->fieldsDisplay['date_upd'],
|
$this->fieldsDisplay['date_upd'],
|
||||||
@@ -1205,6 +1205,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
// header
|
// header
|
||||||
header('Content-type: text/csv');
|
header('Content-type: text/csv');
|
||||||
|
header('Content-Type: application/force-download; charset=UTF-8');
|
||||||
header('Cache-Control: no-store, no-cache');
|
header('Cache-Control: no-store, no-cache');
|
||||||
header('Content-disposition: attachment; filename="'.$this->l('supply_orders_details').'.csv"');
|
header('Content-disposition: attachment; filename="'.$this->l('supply_orders_details').'.csv"');
|
||||||
|
|
||||||
@@ -2076,8 +2077,9 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
$entries = $supply_order->getEntriesCollection($supply_order->id_lang);
|
$entries = $supply_order->getEntriesCollection($supply_order->id_lang);
|
||||||
|
|
||||||
// updates SupplyOrder so that it is not a template anymore
|
// updates SupplyOrder so that it is not a template anymore
|
||||||
|
$language = new Language($supply_order->id_lang);
|
||||||
$ref = $supply_order->reference;
|
$ref = $supply_order->reference;
|
||||||
$ref .= ' ('.date('H:i:s').')';
|
$ref .= ' ('.date($language->date_format_full).')';
|
||||||
$supply_order->reference = $ref;
|
$supply_order->reference = $ref;
|
||||||
$supply_order->is_template = 0;
|
$supply_order->is_template = 0;
|
||||||
$supply_order->id = (int)0;
|
$supply_order->id = (int)0;
|
||||||
|
|||||||
@@ -2186,7 +2186,7 @@ CREATE TABLE `PREFIX_supply_order` (
|
|||||||
`id_supply_order_state` INT(11) UNSIGNED NOT NULL,
|
`id_supply_order_state` INT(11) UNSIGNED NOT NULL,
|
||||||
`id_currency` INT(11) UNSIGNED NOT NULL,
|
`id_currency` INT(11) UNSIGNED NOT NULL,
|
||||||
`id_ref_currency` INT(11) UNSIGNED NOT NULL,
|
`id_ref_currency` INT(11) UNSIGNED NOT NULL,
|
||||||
`reference` VARCHAR(32) NOT NULL,
|
`reference` VARCHAR(64) NOT NULL,
|
||||||
`date_add` DATETIME NOT NULL,
|
`date_add` DATETIME NOT NULL,
|
||||||
`date_upd` DATETIME NOT NULL,
|
`date_upd` DATETIME NOT NULL,
|
||||||
`date_delivery_expected` DATETIME DEFAULT NULL,
|
`date_delivery_expected` DATETIME DEFAULT NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user