2 [% BLOCK edit_contact %]
4 <input type="hidden" name="contact_id" value="[% contact.id %]" />
5 <li><label for="contact_name[% contact.id %]">Contact name: </label>
6 <input type="text" size="40" id="contact_name[% contact.id %]" name="contact_name" value="[% contact.name %]" /></li>
7 <li><label for="contact_position[% contact.id %]">Position: </label>
8 <input type="text" size="40" id="contact_position[% contact.id %]" name="contact_position" value="[% contact.position %]" /></li>
9 <li><label for="contact_phone[% contact.id %]">Phone: </label>
10 <input type="text" size="20" id="contact_phone[% contact.id %]" name="contact_phone" value="[% contact.phone %]" /> </li>
11 <li><label for="contact_altphone[% contact.id %]">Alternative phone: </label>
12 <input type="text" size="20" id="contact_altphone[% contact.id %]" name="contact_altphone" value="[% contact.altphone %]" /></li>
13 <li><label for="contact_fax[% contact.id %]">Fax: </label>
14 <input type="text" size="20" id="contact_fax[% contact.id %]" name="contact_fax" value="[% contact.fax %]" /></li>
15 <li><label for="contact_email[% contact.id %]">Email: </label>
16 <input type="text" size="40" id="contact_email[% contact.id %]" name="contact_email" value="[% contact.email %]" class="email" /></li>
17 <li><label for="contact_notes[% contact.id %]">Notes: </label>
18 <textarea id="contact_notes[% contact.id %]" name="contact_notes" cols="40" rows="4">[% contact.notes %]</textarea></li>
19 <li><label for="contact_acqprimary[% contact.id %]">Primary acquisitions contact:</label>
20 [% IF contact.acqprimary %]
21 <input type="checkbox" id="contact_acqprimary[% contact.id %]" class="contact_acqprimary" checked="checked"></input>
23 <input type="checkbox" id="contact_acqprimary[% contact.id %]" class="contact_acqprimary"></input>
25 <input type="hidden" class="contact_acqprimary_hidden" name="contact_acqprimary" value="[% contact.acqprimary %]"></input>
26 <li><label for="contact_serialsprimary[% contact.id %]">Primary serials contact:</label>
27 [% IF contact.serialsprimary %]
28 <input type="checkbox" id="contact_serialsprimary[% contact.id %]" class="contact_serialsprimary" checked="checked"></input>
30 <input type="checkbox" id="contact_serialsprimary[% contact.id %]" class="contact_serialsprimary"></input>
32 <input type="hidden" class="contact_serialsprimary_hidden" name="contact_serialsprimary" value="[% contact.serialsprimary %]"></input>
33 <li><label for="contact_claimacquisition[% contact.id %]">Contact about late orders?</label>
34 [% IF contact.claimacquisition %]
35 <input type="checkbox" id="contact_claimacquisition[% contact.id %]" class="contact_claimacquisition" checked="checked"></input>
37 <input type="checkbox" id="contact_claimacquisition[% contact.id %]" class="contact_claimacquisition"></input>
39 <input type="hidden" class="contact_claimacquisition_hidden" name="contact_claimacquisition" value="[% contact.claimacquisition %]"></input>
40 <li><label for="contact_claimissues[% contact.id %]">Contact about late issues?</label>
41 [% IF contact.claimissues %]
42 <input type="checkbox" id="contact_claimissues[% contact.id %]" class="contact_claimissues" checked="checked"></input>
44 <input type="checkbox" id="contact_claimissues[% contact.id %]" class="contact_claimissues"></input>
46 <input type="hidden" class="contact_claimissues_hidden" name="contact_claimissues" value="[% contact.claimissues %]"></input>
48 [% IF contact.id %]<li><button class="btn delete-contact"><i class="fa fa-trash"></i> Delete contact</li>[% END %]
52 [% BLOCK show_contact %]
53 <h3>[% contact.name %]</h3>
54 <p><span class="label">Position: </span>[% contact.position %]</p>
55 <p><span class="label">Phone: </span>[% contact.phone %]</p>
56 <p><span class="label">Alternative phone: </span>[% contact.altphone %]</p>
57 <p><span class="label">Fax: </span>[% contact.fax %]</p>
58 [% IF ( contact.email ) %]
59 <p><span class="label">Email: </span><a href="mailto:[% contact.email %]">[% contact.email %]</a></p>
61 [% IF ( contact.notes ) %]
62 <p><span class="label">Notes: </span>[% contact.notes %]</p>
64 [% IF ( contact.acqprimary ) %]
65 <p><span class="label">Primary acquisitions contact</span></p>
67 [% IF ( contact.serialsprimary ) %]
68 <p><span class="label">Primary serials contact</span></p>
70 [% IF ( contact.claimacquisition ) %]
71 <p><span class="label">Receives claims for late orders</span></p>
73 [% IF ( contact.claimissues ) %]
74 <p><span class="label">Receives claims for late issues</span></p>
78 [% INCLUDE 'doc-head-open.inc' %]
79 <title>Koha › Vendor [% bookselname %]</title>
80 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
81 [% INCLUDE 'doc-head-close.inc' %]
82 [% INCLUDE 'datatables.inc' %]
84 <script type="text/javascript">
86 function confirm_deletion() {
87 if (confirm(_("Confirm deletion of this vendor ?"))) {
88 window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
92 function add_contact() {
93 var new_contact = $('#contact-template').clone();
94 var timestamp = new Date().getTime();
95 $(new_contact).removeAttr('id');
96 $('input, textarea', new_contact).each(function () {
97 $(this).attr('id', $(this).attr('id') + '_' + timestamp);
99 $('label', new_contact).each(function () {
100 $(this).attr('for', $(this).attr('for') + '_' + timestamp);
102 $(new_contact).insertBefore(this);
103 if ($('.supplier-contact').length === 2) { // First contact
104 $.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) {
105 $(checkbox, new_contact).click();
108 $('input[name="contact_name"]', new_contact).focus();
112 function delete_contact(ev) {
113 $(this).parents('.supplier-contact').remove();
117 $(document).ready(function() {
118 var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
120 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
121 { "sType": "title-string", "aTargets" : [ "title-string" ] }
125 $('body').on('click', '.delete-contact', null, delete_contact);
126 $('#add-contact').click(add_contact);
127 $('body').on('click', '.contact_acqprimary', null, function () {
128 if ($(this).is(':checked')) {
129 $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
130 $('.contact_acqprimary_hidden').each(function () {
134 $(this).next('.contact_acqprimary_hidden').val('1');
136 $('body').on('click', '.contact_serialsprimary', null, function () {
137 if ($(this).is(':checked')) {
138 $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
139 $('.contact_serialsprimary_hidden').each(function () {
143 $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
145 $('body').on('click', '.contact_claimacquisition', null, function () {
146 $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
148 $('body').on('click', '.contact_claimissues', null, function () {
149 $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
155 <body id="acq_supplier" class="acq">
156 [% INCLUDE 'header.inc' %]
157 [% INCLUDE 'acquisitions-search.inc' %]
159 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › [% IF ( enter ) %][% IF ( booksellerid ) %] <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> › Update: [% name %][% ELSE %]Add vendor[% END %] [% ELSE %][% name %][% END %]</div>
161 <div id="doc3" class="yui-t2">
167 [% IF ( booksellerid ) %]
168 <h1>Update: [% name %]</h1>
173 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
175 <form action="updatesupplier.pl" name="updatesupplier" class="validated" method="post">
177 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
178 <fieldset class="rows">
179 <legend>Company details</legend>
180 <ol><li><label for="company" class="required">Name:</label>
181 <input type="text" size="40" id="company" name="company" value="[% name %]" required="required" class="required" /><span class="required">Required</span></li>
182 <li><label for="company_postal">Postal address: </label>
183 <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal %]</textarea></li>
184 <li><label for="physical">Physical address: </label>
185 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 %][% address2 %][% address3 %][% address4 %]</textarea></li>
186 <li><label for="company_phone">Phone: </label>
187 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone %]" /></li>
188 <li><label for="company_fax">Fax: </label>
189 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax %]" /></li>
190 <li><label for="website">Website: </label>
191 <input type="text" size="40" id="website" name="website" value="[% url %]" class="url" /></li>
192 <li><label for="accountnumber">Account number: </label>
193 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber %]" /></li></ol>
195 <fieldset class="rows">
196 <legend>Contacts</legend>
197 <fieldset id="contact-template" class="supplier-contact">
198 <legend>Contact details</legend>
199 [% INCLUDE edit_contact %]
201 [% FOREACH contact IN contacts %]
202 <fieldset class="supplier-contact">
203 <legend>Contact details</legend>
204 [% INCLUDE edit_contact %]
207 <button id="add-contact" class="btn"><i class="fa fa-plus"></i> Add another contact</button>
211 <fieldset class="rows">
212 <legend>Ordering information</legend>
213 <ol class="radio"><li><label for="activestatus" class="radio">Vendor is:</label>
215 <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
216 <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" />
218 <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" />
219 <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
223 <li><label for="list_currency">List prices are: </label>
224 <select name="list_currency" id="list_currency">
225 [% FOREACH c IN currencies %]
226 [% IF booksellerid and c.currency == listprice or not booksellerid and c.active %]
227 <option value="[% c.currency %]" selected="selected">[% c.currency %]</option>
228 [% ELSIF not c.archived %]
229 <option value="[% c.currency %]">[% c.currency %]</option>
234 <li><label for="invoice_currency">Invoice prices are: </label>
235 <select name="invoice_currency" id="invoice_currency">
236 [% FOREACH c IN currencies %]
237 [% IF booksellerid and c.currency == invoiceprice or not booksellerid and c.active %]
238 <option value="[% c.currency %]" selected="selected">[% c.currency %]</option>
239 [% ELSIF not c.archived %]
240 <option value="[% c.currency %]">[% c.currency %]</option>
247 <li><label for="gstyes" class="radio">Tax number registered:</label>
249 <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
250 <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
252 <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
253 <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
256 <li><label for="list_gstyes" class="radio">List prices:</label>
257 [% IF ( listincgst ) %]
258 <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
259 <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
261 <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
262 <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
265 <li><label for="invoice_gstyes" class="radio">Invoice prices:</label>
266 [% IF ( invoiceincgst ) %]
267 <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
268 <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
270 <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
271 <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
277 <label for="gstrate">Tax rate: </label>
278 <select name="gstrate" id="gstrate">
279 [% FOREACH gst IN gst_values %]
280 [% IF ( gstrate == gst.option ) %]
281 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format ("%.1f") %] %</option>
283 <option value="[% gst.option %]">[% gst.option * 100 | format ("%.1f") %] %</option>
290 <input type="hidden" name="gstrate" value="0" />
293 <li><label for="discount">Discount: </label>
294 <input type="text" size="6" id="discount" name="discount" value="[% discount | format ("%.1f") %]" />%</li>
296 <label for="deliverytime">Delivery time: </label>
297 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime %]" /> days
299 <li><label for="notes">Notes: </label>
300 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
302 <fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
303 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
304 [% END %]Cancel</a></fieldset>
310 <div id="supplier-company-details" class="yui-u first">
311 <h2>Vendor details</h2>
312 <p><span class="label">Company name: </span>[% name %]</p>
313 <p><span class="label">Postal address: </span>[% postal %]</p>
314 <p><span class="label">Physical address: </span>[% address1 %][% address2 %][% address3 %][% address4 %]</p>
315 <p><span class="label">Phone: </span>[% phone %]</p>
316 <p><span class="label">Fax: </span>[% fax %]</p>
318 <p><span class="label">Website: </span><a href="[% url %]">[% url %]</a></p>
320 [% IF ( accountnumber ) %]
321 <p><span class="label">Account number: </span>[% accountnumber %]</p>
324 <div id="supplier-ordering-information">
325 <h2>Ordering information</h2>
326 <p><strong>Vendor is: </strong>
332 <p><strong>List prices are: </strong>[% listprice %]</p>
333 <p><strong>Invoice prices are: </strong>[% invoiceprice %]</p>
334 [% IF ( gstrate ) %]<p><strong>Tax number registered: </strong>
335 [% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
336 <p><strong>List item price includes tax: </strong>
337 [% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
338 <p><strong>Invoice item price includes tax: </strong>
339 [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
340 <p><strong>Discount: </strong>
341 [% discount | format("%.1f") %] %</p>
342 <p><strong>Tax rate: </strong>
343 [% 0 + gstrate * 100 | format("%.1f") %] %</p>
344 [% IF deliverytime.defined %]
345 <p><strong>Delivery time: </strong>
346 [% deliverytime %] days</p>
348 [% IF ( notes ) %]<p><strong>Notes: </strong>
349 [% notes %]</p>[% END %]
353 <div class="supplier-contact-details yui-u">
355 [% FOREACH contact IN contacts %]
356 [% INCLUDE show_contact %]
362 [% IF ( contracts ) %]
363 <div id="supplier-contracts" class="yui-g">
365 <table id="contractst">
368 <th scope="col">Name</th>
369 <th scope="col">Description</th>
370 <th scope="col" class="title-string">Start date</th>
371 <th scope="col" class="title-string">End date</th>
372 <th scope="col">Actions</th>
376 [% FOREACH contract IN contracts %]
379 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]">[% contract.contractname %]</a>
381 <td>[% contract.contractdescription %]</td>
382 <td><span title="[% contract.contractstartdate %]">[% contract.contractstartdate | $KohaDates %]</span></td>
383 <td><span title="[% contract.contractenddate %]">[% contract.contractenddate | $KohaDates %]</span></td>
385 <a class="btn btn-mini" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]"><i class="fa fa-pencil"></i> Edit</a>
386 <a class="btn btn-mini" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]"><i class="fa fa-trash"></i> Delete</a>
400 [% INCLUDE 'vendor-menu.inc' %]
403 [% INCLUDE 'intranet-bottom.inc' %]