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