Add vehicle subscription handling for customers without fixed pricing in order invoice processing

This commit is contained in:
Jepp9350
2025-06-01 20:24:03 +02:00
parent fbf60da178
commit 0eda58bcba
@@ -225,6 +225,9 @@ class orderInvoicesRoute
$customer_fixed_pricing_price = $customer_fixed_pricing_o->selectByCustomerNumber((int)$collected_order_invoices->customer_number->value());
$customer_fixed_pricing_price = (int)$customer_fixed_pricing_price->price->value();
$collected_order_invoices->overridePricesFixed((int)$customer_fixed_pricing_price);
} else {
// Apply vehicle subscriptions if the customer does not have fixed pricing
$collected_order_invoices->addVehicleSubscriptionsTransaction();
}
// Add the collected order invoice to E-Conomic
$collected_order_invoices->addToEconomic();
@@ -244,6 +247,9 @@ class orderInvoicesRoute
$customer_fixed_pricing_price = $customer_fixed_pricing_o->selectByCustomerNumber((int)$collected_order_invoices->customer_number->value());
$customer_fixed_pricing_price = (int)$customer_fixed_pricing_price->price->value();
$collected_order_invoices->overridePricesFixed((int)$customer_fixed_pricing_price);
} else {
// Apply vehicle subscriptions if the customer does not have fixed pricing
$collected_order_invoices->addVehicleSubscriptionsTransaction();
}
// Create the invoice in E-Conomic
$collected_order_invoices->addToEconomic(true);