Add saving to meta even if service charges are blank. #341
This commit is contained in:
parent
f9c304422c
commit
504d910621
3 changed files with 4 additions and 16 deletions
|
|
@ -822,8 +822,4 @@ class JobOrder
|
|||
return $this->meta[$id];
|
||||
}
|
||||
|
||||
public function getAllMeta()
|
||||
{
|
||||
return $this->meta;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,18 +162,14 @@ class CMBInvoiceGenerator implements InvoiceGeneratorInterface
|
|||
}
|
||||
|
||||
// get the meta for service charges
|
||||
if (array_key_exists('service_charges', $jo->getAllMeta()))
|
||||
$service_charges = $jo->getMeta('service_charges');
|
||||
if (!empty($service_charges))
|
||||
{
|
||||
$service_charges = $jo->getMeta('service_charges');
|
||||
if ($service_charges != null)
|
||||
{
|
||||
$service_charges = $jo->getMeta('service_charges');
|
||||
|
||||
$this->invoiceServiceCharges($criteria, $service_charges);
|
||||
}
|
||||
$this->invoiceServiceCharges($criteria, $service_charges);
|
||||
}
|
||||
|
||||
|
||||
if ($ierror)
|
||||
{
|
||||
$error_array['invoice'] = $ierror;
|
||||
|
|
|
|||
|
|
@ -563,11 +563,7 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
->setRider($rider);
|
||||
|
||||
$jo->addMeta('discount', $discount);
|
||||
|
||||
if (!empty($service_charges))
|
||||
{
|
||||
$jo->addMeta('service_charges', $service_charges);
|
||||
}
|
||||
$jo->addMeta('service_charges', $service_charges);
|
||||
|
||||
// check if user is null, meaning call to create came from API
|
||||
if ($user != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue