[ic] Working with VAT inclusive prices
Jamie Neil
jamie at versado.net
Tue Mar 22 11:11:15 EST 2005
Steve 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.
--
Jamie Neil | <jamie at versado.net> | 0870 7777 454
Versado I.T. Services Ltd. | http://versado.net/ | 0845 450 1254
More information about the interchange-users
mailing list