diff --git a/modules/stats_logistic/AdminStatsLogistic.php b/modules/stats_logistic/AdminStatsLogistic.php index 2dfc561b..2d475dd0 100755 --- a/modules/stats_logistic/AdminStatsLogistic.php +++ b/modules/stats_logistic/AdminStatsLogistic.php @@ -85,7 +85,8 @@ class AdminStatsLogistic extends AdminTab { $result[(int)$sale['id_sale']]['nb_pole_1'] = 0; $result[(int)$sale['id_sale']]['nb_pole_2'] = 0; $result[(int)$sale['id_sale']]['nb_pole_3'] = 0; - // $result[(int)$sale['id_sale']]['nb_pole_4'] = 0; + $result[(int)$sale['id_sale']]['nb_pole_4'] = 0; + $result[(int)$sale['id_sale']]['nb_pole_5'] = 0; // $result[(int)$sale['id_sale']]['nb_pole_5'] = 0; // $result[(int)$sale['id_sale']]['nb_pole_6'] = 0; @@ -167,24 +168,32 @@ class AdminStatsLogistic extends AdminTab { $nb_package += count($value); switch ($id_employee) { case '22': - case '35': + case '24': $result[(int)$sale['id_sale']]['nb_pole_1'] += count($value); break; - case '66': - case '36': + case '25': + case '44': $result[(int)$sale['id_sale']]['nb_pole_2'] += count($value); break; - default: + case '47': + case '48': $result[(int)$sale['id_sale']]['nb_pole_3'] += count($value); break; + case '35': + case '36': + $result[(int)$sale['id_sale']]['nb_pole_4'] += count($value); + break; + default: + $result[(int)$sale['id_sale']]['nb_pole_5'] += count($value); + break; } } $result[(int)$sale['id_sale']]['nb_package'] = $nb_package; $result[(int)$sale['id_sale']]['nb_pole_1'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_1'] / $nb_package)*100,2); $result[(int)$sale['id_sale']]['nb_pole_2'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_2'] / $nb_package)*100,2); $result[(int)$sale['id_sale']]['nb_pole_3'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_3'] / $nb_package)*100,2); - // $result[(int)$sale['id_sale']]['nb_pole_4'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_4'] / $nb_package)*100,2); - // $result[(int)$sale['id_sale']]['nb_pole_5'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_5'] / $nb_package)*100,2); + $result[(int)$sale['id_sale']]['nb_pole_4'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_4'] / $nb_package)*100,2); + $result[(int)$sale['id_sale']]['nb_pole_5'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_5'] / $nb_package)*100,2); // $result[(int)$sale['id_sale']]['nb_pole_6'] = number_format(($result[(int)$sale['id_sale']]['nb_pole_6'] / $nb_package)*100,2); } } @@ -321,13 +330,11 @@ class AdminStatsLogistic extends AdminTab { 'employee' => array(), ); } - $poles[0]['name'] = 'LA POSTE'; - $poles[1]['name'] = 'MONDIAL RELAY'; - $poles[2]['name'] = 'AUTRES'; - // $poles[3]['name'] = 'Pôle 4 : Multi'; - // $poles[4]['name'] = 'Pôle 5 : Mondial Relay'; - // $poles[5]['name'] = 'Pôle 6 : Braderie'; - // $poles[6]['name'] = 'Pôle 7 : Postes complémentaires'; + $poles[0]['name'] = 'Pôle 1'; + $poles[1]['name'] = 'Pôle 2'; + $poles[2]['name'] = 'Pôle 3'; + $poles[3]['name'] = 'Multi'; + $poles[4]['name'] = 'Postes Complémentaires'; $total_quantity = 0; /** @@ -353,22 +360,34 @@ class AdminStatsLogistic extends AdminTab { switch ((int)$stat['id_employee']) { //case '52': case '22': - case '35': + case '24': $poles[0]['recap']['quantity'] += $stat['quantity']; $poles[0]['recap']['nb_package'] += $stat['nb_package']; $poles[0]['employee'][] = $stat; break; - case '66': - case '36': + case '25': + case '44': $poles[1]['recap']['quantity'] += $stat['quantity']; $poles[1]['recap']['nb_package'] += $stat['nb_package']; $poles[1]['employee'][] = $stat; break; - default: + case '47': + case '48': $poles[2]['recap']['quantity'] += $stat['quantity']; $poles[2]['recap']['nb_package'] += $stat['nb_package']; $poles[2]['employee'][] = $stat; break; + case '35': + case '36': + $poles[3]['recap']['quantity'] += $stat['quantity']; + $poles[3]['recap']['nb_package'] += $stat['nb_package']; + $poles[3]['employee'][] = $stat; + break; + default: + $poles[4]['recap']['quantity'] += $stat['quantity']; + $poles[4]['recap']['nb_package'] += $stat['nb_package']; + $poles[4]['employee'][] = $stat; + break; } $total_quantity += $stat['quantity']; }