mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Improve late fee calculation
This commit is contained in:
parent
fd2bed9351
commit
37775a1d33
@ -1290,8 +1290,8 @@ class InvoiceRepository extends BaseRepository
|
|||||||
$data = $invoice->toArray();
|
$data = $invoice->toArray();
|
||||||
$fee = $amount;
|
$fee = $amount;
|
||||||
|
|
||||||
if ($invoice->balance > 0) {
|
if ($invoice->getRequestedAmount() > 0) {
|
||||||
$fee += round($invoice->balance * $percent / 100, 2);
|
$fee += round($invoice->getRequestedAmount() * $percent / 100, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
$item = [];
|
$item = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user