Merge pull request #826 from gouz/patch-4

[-] BO : Export DeliverySlip, the dates range using delivery_date but date_add
This commit is contained in:
Gregory Roussac
2013-10-09 06:02:52 -07:00

View File

@@ -466,7 +466,7 @@ class OrderInvoiceCore extends ObjectModel
FROM `'._DB_PREFIX_.'order_invoice` oi
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = oi.`id_order`)
WHERE DATE_ADD(oi.delivery_date, INTERVAL -1 DAY) <= \''.pSQL($date_to).'\'
AND oi.date_add >= \''.pSQL($date_from).'\'
AND oi.delivery_date >= \''.pSQL($date_from).'\'
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
ORDER BY oi.delivery_date ASC
');