0a49619121c793cef892a126d99785451388016c
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / supplier.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% BLOCK edit_contact %]
5     <ol id="contact-form">
6         <input type="hidden" name="contact_id" value="[% contact.id | html %]" />
7         <li><label for="contact_name[% contact.id | html %]">Contact name: </label>
8             <input type="text" size="40" id="contact_name[% contact.id | html %]" name="contact_name" value="[% contact.name | html %]" /></li>
9         <li><label for="contact_position[% contact.id | html %]">Position: </label>
10             <input type="text" size="40" id="contact_position[% contact.id | html %]" name="contact_position" value="[% contact.position | html %]" /></li>
11         <li><label for="contact_phone[% contact.id | html %]">Phone: </label>
12                 <input type="text" size="20" id="contact_phone[% contact.id | html %]" name="contact_phone" value="[% contact.phone | html %]" /> </li>
13         <li><label for="contact_altphone[% contact.id | html %]">Alternative phone: </label>
14             <input type="text" size="20" id="contact_altphone[% contact.id | html %]" name="contact_altphone" value="[% contact.altphone | html %]" /></li>
15         <li><label for="contact_fax[% contact.id | html %]">Fax: </label>
16             <input type="text" size="20" id="contact_fax[% contact.id | html %]" name="contact_fax" value="[% contact.fax | html %]" /></li>
17         <li><label for="contact_email[% contact.id | html %]">Email: </label>
18             <input type="text" size="40" id="contact_email[% contact.id | html %]" name="contact_email" value="[% contact.email | html %]" class="email" /></li>
19         <li><label for="contact_notes[% contact.id | html %]">Notes: </label>
20             <textarea id="contact_notes[% contact.id | html %]" name="contact_notes" cols="40" rows="4">[% contact.notes | html %]</textarea></li>
21         <li><label for="contact_acqprimary[% contact.id | html %]">Primary acquisitions contact:</label>
22             [% IF contact.acqprimary %]
23                 <input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary" checked="checked"></input>
24             [% ELSE %]
25                 <input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary"></input>
26             [% END %]
27             <input type="hidden" class="contact_acqprimary_hidden" name="contact_acqprimary" value="[% contact.acqprimary | html %]"></input>
28         <li><label for="contact_serialsprimary[% contact.id | html %]">Primary serials contact:</label>
29             [% IF contact.serialsprimary %]
30                 <input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary" checked="checked"></input>
31             [% ELSE %]
32                 <input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary"></input>
33             [% END %]
34             <input type="hidden" class="contact_serialsprimary_hidden" name="contact_serialsprimary" value="[% contact.serialsprimary | html %]"></input>
35         <li><label for="contact_orderacquisition[% contact.id | html %]">Contact when ordering?</label>
36             [% IF contact.orderacquisition %]
37                 <input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition" checked="checked"></input>
38             [% ELSE %]
39                 <input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition"></input>
40             [% END %]
41             <input type="hidden" class="contact_orderacquisition_hidden" name="contact_orderacquisition" value="[% contact.orderacquisition | html %]"></input>
42         <li><label for="contact_claimacquisition[% contact.id | html %]">Contact about late orders?</label>
43             [% IF contact.claimacquisition %]
44                 <input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition" checked="checked"></input>
45             [% ELSE %]
46                 <input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition"></input>
47             [% END %]
48             <input type="hidden" class="contact_claimacquisition_hidden" name="contact_claimacquisition" value="[% contact.claimacquisition | html %]"></input>
49         <li><label for="contact_claimissues[% contact.id | html %]">Contact about late issues?</label>
50             [% IF contact.claimissues %]
51                 <input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues" checked="checked"></input>
52             [% ELSE %]
53                 <input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues"></input>
54             [% END %]
55             <input type="hidden" class="contact_claimissues_hidden" name="contact_claimissues" value="[% contact.claimissues | html %]"></input>
56         </li>
57         [% IF contact.id %]<li><button class="btn btn-default delete-contact"><i class="fa fa-trash"></i> Delete contact</li>[% END %]
58     </ol>
59 [% END %]
60
61 [% BLOCK show_contact %]
62     <h3>[% contact.name | html %]</h3>
63     <p><span class="label">Position: </span>[% contact.position | html %]</p>
64     <p><span class="label">Phone: </span>[% contact.phone | html %]</p>
65     <p><span class="label">Alternative phone: </span>[% contact.altphone | html %]</p>
66     <p><span class="label">Fax: </span>[% contact.fax | html %]</p>
67     [% IF ( contact.email ) %]
68         <p><span class="label">Email: </span><a href="mailto:[% contact.email | uri %]">[% contact.email | html %]</a></p>
69     [% END %]
70     [% IF ( contact.notes ) %]
71         <p><span class="label">Notes: </span>[% contact.notes | html %]</p>
72     [% END %]
73     [% IF ( contact.acqprimary ) %]
74         <p><span class="label">Primary acquisitions contact</span></p>
75     [% END %]
76     [% IF ( contact.serialsprimary ) %]
77         <p><span class="label">Primary serials contact</span></p>
78     [% END %]
79     [% IF ( contact.orderacquisition ) %]
80         <p><span class="label">Receives orders</span></p>
81     [% END %]
82     [% IF ( contact.claimacquisition ) %]
83         <p><span class="label">Receives claims for late orders</span></p>
84     [% END %]
85     [% IF ( contact.claimissues ) %]
86         <p><span class="label">Receives claims for late issues</span></p>
87     [% END %]
88 [% END %]
89
90 [% SET footerjs = 1 %]
91 [% INCLUDE 'doc-head-open.inc' %]
92 <title>Vendor [% name | html %] &rsaquo; Koha</title>
93 [% INCLUDE 'doc-head-close.inc' %]
94 </head>
95
96 <body id="acq_supplier" class="acq">
97 [% WRAPPER 'header.inc' %]
98     [% INCLUDE 'acquisitions-search.inc' %]
99 [% END %]
100
101 [% WRAPPER 'sub-header.inc' %]
102 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
103     <ol>
104         <li>
105             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
106         </li>
107         <li>
108             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
109         </li>
110         [% IF ( enter ) %]
111             [% IF ( booksellerid ) %]
112                 <li>
113                     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
114                 </li>
115                 <li>
116                     <a href="#" aria-current="page">
117                         Update: [% name | html %]
118                     </a>
119                 </li>
120             [% ELSE %]
121                 <li>
122                     <a href="#" aria-current="page">
123                         Add vendor
124                     </a>
125                 </li>
126             [% END %]
127         [% ELSE %]
128             <li>
129                 <a href="#" aria-current="page">
130                     [% name | html %]
131                 </a>
132             </li>
133         [% END %]
134     </ol>
135 </nav>
136 [% END %]
137
138 <div class="main container-fluid">
139     <div class="row">
140         <div class="col-sm-10 col-sm-push-2">
141             <main>
142
143     [% IF ( enter ) %]
144         [% IF ( booksellerid ) %]
145         <h1>Update: [% name | html %]</h1>
146     [% ELSE %]
147         <h1>Add vendor</h1>
148     [% END %]
149     [% END %]
150 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
151 [% IF ( enter ) %]
152     <form action="updatesupplier.pl" name="updatesupplier" style="display:block" class="validated" method="post">
153         <div id="toolbar" class="btn-toolbar">
154             <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> Save</button>
155             [% IF ( booksellerid ) %]
156                 <a class="btn btn-default cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">
157             [% ELSE %]
158                 <a class="btn btn-default cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
159             [% END %] <i class="fa fa-remove"></i> Cancel</a>
160         </div>
161
162         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
163         <fieldset class="rows">
164             <legend>Company details</legend>
165             <ol><li><label for="company" class="required">Name:</label>
166                 <input type="text" size="40" id="company" name="company" value="[% name | html %]" required="required" class="required focus" /><span class="required">Required</span></li>
167             <li><label for="company_postal">Postal address: </label>
168                     <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal | html %]</textarea></li>
169             <li><label for="physical">Physical address: </label>
170                 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</textarea></li>
171             <li><label for="company_phone">Phone: </label>
172                 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone | html %]" /></li>
173             <li><label for="company_fax">Fax: </label>
174                 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax | html %]" /></li>
175             <li><label for="website">Website: </label>
176                 <input type="text" size="40" id="website" name="website" value="[% url | html %]" class="url" /></li>
177             <li><label for="accountnumber">Account number: </label>
178                 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber | html %]" /></li>
179                 <li>
180                     <label for="vendor_type">Vendor type: </label>
181                     [% PROCESS 'av-build-dropbox.inc' name="vendor_type", category="VENDOR_TYPE", default=type, empty=1, size = 20 %]
182                 </li>
183             </ol>
184         </fieldset>
185         <fieldset class="rows">
186             <legend>Contacts</legend>
187             <fieldset id="contact-template" class="supplier-contact">
188                 <legend>Contact details</legend>
189                 [% INCLUDE edit_contact %]
190             </fieldset>
191             [% FOREACH contact IN contacts %]
192                 <fieldset class="supplier-contact">
193                     <legend>Contact details</legend>
194                     [% INCLUDE edit_contact %]
195                 </fieldset>
196             [% END %]
197             <button id="add-contact" class="btn btn-default"><i class="fa fa-plus"></i> Add another contact</button>
198         </fieldset>
199
200         <fieldset class="rows">
201             <legend>Ordering information</legend>
202             <ol><li><label for="activestatus">Vendor is:</label>
203                     [% IF ( active ) %]
204                         <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
205                         <label class="radio" for="activestatus">Active</label>
206                         <input type="radio" id="inactivestatus" name="status" value="0" />
207                         <label class="radio" for="inactivestatus">Inactive</label>
208                     [% ELSE %]
209                         <input type="radio" id="activestatus" name="status" value="1" />
210                         <label class="radio" for="activestatus">Active</label>
211                         <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
212                         <label class="radio" for="inactivestatus">Inactive</label>
213                     [% END %]</li>
214             <li><label for="list_currency">List prices are: </label>
215                 <select name="list_currency" id="list_currency">
216                     [% FOREACH c IN currencies %]
217                         [% IF booksellerid and c.currency == listprice or not booksellerid and c.active %]
218                             <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
219                         [% ELSIF not c.archived %]
220                             <option value="[% c.currency | html %]">[% c.currency | html %]</option>
221                         [% END %]
222                     [% END %]
223                 </select>
224             </li>
225             <li><label for="invoice_currency">Invoice prices are: </label>
226                 <select name="invoice_currency" id="invoice_currency">
227                     [% FOREACH c IN currencies %]
228                         [% IF booksellerid and c.currency == invoiceprice or not booksellerid and c.active %]
229                             <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
230                         [% ELSIF not c.archived %]
231                             <option value="[% c.currency | html %]">[% c.currency | html %]</option>
232                         [% END %]
233                     [% END %]
234                 </select>
235             </li>
236             <li><label for="gstyes">Tax number registered:</label>
237                 [% IF ( gstreg ) %]
238                     <label class="radio" for="gstyes">Yes</label>
239                     <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
240                     <label class="radio" for="gstno">No</label>
241                     <input type="radio" name="gst" id="gstno" value="0" />
242                 [% ELSE %]
243                     <label class="radio" for="gstyes">Yes</label>
244                     <input type="radio" name="gst" id="gstyes" value="1" />
245                     <label class="radio" for="gstno">No</label>
246                     <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
247                 [% END %]</li>
248
249             <li><label for="list_gstyes">List prices:</label>
250                 [% IF ( listincgst ) %]
251                     <label class="radio" for="list_gstyes">Include tax</label>
252                     <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
253                     <label class="radio" for="list_gstno">Don't include tax</label>
254                     <input type="radio" id="list_gstno" name="list_gst" value="0" />
255                 [% ELSE %]
256                     <label class="radio" for="list_gstyes">Include tax</label>
257                     <input type="radio" id="list_gstyes" name="list_gst" value="1" />
258                     <label class="radio" for="list_gstno">Don't include tax</label>
259                     <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
260                 [% END %]</li>
261
262             <li><label for="invoice_gstyes">Invoice prices:</label>
263                 [% IF ( invoiceincgst ) %]
264                     <label class="radio" for="invoice_gstyes">Include tax</label>
265                     <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
266                     <label class="radio" for="invoice_gstno">Don't include tax</label>
267                     <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
268                     [% ELSE %]
269                     <label class="radio" for="invoice_gstyes">Include tax</label>
270                     <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
271                     <label class="radio" for="invoice_gstno">Don't include tax</label>
272                     <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
273                 [% END %]</li>
274
275             [% IF gst_values %]
276                 <li>
277                   <label for="tax_rate">Tax rate: </label>
278                   <select name="tax_rate" id="tax_rate">
279                   [% FOREACH gst IN gst_values %]
280                     [% IF ( tax_rate == gst.option ) %]
281                       <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %] %</option>
282                     [% ELSE %]
283                       <option value="[% gst.option | html %]">[% gst.option * 100 | html %] %</option>
284                     [% END %]
285                   [% END %]
286                   </select>
287                 </li>
288             [% ELSE %]
289                 <input type="hidden" name="tax_rate" value="0" />
290             [% END %]
291             <li><label for="discount">Discount: </label>
292                 <input type="text" size="6" id="discount" name="discount" value="[% discount | format ('%.1f') %]" />%</li>
293             <li>
294                 <label for="deliverytime">Delivery time: </label>
295                 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime | html %]" /> days
296             </li>
297             <li><label for="notes">Notes: </label>
298                 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes | html %]</textarea></li>
299             </ol>
300         </fieldset>
301
302     </form>
303 [% ELSE %]
304     <h1>[% name | html %]</h1>
305         <div class="row">
306             <div class="col-sm-6">
307                 <div id="supplier-company-details" class="page-section">
308                     <h2>Vendor details</h2>
309                     <p><span class="label">Type: </span>[% type | html %]</p>
310                     <p><span class="label">Company name: </span>[% name | html %]</p>
311                     <p><span class="label">Postal address: </span>[% postal | html %]</p>
312                     <p><span class="label">Physical address: </span>[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</p>
313                     <p><span class="label">Phone: </span>[% phone | html %]</p>
314                     <p><span class="label">Fax: </span>[% fax | html %]</p>
315                     [% IF ( url ) %]
316                         <p><span class="label">Website: </span><a href="[% url | url %]">[% url | html %]</a></p>
317                     [% END %]
318                     [% IF ( accountnumber ) %]
319                         <p><span class="label">Account number: </span>[% accountnumber | html %]</p>
320                     [% END %]
321                 </div> <!-- /#supplier-company-details -->
322
323                 <div id="supplier-ordering-information" class="page-section">
324                     <h2>Ordering information</h2>
325                     <p><strong>Vendor is: </strong>[% IF ( active ) %]Active[% ELSE %]Inactive[% END %]</p>
326                     <p><strong>List prices are: </strong>[% listprice | html %]</p>
327                     <p><strong>Invoice prices are: </strong>[% invoiceprice | html %]</p>
328                     [% IF ( tax_rate ) %]
329                         <p><strong>Tax number registered: </strong>[% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
330                         <p><strong>List item price includes tax: </strong>[% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
331                         <p><strong>Invoice item price includes tax: </strong>[% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>
332                     [% END %]
333                     <p><strong>Discount: </strong>[% discount | format("%.1f") %] %</p>
334                     <p><strong>Tax rate: </strong>[% ( tax_rate || 0 ) * 100 | html %] %</p>
335                     [% IF deliverytime.defined %]
336                         <p><strong>Delivery time: </strong>[% deliverytime | html %] days</p>
337                     [% END %]
338                     [% IF ( notes ) %]
339                         <p><strong>Notes: </strong>[% notes | html %]</p>
340                     [% END %]
341                 </div> <!-- #supplier-ordering-information -->
342             </div> <!-- /.col-sm-6 -->
343
344             <div class="col-sm-6">
345                 <div id="supplier-contact-details" class="page-section">
346                     <h2>Contact</h2>
347                     [% FOREACH contact IN contacts %]
348                         [% INCLUDE show_contact %]
349                     [% END %]
350                 </div> <!-- /#supplier-contact-details -->
351
352                 <div id="subscription-details" class="page-section">
353                     <h2>Subscription details</h2>
354                     <p><strong>Number of subscriptions: </strong>
355                         [% IF (  CAN_user_serials ) %]
356                             <a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=[% name | uri %]&searched=1">[% subscriptioncount | html %]</a>
357                         [% ELSE %]
358                             [% subscriptioncount | html %]
359                         [% END %]
360                     </p>
361                 </div> <!-- /#subscription-details -->
362             </div> <!-- /.col-sm-6 -->
363
364         </div>
365
366         [% IF ( contracts ) %]
367             <div id="supplier-contracts" class="page-section">
368                 <h2>Contract(s)</h2>
369                 <table id="contractst">
370                   <thead>
371                     <tr>
372                         <th scope="col">Name</th>
373                         <th scope="col">Description</th>
374                         <th scope="col">Start date</th>
375                         <th scope="col">End date</th>
376                         [% IF CAN_user_acquisition_contracts_manage %]
377                             <th scope="col" class="NoSort noExport">Actions</th>
378                         [% END %]
379                     </tr>
380                   </thead>
381                   <tbody>
382                     [% FOREACH contract IN contracts %]
383                         <tr>
384                         <td>
385                             <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber | uri %]&amp;booksellerid=[% contract.booksellerid | uri %]">[% contract.contractname | html %]</a>
386                         </td>
387                         <td>[% contract.contractdescription | html %]</td>
388                         <td data-order="[% contract.contractstartdate | html %]">[% contract.contractstartdate | $KohaDates %]</td>
389                         <td data-order="[% contract.contractenddate | html %]">[% contract.contractenddate | $KohaDates %]</td>
390                         [% IF CAN_user_acquisition_contracts_manage %]
391                             <td class="actions">
392                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber | html %]&amp;booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-pencil"></i> Edit</a>
393                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&amp;contractnumber=[% contract.contractnumber | html %]&amp;booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-trash"></i> Delete</a>
394                             </td>
395                         [% END %]
396                         </tr>
397                     [% END %]
398                   </tbody>
399                 </table>
400             </div> <!-- /#supplier-contracts -->
401         [% END %]
402
403 [% END %]
404
405 </main>
406 </div> <!-- /.col-sm-10.col-sm-push-2 -->
407
408 <div class="col-sm-2 col-sm-pull-10">
409     <aside>
410         [% INCLUDE 'vendor-menu.inc' %]
411     </aside>
412 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
413 </div> <!-- /.row -->
414 [% MACRO jsinclude BLOCK %]
415     [% Asset.js("js/acquisitions-menu.js") | $raw %]
416     [% Asset.js("lib/hc-sticky.js") | $raw %]
417     [% Asset.js("js/acq.js") | $raw %]
418     [% INCLUDE 'datatables.inc' %]
419     <script>
420         function confirm_deletion() {
421             if (confirm(_("Confirm deletion of this vendor ?"))) {
422                 window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]&op=delete";
423             }
424         }
425
426         function add_contact() {
427             var new_contact = $('#contact-template').clone();
428             var timestamp = new Date().getTime();
429             $(new_contact).removeAttr('id');
430             $('input, textarea', new_contact).each(function () {
431                 $(this).attr('id', $(this).attr('id') + '_' + timestamp);
432             });
433             $('label', new_contact).each(function () {
434                 $(this).attr('for', $(this).attr('for') + '_' + timestamp);
435             });
436             $(new_contact).insertBefore(this);
437             if ($('.supplier-contact').length === 2) { // First contact
438                 $.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) {
439                     $(checkbox, new_contact).click();
440                 });
441             }
442             $('input[name="contact_name"]', new_contact).focus();
443             return false;
444         }
445
446         function delete_contact(ev) {
447             $(this).parents('.supplier-contact').remove();
448             ev.preventDefault();
449         }
450
451         var Sticky;
452
453          $(document).ready(function() {
454             var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
455                 "aoColumnDefs": [
456                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
457                 ],
458                 'sDom': 't'
459             } ) );
460             $('body').on('click', '.delete-contact', null, delete_contact);
461             $('#add-contact').click(add_contact);
462             $('body').on('click', '.contact_acqprimary', null, function () {
463                 if ($(this).is(':checked')) {
464                     $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
465                     $('.contact_acqprimary_hidden').each(function () {
466                         $(this).val('0');
467                     });
468                 }
469                 $(this).next('.contact_acqprimary_hidden').val('1');
470             });
471             $('body').on('click', '.contact_serialsprimary', null, function () {
472                 if ($(this).is(':checked')) {
473                     $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
474                     $('.contact_serialsprimary_hidden').each(function () {
475                         $(this).val('0');
476                     });
477                 }
478                 $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
479             });
480             $('body').on('click', '.contact_orderacquisition', null, function () {
481                 $(this).next('.contact_orderacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
482             });
483             $('body').on('click', '.contact_claimacquisition', null, function () {
484                 $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
485             });
486             $('body').on('click', '.contact_claimissues', null, function () {
487                 $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
488             });
489
490             Sticky = $("#toolbar");
491             Sticky.hcSticky({
492                 stickTo: "main",
493                 stickyClass: "floating"
494             });
495         });
496     </script>
497 [% END %]
498
499 [% INCLUDE 'intranet-bottom.inc' %]