Skip to content

Commit

Permalink
// Fix multi shop share order in order invoices
Browse files Browse the repository at this point in the history
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14233 b9a71923-0436-4b27-9f14-aed3839534dd
  • Loading branch information
raphaelMalie committed Mar 23, 2012
1 parent 371e03a commit f785a54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/order/OrderInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public static function getByDateInterval($date_from, $date_to)
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = oi.`id_order`)
WHERE DATE_ADD(oi.date_add, INTERVAL -1 DAY) <= \''.pSQL($date_to).'\'
AND oi.date_add >= \''.pSQL($date_from).'\'
'.Shop::addSqlRestriction().'
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
ORDER BY oi.date_add ASC
');

Expand All @@ -393,7 +393,7 @@ public static function getByStatus($id_order_state)
ORDER BY date_add DESC, id_order_history DESC
LIMIT 1
)
'.Shop::addSqlRestriction(false, 'o').'
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
ORDER BY oi.`date_add` ASC
');

Expand All @@ -415,7 +415,7 @@ public static function getByDeliveryDateInterval($date_from, $date_to)
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).'\'
'.Shop::addSqlRestriction().'
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
ORDER BY oi.delivery_date ASC
');

Expand Down

0 comments on commit f785a54

Please sign in to comment.