Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Need help with taxes please. Rate Topic   - - - - -

 
  • smoked1
  • Senior Member
  • Members
  • Join Date: 19-May 06
  • 178 posts

Posted 05 September 2007 - 10:42 PM #1

For some reason my tax settings are causing a calculation issue. Taxes are being calculated for each product and then added up instead of being based on the Subtotal. It also seems to be coming up with the wrong amount. I have added a screen shot to this post so that you can see what I mean. Any input would be greatly appreciated.

Attached Thumbnails

  • screen.jpg


 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 06 September 2007 - 03:16 AM #2

In Admin->Manage Taxes, uncheck "Price Includes Tax".

Bob
CS-Cart 2.0.14 (testing)

 
  • smoked1
  • Senior Member
  • Members
  • Join Date: 19-May 06
  • 178 posts

Posted 06 September 2007 - 05:59 PM #3

I tried that and it still does the same thing.

 
  • pop-micro
  • Member
  • Members
  • Join Date: 02-May 07
  • 31 posts

Posted 06 September 2007 - 08:31 PM #4

i have the same issue.

Taxes are calculated for each product separately. The norm on the internet is to calculated the tax on the subtotal and not on each product separately.

 
  • smoked1
  • Senior Member
  • Members
  • Join Date: 19-May 06
  • 178 posts

Posted 07 September 2007 - 05:26 PM #5

I need a fix for this pretty bad.

 
  • pbannette
  • Senior Member
  • Members
  • Join Date: 09-Aug 07
  • 1036 posts

Posted 09 September 2007 - 11:23 AM #6

Hi,
Are you sure you don't have two taxes accidentally applied? The numbers come out close if you had a tax (like a vat tax) of 7.1% included in the price and then a 7.75$ tax on what the amount would be after subtracting out the "other" tax. Assuming the cart does not tax another tax. You can tell on the product page where it says "product taxes".

 
  • smoked1
  • Senior Member
  • Members
  • Join Date: 19-May 06
  • 178 posts

Posted 10 September 2007 - 03:41 PM #7

Hi,
Are you sure you don't have two taxes accidentally applied? The numbers come out close if you had a tax (like a vat tax) of 7.1% included in the price and then a 7.75$ tax on what the amount would be after subtracting out the "other" tax. Assuming the cart does not tax another tax. You can tell on the product page where it says "product taxes".


Yes, I am sure as I only have once tax configured in the cart as it is.

 
  • jingalls
  • Junior Member
  • Members
  • Join Date: 03-Nov 06
  • 23 posts

Posted 08 November 2008 - 08:39 PM #8

I know it has been like a year since this post was active and I am now working in 1.3.5sp4, but I was having the same problem. Maybe someone is still having issues with this??? This was more pronounced when I created an order with large quanity and small prices for each item, which led me to believe that since tax is separately calculated on each product and then summed together that this was just a consequence of each tax calculation being off by a fraction of a cent (the old Superman III scenario), and then that error being multiplied by a thousand. It seems like I just comment out a few of the intermediate instances of the calls to function "fn_format_price" in the fn_cart.php file and things seem to work much better. Find the code below and just comment out the calls to fn_format_price or ADD the text in red. If this helps anyone or if anyone has a better solution let me know.

Thanks...

if ($rate['rate_type'] == 'P') { // Percent dependence
// If tax is included into the price
if ($tax['price_includes_tax'] == 'Y') {

// I THINK THIS IS WHERE THE PENNY ROUNDING ERROR
// IS COMING FROM
$_tax = ($base_price - $base_price / ( 1 + ($rate['rate_value'] / 100)));
// TAKE OUT $_tax = fn_format_price($base_price - $base_price / ( 1 + ($rate['rate_value'] / 100)));

// If tax is NOT included into the price
} else {
// TAKE OUT $_tax = fn_format_price($base_price * ($rate['rate_value'] / 100));
$_tax = ($base_price * ($rate['rate_value'] / 100));
$taxed_price += $_tax;
}

} else {
$_tax = fn_format_price($rate['rate_value']);
// If tax is NOT included into the price
if ($tax['price_includes_tax'] != 'Y') {
$taxed_price += $_tax;
}
}

$previous_priority = $tax['priority'];
$previous_price = $base_price;

if (empty($tax_description[$tax['tax_id']])) {
$tax_description[$tax['tax_id']] = db_get_field("SELECT tax FROM $db_tables[tax_descriptions] WHERE tax_id='$tax[tax_id]' AND lang_code='$cart_language'");
}

$taxes_data[$tax['tax_id']] = array (
'rate_type' => $rate['rate_type'],
'rate_value' => $rate['rate_value'],
'price_includes_tax' => $tax['price_includes_tax'],
'regnumber' => @$tax['regnumber'],
'priority' => @$tax['priority'],


// TAKE OUT 'tax_subtotal' => fn_format_price($_tax * $amount),
'tax_subtotal' => ($_tax * $amount),

'description' => $tax_description[$tax['tax_id']],
);
}

return empty($taxes_data) ? false : $taxes_data;
}