From 8d08040017cd36c4d85d3e840166ba7fab692983 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Tue, 21 Mar 2017 14:39:43 +0100 Subject: [PATCH] addition of delay in sale list --- adm/ajax_vp.php | 4 ++++ modules/privatesales/AdminPrivateSalesSales.php | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/adm/ajax_vp.php b/adm/ajax_vp.php index a442eaf2..53f7647b 100644 --- a/adm/ajax_vp.php +++ b/adm/ajax_vp.php @@ -6,6 +6,7 @@ include(PS_ADMIN_DIR.'/../config/config.inc.php'); require_once(dirname(__FILE__).'/init.php'); require_once('../modules/privatesales/Sale.php'); +require_once('../modules/privatesales_delay/saledelay.php'); require_once('../modules/privatesales_extrafields/privatesales_extrafields.php'); @@ -52,6 +53,7 @@ if (isset($_GET['getSales'])){ Commercial FR ES + Delay Shipping Position Actions @@ -60,6 +62,7 @@ if (isset($_GET['getSales'])){ $export = true; foreach($sales as $key => $sale) { + $delay = SaleDelay::getDelaySmallName($sale->delivery_delay,2); echo ' '.$sale->id.' '.$sale->id_category.' @@ -81,6 +84,7 @@ if (isset($_GET['getSales'])){ echo ''.((int) $sale->id_employee != 0? $employees[(int) $sale->id_employee]: '--').' FR ES + '.$delay.' '.(isset($sale_shipping[(int) $sale->id])? ($sale_shipping[(int) $sale->id] == 1? 'Philea': ''): '').' '; if($key != 0){ diff --git a/modules/privatesales/AdminPrivateSalesSales.php b/modules/privatesales/AdminPrivateSalesSales.php index facbd3e7..05e1c27c 100755 --- a/modules/privatesales/AdminPrivateSalesSales.php +++ b/modules/privatesales/AdminPrivateSalesSales.php @@ -1,6 +1,7 @@ '.$this->l('Employee').' '.$this->l('FR').' '.$this->l('ES').' + '.$this->l('Delay').' '.$this->l('Shipping').' '.$this->l('News').' '.$this->l('Position').' @@ -958,6 +960,7 @@ class AdminPrivateSalesSales extends AdminTab { $extrafields = PrivateSales_ExtraFields::getFieldsForSale($ids); foreach($sales as $key => $sale) { + $delay = SaleDelay::getDelaySmallName($sale->delivery_delay,2); echo ' '.$sale->id.' '.$sale->id_category.' @@ -980,7 +983,7 @@ class AdminPrivateSalesSales extends AdminTab { echo ''.((int) $sale->id_employee != 0? $employees[(int) $sale->id_employee]: '--').' FR ES - + '.$delay.' '.(isset($sale_shipping[(int) $sale->id])? ($sale_shipping[(int) $sale->id] == 1? 'Philea': ''): '').' '. $sale->forward_news .'