[ic] multiple sales tax? jojo

Company InterNet Services info@4co.De
Thu, 18 Jan 2001 11:20:09 +0100


Having trouble with advice from jojo...


>--------snip from my checkout.html---------
><TD ALIGN=RIGHT>
><B>[L]Sales Tax[/L]</B></FONT></FONT><BR>
></TD>
><TD NOWRAP>
><B>
>[currency][compute_vat][/currency]
></B></FONT></TD>
>--------snip from my checkout.html---------
>


Okey I placed the above in checkout.html and it shows up.
However the code below shows up as text on the webpage....(checkout.html)

/--------------------------
UserTag compute_vat Routine <{code}); $vatkz = tag_data('products','dummy', $item->{code}); $outmenge = $item->{quantity};
if($vatkz =~ /MWSTKZ2/){ $a = ($outprice * $outmenge)/116*16; $vat = $vat + $a; } else { $a = ($outprice * $outmenge)/107*7; $vat
= $vat + $a; } } return $vat; } EOF

sku:0000130           isbn:0001073192
Light Years-commissioned D
by: Commissioned

--------------------------------------------------------------------------------
US Retail: $15.98
Your save: $2.40
Keywords:
~!(PCD)!~
~(UC)~
Anniversary
Sizes:   $13.58 $13,580.00

Address To Ship To:   Primary Add New Address


\-----------------------------------



>and an UserTag like
>
>######## 7 oder 16 % VAT
>#
>#
>#
>
>
>UserTag compute_vat Routine <<EOF
>sub {
> package Vend::Interpolate;
>        my $vat;
> my $a;
>        my $cart;
> $cart = $Vend::Items;
>        my $item;
> my $outprice;
> my $outmenge;
> my $vatkz;
> my $out;
>        foreach my $item (@$cart){
>                my $item_dummy = '';
> my $item_price = '';
> $outprice = tag_data('products','price', $item->{code});
> $vatkz = tag_data('products','dummy', $item->{code});
> $outmenge =  $item->{quantity};
> if($vatkz =~ /MWSTKZ2/){
> $a = ($outprice * $outmenge)/116*16;
> $vat = $vat + $a;
> } else {
> $a = ($outprice * $outmenge)/107*7;
> $vat = $vat + $a;
> }
>        }
>        return $vat;
>}
>EOF
>
>(Works with MV 3.14 and MV4.04a)
>
>In most common case, you have 7%! If there are some items with 16%, you
>have an entry "MWSTKZ2" in the field "dummy". This works with the whole
>price(netto + VAT = "Bruttopreis").




I noticed you also have KONTO as a payment, it that code availble? (as it is faster than credit cards)
Ken




>Joachim
>
>--
>Hans-Joachim Leidinger
>buch online                 jojo@buchonline.net
>Munscheidstr. 14            FAX: +49 209 1671441
>45886 Gelsenkirchen         FAX: 0209 1671441
>
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users
>