Resolve "New invoice service" #1669

Merged
korina.cordero merged 105 commits from 744-new-invoice-service into master 2023-11-22 08:54:54 +00:00
3 changed files with 13 additions and 0 deletions
Showing only changes of commit 12ebe3538c - Show all commits

View file

@ -1201,6 +1201,7 @@ class RiderAppController extends APIController
$crit->setServiceType($stype_id);
$crit->setCustomerVehicle($cv);
$crit->setHasCoolant($jo->hasCoolant());
$crit->setIsTaxable();
if ($promo != null)
$crit->addPromo($promo);

View file

@ -94,6 +94,9 @@ class InvoiceController extends ApiController
$icrit->addEntry($batt, $trade_in, 1);
// set if taxable
$icrit->setIsTaxable();
// send to invoice generator
$invoice = $ic->generateInvoice($icrit);

View file

@ -658,6 +658,9 @@ class JobOrderController extends ApiController
$icrit->addBattery($batt);
*/
// NOTE: trade in is currently not supported. Would it be better
// if we remove trade-in as a required parameter? Or just leave it be
// and simply not process it?
// check trade-in
// only allow motolite, other, none
switch ($trade_in) {
@ -672,6 +675,9 @@ class JobOrderController extends ApiController
$icrit->addEntry($batt, $trade_in, 1);
// set taxable
$icrit->setIsTaxable();
// send to invoice generator
$invoice = $ic->generateInvoice($icrit);
$jo->setInvoice($invoice);
@ -1074,6 +1080,9 @@ class JobOrderController extends ApiController
break;
}
// set taxable
$icrit->setIsTaxable();
$icrit->addEntry($batt, $trade_in, 1);
// send to invoice generator