Add VAT number handling in order processing and invoice templates

This commit is contained in:
“VeLiTi”
2026-01-27 18:36:21 +01:00
parent f7a91737bc
commit f7733b4113
14 changed files with 81 additions and 9 deletions

View File

@@ -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)) {