Needs work
Project:
Ubercart GST / ABN
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2010 at 01:23 UTC
Updated:
11 Oct 2010 at 06:27 UTC
On 1st October (in New Zealand) we had an increase in GST from 12.5% to 15%. It was no problem to increase the rate, however all existing orders in the system were changed to reflect the new rate when they should not have been changed at all. ie. If the orders were created using the 12.5% rate then they should remain as such, even when the GST rate is changed. See file attachment... the order in question was created prior the GST rate being increased. The net amount was $400.00, GST of $50.00 (at 12.5%), now shows at the 15% rate.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal_gst_bug.jpg | 10.91 KB | jussiep |
Comments
Comment #1
jm.federico commentedThis issue is a bit complex. I came acroess this problem a while ago.
The initial blame comes form how Ubercart Tax system is designed.
The tax system was designed for countries like USA, where the price of an item never includes the tax. ONly at checkout tax is calculated, and then the system stores tho Tax total for the order, but not for individual items.
Now, displaying prices with tax included is handeled by the uc_price module.
What the GST module is doing is simply taking the TAX value and modifying the prices of the products, using HOOK_uc_price_handler().
Didn't try this, but a solution could be to change uc_gst_price_handler_alter() so that when the context is 'order_product' nothing gets changed.
Change :
to
This way individual prices in old order will show up without modification, (no TAX), but the total TAX for the order will remain (Ubercart stores that)
I'm not attaching patch cause haven't tested.
Cheers