Bug 7720: add options for controlling display of an item's home and/or holdings location
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / supplier.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Vendor [% bookselname %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7
8 <script type="text/javascript">
9 //<![CDATA[
10 function confirm_deletion() {
11     if (confirm(_("Confirm deletion of this vendor ?"))) {
12         window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
13     }
14 }
15
16  $(document).ready(function() {
17     var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
18         "aoColumnDefs": [
19           { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
20           { "sType": "title-string", "aTargets" : [ "title-string" ] }
21         ],
22         'sDom': 't'
23     } ) );
24  });
25 //]]>
26 </script>
27 </head>
28 <body id="acq_supplier" class="acq">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'acquisitions-search.inc' %]
31
32 <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 ( booksellerid ) %] <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; Update: [% name %][% ELSE %]Add vendor[% END %] [% ELSE %][% name %][% END %]</div>
33
34 <div id="doc3" class="yui-t2">
35
36 <div id="bd">
37     <div id="yui-main">
38     <div class="yui-b">
39     [% IF ( enter ) %]
40         [% IF ( booksellerid ) %]
41         <h1>Update: [% name %]</h1>
42     [% ELSE %]
43         <h1>Add vendor</h1>
44     [% END %]
45     [% END %]
46 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
47 [% IF ( enter ) %]
48     <form action="updatesupplier.pl" name="updatesupplier" class="validated" method="post">
49     <div class="yui-g">
50         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
51         <fieldset class="rows">
52             <legend>Company details</legend>
53             <ol><li><label for="company" class="required">Name:</label>
54                 <input type="text" size="40" id="company" name="company" value="[% name %]" required="required" class="required" /><span class="required">Required</span></li>
55             <li><label for="company_postal">Postal address: </label>
56                     <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal %]</textarea></li>
57             <li><label for="physical">Physical address: </label>
58                 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 %][% address2 %][% address3 %][% address4 %]</textarea></li>
59             <li><label for="company_phone">Phone: </label>
60                 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone %]" /></li>
61             <li><label for="company_fax">Fax: </label>
62                 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax %]" /></li>
63             <li><label for="website">Website: </label>
64                 <input type="text" size="40" id="website" name="website" value="[% url %]" /></li>
65             <li><label for="accountnumber">Account number: </label>
66                 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber %]" /></li></ol>
67         </fieldset>
68         <fieldset class="rows">
69             <legend>Contact details</legend>
70         <ol> <li><label for="company_contact_name">Contact name: </label>
71                 <input type="text" size="40" id="company_contact_name" name="company_contact_name" value="[% contact %]" /></li>
72             <li><label for="company_contact_position">Position: </label>
73                 <input type="text" size="40" id="company_contact_position" name="company_contact_position" value="[% contpos %]" /></li>
74             <li><label for="contact_phone">Phone: </label>
75                 <input type="text" size="20" id="contact_phone" name="contact_phone" value="[% contphone %]" /> </li>
76             <li><label for="contact_phone_2">Alternative phone: </label>
77                 <input type="text" size="20" id="contact_phone_2" name="contact_phone_2" value="[% contaltphone %]" /></li>
78             <li><label for="contact_fax">Fax: </label>
79                 <input type="text" size="20" id="contact_fax" name="contact_fax" value="[% contfax %]" /></li>
80             <li><label for="company_email">Email: </label>
81                 <input type="text" size="40" id="company_email" name="company_email" value="[% contemail %]" /></li>
82             <li><label for="contact_notes">Notes: </label>
83                 <textarea id="contact_notes" name="contact_notes" cols="40" rows="4">[% contnotes %]</textarea></li></ol>
84         </fieldset>
85     </div>
86         <div class="yui-g">
87         <fieldset class="rows">
88             <legend>Ordering information</legend>
89             <ol class="radio"><li><label for="activestatus" class="radio">Vendor is:</label>
90                     [% IF ( active ) %]
91                         <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
92                         <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" />
93                     [% ELSE %]
94                         <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" />
95                         <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
96                     [% END %]</li>
97             </ol>
98             <ol>
99             <li><label for="list_currency">List prices are: </label>
100                     <select name="list_currency" id="list_currency">
101                     [% FOREACH loop_currenc IN loop_currency %]
102                         [% IF ( loop_currenc.listprice ) %]<option value="[% loop_currenc.currency %]" selected="selected">[% loop_currenc.currency %]</option>
103                         [% ELSE %]<option value="[% loop_currenc.currency %]">[% loop_currenc.currency %]</option>[% END %]
104                     [% END %]
105                     </select>
106             </li>
107             <li><label for="invoice_currency">Invoice prices are: </label>
108                     <select name="invoice_currency" id="invoice_currency">
109                     [% FOREACH loop_currenc IN loop_currency %]
110                         [% IF ( loop_currenc.invoiceprice ) %]<option value="[% loop_currenc.currency %]" selected="selected">[% loop_currenc.currency %]</option>
111                         [% ELSE %]<option value="[% loop_currenc.currency %]">[% loop_currenc.currency %]</option>[% END %]
112                     [% END %]
113                     </select>
114             </li>
115             </ol>
116             <ol class="radio">
117             <li><label for="gstyes" class="radio">Tax number registered:</label>
118                 [% IF ( gstreg ) %]
119                     <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
120                     <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
121                 [% ELSE %]
122                     <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
123                     <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
124                 [% END %]</li>
125             
126             <li><label for="list_gstyes" class="radio">List prices:</label>
127                 [% IF ( listincgst ) %]
128                     <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
129                     <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
130                 [% ELSE %]
131                     <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
132                     <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
133                 [% END %]</li>
134             
135             <li><label for="invoice_gstyes" class="radio">Invoice prices:</label>
136                 [% IF ( invoiceincgst ) %]
137                     <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
138                     <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
139                     [% ELSE %]
140                     <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
141                     <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
142                 [% END %]</li>
143             </ol>
144             [% IF gst_values %]
145                 <ol>
146                   <li>
147                     <label for="gstrate">Tax rate: </label>
148                     <select name="gstrate" id="gstrate">
149                     [% FOREACH gst IN gst_values %]
150                       [% IF ( gstrate == gst.option ) %]
151                         <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format ("%.1f") %] %</option>
152                       [% ELSE %]
153                         <option value="[% gst.option %]">[% gst.option * 100 | format ("%.1f") %] %</option>
154                       [% END %]
155                     [% END %]
156                     </select>
157                   </li>
158                 </ol>
159             [% ELSE %]
160                 <input type="hidden" name="gstrate" value="0" />
161             [% END %]
162             <ol>
163             <li><label for="discount">Discount: </label>
164                 <input type="text" size="6" id="discount" name="discount" value="[% discount | format ("%.1f") %]" />%</li>
165             <li>
166                 <label for="deliverytime">Delivery time: </label>
167                 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime %]" /> days
168             </li>
169             <li><label for="notes">Notes: </label>
170                 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
171         </fieldset>
172         <fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
173         <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
174         [% END %]Cancel</a></fieldset>
175         </div>
176     </form>
177 [% ELSE %]
178     <h1>[% name %]</h1>
179         <div class="yui-g">
180             <div id="supplier-company-details" class="yui-u first">
181                 <h2>Vendor details</h2>
182                 <p><span class="label">Company name: </span>[% name %]</p>
183                 <p><span class="label">Postal address: </span>[% postal %]</p>
184                 <p><span class="label">Physical address: </span>[% address1 %][% address2 %][% address3 %][% address4 %]</p>
185                 <p><span class="label">Phone: </span>[% phone %]</p>
186                 <p><span class="label">Fax: </span>[% fax %]</p>
187                 [% IF ( url ) %]
188                     <p><span class="label">Website: </span><a href="[% url %]" target="_blank">[% url %]</a></p>
189                 [% END %]
190                 [% IF ( accountnumber ) %]
191                     <p><span class="label">Account number: </span>[% accountnumber %]</p>
192                 [% END %]
193             </div>
194             <div id="supplier-contact-details" class="yui-u">
195                 <h2>Contact details</h2>
196                 <p><span class="label">Contact name: </span>[% contact %]</p>
197                 <p><span class="label">Position: </span>[% contpos %]</p>
198                 <p><span class="label">Phone: </span>[% contphone %]</p>
199                 <p><span class="label">Alternative phone: </span>[% contaltphone %]</p>
200                 <p><span class="label">Fax: </span>[% contfax %]</p>
201                 [% IF ( contemail ) %]
202                     <p><span class="label">Email: </span><a href="mailto:[% contemail %]">[% contemail %]</a></p>
203                 [% END %]
204                 [% IF ( contnotes ) %]
205                     <p><span class="label">Notes: </span>[% contnotes %]</p>
206                 [% END %]
207             </div>
208         </div>
209         <div id="supplier-ordering-information" class="yui-g">
210         <h3>Ordering information</h3>
211             <p><strong>Vendor is: </strong>
212                     [% IF ( active ) %]
213                         Active
214                     [% ELSE %]
215                         Inactive
216                     [% END %]</p>
217             <p><strong>List prices are: </strong>[% listprice %]</p>
218             <p><strong>Invoice prices are: </strong>[% invoiceprice %]</p>
219             [% IF ( gstrate ) %]<p><strong>Tax number registered: </strong>
220                     [% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
221             <p><strong>List item price includes tax: </strong>
222                     [% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
223             <p><strong>Invoice item price includes tax: </strong>
224                     [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
225             <p><strong>Discount: </strong>
226                 [% discount | format("%.1f") %] %</p>
227             <p><strong>Tax rate: </strong>
228                 [% 0 + gstrate * 100 | format("%.1f") %] %</p>
229             [% IF deliverytime.defined %]
230                 <p><strong>Delivery time: </strong>
231                     [% deliverytime %] days</p>
232             [% END %]
233             [% IF ( notes ) %]<p><strong>Notes: </strong>
234                 [% notes %]</p>[% END %]
235         </div>
236         [% IF ( contracts ) %]
237             <div id="supplier-contracts" class="yui-g">
238                 <h2>Contract(s)</h2>
239                 <table id="contractst">
240                   <thead>
241                     <tr>
242                         <th scope="col">Name</th>
243                         <th scope="col">Description</th>
244                         <th scope="col" class="title-string">Start date</th>
245                         <th scope="col" class="title-string">End date</th>
246                         <th scope="col">&nbsp; </th>
247                         <th scope="col">&nbsp; </th>
248                     </tr>
249                   </thead>
250                   <tbody>
251                     [% FOREACH contract IN contracts %]
252                         [% IF ( loop.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
253                         <td>
254                             <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber %]&amp;booksellerid=[% contract.booksellerid %]">[% contract.contractname %]</a>
255                         </td>
256                         <td>[% contract.contractdescription %]</td>
257                         <td><span title="[% contract.contractstartdate %]">[% contract.contractstartdate | $KohaDates %]</span></td>
258                         <td><span title="[% contract.contractenddate %]">[% contract.contractenddate | $KohaDates %]</span></td>
259                         <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber %]&amp;booksellerid=[% contract.booksellerid %]">Edit</a></td>
260                         <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&amp;contractnumber=[% contract.contractnumber %]&amp;booksellerid=[% contract.booksellerid %]">Delete</a></td>
261                         </tr>
262                     [% END %]
263                   </tbody>
264                 </table>
265             </div>
266         [% END %]
267
268 [% END %]
269
270 </div>
271 </div>
272 <div class="yui-b">
273 [% INCLUDE 'vendor-menu.inc' %]
274 </div>
275 </div>
276 [% INCLUDE 'intranet-bottom.inc' %]