[ic] custom sales tax using levies

Angela Zenner angela at geton.com
Wed Oct 10 18:07:13 EDT 2007


Greg Hanson wrote:
> Angela Zenner wrote:
>   
>> I am trying to implement custom salestax using levies. The
>> documentation says that you can use the name of a sub or global sub
>> that will return the cost of the levy in the type field. My relevant
>> code in catalog.cfg is:
>> --------------------------------------------------------
>> Sub process_pst <<EOS
>> sub {
>> return 20;
>> }
>> EOS
>>
>>
>> ValuesDefault mv_shipmode PRICECDN
>>
>> Levies salestax shipping pst gst
>>
>> Levy gst description GST/HST
>> Levy gst label "Estimated GST/HST"
>> Levy gst part_number GST/HST
>> Levy gst tax_type GST/HST
>> Levy gst include_if "[if value country eq CA]1[/if]"
>> Levy gst keep_if_zero 1
>> Levy gst type salestax
>> Levy gst sort 002
>>
>> Levy pst description "PST"
>> Levy pst label "Estimated PST"
>> Levy pst part_number PST
>> Levy pst tax_type PST
>> Levy pst include_if "[if value country eq CA]1[/if]"
>> Levy pst keep_if_zero 1
>> * Levy pst type process_pst*
>> Levy pst sort 003
>>
>> Levy salestax description "Sales Tax (%s)"
>> Levy salestax label "Estimated Tax"
>> Levy salestax part_number SALESTAX
>> Levy salestax include_if "[if value country ne CA]1[/if]"
>> Levy salestax keep_if_zero 1
>> Levy salestax type salestax
>> Levy salestax sort 002
>>
>> Levy shipping label "Shipping"
>> Levy shipping type shipping
>> Levy shipping part_number SHIPPING
>> Levy shipping mode_from_values mv_shipmode
>> Levy shipping check_status mv_shipmode
>> Levy shipping group shipping
>>
>> I just want to call the subroutine process_pst (I've tried everything)
>> when calculating PST for Canada, but I don't know the exact syntax.
>> Any ideas would be appreciated.
>>     
>
> try this (untested):
>
> Levy pst description "PST"
> Levy pst label "Estimated PST"
> Levy pst part_number PST
> Levy pst tax_type PST
> Levy pst include_if "[if value country eq CA]1[/if]"
> Levy pst keep_if_zero 1
> Levy pst type custom
> Levy pst mode process_pst
> Levy pst sort 003
>
>
>   
That does it! Thanks very much

-Angela




More information about the interchange-users mailing list