Merge branch 'ticket-13755-LogStats' into develop
This commit is contained in:
commit
ecd5c91ec4
@ -634,9 +634,9 @@ class AdminStatsLogistic extends AdminTab {
|
||||
|
||||
public function getReport($day = 25, $state = 2, $carrier=false) {
|
||||
if($carrier == "laposte"){
|
||||
$carriers = Configuration::get('ANT_CARRIERS_SOCOL');
|
||||
$carriers = unserialize(Configuration::get('LAPOSTEWS_CARRIERS'));
|
||||
} elseif($carrier == "mondialrelay"){
|
||||
$carriers = Configuration::get('ANT_CARRIERS_MR');
|
||||
$carriers = unserialize(Configuration::get('MONDIALRELAYWS_CARRIERS'));
|
||||
}
|
||||
return Db::getInstance()->getValue('
|
||||
SELECT COUNT(o.`id_order`)
|
||||
@ -645,7 +645,7 @@ class AdminStatsLogistic extends AdminTab {
|
||||
WHERE o.`date_add` < DATE_SUB("'.pSQL($this->date_stock).'",INTERVAL '.((int)$day-1).' DAY)
|
||||
AND oh.`id_order_state` = '.(int)$state.'
|
||||
AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = o.`id_order` GROUP BY moh.`id_order`)
|
||||
'.($carrier?'AND o.id_carrier IN ('.$carriers.')':'').'
|
||||
'.($carrier?'AND o.id_carrier IN ('.implode(',',$carriers).')':'').'
|
||||
');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user