3 #script to recieve orders
4 #written by chris@katipo.co.nz 24/2/2000
12 print $input->header();
13 my $id=$input->param('id');
14 my ($count,@booksellers)=bookseller($id);
15 my $invoice=$input->param('invoice');
16 my $freight=$input->param('freight');
17 my $gst=$input->param('gst');
18 my $user=$input->remote_user;
19 my $date=localtime(time);
22 print startmenu('acquisitions');
28 Received By: $user<br>
31 <FONT SIZE=6><em>Receipt Summary For : <a href=whitcoulls.html>$booksellers[0]->{'name'}</a> </em></FONT>
34 <FORM ACTION="/cgi-bin/koha/acqui/acquire.pl">
35 <input type=hidden name=gst value=$gst>
36 <input type=hidden name=freight value=$freight>
37 <input type=hidden name=invoice value=$invoice>
39 <b>Search ISBN or Title:</b> <INPUT TYPE="text" SIZE="25" NAME="recieve">
42 <FORM ACTION="" method=post name=orderform>
44 <table border=0 cellspacing=0 cellpadding=5>
45 <tr valign=top bgcolor=#99cc33>
46 <td background="/images/background-mem.gif"><b>BASKET</b></td>
47 <td background="/images/background-mem.gif"><b>ISBN</b></td>
48 <td background="/images/background-mem.gif"><b>TITLE</b></td>
49 <td background="/images/background-mem.gif"><b>AUTHOR</b></td>
50 <td background="/images/background-mem.gif"><b>ACTUAL</b></td>
51 <td background="/images/background-mem.gif"><b>P&P</b></td>
52 <td background="/images/background-mem.gif"><b>QTY</b></td>
53 <td background="/images/background-mem.gif"><b>TOTAL</b></td></tr>
58 ($count,@results)=invoice($invoice);
60 ($count,@results)=getallorders($id);
68 for (my$i=0;$i<$count;$i++){
69 $total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * $results[$i]->{'quantityreceived'};
70 $results[$i]->{'unitprice'}+=0;
72 <tr valign=top bgcolor=#ffffcc>
73 <td>$results[$i]->{'basketno'}</td>
74 <td>$results[$i]->{'isbn'}</td>
75 <td><a href="acquire.pl?recieve=$results[$i]->{'ordernumber'}&biblio=$results[$i]->{'biblionumber'}&invoice=$invoice&gst=$gst&freight=$freight">$results[$i]->{'title'}</a></td>
76 <td>$results[$i]->{'author'}</td>
77 <td>\$$results[$i]->{'unitprice'}</td>
79 <td>$results[$i]->{'quantityreceived'}</td>
84 $totalprice+=$results[$i]->{'unitprice'};
85 $totalfreight+=$results[$i]->{'freight'};
86 $totalquantity+=$results[$i]->{'quantityreceived'};
89 $totalfreight=$freight;
90 $tototal=$tototal+$freight;
92 my $grandtot=$tototal+$gst;
94 <tr valign=top bgcolor=white>
100 <tr valign=top bgcolor=white>
104 <td><b>SUBTOTALS</b></td>
105 <td>\$$totalprice</td>
106 <td>$totalfreight</td>
107 <td>$totalquantity</td>
110 <tr valign=top bgcolor=white>
111 <td colspan=5 rowspan=2 bgcolor=#99cc33 background="/images/background-mem.gif">
114 The total at the bottom of the page should be within a few cents of the total for the invoice.<p>
115 When you have finished this invoice save the changes.
117 <td colspan=2 align=right><b>GST</b></td>
120 <tr valign=top bgcolor=white>
121 <td colspan=2 align=right ><b>TOTAL</b></td>
124 <tr valign=top bgcolor=white>
131 <td colspan=3><input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42 align=right></td>
139 print endmenu('acquisitions');