[ic] Easiest way to display price inc VAT/TAX??
interchange at tvcables.co.uk
interchange at tvcables.co.uk
Sun Sep 5 07:35:26 EDT 2004
Quoting Jonathan Clark <jonc at webmaint.com>:
>
> > All prices are stored in the database ex VAT, what is the easiest way to
> > DISPLAY prices inc VAT? I found a thread referring to this which
> > mentions "$price /= 1.175" (assumes 17.5%), how do I use that???
>
> For retail type catalogs where you tend to display prices inc VAT, we tend
> to set the price in the products table including VAT and display the VAT
> content on the checkout/receipts.
>
> The reason for this is that using a two decimal ex vat price it is not to
> get some inc vat prices to display due to rounding.
>
> Alternatively, here is Jamie Neil's solution:
>
> http://www.icdevgroup.org/pipermail/interchange-users/2003-May/033058.html
>
> Jonathan
Thanks Jonathan,
Having read your post after modding the whole site I now have the problem
across the whole site, typical example:-
Item in database ex VAT price =3.40
With 17.5% VAT the price becomes 3.995 so the single price will either show
£3.99 or £4.00, IC rounds up showing £4.00. Of course if you try buying a
quantity the whole calculation goes wrong because £4.00 x Qty 4 = £16.00
whereas the subtotal function of IC actually caclulates it correctly at 3.995
* 4 * 1.175 = £15.98
Having now modded the whole site to display an inc VAT price calculated from
the database ex VAT price (which is what I need), what is the best solution?
Thanks,
Andy.
More information about the interchange-users
mailing list