Download & Extend

uc_vat and uc_taxes does not handle inclusive tax rate properly

Project:Ubercart 2 VAT support
Version:6.x-1.2
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:active

Issue Summary

For countries like Australia, all sale prices are inclusive of tax (GST).

Unfortunately, uc_vat and uc_taxes assumes sell price is exclusive of tax, hence applies the tax rate as if it was addititive (eg: 10%, it uses 1.1 or 0.1) instead of 9.0909%. Even though uc_vat supports "inclusive tax price", it does not adjust the tax rate for this calculation.

_Without_ this patch, uc_vat (and uc_taxes) assumes this is how tax is calculated:
sale price exclusive of tax: tax = sale price * tax rate (eg: 10%)
sale price inclusive of tax: tax = sale price * tax rate (eg: 10%)

_With_ this patch, this is how tax is calculated:
sale price exclusive of tax: tax = sale price * tax rate (eg: 10%)
sale price inclusive of tax: tax = sale price * tax rate (eg: 9.090909%)

This also caused a problem with the uc_paypal module (http://drupal.org/node/1300976) where paypal rejects any transactions where AMT != ITMAMT + TAXAMT.

AttachmentSize
uc_vat_inclusive_fix.patch603 bytes
uc_taxes_inclusive_fix.patch668 bytes

Comments

#1

This patch do not handle proprerly complex vat configurations beetween sell prices and order line item taxes-.

My products has tax included, but my shipping line items don't have it.

regards.

#2

I've run both patches with hopes of fixing my issue (http://drupal.org/node/1368150). I'll try installing 6.x-1.2 and update you on the results.

#3

Tested the patches and they appear to work. However, they tax amount shown on Cart, Checkout and Review Order pages are still incorrect.

nobody click here