mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge: Fix discount rounding #1305
This commit is contained in:
parent
1cc4c9af32
commit
a7ffcfe7b2
@ -467,8 +467,8 @@ class InvoiceRepository extends BaseRepository
|
||||
if ($invoice->is_amount_discount) {
|
||||
$total -= $invoice->discount;
|
||||
} else {
|
||||
$total *= (100 - $invoice->discount) / 100;
|
||||
$total = round($total, 2);
|
||||
$discount = round($total * ($invoice->discount/100), 2);
|
||||
$total -= $discount;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user