Commerce Server General - Item based tax exemption?

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > June 2004 > Item based tax exemption?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Item based tax exemption?
Ravi Shankar

2004-06-26, 10:49 am

Your approach of adding a "VATExempt" field to the
catalog for each product would certainly help. This would
then become available for each product in the pipeline as
item.[_product_VATExempt] so you're scriptor code would
look like

> for each item in orderform.items
> if NOT IsDBNull(item.[_product_VAXExempt]) Then
> if item.[_product_VAXExempt] = "Y" Then
> item.[_cy_tax_total] = 0
> end if
> end if
> next


Be sure to run this component after the component that
calculates the VAT for the line item and your totals
would be fine.

Alternatively you can take a more complex approach of
creating your own VAT calculation component that would be
based on Product Classification. In this case you would
maintain a table of product classification and VAT
applicable, and write a component that would access this
based on "Product Classification" being stored per SKU in
the catalog. Through the component you'd then populate
the orderform field item.[_cy_tax_total] and such.

HTH


>-----Original Message-----
>Hey guys,
>
>I'm running a british website using Commerce Server

2002. We're using a system 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, or how to access
it. I've also been looking into adding a property
called "VATExempt" to the product properties, 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 VATExempt set to "Yes", then zero'ing out
the item.[_cy_tax_total], but I can't figure out the
exact syntax for 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 code.
>
>If it helps, I'm doing the actual site coding in C#.
>
>Brian Newton
>.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com