Add vehicle subscription handling for customers without fixed pricing in order invoice processing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user