From c4e8f0af70344f263f64eccccf8817ddc18f8585 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Thu, 15 Sep 2022 18:06:53 +0000 Subject: [PATCH] Bug 31513: (QA follow-up) Keep price formatting on non-editable text fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Joonas Kylmälä Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/members/boraccount.tt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index aa8415ca4b..592cac4ad5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -327,6 +327,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'format_price.inc' %] [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %] @@ -371,7 +372,7 @@ var accountline = button.data('accountline'); $('#payoutline').val(accountline); var amount = button.data('amount') * -1; - $("#paid + span").replaceWith(amount); + $("#paid + span").replaceWith(amount.format_price()); $("#amount").attr({ "value": amount, "max": amount, "min": 0 }); $("#amount, #payout_transaction_type").focus(); }); @@ -385,7 +386,7 @@ var amount = button.data('amount'); var amountoutstanding = button.data('amountoutstanding') || 0; var paid = amount - amountoutstanding; - $("#paid + span").replaceWith(paid); + $("#paid + span").replaceWith(paid.format_price()); $("#returned").attr({ "value": paid, "max": paid, "min": 0 }); var member = button.data('member'); if ( member === '' ) { @@ -403,7 +404,7 @@ var accountline = button.data('accountline'); $('#discountline').val(accountline); var amount = button.data('amount'); - $("#charged + span").replaceWith(amount); + $("#charged + span").replaceWith(amount.format_price()); $("#discount").attr({ "max": amount, "min": 0 }); $("#discount").focus(); }); -- 2.39.5