Merge branch 'ticket-12462-fixReturn'

This commit is contained in:
Marion Muszynski 2017-05-24 10:12:31 +02:00
commit 6bedf15606

View File

@ -18,6 +18,10 @@ class OrderReturn extends OrderReturnCore {
SELECT SUM(`quantity`)
FROM `'._DB_PREFIX_.'mondialrelay_parcel`
WHERE `id_order_detail` = '.(int) $product['id_order_detail'].'
') + (int) Db::getInstance()->getValue('
SELECT SUM(`quantity`)
FROM `'._DB_PREFIX_.'philea_parcel`
WHERE `id_order_detail` = '.(int) $product['id_order_detail'].'
') - max($product['product_quantity_return'], $product['product_quantity_refunded']);
}
$qty -= (int) Db::getInstance()->getValue('