Add VAT number handling in order processing and invoice templates
This commit is contained in:
@@ -468,6 +468,16 @@ if (isset($criterias['sn']) && $criterias['sn'] != ''){
|
||||
];
|
||||
}
|
||||
|
||||
// Sort output: is_current = true first, then by price low to high
|
||||
usort($output, function($a, $b) {
|
||||
// First priority: is_current (true comes before false)
|
||||
if ($a['is_current'] !== $b['is_current']) {
|
||||
return $b['is_current'] - $a['is_current'];
|
||||
}
|
||||
// Second priority: price (low to high)
|
||||
return floatval($a['price']) - floatval($b['price']);
|
||||
});
|
||||
|
||||
$messages = $output;
|
||||
|
||||
if (debug && !empty($output)) {
|
||||
|
||||
Reference in New Issue
Block a user