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