Add condition to generate export with state "Commandes Frauduleuses"
This commit is contained in:
parent
1cf431bb22
commit
7ceb2aca6c
@ -558,10 +558,20 @@ if($slipNb > 0) {
|
||||
SELECT d.*, p.`wholesale_price`
|
||||
FROM `'._DB_PREFIX_.'order_detail` d
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = d.`product_id`)
|
||||
WHERE d.`product_quantity_refunded` > 0 AND d.`id_order`='.(int) $slip['id_order']
|
||||
WHERE d.`id_order`='.(int) $slip['id_order']
|
||||
);
|
||||
|
||||
// Commande Frauduleuse - generate complete refund
|
||||
if ($order['id_order_state'] == 15) {
|
||||
if ($optVerbose) {
|
||||
echo date('Y-m-d H:i:s')." - Order fraud ".$order['id_order']." - Articles: ".count($order_details)."\n";
|
||||
}
|
||||
foreach ($order_details as $k => $detail) {
|
||||
$order_details[$k]['product_quantity_refunded'] = $detail['product_quantity'];
|
||||
}
|
||||
}
|
||||
// Paybox refund
|
||||
if (strtolower($order['payment']) == 'paybox') {
|
||||
elseif (strtolower($order['payment']) == 'paybox') {
|
||||
$refund_details = Db::getInstance()->executeS('
|
||||
SELECT r.`id_order_detail`
|
||||
FROM `'._DB_PREFIX_.'refund_transaction` r
|
||||
|
Loading…
Reference in New Issue
Block a user