Fix for gateway payment items total amount

This commit is contained in:
Hillel Coren 2017-12-23 23:37:28 +02:00
parent 8f3952a938
commit 3c90f9ccbd
2 changed files with 2 additions and 2 deletions

View File

@ -1003,6 +1003,7 @@ class Invoice extends EntityModel implements BalanceAffecting
'tax_name2', 'tax_name2',
'tax_rate2', 'tax_rate2',
'invoice_item_type_id', 'invoice_item_type_id',
'discount',
]); ]);
} }

View File

@ -375,8 +375,7 @@ class BasePaymentDriver
$items[] = $item; $items[] = $item;
$invoiceItem->setRelation('invoice', $invoice); $total += $invoiceItem->cost * $invoiceItem->qty;
$total += $invoiceItem->amount();
} }
if ($total != $invoice->getRequestedAmount()) { if ($total != $invoice->getRequestedAmount()) {