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