Add checking if invoice has items before getting customer tags. #558

This commit is contained in:
Korina Cordero 2021-05-10 03:52:00 +00:00
parent d99bfedb01
commit 02bf16e787

View file

@ -71,8 +71,10 @@ class ResqInvoiceGenerator implements InvoiceGeneratorInterface
$cust_tag_info = [];
if ($stype == ServiceType::BATTERY_REPLACEMENT_NEW)
{
error_log('calling getCustomerTagInfo');
$cust_tag_info = $this->getCustomerTagInfo($cv);
// check if criteria has entries
$entries = $criteria->getEntries();
if (!empty($entries))
$cust_tag_info = $this->getCustomerTagInfo($cv);
}
// error_log($stype);
switch ($stype)