mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fix discounts on tax rate report
This commit is contained in:
parent
e78194ec2f
commit
85b99b71ec
@ -1263,7 +1263,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
|
||||
if ($this->discount > 0) {
|
||||
if ($this->is_amount_discount) {
|
||||
$total -= $invoiceTotal ? ($total / $invoiceTotal * $this->discount) : 0;
|
||||
$total -= $invoiceTotal ? ($total / ($invoiceTotal + $this->discount) * $this->discount) : 0;
|
||||
} else {
|
||||
$total *= (100 - $this->discount) / 100;
|
||||
$total = round($total, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user