Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop

This commit is contained in:
Christophe Latour 2017-08-28 15:41:38 +02:00
commit e8d95d2c3c

View File

@ -260,12 +260,12 @@ class AdminLogisticsPending extends AdminTab {
$_orders = array();
foreach(Db::getInstance()->ExecuteS('
SELECT d.`id_order`, p.`id_product`, c.`id_sale`, GREATEST(d.`product_quantity` - d.`product_quantity_return`, 0) AS `product_quantity`,
d.`product_reference`, COUNT(d.id_order_detail) as `nb_p`,
d.`product_reference`, COUNT(d.id_order_detail) AS `nb_p`,
CASE
WHEN SUBSTRING(ca.`name`, 1,1) = "T" THEN 1
WHEN SUBSTRING(ca.name`, 1,1) = "C" THEN 1
ELSE '2'
END as `carrier_name`
WHEN SUBSTRING(ca.`name`, 1,1) = "C" THEN 1
ELSE 2
END AS `carrier_name`
FROM `'._DB_PREFIX_.'privatesale_category` c
LEFT JOIN `'._DB_PREFIX_.'product` p ON c.`id_category` = p.`id_category_default`
LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON d.`product_id` = p.`id_product`