From 0c3118922e045241501625382af2fb892c599a96 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 (cherry picked from commit c4e8f0af70344f263f64eccccf8817ddc18f8585) Signed-off-by: Lucas Gass (cherry picked from commit 6cc62528cd5ba04665268f6ee0afc586c1572933) Signed-off-by: Arthur Suzuki --- .../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 f43259df76..26b1f45101 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -322,6 +322,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 %] @@ -366,7 +367,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(); }); @@ -380,7 +381,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 === '' ) { @@ -398,7 +399,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