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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-3 / +9 lines)
Lines 445-450 Link Here
445
    [% Asset.js("js/cashup_modal.js") | $raw %]
445
    [% Asset.js("js/cashup_modal.js") | $raw %]
446
    [% Asset.js("js/modal_printer.js") | $raw %]
446
    [% Asset.js("js/modal_printer.js") | $raw %]
447
    [% INCLUDE 'calendar.inc' %]
447
    [% INCLUDE 'calendar.inc' %]
448
    <script>
449
        const register = {
450
            id: "[% register.id | html %]",
451
            description: "[% register.description | html %]",
452
        };
453
    </script>
454
448
    <script>
455
    <script>
449
        var sales_table = $("#sales").kohaTable({
456
        var sales_table = $("#sales").kohaTable({
450
            orderFixed: [ 0, 'asc'],
457
            orderFixed: [ 0, 'asc'],
Lines 521-527 Link Here
521
            win.focus();
528
            win.focus();
522
        });
529
        });
523
530
524
        var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?";
531
        var cashups_table_url = `/api/v1/cash_registers/${register.id}/cashups?`;
525
        var cashups_table = $("#table_cashups").kohaTable({
532
        var cashups_table = $("#table_cashups").kohaTable({
526
            ajax: {
533
            ajax: {
527
                "url": cashups_table_url
534
                "url": cashups_table_url
Lines 565-571 Link Here
565
                },
572
                },
566
                {
573
                {
567
                    data: function( row, type, val, meta ) {
574
                    data: function( row, type, val, meta ) {
568
                        var result = '<a class="btn btn-default btn-xs" role="button" data-bs-toggle="modal" data-cashup="'+encodeURIComponent(row.cashup_id)+'" data-register="[% register.description | html %]" href="#cashupSummaryModal"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Summary")+'</a>\n';
575
                        var result = '<a class="btn btn-default btn-xs" role="button" data-bs-toggle="modal" data-cashup="'+encodeURIComponent(row.cashup_id)+'" data-register="${register.description}" href="#cashupSummaryModal"><i class="fa-solid fa-pencil" aria-hidden="true"></i> '+_("Summary")+'</a>\n';
569
                        return result;
576
                        return result;
570
                    },
577
                    },
571
                    searchable: false,
578
                    searchable: false,
572
- 

Return to bug 41575