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_orderacquisition[% contact.id %]">Contact when ordering?</label>
34 [% IF contact.orderacquisition %]
35 <input type="checkbox" id="contact_orderacquisition[% contact.id %]" class="contact_orderacquisition" checked="checked"></input>
37 <input type="checkbox" id="contact_orderacquisition[% contact.id %]" class="contact_orderacquisition"></input>
39 <input type="hidden" class="contact_orderacquisition_hidden" name="contact_orderacquisition" value="[% contact.orderacquisition %]"></input>
40 <li><label for="contact_claimacquisition[% contact.id %]">Contact about late orders?</label>
41 [% IF contact.claimacquisition %]
42 <input type="checkbox" id="contact_claimacquisition[% contact.id %]" class="contact_claimacquisition" checked="checked"></input>
44 <input type="checkbox" id="contact_claimacquisition[% contact.id %]" class="contact_claimacquisition"></input>
46 <input type="hidden" class="contact_claimacquisition_hidden" name="contact_claimacquisition" value="[% contact.claimacquisition %]"></input>
47 <li><label for="contact_claimissues[% contact.id %]">Contact about late issues?</label>
48 [% IF contact.claimissues %]
49 <input type="checkbox" id="contact_claimissues[% contact.id %]" class="contact_claimissues" checked="checked"></input>
51 <input type="checkbox" id="contact_claimissues[% contact.id %]" class="contact_claimissues"></input>
53 <input type="hidden" class="contact_claimissues_hidden" name="contact_claimissues" value="[% contact.claimissues %]"></input>
55 [% IF contact.id %]<li><button class="btn btn-default delete-contact"><i class="fa fa-trash"></i> Delete contact</li>[% END %]
59 [% BLOCK show_contact %]
60 <h3>[% contact.name %]</h3>
61 <p><span class="label">Position: </span>[% contact.position %]</p>
62 <p><span class="label">Phone: </span>[% contact.phone %]</p>
63 <p><span class="label">Alternative phone: </span>[% contact.altphone %]</p>
64 <p><span class="label">Fax: </span>[% contact.fax %]</p>
65 [% IF ( contact.email ) %]
66 <p><span class="label">Email: </span><a href="mailto:[% contact.email %]">[% contact.email %]</a></p>
68 [% IF ( contact.notes ) %]
69 <p><span class="label">Notes: </span>[% contact.notes %]</p>
71 [% IF ( contact.acqprimary ) %]
72 <p><span class="label">Primary acquisitions contact</span></p>
74 [% IF ( contact.serialsprimary ) %]
75 <p><span class="label">Primary serials contact</span></p>
77 [% IF ( contact.orderacquisition ) %]
78 <p><span class="label">Receives orders</span></p>
80 [% IF ( contact.claimacquisition ) %]
81 <p><span class="label">Receives claims for late orders</span></p>
83 [% IF ( contact.claimissues ) %]
84 <p><span class="label">Receives claims for late issues</span></p>
88 [% INCLUDE 'doc-head-open.inc' %]
89 <title>Koha › Vendor [% bookselname %]</title>
90 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
91 [% INCLUDE 'doc-head-close.inc' %]
92 [% INCLUDE 'datatables.inc' %]
94 <script type="text/javascript">
96 function confirm_deletion() {
97 if (confirm(_("Confirm deletion of this vendor ?"))) {
98 window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
102 function add_contact() {
103 var new_contact = $('#contact-template').clone();
104 var timestamp = new Date().getTime();
105 $(new_contact).removeAttr('id');
106 $('input, textarea', new_contact).each(function () {
107 $(this).attr('id', $(this).attr('id') + '_' + timestamp);
109 $('label', new_contact).each(function () {
110 $(this).attr('for', $(this).attr('for') + '_' + timestamp);
112 $(new_contact).insertBefore(this);
113 if ($('.supplier-contact').length === 2) { // First contact
114 $.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) {
115 $(checkbox, new_contact).click();
118 $('input[name="contact_name"]', new_contact).focus();
122 function delete_contact(ev) {
123 $(this).parents('.supplier-contact').remove();
127 $(document).ready(function() {
128 var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
130 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
131 { "sType": "title-string", "aTargets" : [ "title-string" ] }
135 $('body').on('click', '.delete-contact', null, delete_contact);
136 $('#add-contact').click(add_contact);
137 $('body').on('click', '.contact_acqprimary', null, function () {
138 if ($(this).is(':checked')) {
139 $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
140 $('.contact_acqprimary_hidden').each(function () {
144 $(this).next('.contact_acqprimary_hidden').val('1');
146 $('body').on('click', '.contact_serialsprimary', null, function () {
147 if ($(this).is(':checked')) {
148 $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
149 $('.contact_serialsprimary_hidden').each(function () {
153 $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
155 $('body').on('click', '.contact_orderacquisition', null, function () {
156 $(this).next('.contact_orderacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
158 $('body').on('click', '.contact_claimacquisition', null, function () {
159 $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
161 $('body').on('click', '.contact_claimissues', null, function () {
162 $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
168 <body id="acq_supplier" class="acq">
169 [% INCLUDE 'header.inc' %]
170 [% INCLUDE 'acquisitions-search.inc' %]
172 <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>
174 <div id="doc3" class="yui-t2">
180 [% IF ( booksellerid ) %]
181 <h1>Update: [% name %]</h1>
186 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
188 <form action="updatesupplier.pl" name="updatesupplier" class="validated" method="post">
190 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
191 <fieldset class="rows">
192 <legend>Company details</legend>
193 <ol><li><label for="company" class="required">Name:</label>
194 <input type="text" size="40" id="company" name="company" value="[% name %]" required="required" class="required" /><span class="required">Required</span></li>
195 <li><label for="company_postal">Postal address: </label>
196 <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal %]</textarea></li>
197 <li><label for="physical">Physical address: </label>
198 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 %][% address2 %][% address3 %][% address4 %]</textarea></li>
199 <li><label for="company_phone">Phone: </label>
200 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone %]" /></li>
201 <li><label for="company_fax">Fax: </label>
202 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax %]" /></li>
203 <li><label for="website">Website: </label>
204 <input type="text" size="40" id="website" name="website" value="[% url %]" class="url" /></li>
205 <li><label for="accountnumber">Account number: </label>
206 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber %]" /></li></ol>
208 <fieldset class="rows">
209 <legend>Contacts</legend>
210 <fieldset id="contact-template" class="supplier-contact">
211 <legend>Contact details</legend>
212 [% INCLUDE edit_contact %]
214 [% FOREACH contact IN contacts %]
215 <fieldset class="supplier-contact">
216 <legend>Contact details</legend>
217 [% INCLUDE edit_contact %]
220 <button id="add-contact" class="btn btn-default"><i class="fa fa-plus"></i> Add another contact</button>
224 <fieldset class="rows">
225 <legend>Ordering information</legend>
226 <ol class="radio"><li><label for="activestatus" class="radio">Vendor is:</label>
228 <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
229 <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" />
231 <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" />
232 <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
236 <li><label for="list_currency">List prices are: </label>
237 <select name="list_currency" id="list_currency">
238 [% FOREACH c IN currencies %]
239 [% IF booksellerid and c.currency == listprice or not booksellerid and c.active %]
240 <option value="[% c.currency %]" selected="selected">[% c.currency %]</option>
241 [% ELSIF not c.archived %]
242 <option value="[% c.currency %]">[% c.currency %]</option>
247 <li><label for="invoice_currency">Invoice prices are: </label>
248 <select name="invoice_currency" id="invoice_currency">
249 [% FOREACH c IN currencies %]
250 [% IF booksellerid and c.currency == invoiceprice or not booksellerid and c.active %]
251 <option value="[% c.currency %]" selected="selected">[% c.currency %]</option>
252 [% ELSIF not c.archived %]
253 <option value="[% c.currency %]">[% c.currency %]</option>
260 <li><label for="gstyes" class="radio">Tax number registered:</label>
262 <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
263 <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
265 <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
266 <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
269 <li><label for="list_gstyes" class="radio">List prices:</label>
270 [% IF ( listincgst ) %]
271 <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
272 <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
274 <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
275 <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
278 <li><label for="invoice_gstyes" class="radio">Invoice prices:</label>
279 [% IF ( invoiceincgst ) %]
280 <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
281 <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
283 <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
284 <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
290 <label for="tax_rate">Tax rate: </label>
291 <select name="tax_rate" id="tax_rate">
292 [% FOREACH gst IN gst_values %]
293 [% IF ( tax_rate == gst.option ) %]
294 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 %] %</option>
296 <option value="[% gst.option %]">[% gst.option * 100 %] %</option>
303 <input type="hidden" name="tax_rate" value="0" />
306 <li><label for="discount">Discount: </label>
307 <input type="text" size="6" id="discount" name="discount" value="[% discount | format ("%.1f") %]" />%</li>
309 <label for="deliverytime">Delivery time: </label>
310 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime %]" /> days
312 <li><label for="notes">Notes: </label>
313 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
315 <fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
316 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
317 [% END %]Cancel</a></fieldset>
323 <div id="supplier-company-details" class="yui-u first">
324 <h2>Vendor details</h2>
325 <p><span class="label">Company name: </span>[% name %]</p>
326 <p><span class="label">Postal address: </span>[% postal %]</p>
327 <p><span class="label">Physical address: </span>[% address1 %][% address2 %][% address3 %][% address4 %]</p>
328 <p><span class="label">Phone: </span>[% phone %]</p>
329 <p><span class="label">Fax: </span>[% fax %]</p>
331 <p><span class="label">Website: </span><a href="[% url %]">[% url %]</a></p>
333 [% IF ( accountnumber ) %]
334 <p><span class="label">Account number: </span>[% accountnumber %]</p>
337 <div id="supplier-ordering-information">
338 <h2>Ordering information</h2>
339 <p><strong>Vendor is: </strong>
345 <p><strong>List prices are: </strong>[% listprice %]</p>
346 <p><strong>Invoice prices are: </strong>[% invoiceprice %]</p>
347 [% IF ( tax_rate ) %]<p><strong>Tax number registered: </strong>
348 [% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
349 <p><strong>List item price includes tax: </strong>
350 [% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
351 <p><strong>Invoice item price includes tax: </strong>
352 [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
353 <p><strong>Discount: </strong>
354 [% discount | format("%.1f") %] %</p>
355 <p><strong>Tax rate: </strong>
356 [% 0 + tax_rate * 100 %] %</p>
357 [% IF deliverytime.defined %]
358 <p><strong>Delivery time: </strong>
359 [% deliverytime %] days</p>
361 [% IF ( notes ) %]<p><strong>Notes: </strong>
362 [% notes %]</p>[% END %]
366 <div class="supplier-contact-details yui-u">
368 [% FOREACH contact IN contacts %]
369 [% INCLUDE show_contact %]
375 <div class="subscription-details">
376 <h2>Subscription details</h2>
377 <p><strong>Number of subscriptions: </strong>[% subscriptioncount %]
378 [% IF subscriptioncount == 1 %] subscription [% ELSE %]
379 subscriptions [% END %]
388 [% IF ( contracts ) %]
389 <div id="supplier-contracts" class="yui-g">
391 <table id="contractst">
394 <th scope="col">Name</th>
395 <th scope="col">Description</th>
396 <th scope="col" class="title-string">Start date</th>
397 <th scope="col" class="title-string">End date</th>
398 <th scope="col">Actions</th>
402 [% FOREACH contract IN contracts %]
405 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]">[% contract.contractname %]</a>
407 <td>[% contract.contractdescription %]</td>
408 <td><span title="[% contract.contractstartdate %]">[% contract.contractstartdate | $KohaDates %]</span></td>
409 <td><span title="[% contract.contractenddate %]">[% contract.contractenddate | $KohaDates %]</span></td>
411 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]"><i class="fa fa-pencil"></i> Edit</a>
412 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]"><i class="fa fa-trash"></i> Delete</a>
426 [% INCLUDE 'vendor-menu.inc' %]
429 [% INCLUDE 'intranet-bottom.inc' %]