From 22adc9397ece78503c6c99e458074ead75d08c46 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Thu, 25 Jul 2024 16:02:16 +0000 Subject: [PATCH] Bug 36998: Correctly update the 'Amount paid' displayed on the issue refund modal To test: 1) Enable the 'EnablePointOfSale' sys pref (also requires the 'UseCashRegisters' pref) 2) In the POS module, configure a cash register and also configure some items for purchase with different costs 3) Make multiple sales 4) View the transactions table by clicking the 'Cash summary for ...' tab and then clicking on your cash register's name. 5) Click on the 'Issue refund' button for one of the sales, this should have the correct 'Amount paid' 6) Close the modal and click issue refund on your other item. 7) Note the 'Amount paid' is incorrect and lists the value from the previous item 8) Apply patch 9) Now when clicking issue refund, it displays the correct 'Amount paid' Signed-off-by: Barbara Johnson Signed-off-by: Martin Renvoize (cherry picked from commit 47a3c284734c56e095a5945cdbd40f6e50652496) Signed-off-by: Lucas Gass (cherry picked from commit 528db7e928367b8f1c2c358abb4f685d74a20bf2) 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 df94cba635..8f5b191ec8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -412,7 +412,7 @@ var amount = button.data('amount'); var amountoutstanding = button.data('amountoutstanding') || 0; var paid = amount - amountoutstanding; - $("#paid + span").replaceWith(paid); + $("#paid + span").text(paid); $("#returned").attr({ "value": paid, "max": paid }); var member = button.data('member'); if ( member === '' ) { -- 2.39.5