Merge remote-tracking branch 'origin/new/bug_5604'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / supplier.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Vendor [% bookselname %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
5 //<![CDATA[
6 function confirm_deletion() {
7     if (confirm(_("Confirm deletion of this vendor ?"))) {
8         window.location="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% id %]&op=delete";
9     }
10 }
11 function check(f) {
12 if (f.company.value == "") {
13     alert(_("You must specify a name for this vendor."));
14     return false;
15 }
16     f.submit();
17 }
18 //]]>
19 </script>
20 </head>
21 <body>
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'acquisitions-search.inc' %]
24
25 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; [% IF ( enter ) %][% IF ( id ) %] <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% id %]">[% name %]</a> &rsaquo; Update: [% name %][% ELSE %]Add vendor[% END %] [% ELSE %][% name %][% END %]</div>
26
27 <div id="doc" class="yui-t7">
28
29 <div id="bd">
30     <div id="yui-main">
31     [% IF ( enter ) %]
32         [% IF ( id ) %]
33         <h1>Update: [% name %]</h1>
34     [% ELSE %]
35         <h1>Add vendor</h1>
36     [% END %]
37     [% END %]
38 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
39 [% IF ( enter ) %]
40     <form action="updatesupplier.pl" name="updatesupplier" method="post">
41     <div class="yui-g">
42         <input type="hidden" name="id" value="[% id %]" />
43         <fieldset class="rows">
44             <legend>Company details</legend>
45             <ol><li><label for="company" class="required">Name * </label>
46                 <input type="text" size="40" id="company" name="company" value="[% name %]" /></li>
47             <li><label for="company_postal">Postal address</label>
48                     <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal %]</textarea></li>
49             <li><label for="physical">Physical address</label>
50                 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 %][% address2 %][% address3 %][% address4 %]</textarea></li>
51             <li><label for="company_phone">Phone</label>
52                 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone %]" /></li>
53             <li><label for="company_fax">Fax</label>
54                 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax %]" /></li>
55             <li><label for="website">Website</label>
56                 <input type="text" size="40" id="website" name="website" value="[% url %]" /></li>
57             <li><label for="accountnumber">Account number</label>
58                 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber %]" /></li></ol>
59         </fieldset>
60         <fieldset class="rows">
61             <legend>Contact details</legend>
62         <ol> <li><label for="company_contact_name">Contact name</label>
63                 <input type="text" size="40" id="company_contact_name" name="company_contact_name" value="[% contact %]" /></li>
64             <li><label for="company_contact_position">Position</label>
65                 <input type="text" size="40" id="company_contact_position" name="company_contact_position" value="[% contpos %]" /></li>
66             <li><label for="contact_phone">Phone</label>
67                 <input type="text" size="20" id="contact_phone" name="contact_phone" value="[% contphone %]" /> </li>
68             <li><label for="contact_phone_2">Alternative phone</label>
69                 <input type="text" size="20" id="contact_phone_2" name="contact_phone_2" value="[% contaltphone %]" /></li>
70             <li><label for="contact_fax">Fax</label>
71                 <input type="text" size="20" id="contact_fax" name="contact_fax" value="[% contfax %]" /></li>
72             <li><label for="company_email">Email</label>
73                 <input type="text" size="40" id="company_email" name="company_email" value="[% contemail %]" /></li>
74             <li><label for="contact_notes">Notes</label>
75                 <textarea id="contact_notes" name="contact_notes" cols="40" rows="4">[% contnotes %]</textarea></li></ol>
76         </fieldset>
77     </div>
78         <div class="yui-g">
79         <fieldset class="rows">
80             <legend>Ordering information</legend>
81             <ol class="radio"><li><label for="activestatus" class="radio">Vendor is:</label>
82                     [% IF ( active ) %]
83                         <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
84                         <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" />
85                     [% ELSE %]
86                         <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" />
87                         <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
88                     [% END %]</li>
89             </ol>
90             <ol>
91             <li><label for="list_currency">List prices are</label>
92                     <select name="list_currency" id="list_currency">
93                     [% FOREACH loop_currenc IN loop_currency %]
94                         [% IF ( loop_currenc.listprice ) %]<option value="[% loop_currenc.currency %]" selected="1">[% loop_currenc.currency %]</option>
95                         [% ELSE %]<option value="[% loop_currenc.currency %]">[% loop_currenc.currency %]</option>[% END %]
96                     [% END %]
97                     </select>
98             </li>
99             <li><label for="invoice_currency">Invoice prices are</label>
100                     <select name="invoice_currency" id="invoice_currency">
101                     [% FOREACH loop_currenc IN loop_currency %]
102                         [% IF ( loop_currenc.invoiceprice ) %]<option value="[% loop_currenc.currency %]" selected="1">[% loop_currenc.currency %]</option>
103                         [% ELSE %]<option value="[% loop_currenc.currency %]">[% loop_currenc.currency %]</option>[% END %]
104                     [% END %]
105                     </select>
106             </li>
107             </ol>
108             <ol class="radio">
109             <li><label for="gstyes" class="radio">Tax Number Registered:</label>
110                 [% IF ( gstreg ) %]
111                     <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
112                     <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
113                 [% ELSE %]
114                     <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
115                     <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
116                 [% END %]</li>
117             
118             <li><label for="list_gstyes" class="radio">List prices:</label>
119                 [% IF ( listincgst ) %]
120                     <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
121                     <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
122                 [% ELSE %]
123                     <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
124                     <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
125                 [% END %]</li>
126             
127             <li><label for="invoice_gstyes" class="radio">Invoice prices:</label>
128                 [% IF ( invoiceincgst ) %]
129                     <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
130                     <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
131                     [% ELSE %]
132                     <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
133                     <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
134                 [% END %]</li>
135             </ol>
136             <ol>
137             <li><label for="discount">Discount</label>
138                 <input type="text" size="6" id="discount" name="discount" value="[% discount %]" />%</li>
139             <li><label for="gstrate">Tax rate</label><input type="text" name="gstrate" id="gstrate" size="6" value="[% gstrate %]"/>% (leave blank for default tax of [% default_gst_rate %]%)</li>
140             <li><label for="notes">Notes</label>
141                 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
142         </fieldset>
143         <fieldset class="action"><input type="button" value="Save" onclick="check(this.form);" /> [% IF ( id ) %]
144         <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% id %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
145         [% END %]Cancel</a></fieldset>
146         </div>
147     </form>
148 [% ELSE %]
149     <h1>[% name %]</h1>
150         <div class="yui-g">
151             <div id="supplier-company-details" class="yui-u first">
152                 <h2>Vendor details</h2>
153                 <p><span class="label">Company Name: </span>[% name %]</p>
154                 <p><span class="label">Postal Address: </span>[% postal %]</p>
155                 <p><span class="label">Physical Address: </span>[% address1 %][% address2 %][% address3 %][% address4 %]</p>
156                 <p><span class="label">Phone: </span>[% phone %]</p>
157                 <p><span class="label">Fax: </span>[% fax %]</p>
158                 [% IF ( url ) %]
159                     <p><span class="label">Website: </span><a href="[% url %]">[% url %]</a></p>
160                 [% END %]
161                 [% IF ( accountnumber ) %]
162                     <p><span class="label">Account number: </span>[% accountnumber %]</p>
163                 [% END %]
164             </div>
165             <div id="supplier-contact-details" class="yui-u">
166                 <h2>Contact details</h2>
167                 <p><span class="label">Contact name: </span>[% contact %]</p>
168                 <p><span class="label">Position: </span>[% contpos %]</p>
169                 <p><span class="label">Phone: </span>[% contphone %]</p>
170                 <p><span class="label">Alternative phone: </span>[% contaltphone %]</p>
171                 <p><span class="label">Fax: </span>[% contfax %]</p>
172                 [% IF ( contemail ) %]
173                     <p><span class="label">Email: </span><a href="mailto:[% contemail %]">[% contemail %]</a></p>
174                 [% END %]
175                 [% IF ( contnotes ) %]
176                     <p><span class="label">Notes: </span>[% contnotes %]</p>
177                 [% END %]
178             </div>
179         </div>
180         <div id="supplier-ordering-information" class="yui-g">
181         <h3>Ordering information</h3>
182             <p><strong>Vendor is: </strong>
183                     [% IF ( active ) %]
184                         Active
185                     [% ELSE %]
186                         Inactive
187                     [% END %]</p>
188             <p><strong>List prices are: </strong>[% listprice %]</p>
189             <p><strong>Invoice prices are: </strong>[% invoiceprice %]</p>
190             [% IF ( GST ) %]<p><strong>Tax Number Registered: </strong>
191                     [% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
192             <p><strong>List Item Price Includes Tax: </strong>
193                     [% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
194             <p><strong>Invoice Item Price Includes Tax: </strong>
195                     [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
196             <p><strong>Discount: </strong>
197                 [% discount %] %</p>
198             <p><strong>Tax rate: </strong>
199                 [% GST %]%[% UNLESS ( default_tax ) %] (default)[% END %]</p>
200             [% IF ( notes ) %]<p><strong>Notes: </strong>
201                 [% notes %]</p>[% END %]
202         </div>
203         [% IF ( contracts ) %]
204             <div id="supplier-contracts" class="yui-g">
205                 <h2>Contract(s)</h2>
206                 <table>
207                     <tr>
208                         <th scope="col">Name</th>
209                         <th scope="col">Description</th>
210                         <th scope="col">Start date</th>
211                         <th scope="col">End date</th>
212                         <th scope="col" colspan="2">&nbsp; </th>
213                     </tr>
214                     [% FOREACH contract IN contracts %]
215                         [% IF ( loop.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
216                         <td>
217                             <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber %]&amp;booksellerid=[% contract.booksellerid %]">[% contract.contractname %]</a>
218                         </td>
219                         <td>[% contract.contractdescription %]</td>
220                         <td>[% contract.contractstartdate %]</td>
221                         <td>[% contract.contractenddate %]</td>
222                         <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber %]&amp;booksellerid=[% contract.booksellerid %]">Edit</a></td>
223                         <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&amp;contractnumber=[% contract.contractnumber %]&amp;booksellerid=[% contract.booksellerid %]">Delete</a></td>
224                         </tr>
225                     [% END %]
226                 </table>
227             </div>
228         [% END %]
229
230 [% END %]
231
232 </div>
233 </div>
234 [% INCLUDE 'intranet-bottom.inc' %]