Skip transactions not included in invoicing

- Updated `customer_vehicles_o` to exclude transactions not marked for invoicing during processing.
This commit is contained in:
Jeppe Bundgaard
2025-12-01 13:20:07 +01:00
parent d2f82b83ed
commit b45e270fed
@@ -503,6 +503,11 @@ class customer_vehicles_o extends db
// Convert the array of transaction ids to a comma separated string
$orders = '';
foreach ($transaction_ids as $transaction_id) {
// Check if the transaction is included in the invoicing.
$tmp = (new orders_o())->select((int)$transaction_id);
if (!$tmp->isIncludedInInvoicing()) {
continue; // The transaction is not included in the invoicing, skip it
}
$orders .= (int)$transaction_id . ',';
}
// Remove the last comma