Merge branch 'ticket-10657-ExportCMD'

This commit is contained in:
Marion Muszynski 2016-12-08 11:46:51 +01:00
commit 5984fba9dd

View File

@ -209,13 +209,15 @@ class AdminPhileaMagistor extends AdminTab {
}
}
$cmd = Db::getInstance()->ExecuteS('
SELECT o.`id_order` as order_id, o.`date_add` as date_cmd,os.`name`, c.`id_sale`, IF(phs.`date_add` IS NULL,"NON","OK") as sent, phs.`date_add` as sent_to_philea
SELECT o.`id_order` as order_id, o.`date_add` as date_cmd, CONCAT(os.`name`," (", CAST(osc.`date_upd` AS DATE),")") as status, CONCAT(c.`id_sale`," - ", cl.`name`) as sale, IF(phs.`date_add` IS NULL,"NON","OK") as sent, phs.`date_add` as sent_to_philea
FROM `'._DB_PREFIX_.'orders` o
LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON (o.`id_order` = d.`id_order`)
LEFT JOIN `'._DB_PREFIX_.'order_state_current` osc ON (o.`id_order` = osc.`id_order`)
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` os ON (osc.`id_order_state` = os.`id_order_state` AND os.`id_lang`=2)
LEFT JOIN `'._DB_PREFIX_.'philea_sent` phs ON (o.`id_order` = phs.`id_order`)
LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` c ON (d.`product_id` = c.`id_product`)
LEFT JOIN `'._DB_PREFIX_.'privatesale` p ON (c.`id_sale` = p.`id_sale`)
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (p.`id_category` = cl.`id_category` AND cl.`id_lang`=2)
WHERE o.`date_add` >= "'.$from.' 00:00:00"
AND o.`date_add` <= "'.$to.' 23:59:59"
AND c.`id_sale` IN ('.implode(',',$philea_sales).')
@ -237,8 +239,8 @@ class AdminPhileaMagistor extends AdminTab {
$row_definition = array(
'order_id' => 'Commande',
'date_cmd' => 'Date',
'name' => 'Statut',
'id_sale' => 'Vente',
'status' => 'Statut',
'sale' => 'Vente',
'sent' => 'Envoyee a Philea',
'sent_to_philea' => 'Date envoi',
);