From 180dce17724378d548f6b21175d486b90165ce44 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 10 Jun 2018 10:38:55 +0300 Subject: [PATCH] Fix for UBL --- app/Models/InvoiceItem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } }