From 77573dacfbdb4b73fd6cbda5f9ee153bd5d9ad13 Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Tue, 8 Feb 2022 11:40:06 +0000 Subject: [PATCH] Applied a fix to stop point-of-sale items being added twice to till transaction lists https://bugs.koha-community.org/show_bug.cgi?id=30003 Signed-off-by: Sally --- koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 8 ++++++++ 1 file changed, 8 insertions(+) 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 243c0baaae..007ddd1e77 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt @@ -402,6 +402,14 @@ }); $('#payForm').submit(function(e){ + // first, clear stale sales 'rows' from the payForm + if($('input[name="sales"]').length > 0) { + $('input[name="sales"]').each(function() { + $(this).remove(); + }); + } + + // now, process the current & fresh contents of the sale_table if (change != undefined && change.innerHTML > 0.00 && !checked) { e.preventDefault(); $("#confirm_change_form").modal("show"); -- 2.30.2