diff --git a/src/Controller/TAPI/JobOrderController.php b/src/Controller/TAPI/JobOrderController.php index e70928f8..88e4b128 100644 --- a/src/Controller/TAPI/JobOrderController.php +++ b/src/Controller/TAPI/JobOrderController.php @@ -154,6 +154,9 @@ class JobOrderController extends APIController $icrit->setCustomerVehicle($data['customer_vehicle']); + // set taxable + $icrit->setIsTaxable(); + $icrit->addEntry($data['batt'], $data['trade_in_type'], 1); // send to invoice generator diff --git a/src/Service/InvoiceManager.php b/src/Service/InvoiceManager.php index b2f87ad4..1c308adc 100644 --- a/src/Service/InvoiceManager.php +++ b/src/Service/InvoiceManager.php @@ -153,9 +153,12 @@ class InvoiceManager implements InvoiceGeneratorInterface return $ierror; } - // this is called by JobOrderController when JS script generateInvoice is called - // this is also called by the APIController from newRequestJobOrder - // this is also called by generateInvoiceCriteria + // called by the following: + // (1) JobOrderController when JS script generateInvoice is called + // (2) APIController from newRequestJobOrder + // (3) generateInvoiceCriteria + // (4) RiderAPIHandler's changeService + // (5) TAPI's JobOrderController public function generateInvoice($criteria) { // no need to validate since generateDraftInvoice was called before this was called diff --git a/src/Service/RiderAPIHandler/ResqRiderAPIHandler.php b/src/Service/RiderAPIHandler/ResqRiderAPIHandler.php index a543f39d..97af80a2 100644 --- a/src/Service/RiderAPIHandler/ResqRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/ResqRiderAPIHandler.php @@ -848,6 +848,9 @@ class ResqRiderAPIHandler implements RiderAPIHandlerInterface $crit->setCustomerVehicle($cv); $crit->setHasCoolant($jo->hasCoolant()); + // set istaxable + $crit->setIsTaxable(); + if ($promo != null) $crit->addPromo($promo);