Merge branch 'ticket-invoiceOrderBy' into develop
This commit is contained in:
commit
f754060f1d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user