diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt index 129d877582..3ed39add99 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt @@ -518,17 +518,17 @@ .appendTo("#payForm"); }); - [% IF Koha.Preference('FinePaymentAutoPopup') %] - // Form submits to new tab; reset this page for the next transaction - setTimeout(function() { - sale_kohaTable.api().clear().draw(); - $('#tendered').val(''); - $('#paid').val(zero_formatted); - $('#change').html(zero_formatted); - $(':input[name="change"]').val(zero_formatted); - checked = false; - }, 0); - [% END %] + if (Koha.prefs.FinePaymentAutoPopup) { + // Form submits to new tab; reset this page for the next transaction + setTimeout(function () { + sale_kohaTable.api().clear().draw(); + $("#tendered").val(""); + $("#paid").val(zero_formatted); + $("#change").html(zero_formatted); + $(':input[name="change"]').val(zero_formatted); + checked = false; + }, 0); + } return true; }