Bug 28344: Restore ability to issue refund against older payments
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / pos / register.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE AuthorisedValues %]
6 [% USE Price %]
7 [% SET footerjs = 1 %]
8 [% PROCESS 'accounts.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Cashup &rsaquo; Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
13 </head>
14
15 <body id="register" class="pos">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'circ-search.inc' %]
18
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20     <ol>
21         <li>
22             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23         </li>
24         <li>
25             <a href="/cgi-bin/koha/pos/pay.pl">Point of sale</a>
26         </li>
27         <li>
28             <a href="#" aria-current="page">
29                 Register details
30             </a>
31         </li>
32     </ol>
33 </nav>
34
35 <div class="main container-fluid">
36     <div class="row">
37         <div class="col-sm-10 col-sm-push-2">
38
39             [% IF ( error_registers ) %]
40                 <div id="error_message" class="dialog message">
41                     <p>
42                         You must have at least one cash register associated with the library before you can record payments.
43                     </p>
44                     [% IF ( CAN_user_parameters_manage_cash_registers ) %]
45                         <form action="/cgi-bin/koha/admin/cash_registers.pl" method="get">
46                             <input type="hidden" name="op" value="add_form" />
47                             <button class="new" type="submit"><i class="fa fa-plus"></i> Create a new cash register</button>
48                         </form>
49                     [% END %]
50                 </div>
51             [% ELSE %]
52
53             [% IF ( error_cashup_permission ) %]
54             <div id="error_message" class="dialog alert">
55                 You do not have permission to perform cashup actions.
56             </div>
57             [% END %]
58
59             [% IF ( error_refund_permission ) %]
60             <div id="error_message" class="dialog alert">
61                 You do not have permission to perform refund actions.
62             </div>
63             [% END %]
64
65             [% IF ( CAN_user_cash_management_cashup ) %]
66             <div id="toolbar" class="btn-toolbar">
67                 <button id="pos_cashup" type="button" class="btn btn-default" data-toggle="modal" data-target="#confirmCashupModal" ><i class="fa fa-money"></i> Record cashup</button>
68             </div>
69             [% END %]
70
71             <h1>Register transaction details for [% register.name | html %]</h1>
72
73             <h2>Summary</h2>
74             <ul>
75                 [% IF register.last_cashup %]
76                 <li>Last cashup: [% register.last_cashup.timestamp | $KohaDates with_hours => 1 %] (<a data-toggle="modal" data-cashup="[% register.last_cashup.id | html %]" data-register="[% register.description | html %]" href="#cashupSummaryModal" class="button">Summary</a>)</li>
77                 [% END %]
78                 <li>Float: [% register.starting_float | $Price %]</li>
79                 <li>Total income (cash): [% accountlines.credits_total * -1 | $Price %] ([% accountlines.credits_total(payment_type => 'CASH') * -1 | $Price %])</li>
80                 <li>Total outgoing (cash): [% accountlines.debits_total * -1 | $Price %] ([% accountlines.debits_total( payment_type => 'CASH') * -1 | $Price %])</li>
81                 <li>Total bankable: [% accountlines.total( payment_type => 'CASH') * -1 | $Price %]</li>
82             </ul>
83
84             [% IF register.last_cashup %]
85             <h2>Transactions since [% register.last_cashup.timestamp | $KohaDates with_hours => 1 %]</h2>
86             [% ELSE %]
87             <h2>Transactions to date</h2>
88             [% END %]
89             <table id="sales" class="table_sales">
90                 <thead>
91                     <th>ID</th>
92                     <th>DATA</th>
93                     <th>Transaction</th>
94                     <th>Description</th>
95                     <th>Price</th>
96                     <th>Total</th>
97                     <th class="noExport">Actions</th>
98                 </thead>
99                 <tbody>
100                     [% FOREACH accountline IN accountlines %]
101                         [% IF accountline.is_credit %]
102                             [% FOREACH credit IN accountline.credit_offsets %]
103                             [% IF credit.debit %]
104                             <tr>
105                                 <td>[% accountline.accountlines_id | html %]</td>
106                                 <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
107                                 <td>[% IF accountline.timestamp %][% accountline.timestamp | $KohaDates with_hours => 1 %][% END %]</td>
108                                 <td>
109                                     [%- PROCESS account_type_description account=credit.debit -%]
110                                     [%- IF credit.debit.description -%] ([% credit.debit.description | html %])[%- END -%]
111                                     [%- IF ( credit.debit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% credit.debit.item.biblionumber | uri %]&amp;itemnumber=[% credit.debit.itemnumber | uri %]">[% credit.debit.item.biblio.title | html %]</a>)[%- END -%]
112                                 </td>
113                                 <td>[% credit.debit.amount | $Price %]</td>
114                                 <td></td>
115                                 <td>
116                                     [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %]
117                                     <button type="button" class="btn btn-default btn-xs pos_refund" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
118                                     [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber && !(credit.debit.debit_type_code == 'PAYOUT') %]
119                                     <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
120                                     [% END %]
121                                 </td>
122                             </tr>
123                             [% END %]
124                             [% END %]
125                         [% ELSE %]
126                             [% FOREACH debit IN accountline.debit_offsets %]
127                             [% IF debit.credit %]
128                             <tr>
129                                 <td>[% accountline.accountlines_id | html %]</td>
130                                 <td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
131                                 <td></td>
132                                 <td>[%- PROCESS account_type_description account=debit.credit -%]</td>
133                                 <td>
134                                     [%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
135                                     [%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&amp;itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
136                                 </td>
137                                 <td>[% debit.credit.amount | $Price %]</td>
138                                 <td></td>
139                             </tr>
140                             [% END %]
141                             [% END %]
142                         [% END %]
143                     [% END %]
144                 </tbody>
145                 <tfoot>
146                     <tr>
147                         <td colspan="5">Total income: </td>
148                         <td>[% accountlines.total * -1 | $Price %]</td>
149                         <td></td>
150                     </tr>
151                 </tfoot>
152             </table>
153             [% END %]
154
155             [% IF register.cashups %]
156             <h2>Older transactions</h2>
157             <form method="GET" action="/cgi-bin/koha/pos/register.pl">
158                 <fieldset class="rows">
159                     Please select a date range to display transactions for:
160                     <ol>
161                         <li>
162                             <label for="trange_f">From: </label>
163                             <input type="text" size="10" id="from" class="datepickerfrom" name="trange_f" value="[% trange_f | html %]"/>
164                             <label class="inline" for="trange_t">To: </label>
165                             <input type="text" size="10" id="to" class="datepickerto" name="trange_t" value="[% trange_t | html %]" />
166                             <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
167                         </li>
168                     </ol>
169                 </fieldset>
170
171                 <div class="action">
172                     <input type="hidden" name="registerid" value="[% register.id | html %]">
173                     <input type="submit" value="Display" />
174                 </div>
175             </form>
176
177             [% IF trange_f %]
178             <table id="past_sales" class="past_sales_table">
179                 <thead>
180                     <th>ID</th>
181                     <th>DATA</th>
182                     <th>Transaction</th>
183                     <th>Description</th>
184                     <th>Price</th>
185                     <th>Total</th>
186                     <th class="noExport">Actions</th>
187                 </thead>
188                 <tbody>
189                     [% FOREACH accountline IN past_accountlines %]
190                         [% IF accountline.is_credit %]
191                             [% FOREACH credit IN accountline.credit_offsets %]
192                             [% IF credit.debit %]
193                             <tr>
194                                 <td>[% accountline.accountlines_id | html %]</td>
195                                 <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
196                                 <td>[% IF accountline.timestamp %][% accountline.timestamp | $KohaDates with_hours => 1 %][% END %]</td>
197                                 <td>
198                                     [%- PROCESS account_type_description account=credit.debit -%]
199                                     [%- IF credit.debit.description -%] ([% credit.debit.description | html %])[%- END -%]
200                                     [%- IF ( credit.debit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% credit.debit.item.biblionumber | uri %]&amp;itemnumber=[% credit.debit.itemnumber | uri %]">[% credit.debit.item.biblio.title | html %]</a>)[%- END -%]
201                                 </td>
202                                 <td>[% credit.debit.amount | $Price %]</td>
203                                 <td></td>
204                                 <td>
205                                     [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %]
206                                     <button type="button" class="btn btn-default btn-xs pos_refund" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
207                                     [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber && !(credit.debit.debit_type_code == 'PAYOUT') %]
208                                     <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
209                                     [% END %]
210                                 </td>
211                             </tr>
212                             [% END %]
213                             [% END %]
214                         [% ELSE %]
215                             [% FOREACH debit IN accountline.debit_offsets %]
216                             [% IF debit.credit %]
217                             <tr>
218                                 <td>[% accountline.accountlines_id | html %]</td>
219                                 <td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
220                                 <td></td>
221                                 <td>[%- PROCESS account_type_description account=debit.credit -%]</td>
222                                 <td>
223                                     [%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
224                                     [%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&amp;itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
225                                 </td>
226                                 <td>[% debit.credit.amount | $Price %]</td>
227                                 <td></td>
228                             </tr>
229                             [% END %]
230                             [% END %]
231                         [% END %]
232                     [% END %]
233                 </tbody>
234                 <tfoot>
235                     <tr>
236                         <td colspan="5">Total income: </td>
237                         <td>[% past_accountlines.total * -1 | $Price %]</td>
238                         <td></td>
239                     </tr>
240                 </tfoot>
241             </table>
242             [% END %]
243
244             <hr/>
245             <h2>Cashup history</h2>
246             <table id="table_cashups">
247                 <thead>
248                     <tr>
249                         <th>Date</th>
250                         <th>Cashier</th>
251                         <th>Amount</th>
252                         <th data-class-name="actions">Actions</th>
253                     </tr>
254                 </thead>
255             </table>
256             [% END %]
257         </div>
258
259         <div class="col-sm-2 col-sm-pull-10">
260             <aside>
261                 [% INCLUDE 'pos-menu.inc' %]
262             </aside>
263         </div>
264     </div><!-- /.row -->
265
266     <!-- Confirm cashup modal -->
267     <div class="modal" id="confirmCashupModal" tabindex="-1" role="dialog" aria-labelledby="confirmCashupLabel">
268         <div class="modal-dialog" role="document">
269             <div class="modal-content">
270                 <div class="modal-header">
271                     <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
272                     <h4 class="modal-title" id="confirmCashupLabel">Confirm cashup of <em>[% register.description | html %]</em></h4>
273                 </div>
274                 <div class="modal-body">
275                     Please confirm that you have removed [% accountlines.total( payment_type => 'CASH') * -1 | $Price %] from the cash register and left a float of [% register.starting_float | $Price %].
276                 </div> <!-- /.modal-body -->
277                 <div class="modal-footer">
278                     <a href="/cgi-bin/koha/pos/register.pl?op=cashup" class="btn btn-default" id="pos_cashup_confirm">Confirm</a>
279                     <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
280                 </div> <!-- /.modal-footer -->
281             </div> <!-- /.modal-content -->
282         </div> <!-- /.modal-dialog -->
283     </div> <!-- /#confirmCashupModal -->
284
285     <!-- Issue refund modal -->
286     <div class="modal" id="issueRefundModal" tabindex="-1" role="dialog" aria-labelledby="issueRefundLabel">
287         <form id="refund_form" method="post" enctype="multipart/form-data" class="validated">
288             <input type="hidden" name="accountline" value="" id="refundline">
289             <div class="modal-dialog" role="document">
290                 <div class="modal-content">
291                     <div class="modal-header">
292                         <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
293                         <h4 class="modal-title" id="issueRefundLabel">Issue refund from <em>[% register.description | html %]</em></h4>
294                     </div>
295                     <div class="modal-body">
296                         <fieldset class="rows">
297                             <ol>
298                                 <li>
299                                     <span id="item" class="label">Item: </span><span></span>
300                                 </li>
301                                 <li>
302                                     <span id="paid" class="label">Amount paid: </span><span></span>
303                                 </li>
304                                 <li>
305                                     <label class="required" for="amount">Returned to patron: </label>
306                                     <input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" id="returned" name="amount" required="required">
307                                     <span class="required">Required</span>
308                                 </li>
309                                 [% INCLUDE 'transaction_types.inc' type="refund" %]
310                             </ol>
311                         </fieldset> <!-- /.rows -->
312                     </div> <!-- /.modal-body -->
313                     <div class="modal-footer">
314                         <input type="hidden" name="registerid" value="[% register.id | html %]">
315                         <input type="hidden" name="op" value="refund">
316                         <button type="submit" class="btn btn-default" id="pos_refund_confirm">Confirm</button>
317                         <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
318                     </div> <!-- /.modal-footer -->
319                 </div> <!-- /.modal-content -->
320             </div> <!-- /.modal-dialog -->
321         </form> <!-- /#refund_form -->
322     </div> <!-- /#issueRefundModal -->
323
324     [% INCLUDE 'modals/cashup_summary.inc' %]
325
326     [% MACRO jsinclude BLOCK %]
327     [% INCLUDE 'datatables.inc' %]
328     [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
329     [% Asset.js("js/cashup_modal.js") | $raw %]
330     [% INCLUDE 'calendar.inc' %]
331     [% INCLUDE 'js-date-format.inc' %]
332     <script>
333         var sales_table = $("#sales").dataTable($.extend(true, {}, dataTablesDefaults, {
334             orderFixed: [ 0, 'asc'],
335             columnDefs: [ {
336                 targets: [ 0, 1 ],
337                 visible: false
338             }],
339             rowGroup: {
340                 dataSrc: 0,
341                 startRender: function ( rows, group ) {
342                     var details = JSON.parse(rows.data().pluck(1).pop());
343                     var identifier = details.identifier || group;
344                     return $('<tr class="'+details.type+'"/>')
345                         .append( '<td>'+identifier+'</td>' )
346                         .append( '<td colspan="2">'+details.description+'</td>' )
347                         .append( '<td>'+details.amount+'</td>' )
348                         .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>');
349                 },
350                 endRender: null,
351             },
352             initComplete: function() {
353                 $("#sales").show();
354             }
355         }));
356
357         var past_sales_table = $("#past_sales").dataTable($.extend(true, {}, dataTablesDefaults, {
358             orderFixed: [ 0, 'asc'],
359             columnDefs: [ {
360                 targets: [ 0, 1 ],
361                 visible: false
362             }],
363             rowGroup: {
364                 dataSrc: 0,
365                 startRender: function ( rows, group ) {
366                     var details = JSON.parse(rows.data().pluck(1).pop());
367                     var identifier = details.identifier || group;
368                     return $('<tr class="'+details.type+'"/>')
369                         .append( '<td>'+identifier+'</td>' )
370                         .append( '<td colspan="2">'+details.description+'</td>' )
371                         .append( '<td>'+details.amount+'</td>' )
372                         .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> Print receipt</button></td>');
373                 },
374                 endRender: null,
375             }
376         }));
377
378         $("#issueRefundModal").on("shown.bs.modal", function(e){
379            var button = $(e.relatedTarget);
380            var item = button.data('item');
381            $("#item + span").replaceWith(item);
382            var accountline = button.data('accountline');
383            $('#refundline').val(accountline);
384            var amount = button.data('amount');
385            var amountoutstanding = button.data('amountoutstanding') || 0;
386            var paid = amount - amountoutstanding;
387            $("#paid + span").replaceWith(paid);
388            $("#returned").attr({ "value": paid, "max": paid });
389            var member = button.data('member');
390            if ( member === '' ) {
391                $("#refund_type option[value='AC']").remove();
392            } else if ( $("#refund_type option[value='AC']").length == 0 ) {
393                $("#refund_type").prepend('<option value="AC" selected="selected">Account credit</option>');
394            }
395            $("#returned, #refund_type").focus();
396         });
397
398         $(".printReceipt").click(function() {
399             var accountlines_id = $(this).data('accountline');
400             var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=' + accountlines_id, '_blank');
401             win.focus();
402         });
403
404         $('.modal.printable').on('shown.bs.modal', function() {
405             $('.modal-dialog', this).addClass('focused');
406             $('body').addClass('modalprinter');
407
408             if ($(this).hasClass('autoprint')) {
409                 window.print();
410             }
411         }).on('hidden.bs.modal', function () {
412             $('.modal-dialog', this).removeClass('focused');
413             $('body').removeClass('modalprinter');
414         });
415
416         $('.printModal').click(function() {
417             window.print();
418         });
419
420
421         var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
422         var cashups_table = $("#table_cashups").api({
423             "ajax": {
424                 "url": cashups_table_url
425             },
426             "header_filter": true,
427             "embed": [
428                "manager"
429             ],
430             "order": [[ 0, "asc" ]],
431             "columns": [
432                 {
433                     "data": "timestamp",
434                     "searchable": true,
435                     "orderable": true,
436                     "render": function(data, type, row, meta) {
437                         return $datetime(row.timestamp);
438                     }
439                 },
440                 {
441                     "data": "manager.firstname:manager.surname",
442                     "searchable": true,
443                     "orderable": true,
444                     "render": function(data, type, row, meta) {
445                         var fullname;
446                         if ( row.manager.firstname == null ) {
447                             fullname = row.manager.surname;
448                         }
449                         else {
450                             fullname = row.manager.firstname + " " + row.manager.surname;
451                         }
452                         return escape_str(fullname);
453                     }
454                 },
455                 {
456                     "data": "amount",
457                     "searchable": true,
458                     "orderable": true,
459                     "render": function(data, type, row, meta) {
460                         var amt = row.amount * -1;
461                         return escape_price(amt);
462                     }
463                 },
464                 {
465                     "data": function( row, type, val, meta ) {
466                         var result = '<a class="btn btn-default btn-xs" role="button" data-toggle="modal" data-cashup="'+encodeURIComponent(row.cashup_id)+'" data-register="[% register.description | html %]" href="#cashupSummaryModal"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Summary")+'</a>\n';
467                         return result;
468                     },
469                     "searchable": false,
470                     "orderable": false
471                 }
472             ]
473         }, [], 1);
474
475         $(document).ready(function() {
476             // http://jqueryui.com/demos/datepicker/#date-range
477             var dates = $( "#from, #to" ).datepicker({
478                 changeMonth: true,
479                 numberOfMonths: 1,
480                 onSelect: function( selectedDate ) {
481                     var option = this.id == "from" ? "minDate" : "maxDate",
482                         instance = $( this ).data( "datepicker" );
483                         date = $.datepicker.parseDate(
484                             instance.settings.dateFormat ||
485                             $.datepicker._defaults.dateFormat,
486                             selectedDate, instance.settings );
487                     dates.not( this ).datepicker( "option", option, date );
488                 }
489             });
490         });
491     </script>
492 [% END %]
493
494 [% INCLUDE 'intranet-bottom.inc' %]