Fix late fee calculation

This commit is contained in:
Hillel Coren 2018-04-28 22:14:53 +03:00
parent b6df4ed650
commit f838bfcc1e

View File

@ -1290,8 +1290,8 @@ class InvoiceRepository extends BaseRepository
$data = $invoice->toArray(); $data = $invoice->toArray();
$fee = $amount; $fee = $amount;
if ($invoice->amount > 0) { if ($invoice->balance > 0) {
$fee += round($invoice->amount * $percent / 100, 2); $fee += round($invoice->balance * $percent / 100, 2);
} }
$item = []; $item = [];