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

@ -372,7 +372,7 @@ class Items extends Controller
foreach ($inclusives as $inclusive) {
$item_sub_and_tax_total = $item_sub_total + $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;
@ -382,7 +382,7 @@ class Items extends Controller
foreach ($inclusives as $inclusive) {
$item_sub_and_tax_total = $item_discount_total + $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;