From 7989e661f70a22377348692a9b67e190dab0efc2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 25 Apr 2022 15:37:33 +0100 Subject: [PATCH] Bug 30610: Update on click binding for print receipt This patch updates the binding for the on click even of the print receipt button so that subsequent pages in the datatable work with the reciept printing button. Test plan 1) Enable cash management and process enough transactions to display more than one page of transactions in the register details page. 2) Confirm the 'Print receipt' button works on the first page of transactions 3) Confirm the 'Print receipt' button works on subsequent transactions pages in the datatable. 4) Confirm the same for the past transactions table. Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt index 662f51b29f..b5604d8f97 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -401,7 +401,7 @@ $("#returned, #refund_type").focus(); }); - $(".printReceipt").click(function() { + $("body").on('click', ".printReceipt", function() { var accountlines_id = $(this).data('accountline'); var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=' + accountlines_id, '_blank'); win.focus(); -- 2.39.5