From b23eda9959dcf60fe1799cc8632cb975103617eb Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 11 Sep 2022 16:50:56 +0200 Subject: [PATCH] Bug 31513: Remove price formatting form data- attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We cannot use data formatted with a decimal comma for calculations. So we need to make sure that the data- attributes passed to the modals are in 'database format' with decimal . This will fix the NaN errors on the forms, but might also negatively effect formatting in some spots. Formatting should be fixed separately as this is for sure the right first step, but we need to put in more work for displays. To test: * Set CurrencyFormat system preference to FR * Go to any patron account > accounting tab * Create a credit * On Transactions tab: Payout amount at bottom = Verify NaN in input * On Transactions tab: Issue payout on the credit line = Verify NaN in input * Create a manual debit and pay it * On Transactions tab: Issue refund = Verify NaN in input * Apply patch * Repeat test plan * Now all input fields should be set with the correct amounts https://bugs.koha-community.org/show_bug.cgi?id=31486 Signed-off-by: Michaela Sieber Signed-off-by: Joonas Kylmälä Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 9d02c71166258425f58dc020b9e7a9b95f895bb9) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/modules/members/boraccount.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 5223997277..95a37f4f0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -129,13 +129,13 @@ [% END %] [% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] - + [% END %] [% IF CAN_user_updatecharges_refund && account.is_debit && ( account.amountoutstanding != account.amount ) && !(account.status == 'REFUNDED') && !(account.debit_type_code == 'PAYOUT') %] - + [% END %] [% IF CAN_user_updatecharges_discount && account.is_debit && ( account.amountoutstanding == account.amount ) && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') %] - + [% END %] @@ -148,7 +148,7 @@ [% total | $Price %] [% IF CAN_user_updatecharges_payout %] - + [% END %] [% ELSE %] -- 2.39.5