0
Hi,
I have a big problem with tax calculation.
In Quebec, Canada, we have two applicable taxes.
Federal tax: 5%
Provincial tax: 9,975%
The problem is that the provincial tax is always rounded to 9,98% even if I set 3 decimals in the component settings and the currency.
This is very wrong as we do not charge the correct amount of taxes!
Please provide a fix.
I have a big problem with tax calculation.
In Quebec, Canada, we have two applicable taxes.
Federal tax: 5%
Provincial tax: 9,975%
The problem is that the provincial tax is always rounded to 9,98% even if I set 3 decimals in the component settings and the currency.
This is very wrong as we do not charge the correct amount of taxes!
Please provide a fix.
Accepted Answer
0
ok yes, it's a small bug.
there's a DB field that is missing 2 decimals.
if you have access to your DB, it is very easy to fix.
just go to table "#__invoices_tax_invoice" and change 'value' to DECIMAL(10,4)
this is the actual MySQL query you need to perform:
Make sure to replace the "#_" on the table name by your actual prefix.
there's a DB field that is missing 2 decimals.
if you have access to your DB, it is very easy to fix.
just go to table "#__invoices_tax_invoice" and change 'value' to DECIMAL(10,4)
this is the actual MySQL query you need to perform:
ALTER TABLE `#__invoices_tax_invoice` CHANGE `value` `value` DECIMAL(10,4) NOT NULL;
Make sure to replace the "#_" on the table name by your actual prefix.
Responses (8)
-
Accepted Answer
-
Accepted Answer
0Problem is still present..
Here is another set of screenshots with item amount of 1000$ because the 100$ was confusing with the currency rounding.
When I create the invoice the taxe rate displayed in the edit field id 9,975% so this tax amount is 99,75$
https://www.dropbox.com/s/yyfku90giso2f7x/create_v2.png?dl=0
I hit the save button and go to order display and the tax amount is 99,8%
https://www.dropbox.com/s/etcpntxkjo98k1p/display_v2.png?dl=0
If I go back to order edit, the tax rate is rounded to 9,98% witch is wrong.
https://www.dropbox.com/s/0hfzkkxyvy8mjsp/edit_v2.png?dl=0 -
Accepted Answer
0hi
thanks for the screenshots. however I still don't see the problem. the LAST picture (invoice display), is that from the invoice with tax set to 9,975 or 9,98?
I mean, in the picture where the tax is 9,975, the tax is calculated and display in 2 decimals. You want to display only 2 decimals, don't you? or you want to display 3?
I mean, the numbers I see on https://www.dropbox.com/s/vzgduat6gydrle1/create_invoice.png?dl=0 are all correct... the final result is rounded to 2 decimals, as indicated by the Canadian dollar settings (second picture) -
Accepted Answer
0Sorry for the cross post. Please delete the other post
See screenshots below:
Taxes
https://www.dropbox.com/s/h0ulpcdlio06bcp/taxes.png?dl=0
Currency settings
https://www.dropbox.com/s/qqx4rtgj7e0v8zr/currency.png?dl=0
When creating a new invoice
https://www.dropbox.com/s/vzgduat6gydrle1/create_invoice.png?dl=0
Editing same invoice
https://www.dropbox.com/s/bpxq9hq2jm2qgn0/editing_invoice.png?dl=0
Invoice display
https://www.dropbox.com/s/p0uyi2h5obuopie/invoice_display.png?dl=0 -
Accepted Answer
-
Accepted Answer
0Yes,
That's the parameter named 'decimals_editing'
Also I noticed in your code that you read the parameter 'decimals' defaulted to 2. The parameter is not resent in the config.xml file so this always get the value '2'
I tried adding this parameter to the config.xml file and set it to 3. Same result, the taxes always get rounded to 2 decimals.
I use version 3.0.0 -
Accepted Answer
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »