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 %]" /></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">[% contnotes %]</textarea></li>
19 [% IF contact.id %]<li><button class="btn" class="delete-contact"><i class="icon-remove"></i> Delete contact</li>[% END %]
23 [% BLOCK show_contact %]
24 <h3>[% contact.name %]</h3>
25 <p><span class="label">Position: </span>[% contact.position %]</p>
26 <p><span class="label">Phone: </span>[% contact.phone %]</p>
27 <p><span class="label">Alternative phone: </span>[% contact.altphone %]</p>
28 <p><span class="label">Fax: </span>[% contact.fax %]</p>
29 [% IF ( contact.email ) %]
30 <p><span class="label">Email: </span><a href="mailto:[% contact.email %]">[% contact.email %]</a></p>
32 [% IF ( contact.notes ) %]
33 <p><span class="label">Notes: </span>[% contact.notes %]</p>
37 [% INCLUDE 'doc-head-open.inc' %]
38 <title>Koha › Vendor [% bookselname %]</title>
39 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
40 [% INCLUDE 'doc-head-close.inc' %]
41 [% INCLUDE 'datatables.inc' %]
43 <script type="text/javascript">
45 function confirm_deletion() {
46 if (confirm(_("Confirm deletion of this vendor ?"))) {
47 window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=delete";
51 function add_contact() {
52 var new_contact = $('#contact-template').clone();
53 var timestamp = new Date().getTime();
54 $(new_contact).removeAttr('id');
55 $('input, textarea', new_contact).each(function () {
56 $(this).attr('id', $(this).attr('id') + '_' + timestamp);
58 $('label', new_contact).each(function () {
59 $(this).attr('for', $(this).attr('for') + '_' + timestamp);
61 $(new_contact).insertBefore(this);
62 $('input[name="contact_name"]', new_contact).focus();
66 function delete_contact() {
67 $(this).parents('fieldset').delete();
71 $(document).ready(function() {
72 var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
74 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
75 { "sType": "title-string", "aTargets" : [ "title-string" ] }
79 $('.delete-contact').click(delete_contact);
80 $('#add-contact').click(add_contact);
85 <body id="acq_supplier" class="acq">
86 [% INCLUDE 'header.inc' %]
87 [% INCLUDE 'acquisitions-search.inc' %]
89 <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>
91 <div id="doc3" class="yui-t2">
97 [% IF ( booksellerid ) %]
98 <h1>Update: [% name %]</h1>
103 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
105 <form action="updatesupplier.pl" name="updatesupplier" class="validated" method="post">
107 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
108 <fieldset class="rows">
109 <legend>Company details</legend>
110 <ol><li><label for="company" class="required">Name:</label>
111 <input type="text" size="40" id="company" name="company" value="[% name %]" required="required" class="required" /><span class="required">Required</span></li>
112 <li><label for="company_postal">Postal address: </label>
113 <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal %]</textarea></li>
114 <li><label for="physical">Physical address: </label>
115 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 %][% address2 %][% address3 %][% address4 %]</textarea></li>
116 <li><label for="company_phone">Phone: </label>
117 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone %]" /></li>
118 <li><label for="company_fax">Fax: </label>
119 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax %]" /></li>
120 <li><label for="website">Website: </label>
121 <input type="text" size="40" id="website" name="website" value="[% url %]" /></li>
122 <li><label for="accountnumber">Account number: </label>
123 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber %]" /></li></ol>
125 <fieldset class="rows">
126 <legend>Contacts</legend>
127 <fieldset id="contact-template" class="supplier-contact">
128 <legend>Contact details</legend>
129 [% INCLUDE edit_contact %]
131 [% FOREACH contact IN contacts %]
132 <fieldset class="supplier-contact">
133 <legend>Contact details</legend>
134 [% INCLUDE edit_contact %]
137 <button id="add-contact" class="btn"><i class="icon-plus"></i> Add another contact</button>
141 <fieldset class="rows">
142 <legend>Ordering information</legend>
143 <ol class="radio"><li><label for="activestatus" class="radio">Vendor is:</label>
145 <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
146 <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" />
148 <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" />
149 <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
153 <li><label for="list_currency">List prices are: </label>
154 <select name="list_currency" id="list_currency">
155 [% FOREACH loop_currenc IN loop_currency %]
156 [% IF ( loop_currenc.listprice ) %]<option value="[% loop_currenc.currency %]" selected="selected">[% loop_currenc.currency %]</option>
157 [% ELSE %]<option value="[% loop_currenc.currency %]">[% loop_currenc.currency %]</option>[% END %]
161 <li><label for="invoice_currency">Invoice prices are: </label>
162 <select name="invoice_currency" id="invoice_currency">
163 [% FOREACH loop_currenc IN loop_currency %]
164 [% IF ( loop_currenc.invoiceprice ) %]<option value="[% loop_currenc.currency %]" selected="selected">[% loop_currenc.currency %]</option>
165 [% ELSE %]<option value="[% loop_currenc.currency %]">[% loop_currenc.currency %]</option>[% END %]
171 <li><label for="gstyes" class="radio">Tax number registered:</label>
173 <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
174 <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
176 <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
177 <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
180 <li><label for="list_gstyes" class="radio">List prices:</label>
181 [% IF ( listincgst ) %]
182 <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
183 <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
185 <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
186 <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
189 <li><label for="invoice_gstyes" class="radio">Invoice prices:</label>
190 [% IF ( invoiceincgst ) %]
191 <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
192 <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
194 <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
195 <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
201 <label for="gstrate">Tax rate: </label>
202 <select name="gstrate" id="gstrate">
203 [% FOREACH gst IN gst_values %]
204 [% IF ( gstrate == gst.option ) %]
205 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format ("%.1f") %] %</option>
207 <option value="[% gst.option %]">[% gst.option * 100 | format ("%.1f") %] %</option>
214 <input type="hidden" name="gstrate" value="0" />
217 <li><label for="discount">Discount: </label>
218 <input type="text" size="6" id="discount" name="discount" value="[% discount | format ("%.1f") %]" />%</li>
220 <label for="deliverytime">Delivery time: </label>
221 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime %]" /> days
223 <li><label for="notes">Notes: </label>
224 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes %]</textarea></li></ol>
226 <fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
227 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
228 [% END %]Cancel</a></fieldset>
234 <div id="supplier-company-details" class="yui-u first">
235 <h2>Vendor details</h2>
236 <p><span class="label">Company name: </span>[% name %]</p>
237 <p><span class="label">Postal address: </span>[% postal %]</p>
238 <p><span class="label">Physical address: </span>[% address1 %][% address2 %][% address3 %][% address4 %]</p>
239 <p><span class="label">Phone: </span>[% phone %]</p>
240 <p><span class="label">Fax: </span>[% fax %]</p>
242 <p><span class="label">Website: </span><a href="[% url %]" target="_blank">[% url %]</a></p>
244 [% IF ( accountnumber ) %]
245 <p><span class="label">Account number: </span>[% accountnumber %]</p>
248 <div id="supplier-ordering-information">
249 <h2>Ordering information</h2>
250 <p><strong>Vendor is: </strong>
256 <p><strong>List prices are: </strong>[% listprice %]</p>
257 <p><strong>Invoice prices are: </strong>[% invoiceprice %]</p>
258 [% IF ( gstrate ) %]<p><strong>Tax number registered: </strong>
259 [% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
260 <p><strong>List item price includes tax: </strong>
261 [% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
262 <p><strong>Invoice item price includes tax: </strong>
263 [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
264 <p><strong>Discount: </strong>
265 [% discount | format("%.1f") %] %</p>
266 <p><strong>Tax rate: </strong>
267 [% 0 + gstrate * 100 | format("%.1f") %] %</p>
268 [% IF deliverytime.defined %]
269 <p><strong>Delivery time: </strong>
270 [% deliverytime %] days</p>
272 [% IF ( notes ) %]<p><strong>Notes: </strong>
273 [% notes %]</p>[% END %]
277 <div class="supplier-contact-details yui-u">
279 [% FOREACH contact IN contacts %]
280 [% INCLUDE show_contact %]
286 [% IF ( contracts ) %]
287 <div id="supplier-contracts" class="yui-g">
289 <table id="contractst">
292 <th scope="col">Name</th>
293 <th scope="col">Description</th>
294 <th scope="col" class="title-string">Start date</th>
295 <th scope="col" class="title-string">End date</th>
296 <th scope="col"> </th>
297 <th scope="col"> </th>
301 [% FOREACH contract IN contracts %]
302 [% IF ( loop.even ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
304 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]">[% contract.contractname %]</a>
306 <td>[% contract.contractdescription %]</td>
307 <td><span title="[% contract.contractstartdate %]">[% contract.contractstartdate | $KohaDates %]</span></td>
308 <td><span title="[% contract.contractenddate %]">[% contract.contractenddate | $KohaDates %]</span></td>
309 <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]">Edit</a></td>
310 <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=[% contract.contractnumber %]&booksellerid=[% contract.booksellerid %]">Delete</a></td>
323 [% INCLUDE 'vendor-menu.inc' %]
326 [% INCLUDE 'intranet-bottom.inc' %]