Merge branch 'ticket-invoiceOrderBy' into develop

This commit is contained in:
Marion Muszynski 2016-07-11 17:06:35 +02:00
commit f754060f1d

View File

@ -935,15 +935,16 @@ class Sale {
if ($multi_only) {
return $order_print;
} else {
// tri par date pour les M2+
// sort($order_print);
usort($order_print, function ($a, $b) {
if ($_nb_product[$a] == $_nb_product[$b]) {
return 0;
}
return ($_nb_product[$a] < $_nb_product[$b]) ? -1 : 1;
});
return $order_print;
asort($_nb_product);
$result_to_print = array();
foreach ($_nb_product as $key => $value) {
if (in_array($key,$order_print)) {
$result_to_print[]=$key;
} else {
continue;
}
}
return $result_to_print;
}
return $order_print;