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();
|
||||
$fee = $amount;
|
||||
|
||||
if ($invoice->balance > 0) {
|
||||
$fee += round($invoice->balance * $percent / 100, 2);
|
||||
if ($invoice->getRequestedAmount() > 0) {
|
||||
$fee += round($invoice->getRequestedAmount() * $percent / 100, 2);
|
||||
}
|
||||
|
||||
$item = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user