Bugzilla – Attachment 140612 Details for
Bug 31513
NaN errors when using refund and payout with CurrencyFormat = FR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31513: Remove price formatting form data- attributes
Bug-31513-Remove-price-formatting-form-data--attri.patch (text/plain), 5.37 KB, created by
ByWater Sandboxes
on 2022-09-14 07:13:32 UTC
(
hide
)
Description:
Bug 31513: Remove price formatting form data- attributes
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-09-14 07:13:32 UTC
Size:
5.37 KB
patch
obsolete
>From 9bf288d064e31edd4d347967e3d1e817ed59c92d Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 11 Sep 2022 16:50:56 +0200 >Subject: [PATCH] Bug 31513: Remove price formatting form data- attributes > >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 <michaela.sieber@kit.edu> >--- > .../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 22f021b78c..aa8415ca4b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -133,13 +133,13 @@ > </form> > [% END %] > [% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] >- <button type="button" data-toggle="modal" data-target="#issuePayoutModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amountoutstanding | $Price %]" class="btn btn-default btn-xs payout-action"><i class="fa fa-money"></i> Issue payout</button> >+ <button type="button" data-toggle="modal" data-target="#issuePayoutModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amountoutstanding | $Price on_editing => 1 %]" class="btn btn-default btn-xs payout-action"><i class="fa fa-money"></i> Issue payout</button> > [% END %] > [% IF CAN_user_updatecharges_refund && account.is_debit && ( account.amountoutstanding != account.amount ) && !(account.status == 'REFUNDED') && !(account.debit_type_code == 'PAYOUT') %] >- <button type="button" class="btn btn-default btn-xs refund-action" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amount | $Price %]" data-amountoutstanding="[% account.amountoutstanding | $Price %]" data-member="[% account.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> >+ <button type="button" class="btn btn-default btn-xs refund-action" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amount | $Price on_editing => 1 %]" data-amountoutstanding="[% account.amountoutstanding | $Price on_editing => 1 %]" data-member="[% account.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> > [% END %] > [% IF CAN_user_updatecharges_discount && account.is_debit && ( account.amountoutstanding == account.amount ) && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') %] >- <button type="button" data-toggle="modal" data-target="#applyDiscountModal" data-item="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amount | $Price %]" data-amountoutstanding="[% account.amountoutstanding | $Price %]" class="btn btn-default btn-xs discount-action">Apply discount</button> >+ <button type="button" data-toggle="modal" data-target="#applyDiscountModal" data-item="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amount | $Price on_editing => 1 %]" data-amountoutstanding="[% account.amountoutstanding | $Price on_editing => 1 %]" class="btn btn-default btn-xs discount-action">Apply discount</button> > [% END %] > </td> > </tr> >@@ -152,7 +152,7 @@ > <td class="credit" style="text-align: right;">[% total | $Price %]</td> > <td> > [% IF CAN_user_updatecharges_payout %] >- <button type="button" data-toggle="modal" data-target="#issuePayoutModal" data-amount="[% total | $Price %]" class="btn btn-default btn-xs payout-amount-action"><i class="fa fa-money"></i> Payout amount</button> >+ <button type="button" data-toggle="modal" data-target="#issuePayoutModal" data-amount="[% total | $Price on_editing => 1 %]" class="btn btn-default btn-xs payout-amount-action"><i class="fa fa-money"></i> Payout amount</button> > [% END %] > </td> > [% ELSE %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31513
:
140405
|
140612
|
140684
|
140685