Add setting of taxable for invoice criteria. #744

This commit is contained in:
Korina Cordero 2023-06-19 00:14:34 -04:00
parent 822bc59c6c
commit 783c26facc
3 changed files with 12 additions and 3 deletions

View file

@ -154,6 +154,9 @@ class JobOrderController extends APIController
$icrit->setCustomerVehicle($data['customer_vehicle']); $icrit->setCustomerVehicle($data['customer_vehicle']);
// set taxable
$icrit->setIsTaxable();
$icrit->addEntry($data['batt'], $data['trade_in_type'], 1); $icrit->addEntry($data['batt'], $data['trade_in_type'], 1);
// send to invoice generator // send to invoice generator

View file

@ -153,9 +153,12 @@ class InvoiceManager implements InvoiceGeneratorInterface
return $ierror; return $ierror;
} }
// this is called by JobOrderController when JS script generateInvoice is called // called by the following:
// this is also called by the APIController from newRequestJobOrder // (1) JobOrderController when JS script generateInvoice is called
// this is also called by generateInvoiceCriteria // (2) APIController from newRequestJobOrder
// (3) generateInvoiceCriteria
// (4) RiderAPIHandler's changeService
// (5) TAPI's JobOrderController
public function generateInvoice($criteria) public function generateInvoice($criteria)
{ {
// no need to validate since generateDraftInvoice was called before this was called // no need to validate since generateDraftInvoice was called before this was called

View file

@ -848,6 +848,9 @@ class ResqRiderAPIHandler implements RiderAPIHandlerInterface
$crit->setCustomerVehicle($cv); $crit->setCustomerVehicle($cv);
$crit->setHasCoolant($jo->hasCoolant()); $crit->setHasCoolant($jo->hasCoolant());
// set istaxable
$crit->setIsTaxable();
if ($promo != null) if ($promo != null)
$crit->addPromo($promo); $crit->addPromo($promo);