Item based tax exemption?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Item based tax exemption?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Item based tax exemption?  
Ravi Shankar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:49 PM

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
>.
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:45 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register