VAT/GST: The concept

Posts: 85
Joined: 02/14/2008
Bug FinderGetting busy with the Ubercode.Internationalizationizer

I tried to finish zmove's contrib and ended up with a 100kb+ monster with still some unsolved issues (+ nearly all core patches which are included at VAT/GST: Overview)
I tried to extend the Discounts module to get a Price module - and got back the rounding error. We can discuss these other options, but I see a couple of advantages doing it my way.

The basic idea is to fix the rounding errors where they happen. TR modified for his Multi Currency Support uc_currency_format(), I added a new display layer uc_display_price() at the place of uc_currency_format() as we need a little different input: basically $value get's $data, containing the item-price, the quantity and the type in case of line items. uc_currency_format() is called inside the function.

Except the syntax change to item price + quantity there is nothing else to care for that it works for the "display VAT/GST countries" and for the EU important is that true multi currency support is easy to integrate.

There is a quite small patch to uc_taxes to get taxes calculated related to the settings (order based or per item) which I would call stable

As this stuff shall go to core (at least for Uber Tuber) I also patched

  • uc_quote.module for the shipping calculation (still with a bug)
  • uc_store.module: added 3 settings (you find them at /admin/store/settings/store/edit/display), functions uc_round() & uc_display_price()
  • Off topic: I have soon to update/setup 3 east European shops, to prevent further mess in my dev environment I left my currency support for 0,50[curr_unit] which is working since months.
  • Hope I didn't miss now sth, but the rest of the files should be just related to uc_currency_format() => uc_display_price()