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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-6 / +15 lines)
Lines 233-238 Link Here
233
    [% INCLUDE 'str/members-menu.inc' %]
233
    [% INCLUDE 'str/members-menu.inc' %]
234
    [% Asset.js("js/members-menu.js") | $raw %]
234
    [% Asset.js("js/members-menu.js") | $raw %]
235
    [% INCLUDE 'datatables.inc' %]
235
    [% INCLUDE 'datatables.inc' %]
236
    <script>
237
        var table_settings = [% TablesSettings.GetTableSettings('members', 'pay', 'pay-fines-table', 'json') | $raw %];
238
        const payment_id = "[% payment_id | html %]";
239
        const change_given = "[% change_given | html %]";
240
        const total = "[% total | $Price %]";
241
        const patron_id = "[% patron.borrowernumber | html %]";
242
        addPrefs({
243
            FinePaymentAutoPopup: [% Koha.Preference('FinePaymentAutoPopup') ? 1 : 0 | html %],
244
        });
245
    </script>
246
236
    <script>
247
    <script>
237
        function enableCheckboxActions(){
248
        function enableCheckboxActions(){
238
            // Enable/disable controls if checkboxes are checked
249
            // Enable/disable controls if checkboxes are checked
Lines 244-256 Link Here
244
            }
255
            }
245
        }
256
        }
246
        $(document).ready(function(){
257
        $(document).ready(function(){
247
            [% IF payment_id && Koha.Preference('FinePaymentAutoPopup') %]
258
            if (payment_id && prefs.FinePaymentAutoPopup){
248
                window.open('/cgi-bin/koha/members/printfeercpt.pl?action=print&accountlines_id=[% payment_id | html %]&change_given=[% change_given | html %]&borrowernumber=[% patron.borrowernumber | html %]', '_blank');
259
                window.open(`/cgi-bin/koha/members/printfeercpt.pl?action=print&accountlines_id=${payment_id}&change_given=${change_given}&borrowernumber=${patron_id}', '_blank');
249
            [% END %]
260
            }
250
261
251
            $('#pay-fines-form').preventDoubleFormSubmit();
262
            $('#pay-fines-form').preventDoubleFormSubmit();
252
            $("#woall").click(function(event){
263
            $("#woall").click(function(event){
253
                var msg = _("Are you sure you want to write off %s in outstanding charges? This cannot be undone!").format( "[% total | $Price %]" );
264
                var msg = _("Are you sure you want to write off %s in outstanding charges? This cannot be undone!").format(total);
254
                var answer = confirm(msg);
265
                var answer = confirm(msg);
255
                    if (!answer){
266
                    if (!answer){
256
                        event.preventDefault();
267
                        event.preventDefault();
Lines 287-293 Link Here
287
                this_td.find(".add-note").show();
298
                this_td.find(".add-note").show();
288
            });
299
            });
289
300
290
            var table_settings = [% TablesSettings.GetTableSettings('members', 'pay', 'pay-fines-table', 'json') | $raw %];
291
            $("#finest").kohaTable(
301
            $("#finest").kohaTable(
292
                {
302
                {
293
                    paging: false,
303
                    paging: false,
294
- 

Return to bug 41572