1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00
This commit is contained in:
Hillel Coren 2019-07-21 10:59:16 +03:00
parent f2416b3b91
commit bbb72875e3

View File

@ -1302,7 +1302,9 @@ class Invoice extends EntityModel implements BalanceAffecting
if ($this->discount != 0) {
if ($this->is_amount_discount) {
$total -= $invoiceTotal ? ($total / ($invoiceTotal + $this->discount) * $this->discount) : 0;
if ($invoiceTotal + $this->discount != 0) {
$total -= $invoiceTotal ? ($total / ($invoiceTotal + $this->discount) * $this->discount) : 0;
}
} else {
$total *= (100 - $this->discount) / 100;
}