From b45e270feda96ec0509ebc0d279dfee9db89affb Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Mon, 1 Dec 2025 13:20:07 +0100 Subject: [PATCH] Skip transactions not included in invoicing - Updated `customer_vehicles_o` to exclude transactions not marked for invoicing during processing. --- services/nginx/app/objects/customer_vehicles_o.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/nginx/app/objects/customer_vehicles_o.php b/services/nginx/app/objects/customer_vehicles_o.php index 6962840e..058d84b8 100644 --- a/services/nginx/app/objects/customer_vehicles_o.php +++ b/services/nginx/app/objects/customer_vehicles_o.php @@ -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