separate la poste invoices and mr invoices
This commit is contained in:
parent
dde433e46a
commit
dadf16f8fb
@ -117,7 +117,8 @@ function generateInvoicesPDFPrivateSales()
|
|||||||
include(dirname(__FILE__).'/../modules/privatesales/Sale.php');
|
include(dirname(__FILE__).'/../modules/privatesales/Sale.php');
|
||||||
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
||||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = $sale->getOrdersFromSale($statuts);
|
$carrier = Tools::getValue('carrier')? Tools::getValue('carrier') : 'lp';
|
||||||
|
$orders = $sale->getOrdersFromSale($statuts, true, false, $carrier);
|
||||||
if(count($orders) == 0) {
|
if(count($orders) == 0) {
|
||||||
die (Tools::displayError('No invoices found'));
|
die (Tools::displayError('No invoices found'));
|
||||||
}
|
}
|
||||||
@ -191,7 +192,8 @@ function generateInvoicesPDFPrivateSalesAll()
|
|||||||
include(dirname(__FILE__).'/../modules/privatesales/Sale.php');
|
include(dirname(__FILE__).'/../modules/privatesales/Sale.php');
|
||||||
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
||||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = $sale->getOrdersFromSale($statuts, FALSE, TRUE);
|
$carrier = Tools::getValue('carrier') ? Tools::getValue('carrier'):'lp';
|
||||||
|
$orders = $sale->getOrdersFromSale($statuts, FALSE, TRUE, $carrier);
|
||||||
if(count($orders) == 0) {
|
if(count($orders) == 0) {
|
||||||
die (Tools::displayError('No invoices found'));
|
die (Tools::displayError('No invoices found'));
|
||||||
}
|
}
|
||||||
@ -262,8 +264,9 @@ function generateInvoicesPDFPrivateM2Plus()
|
|||||||
if (!Validate::isDate(Tools::getValue('date_from')))
|
if (!Validate::isDate(Tools::getValue('date_from')))
|
||||||
die (Tools::displayError('Invalid end date'));
|
die (Tools::displayError('Invalid end date'));
|
||||||
|
|
||||||
|
$carrier = Tools::getValue('carrier')?Tools::getValue('carrier'):'lp';
|
||||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = Sale::getOrdersM2($statuts, $id_sales, Tools::getValue('date_from'), Tools::getValue('date_to'));
|
$orders = Sale::getOrdersM2($statuts, $id_sales, Tools::getValue('date_from'), Tools::getValue('date_to'), false, $carrier);
|
||||||
|
|
||||||
if(count($orders) == 0) {
|
if(count($orders) == 0) {
|
||||||
die (Tools::displayError('No invoices found'));
|
die (Tools::displayError('No invoices found'));
|
||||||
|
@ -223,20 +223,20 @@ class AdminInvoices extends AdminTab
|
|||||||
<td align="center"><p style="padding:0px;color: #565485;font-size:12px;">'. $date->format('Y-m-d') .'</p></td>
|
<td align="center"><p style="padding:0px;color: #565485;font-size:12px;">'. $date->format('Y-m-d') .'</p></td>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&laposte=1&token='.$this->token.'">
|
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=lp&token='.$this->token.'">
|
||||||
<span class="text-yellow anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
<span class="text-yellow anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||||
</a>
|
</a>
|
||||||
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&mondialrelay=1&token='.$this->token.'">
|
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=mr&token='.$this->token.'">
|
||||||
<span class="text-red-light anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
<span class="text-red-light anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center"><input id="multi_'. $sale['id_sale'].'" type="checkbox" name="multi2[]" value="'.$sale['id_sale'].'" '.(in_array((int)$sale['id_sale'], $id_sales)?'checked':'').'/></td>
|
<td align="center"><input id="multi_'. $sale['id_sale'].'" type="checkbox" name="multi2[]" value="'.$sale['id_sale'].'" '.(in_array((int)$sale['id_sale'], $id_sales)?'checked':'').'/></td>
|
||||||
<td align="center"><input id="multi_plus_'. $sale['id_sale'].'" type="checkbox" name="multiPlus[]" value="'.$sale['id_sale'].'"/></td>
|
<td align="center"><input id="multi_plus_'. $sale['id_sale'].'" type="checkbox" name="multiPlus[]" value="'.$sale['id_sale'].'"/></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&laposte=1&token='.$this->token.'">
|
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=lp&token='.$this->token.'">
|
||||||
<span class="text-yellow anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
<span class="text-yellow anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||||
</a>
|
</a>
|
||||||
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&mondialrelay=1&token='.$this->token.'">
|
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=mr&token='.$this->token.'">
|
||||||
<span class="text-red-light anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
<span class="text-red-light anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
@ -615,12 +615,14 @@ class AdminInvoices extends AdminTab
|
|||||||
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
||||||
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
||||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = $sale->getOrdersFromSale($statuts, FALSE, TRUE);
|
$carrier = Tools::getValue('carrier') ? Tools::getValue('carrier'):'lp';
|
||||||
|
$orders = $sale->getOrdersFromSale($statuts, FALSE, TRUE, $carrier);
|
||||||
|
echo '<pre>';var_dump($orders);echo '</pre>';die();
|
||||||
if(sizeof($orders)) {
|
if(sizeof($orders)) {
|
||||||
if(Tools::getValue('gift') == 1) {
|
if(Tools::getValue('gift') == 1) {
|
||||||
Tools::redirectAdmin('pdf.php?privatesalesAll&gift=1&id_sale='.(int) $sale->id.'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesalesAll&gift=1&id_sale='.(int) $sale->id.'&carrier='.$carrier.'&token='.$this->token);
|
||||||
} else {
|
} else {
|
||||||
Tools::redirectAdmin('pdf.php?privatesalesAll&id_sale='.(int) $sale->id.'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesalesAll&id_sale='.(int) $sale->id.'&carrier='.$carrier.'&token='.$this->token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -632,12 +634,14 @@ class AdminInvoices extends AdminTab
|
|||||||
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
||||||
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
if($sale = new Sale((int) Tools::getValue('id_sale'))) {
|
||||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = $sale->getOrdersFromSale($statuts);
|
$carrier = Tools::getValue('carrier') ? Tools::getValue('carrier'):'lp';
|
||||||
|
$orders = $sale->getOrdersFromSale($statuts, TRUE, FALSE, $carrier);
|
||||||
|
echo '<pre>';var_dump($orders);echo '</pre>';die();
|
||||||
if(sizeof($orders)) {
|
if(sizeof($orders)) {
|
||||||
if(Tools::getValue('gift') == 1) {
|
if(Tools::getValue('gift') == 1) {
|
||||||
Tools::redirectAdmin('pdf.php?privatesales&gift=1&id_sale='.(int) $sale->id.'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesales&gift=1&id_sale='.(int) $sale->id.(Tools::getValue('carrier')?'&carrier='.Tools::getValue('carrier'):'').'&token='.$this->token);
|
||||||
} else {
|
} else {
|
||||||
Tools::redirectAdmin('pdf.php?privatesales&id_sale='.(int) $sale->id.'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesales&id_sale='.(int) $sale->id.(Tools::getValue('carrier')?'&carrier='.Tools::getValue('carrier'):'').'&token='.$this->token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -672,7 +676,7 @@ class AdminInvoices extends AdminTab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// print multi (M2+)
|
// print multi (M2+)
|
||||||
elseif (Tools::isSubmit('submitPrintM2Plus')) {
|
elseif (Tools::isSubmit('submitPrintM2PlusLP') || Tools::isSubmit('submitPrintM2PlusMR')) {
|
||||||
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
||||||
$id_sales = Tools::getValue('multi2');
|
$id_sales = Tools::getValue('multi2');
|
||||||
|
|
||||||
@ -682,12 +686,13 @@ class AdminInvoices extends AdminTab
|
|||||||
$this->_errors[] = $this->l('You must select 2 sales minimum for print M2+');
|
$this->_errors[] = $this->l('You must select 2 sales minimum for print M2+');
|
||||||
} else {
|
} else {
|
||||||
$statuts = array(17, (int)Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, (int)Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = Sale::getOrdersM2($statuts, $id_sales, Tools::getValue('date_from'), Tools::getValue('date_to'));
|
$carrier = Tools::isSubmit('submitPrintM2PlusMR')?'mr':'lp';
|
||||||
|
$orders = Sale::getOrdersM2($statuts, $id_sales, Tools::getValue('date_from'), Tools::getValue('date_to'), false, $carrier);
|
||||||
if(sizeof($orders)) {
|
if(sizeof($orders)) {
|
||||||
if(Tools::getValue('gift') == 1) {
|
if(Tools::getValue('gift') == 1) {
|
||||||
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&gift=1&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&gift=1&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&carrier='.$carrier.'&token='.$this->token);
|
||||||
} else {
|
} else {
|
||||||
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&carrier='.$carrier.'&token='.$this->token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_errors[] = $this->l('No invoice found for these sales');
|
$this->_errors[] = $this->l('No invoice found for these sales');
|
||||||
@ -702,12 +707,13 @@ class AdminInvoices extends AdminTab
|
|||||||
$this->_errors[] = $this->l('You must select 2 sales minimum for print M2+');
|
$this->_errors[] = $this->l('You must select 2 sales minimum for print M2+');
|
||||||
} else {
|
} else {
|
||||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||||
$orders = Sale::getOrdersM2($statuts, $id_sales, Tools::getValue('date_from'), Tools::getValue('date_to'));
|
$carrier = Tools::isSubmit('submitPrintMPlusMR')?'mr':'lp';
|
||||||
|
$orders = Sale::getOrdersM2($statuts, $id_sales, Tools::getValue('date_from'), Tools::getValue('date_to'), false, $carrier);
|
||||||
if(sizeof($orders)) {
|
if(sizeof($orders)) {
|
||||||
if(Tools::getValue('gift') == 1) {
|
if(Tools::getValue('gift') == 1) {
|
||||||
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&gift=1&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&gift=1&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&carrier='.$carrier.'&token='.$this->token);
|
||||||
} else {
|
} else {
|
||||||
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
|
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&carrier='.$carrier.'&token='.$this->token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_errors[] = $this->l('No invoice found for these sales');
|
$this->_errors[] = $this->l('No invoice found for these sales');
|
||||||
|
@ -810,11 +810,17 @@ class Sale {
|
|||||||
* @param boolean $multi_only (if true, check only sales past in params)
|
* @param boolean $multi_only (if true, check only sales past in params)
|
||||||
* @return array order_print
|
* @return array order_print
|
||||||
*/
|
*/
|
||||||
public static function getOrdersM2($id_status=NULL, $id_sales = array(), $date_from, $date_to, $multi_only = false) {
|
public static function getOrdersM2($id_status=NULL, $id_sales = array(), $date_from, $date_to, $multi_only = false, $carrier = 'lp') {
|
||||||
if($id_sales < 2) {
|
if($id_sales < 2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($carrier === "lp") {
|
||||||
|
$carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_SOCOL')));
|
||||||
|
} else {
|
||||||
|
$carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_MR')));
|
||||||
|
}
|
||||||
|
|
||||||
$orders = array();
|
$orders = array();
|
||||||
|
|
||||||
foreach ($id_sales as $key => $id_sale) {
|
foreach ($id_sales as $key => $id_sale) {
|
||||||
@ -830,6 +836,7 @@ class Sale {
|
|||||||
WHERE `product_id` IN ('.implode(', ', $products).')
|
WHERE `product_id` IN ('.implode(', ', $products).')
|
||||||
AND o.`invoice_date` >= "'.pSQL($date_from).' 00:00:00"
|
AND o.`invoice_date` >= "'.pSQL($date_from).' 00:00:00"
|
||||||
AND o.`invoice_date` <= "'.pSQL($date_to).' 23:59:59"
|
AND o.`invoice_date` <= "'.pSQL($date_to).' 23:59:59"
|
||||||
|
AND o.`id_carrier` IN ('.implode(',', $carriers).')
|
||||||
') as $order) {
|
') as $order) {
|
||||||
$orders[] = (int) $order['id_order'];
|
$orders[] = (int) $order['id_order'];
|
||||||
}
|
}
|
||||||
@ -844,6 +851,7 @@ class Sale {
|
|||||||
AND h1.`id_order_state` IN ('.implode(',', $id_status).')
|
AND h1.`id_order_state` IN ('.implode(',', $id_status).')
|
||||||
AND o.`invoice_date` >= "'.pSQL($date_from).' 00:00:00"
|
AND o.`invoice_date` >= "'.pSQL($date_from).' 00:00:00"
|
||||||
AND o.`invoice_date` <= "'.pSQL($date_to).' 23:59:59"
|
AND o.`invoice_date` <= "'.pSQL($date_to).' 23:59:59"
|
||||||
|
AND o.`id_carrier` IN ('.implode(',', $carriers).')
|
||||||
AND h1.`id_order` IN (
|
AND h1.`id_order` IN (
|
||||||
SELECT DISTINCT `id_order`
|
SELECT DISTINCT `id_order`
|
||||||
FROM `'._DB_PREFIX_.'order_detail`
|
FROM `'._DB_PREFIX_.'order_detail`
|
||||||
@ -951,16 +959,24 @@ class Sale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOrdersFromSale($id_status=NULL, $single_only=TRUE, $send_test = FALSE) {
|
public function getOrdersFromSale($id_status=NULL, $single_only=TRUE, $send_test = FALSE, $carrier = 'lp') {
|
||||||
$orders = array();
|
$orders = array();
|
||||||
$products = $this->getProducts();
|
$products = $this->getProducts();
|
||||||
|
|
||||||
|
if($carrier === "lp") {
|
||||||
|
$carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_SOCOL')));
|
||||||
|
} else {
|
||||||
|
$carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_MR')));
|
||||||
|
}
|
||||||
|
|
||||||
if(count($products) > 0) {
|
if(count($products) > 0) {
|
||||||
if($id_status === NULL) {
|
if($id_status === NULL) {
|
||||||
foreach(Db::getInstance()->ExecuteS('
|
foreach(Db::getInstance()->ExecuteS('
|
||||||
SELECT DISTINCT `id_order`
|
SELECT DISTINCT od.`id_order`
|
||||||
FROM `'._DB_PREFIX_.'order_detail`
|
FROM `'._DB_PREFIX_.'order_detail` od
|
||||||
WHERE `product_id` IN ('.implode(', ', $products).')
|
LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = od.`id_order`
|
||||||
|
WHERE od.`product_id` IN ('.implode(', ', $products).')
|
||||||
|
AND o.`id_carrier` IN ('.implode(',', $carriers).')
|
||||||
') as $order) {
|
') as $order) {
|
||||||
$orders[] = (int) $order['id_order'];
|
$orders[] = (int) $order['id_order'];
|
||||||
}
|
}
|
||||||
@ -973,9 +989,11 @@ class Sale {
|
|||||||
WHERE h2.`id_order_history` IS NULL
|
WHERE h2.`id_order_history` IS NULL
|
||||||
AND h1.`id_order_state` IN ( '.implode(',', $id_status) .')
|
AND h1.`id_order_state` IN ( '.implode(',', $id_status) .')
|
||||||
AND h1.`id_order` IN (
|
AND h1.`id_order` IN (
|
||||||
SELECT DISTINCT `id_order`
|
SELECT DISTINCT od.`id_order`
|
||||||
FROM `'._DB_PREFIX_.'order_detail`
|
FROM `'._DB_PREFIX_.'order_detail` od
|
||||||
WHERE `product_id` IN ('.implode(', ', $products).')
|
LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = od.`id_order`
|
||||||
|
WHERE od.`product_id` IN ('.implode(', ', $products).')
|
||||||
|
AND o.`id_carrier` IN ('.implode(',', $carriers).')
|
||||||
)
|
)
|
||||||
') as $order) {
|
') as $order) {
|
||||||
$orders[] = (int) $order['id_order'];
|
$orders[] = (int) $order['id_order'];
|
||||||
@ -985,6 +1003,7 @@ class Sale {
|
|||||||
// TEST pour les commandes en 48h
|
// TEST pour les commandes en 48h
|
||||||
if ($send_test) {
|
if ($send_test) {
|
||||||
$orders_not_sended = array();
|
$orders_not_sended = array();
|
||||||
|
|
||||||
foreach(Db::getInstance()->ExecuteS('
|
foreach(Db::getInstance()->ExecuteS('
|
||||||
SELECT DISTINCT(o.`id_order`) AS `id_order`
|
SELECT DISTINCT(o.`id_order`) AS `id_order`
|
||||||
FROM `'._DB_PREFIX_.'order_detail` od
|
FROM `'._DB_PREFIX_.'order_detail` od
|
||||||
@ -995,6 +1014,11 @@ class Sale {
|
|||||||
SELECT `id_order_detail`
|
SELECT `id_order_detail`
|
||||||
FROM `'._DB_PREFIX_.'lapostews` la
|
FROM `'._DB_PREFIX_.'lapostews` la
|
||||||
WHERE la.`quantity` = (od.`product_quantity` - od.`product_quantity_refunded`)
|
WHERE la.`quantity` = (od.`product_quantity` - od.`product_quantity_refunded`)
|
||||||
|
)
|
||||||
|
AND od.`id_order_detail` NOT IN (
|
||||||
|
SELECT `id_order_detail`
|
||||||
|
FROM `'._DB_PREFIX_.'mondialrelay_parcel` mr
|
||||||
|
WHERE mr.`quantity` = (od.`product_quantity` - od.`product_quantity_refunded`)
|
||||||
)'
|
)'
|
||||||
) as $order) {
|
) as $order) {
|
||||||
$orders_not_sended[] = $order['id_order'];
|
$orders_not_sended[] = $order['id_order'];
|
||||||
|
Loading…
Reference in New Issue
Block a user