06-26-04 03:49 PM
Hey guys,
I'm running a british website using Commerce Server 2002. We're using a syst
em of VAT taxing, which I'm doing just by either charging VAT or not, based
on the country of the user. Now they want to make it so each individual item
in the catalog can either
be VAT taxable or not.
What's the simplest way to go about doing this? I've seen a "tax_exempt_code
" in the OrderFormLineItems table, but I'm not sure if that does anything, o
r how to access it. I've also been looking into adding a property called "VA
TExempt" to the product pro
perties, then using a scriptor somewhere in the tax calculation part of the
pipeline to cycle through every item in the orderform, and if it has VATExem
pt set to "Yes", then zero'ing out the item.[_cy_tax_total], but I can't
figure out the exact syntax fo
r this.
What I've been using so far is just a simple scriptor that does this:
'The following entry points are available (shown in VBScript format):
function MSCSExecute(config, orderform, context, flags)
for each item in orderform.items
item.[_cy_tax_total] = 0
next
MSCSExecute = 1
end function
sub MSCSOpen(config)
end sub
sub MSCSClose()
end sub
Which I'm assuming should go through every item and set its tax to zero, but
it doesn't do anything at all.
Am I going down the wrong path here? What's the best way to do this, and if
it is through the scriptor, could someone give me just a bit of sample code,
since I'm having a hard time finding resources which have a good amount of
pipeline scriptor example c
ode.
If it helps, I'm doing the actual site coding in C#.
Brian Newton
[ Post a follow-up to this message ]
|