close #660 Fixed: Inclusive tax calculation seems incorrect
This commit is contained in:
parent
f8ba2721a8
commit
37376cd0b2
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -144,7 +144,7 @@ class CreateInvoiceItem
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user