From 8308f924aaeaa2fe3c25ea161dd0ef7928d27c17 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 Signed-off-by: Kyle M Hall (cherry picked from commit 126c70c982089c74c75d1c99d33c01c9cc4cf001) Signed-off-by: Victor Grousset/tuxayo --- 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 eb507b3435..dae37e6e2b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -395,7 +395,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