mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Bug fix
This commit is contained in:
parent
068cda7392
commit
fd39f98f74
@ -1349,7 +1349,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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user