From cd96e8c297038b5b196296bb074a50dd7c13dd61 Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 26 Feb 2002 09:06:19 +0000 Subject: [PATCH] Fix for displaying prices --- acqui/basket.pl | 134 +++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 71 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index da0c66afb2..6c59bd5b15 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -14,9 +14,14 @@ my $basket=$input->param('basket'); my ($count,@results)=basket($basket); print startpage; -print startmenu('acquisitions'); - -#print $count; +my @inp=startmenu('acquisitions'); + +my $count3=@inp; +for (my $i=0;$i<$count3;$i++){ + $inp[$i]=~ s/leftmargin=0 topmargin=0\>/leftmargin=0 topmargin=0 onload='update(orderform)'\>/; + } +print @inp; +# print $count; my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'}); print < Authorised By: $results[0]->{'authorisedby'}
$results[0]->{'entrydate'}; - -Shopping Basket For: {'booksellerid'}> $booksellers[0]->{'name'} - -{'booksellerid'}&basket=$basket>Add more orders - - +Shopping Basket For: {'booksellerid'}> $booksellers[0]->{'name'} +{'booksellerid'}&basket=$basket>Add more orders
-
-Search ISBN, Title or Author: + Search ISBN, Title or Author:

- - - - - + + + + + + + + printend ; + + +my $line_total; # total of each line +my $sub_total; # total of line totals +my $gist; # GST +my $grand_total; # $subttotal + $gist + for (my $i=0;$i<$count;$i++){ my $rrp=$results[$i]->{'listprice'}; if ($results[$i]->{'currency'} ne 'NZD'){ - $rrp=curconvert($results[$i]->{'currency'},$rrp); +$rrp=curconvert($results[$i]->{'currency'},$rrp); } -print <{'quantity'}*$results[$i]->{'ecost'}; +$sub_total+=$line_total; +$gist=sprintf("%.2f",$sub_total*0.125); +$grand_total=$sub_total+$gist; +print < - - - - - - - - -{'ordernumber'}> -{'biblionumber'}> + + + + + + + + + {'ordernumber'}> + {'biblionumber'}> - EOP ; } -# onchange='update(this.form)'> +# print ""; print < + + - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + +
ORDERISBNTITLEAUTHORRRP\$ESTQUANTITYTOTAL
ORDERISBNTITLEAUTHORRRP\$ESTQUANTITYTOTAL
$results[$i]->{'ordernumber'}$results[$i]->{'isbn'}$results[$i]->{'title'}$results[$i]->{'author'}\$\${'quantity'}>\$$results[$i]->{'ordernumber'}$results[$i]->{'isbn'}$results[$i]->{'title'}$results[$i]->{'author'}\$\${'quantity'} onchange='update(this.form)'>\$
+ HELP
+ To cancel an order, just change the quantity to 0 and click "save changes".
+ To change any of the catalogue or accounting information attached to an order, click on the title.
+ To add new orders to this supplier, start with a search.
SubTotal\$
-HELP
-To cancel an order, just change the quantity to 0 and click "save changes".
-To change any of the catalogue or accounting information attached to an order, click on the title.
-To add new orders to this supplier, start with a search.
SubTotal\$
GST\$
GST\$
TOTAL\$
TOTAL\$
-
- - - + EOP -; + ; print endmenu('acquisitions'); -- 2.39.5