Fix the quantity in invoice when user orders more than one battery of the same type. #436

This commit is contained in:
Korina Cordero 2020-07-13 09:38:47 +00:00
parent c61e3ac39e
commit 6cb3f1be66

View file

@ -363,9 +363,10 @@ class CMBInvoiceGenerator implements InvoiceGeneratorInterface
if (!isset($con_batts[$batt_id]))
$con_batts[$batt->getID()] = [
'batt' => $batt,
'qty' => 0
'qty' => $qty
];
$con_batts[$batt_id]['qty']++;
else
$con_batts[$batt_id]['qty'] += $qty;
// no trade-in