From b722dee96204d9b2df44cd5f3aa7ee8eb388526a Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Thu, 29 Nov 2018 11:50:23 +0300 Subject: [PATCH] close #650 Fixed: Invoice TOTAL Calculation Mistake between create and showing/paying times --- app/Jobs/Expense/CreateBillItem.php | 2 +- app/Jobs/Income/CreateInvoiceItem.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Expense/CreateBillItem.php b/app/Jobs/Expense/CreateBillItem.php index 07ff2d0dc..1826fa2cc 100644 --- a/app/Jobs/Expense/CreateBillItem.php +++ b/app/Jobs/Expense/CreateBillItem.php @@ -50,7 +50,7 @@ class CreateBillItem // Apply discount to tax if ($this->discount) { - $item_discount_amount = $item_amount * ($this->discount / 100); + $item_discount_amount = $item_amount - ($item_amount * ($this->discount / 100)); } if (!empty($item_id)) { diff --git a/app/Jobs/Income/CreateInvoiceItem.php b/app/Jobs/Income/CreateInvoiceItem.php index 16269abac..6e6575dff 100644 --- a/app/Jobs/Income/CreateInvoiceItem.php +++ b/app/Jobs/Income/CreateInvoiceItem.php @@ -50,7 +50,7 @@ class CreateInvoiceItem // Apply discount to tax if ($this->discount) { - $item_discount_amount = $item_amount * ($this->discount / 100); + $item_discount_amount = $item_amount - ($item_amount * ($this->discount / 100)); } if (!empty($item_id)) {