View | Details | Raw Unified | Return to bug 26273
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-1 / +50 lines)
Lines 223-228 Link Here
223
            </table>
223
            </table>
224
            [% END %]
224
            [% END %]
225
225
226
            <hr/>
227
            <h2>Cashup history</h2>
228
            <table id="table_cashups">
229
                <thead>
230
                    <tr>
231
                        <th>Date</th>
232
                        <th>Amount</th>
233
                        <th data-class-name="actions">Actions</th>
234
                    </tr>
235
                </thead>
236
            </table>
226
            [% END %]
237
            [% END %]
227
        </div>
238
        </div>
228
239
Lines 390-395 Link Here
390
            window.print();
401
            window.print();
391
        });
402
        });
392
403
404
405
        var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
406
        var cashups_table = $("#table_cashups").api({
407
            "ajax": {
408
                "url": cashups_table_url
409
            },
410
            "order": [[ 1, "asc" ]],
411
            "columnDefs": [ {
412
                "targets": [0,1],
413
                "render": function (data, type, row, meta) {
414
                    if ( type == 'display' ) {
415
                        return data.escapeHtml();
416
                    }
417
                    return data;
418
                }
419
            } ],
420
            "columns": [
421
                {
422
                    "data": "timestamp",
423
                    "searchable": true,
424
                    "orderable": true
425
                },
426
                {
427
                    "data": "amount",
428
                    "searchable": true,
429
                    "orderable": true
430
                },
431
                {
432
                    "data": function( row, type, val, meta ) {
433
                        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';
434
                        return result;
435
436
                    },
437
                    "searchable": false,
438
                    "orderable": false
439
                }
440
            ]
441
        }, [], 1);
442
393
        $(document).ready(function() {
443
        $(document).ready(function() {
394
            // http://jqueryui.com/demos/datepicker/#date-range
444
            // http://jqueryui.com/demos/datepicker/#date-range
395
            var dates = $( "#from, #to" ).datepicker({
445
            var dates = $( "#from, #to" ).datepicker({
396
- 

Return to bug 26273