Added copyright statement to all .pl and .pm files
[koha.git] / acqui / supplier.pl
1 #!/usr/bin/perl
2
3 #script to show display basket of orders
4 #written by chris@katipo.co.nz 24/2/2000
5
6
7 # Copyright 2000-2002 Katipo Communications
8 #
9 # This file is part of Koha.
10 #
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
14 # version.
15 #
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.
19 #
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
23
24 use C4::Catalogue;
25 use C4::Biblio;
26 use C4::Output;
27 use CGI;
28 use strict;
29
30 my $input=new CGI;
31 print $input->header();
32 my $id=$input->param('id');
33 my ($count,@booksellers)=bookseller($id); 
34 print startpage;
35
36 print startmenu('acquisitions');
37
38 print <<EOP
39 <form action=updatesupplier.pl method=post>
40
41 <input type=hidden name=id value=$id>
42 <FONT SIZE=6><em>Update: $booksellers[0]->{'name'}</em></FONT>
43 <P>
44 <CENTER>
45 <TABLE  CELLSPACING=0  CELLPADDING=5 border=1 align=left width="40%">
46 <tr valign=top bgcolor=#99cc33><td background="/images/background-mem.gif" colspan=2><B>COMPANY DETAILS</B></td></tr>
47 <TR VALIGN=TOP>
48 <TD><b>Company Name</b></td>
49 <td><input type=text size=20 name=company value="$booksellers[0]->{'name'}">
50 </td>
51 </tr>
52 <TR VALIGN=TOP>
53 <TD>Postal Address</td>
54 <td><textarea name=company_postal cols=20 rows=3>$booksellers[0]->{'postal'}
55 </textarea></td>
56 </tr>
57 <TR VALIGN=TOP>
58 <TD>Physical Address</td>
59 <td><textarea name=physical cols=20 rows=4>$booksellers[0]->{'address1'}
60 $booksellers[0]->{'address2'}
61 $booksellers[0]->{'address3'}
62 $booksellers[0]->{'address4'}
63 </textarea>
64 </td>
65 </tr>
66 <TR VALIGN=TOP>
67 <TD>Phone</td>
68 <td><input type=text size=20 name=company_phone value="$booksellers[0]->{'phone'}">
69 </td>
70 </tr>
71 <TR VALIGN=TOP>
72 <TD>Fax</td>
73 <td><input type=text size=20 name=company_fax value="$booksellers[0]->{'fax'}">
74 </td>
75 </tr>
76 <TR VALIGN=TOP>
77 <TD>Website</td>
78 <td><input type=text size=20 name=website value="$booksellers[0]->{'url'}">
79 </td>
80 </tr>
81 <tr valign=top bgcolor=#99cc33><td background="/images/background-mem.gif" colspan=2><B>CONTACT DETAILS</B></td></tr>
82 <TR VALIGN=TOP>
83 <TD>Contact Name</td>
84 <td><input type=text size=20 name=company_contact_name value="$booksellers[0]->{'contact'}">
85 </td>
86 </tr>
87 <TR VALIGN=TOP>
88 <TD>Position</td>
89 <td><input type=text size=20 name=company_contact_position value="$booksellers[0]->{'contpos'}">
90 </td>
91 </tr>
92 <TR VALIGN=TOP>
93 <TD>Phone</td>
94 <td><input type=text size=20 name=contact_phone value="$booksellers[0]->{'contphone'}">
95 </td>
96 </tr>
97 <TR VALIGN=TOP>
98 <TD>Alternative Phone</td>
99 <td><input type=text size=20 name=contact_phone_2 value="$booksellers[0]->{'contaltphone'}">
100 </td>
101 </tr>
102 <TR VALIGN=TOP>
103 <TD>Fax</td>
104 <td><input type=text size=20 name=contact_fax value="$booksellers[0]->{'contfax'}">
105 </td>
106 </tr>
107 <TR VALIGN=TOP>
108 <TD>E-mail</td>
109 <td><input type=text size=20 name=company_email value="$booksellers[0]->{'contemail'}">
110 </td>
111 </tr>
112 <TR VALIGN=TOP>
113 <TD>Notes</td>
114 <td><textarea name=notes cols=20 rows=4>$booksellers[0]->{'contnotes'}</textarea>
115 </td>
116 </tr>
117 <tr valign=right><td><input type=image  name=submit src=/images/save-changes.gif border=0 width=187 height=42 align=right></td></tr>
118 </table>
119 <img src="/images/holder.gif" width=32 height=250 align=left>
120
121 <table border=1 cellspacing=0 cellpadding=5 width="40%">
122 <tr valign=top bgcolor=#99cc33><td background="/images/background-mem.gif" colspan=2><B>CURRENT STATUS</B></td></tr>
123 <TR VALIGN=TOP>
124 <TD>Supplier is</td>
125 <td><input type=radio name=status value=1
126 EOP
127 ;
128 if ($booksellers[0]->{'active'}==1){
129   print " checked ";
130 }
131 print ">Active
132 <input type=radio name=status value=0";
133 if ($booksellers[0]->{'active'}==0){
134   print " checked ";
135 }
136 print <<EOP
137 >Inactive
138 </td>
139 </tr>
140 <tr valign=top bgcolor=#99cc33><td background="/images/background-mem.gif" colspan=2><B>ORDERING INFORMATION</B></td></tr>
141 <TR VALIGN=TOP>
142 <TD>Publishers and Imprints</td>
143 <td><textarea name=publishers_imprints cols=20 rows=4>$booksellers[0]->{'specialty'}</textarea>
144 </td>
145 </tr>
146 <TR VALIGN=TOP>
147 <TD>List Prices are</td>
148 <td><select name=list_currency size=1>
149 <option value=NZD
150 EOP
151 ;
152 if ($booksellers[0]->{'listprice'} eq 'NZD'){
153   print " selected";
154 }
155 print ">\$ NZ
156 <option value=AUD";
157 if ($booksellers[0]->{'listprice'} eq 'AUD'){
158   print " selected";
159 }
160 print ">\$ Aus
161 <option value=USD";
162 if ($booksellers[0]->{'listprice'} eq 'USD'){
163   print " selected";
164 }
165 print ">\$ USA
166 <option value=UKP";
167 if ($booksellers[0]->{'listprice'} eq 'UKP'){
168   print " selected";
169 }
170
171 print <<EOP
172 >&pound; Sterling
173 </select>
174 </td>
175 </tr>
176 <TR VALIGN=TOP>
177 <TD>Invoice Prices are</td>
178 <td><select name=invoice_currency size=1>
179 <option value=NZD
180 EOP
181 ;
182 if ($booksellers[0]->{'invoiceprice'} eq 'NZD'){
183   print " selected";
184 }
185 print ">\$ NZ
186 <option value=AUD";
187 if ($booksellers[0]->{'invoiceprice'} eq 'AUD'){
188   print " selected";
189 }
190 print ">\$ Aus
191 <option value=USD";
192 if ($booksellers[0]->{'invoiceprice'} eq 'USD'){
193   print " selected";
194 }
195 print ">\$ USA
196 <option value=UKP";
197 if ($booksellers[0]->{'invoiceprice'} eq 'UKP'){
198   print " selected";
199 }
200 print <<EOP
201 >&pound; Sterling
202 </select>
203 </td>
204 </tr>
205 <TR VALIGN=TOP>
206 <TD>GST Registered</td>
207 <td><input type=radio name=gst value=1
208 EOP
209 ;
210 if ($booksellers[0]->{'gstreg'}==1){
211   print " checked";
212 }
213 print ">Yes 
214 <input type=radio name=gst value=0";
215 if ($booksellers[0]->{'gstreg'}==0){
216   print " checked";
217 }
218 print <<EOP
219 >No
220 </td>
221 </tr>
222 <TR VALIGN=TOP>
223 <TD>List Item Price Includes GST</td>
224 <td><input type=radio name=list_gst value=1
225 EOP
226 ;
227 if ($booksellers[0]->{'listincgst'}==1){
228   print " checked";
229 }
230 print ">Yes 
231 <input type=radio name=list_gst value=0";
232 if ($booksellers[0]->{'listincgst'}==0){
233   print " checked";
234 }
235 print <<EOP
236 >No
237 </td>
238 </tr>
239 <TR VALIGN=TOP>
240 <TD>Invoice Item Price Includes GST</td>
241 <td><input type=radio name=invoice_gst value=1
242 EOP
243 ;
244 if ($booksellers[0]->{'invoiceincgst'}==1){
245   print " checked";
246 }
247 print ">Yes 
248 <input type=radio name=invoice_gst value=0";
249 if ($booksellers[0]->{'invoiceincgst'}==0){
250   print " checked";
251 }
252 print <<EOP
253 >No
254 </td>
255 </tr>
256 <TR VALIGN=TOP>                         
257 <TD>Discount</td>
258 <td><input type=text size=3 name=discount value=$booksellers[0]->{'discount'}> %
259 </tr>
260 </table>
261
262 </form>
263 </center>
264 EOP
265 ;
266
267
268 print endmenu('acquisitions');
269
270 print endpage;