close #660 Fixed: Inclusive tax calculation seems incorrect

This commit is contained in:
cuneytsenturk
2018-12-04 12:02:15 +03:00
parent f8ba2721a8
commit 37376cd0b2
3 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ class CreateBillItem
foreach ($inclusives as $inclusive) {
$item_sub_and_tax_total = $item_amount + $item_tax_total;
$item_tax_total = $item_sub_and_tax_total - (($item_sub_and_tax_total * (100 - $inclusive->rate)) / 100);
$item_tax_total = $item_sub_and_tax_total - ($item_sub_and_tax_total / (1 + ($inclusive->rate / 100)));
$item_sub_total = $item_sub_and_tax_total - $item_tax_total;