3 #script to recieve orders
4 #written by chris@katipo.co.nz 24/2/2000
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
31 print $input->header();
32 my $id=$input->param('id');
33 my ($count,@booksellers)=bookseller($id);
34 my $invoice=$input->param('invoice');
35 my $freight=$input->param('freight');
36 my $gst=$input->param('gst');
37 my $user=$input->remote_user;
38 my $date=localtime(time);
41 print startmenu('acquisitions');
47 Received By: $user<br>
50 <FONT SIZE=6><em>Receipt Summary For : <a href=whitcoulls.html>$booksellers[0]->{'name'}</a> </em></FONT>
53 <FORM ACTION="/cgi-bin/koha/acqui/acquire.pl">
54 <input type=hidden name=gst value=$gst>
55 <input type=hidden name=freight value=$freight>
56 <input type=hidden name=invoice value=$invoice>
58 <b>Search ISBN or Title:</b> <INPUT TYPE="text" SIZE="25" NAME="recieve">
61 <FORM ACTION="" method=post name=orderform>
63 <table border=0 cellspacing=0 cellpadding=5>
64 <tr valign=top bgcolor=#99cc33>
65 <td background="/images/background-mem.gif"><b>BASKET</b></td>
66 <td background="/images/background-mem.gif"><b>ISBN</b></td>
67 <td background="/images/background-mem.gif"><b>TITLE</b></td>
68 <td background="/images/background-mem.gif"><b>AUTHOR</b></td>
69 <td background="/images/background-mem.gif"><b>ACTUAL</b></td>
70 <td background="/images/background-mem.gif"><b>P&P</b></td>
71 <td background="/images/background-mem.gif"><b>QTY</b></td>
72 <td background="/images/background-mem.gif"><b>TOTAL</b></td></tr>
77 ($count,@results)=invoice($invoice);
79 ($count,@results)=getallorders($id);
87 for (my$i=0;$i<$count;$i++){
88 $total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * $results[$i]->{'quantityreceived'};
89 $results[$i]->{'unitprice'}+=0;
91 <tr valign=top bgcolor=#ffffcc>
92 <td>$results[$i]->{'basketno'}</td>
93 <td>$results[$i]->{'isbn'}</td>
94 <td><a href="acquire.pl?recieve=$results[$i]->{'ordernumber'}&biblio=$results[$i]->{'biblionumber'}&invoice=$invoice&gst=$gst&freight=$freight">$results[$i]->{'title'}</a></td>
95 <td>$results[$i]->{'author'}</td>
96 <td>\$$results[$i]->{'unitprice'}</td>
98 <td>$results[$i]->{'quantityreceived'}</td>
103 $totalprice+=$results[$i]->{'unitprice'};
104 $totalfreight+=$results[$i]->{'freight'};
105 $totalquantity+=$results[$i]->{'quantityreceived'};
108 $totalfreight=$freight;
109 $tototal=$tototal+$freight;
111 my $grandtot=$tototal+$gst;
113 <tr valign=top bgcolor=white>
119 <tr valign=top bgcolor=white>
123 <td><b>SUBTOTALS</b></td>
124 <td>\$$totalprice</td>
125 <td>$totalfreight</td>
126 <td>$totalquantity</td>
129 <tr valign=top bgcolor=white>
130 <td colspan=5 rowspan=2 bgcolor=#99cc33 background="/images/background-mem.gif">
133 The total at the bottom of the page should be within a few cents of the total for the invoice.<p>
134 When you have finished this invoice save the changes.
136 <td colspan=2 align=right><b>GST</b></td>
139 <tr valign=top bgcolor=white>
140 <td colspan=2 align=right ><b>TOTAL</b></td>
143 <tr valign=top bgcolor=white>
150 <td colspan=3><input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42 align=right></td>
158 print endmenu('acquisitions');