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