Add service type to invoice criteria calls #43
This commit is contained in:
parent
31f57d1b83
commit
4120677cb0
2 changed files with 5 additions and 1 deletions
|
|
@ -735,6 +735,7 @@ class APIController extends Controller
|
|||
|
||||
// make invoice criteria
|
||||
$icrit = new InvoiceCriteria();
|
||||
$icrit->setServiceType($stype);
|
||||
|
||||
// check promo
|
||||
$promo_id = $req->request->get('promo_id');
|
||||
|
|
|
|||
|
|
@ -178,12 +178,14 @@ class JobOrderController extends BaseController
|
|||
// coordinates
|
||||
$point = new Point($req->request->get('coord_lng'), $req->request->get('coord_lat'));
|
||||
|
||||
$stype = $req->request->get('service_type');
|
||||
|
||||
// set and save values
|
||||
$obj->setDateSchedule(DateTime::createFromFormat("d M Y h:i A", $req->request->get('date_schedule_date') . " " . $req->request->get('date_schedule_time')))
|
||||
->setCoordinates($point)
|
||||
->setAdvanceOrder($req->request->get('flag_advance') ?? false)
|
||||
->setCreatedBy($this->getUser())
|
||||
->setServiceType($req->request->get('service_type'))
|
||||
->setServiceType($stype)
|
||||
->setWarrantyClass($req->request->get('warranty_class'))
|
||||
->setCustomer($cust_vehicle->getCustomer())
|
||||
->setCustomerVehicle($cust_vehicle)
|
||||
|
|
@ -208,6 +210,7 @@ class JobOrderController extends BaseController
|
|||
|
||||
// instantiate invoice criteria
|
||||
$criteria = new InvoiceCriteria();
|
||||
$criteria->setServiceType($stype);
|
||||
|
||||
$ierror = $this->invoicePromo($em, $criteria, $req->request->get('invoice_promo'));
|
||||
$invoice_items = $req->request->get('invoice_items');
|
||||
|
|
|
|||
Loading…
Reference in a new issue