diff --git a/app/Models/InvoiceItem.php b/app/Models/InvoiceItem.php index 8b11498426ce..731c0251a2e9 100644 --- a/app/Models/InvoiceItem.php +++ b/app/Models/InvoiceItem.php @@ -138,9 +138,9 @@ class InvoiceItem extends EntityModel if ($this->discount != 0) { if ($this->invoice->is_amount_discount) { - $cost -= $discount / $this->qty; + $cost -= $this->discount / $this->qty; } else { - $cost -= $cost * $discount / 100; + $cost -= $cost * $this->discount / 100; } }