[ic] custom sales tax using levies

Greg Hanson greg at perusion.com
Wed Oct 10 17:42:59 EDT 2007


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


-- 
Greg Hanson
Interchange Consulting
Perusion
1506 E Gilbert Ave
Coeur d'Alene, ID 83815

Email		greg at perusion.com
Phone		208-667-2442
Toll Free	800-949-1889
Fax		775-256-2231
Web		http://www.perusion.com




More information about the interchange-users mailing list