mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:44:29 -04:00
Improve late fee calculation
This commit is contained in:
parent
aa6be32495
commit
f64a2583b8
@ -1285,8 +1285,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