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