[ic] Working with VAT inclusive prices

Stephen Ricketts steve at bojanglesdesign.co.uk
Wed Mar 23 12:05:29 EST 2005


on 23/3/05 10:04 am, Jonathan Clark wrote:

>>>>> If so, could Jamie expand on how his system works with the
>> CommonAdjust
>>>>> tags? I haven't used CommonAdjust before, but thought it was
>> for quantity
>>>>> pricing?
>>>> 
>>>> catalog.cfg
>>>> -----------
>>>> ...
>>>> include etc/subtax.tag
>>>> ...
>>>> CommonAdjust <<EOF
>>>>  :price:,
>>>>  ;$,
>>>>  [subtax]
>>>> EOF
>>>> ...
>>>> 
>>>> etc/subtax.tag
>>>> --------------
>>>> UserTag subtax              Routine   <<EOR
>>>> sub {
>>>> my $price = $s;
>>>> $price = $price/1.175;
>>>> return $price-$s;
>>>> }
>>>> EOR
>>>> 
>>>> 
>>>> If I was to do this now (having more IC experience), I would probably:
>>>> 
>>>> 1) Use the "& CODE" rule form rather than a usertag.
>>>> 
>>>> 2) Make the tax deduction according to the value of the tax_category &
>>>> nontaxable fields.
>>>> 
>>>> However despite being ugly it does work.
>>> Thanks Jamie, that looks like a great backup if I can't get the new
>>> 'TaxInclusive' working properly. I'll post out what I find in
>> the next day
>>> or two.
>> 
>> I spent a long time playing with Interchange trying to get VAT to
>> work correctly
>> without rounding errors, in the end I concluded the only way to do things
>> properly was store the ex VAT prices in the database with 5
>> decimal places and
>> use my own calculations to assign VAT. Every other way caused
>> rounding errors.
> 
> This was one of the main reasons that TaxInclusive feature was added. Prices
> are stored inclusive of VAT and so never display wrong :-)
> 
> Jonathan.
> 

I have just installed IC 5.3 and have it working with my old catalog. The
new 'TaxInclusive' directive works an absolute dream!!!!

Calculating how much tax there already is in the [subtotal] is done
automatically and that amount is displayed with the usual [salestax] tag and
then not added to [total-cost].

Thanks again for the help. ;-)

Steve



More information about the interchange-users mailing list