From e4333840600e7d211ddc1d80b6a0777a22e776f3 Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Tue, 8 Feb 2022 11:40:06 +0000 Subject: [PATCH] Bug 30003: Fix to stop point-of-sale items being added twice to transactions 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.25.1