[ic] multiple sales tax?

jojo@buchonline.net jojo@buchonline.net
Wed, 17 Jan 2001 13:09:31 +0100 (CET)


On 17 Jan, Company InterNet Services wrote:
> I have a large site,  500,000+ book store
> In Germany we have two sales taxes (Like PA in the usa)
> 7% for books, food and everything else 16%
> I can make a new colum in the ascii DB, for the tax
> but how would I get IC to read it properly. and on the reciept it needs to show the two taxes.
> 
> Sub Total= $50
> Tax1 items (7%)= $5
> Tax2 items (16%)= $11
> Total= $66

Ive

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

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
p rice(netto + VAT = "Bruttopreis").

  
> Also the construct site has 4 colums: sku, description, price, category
> Is there a way to add another description (like the images colum) so when the item is in a list it only shows the short
> "description", and when viewed a page shown the long detailed "description2" with an image

If the viewed page is "flypage.html", you can use

[item-field description2]

or what is the problem?

Joachim

-- 
Hans-Joachim Leidinger
buch online                 jojo@buchonline.net
Munscheidstr. 14            FAX: +49 209 1671441
45886 Gelsenkirchen         FAX: 0209 1671441