Bugzilla – Attachment 134973 Details for
Bug 30139
Point of sale sets wrong 'Amount being paid' with CurrencyFormat = FR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30139: Same fix for the other javascript moneyFormat function
Bug-30139-Same-fix-for-the-other-javascript-moneyF.patch (text/plain), 2.14 KB, created by
Shi Yao Wang
on 2022-05-13 14:22:52 UTC
(
hide
)
Description:
Bug 30139: Same fix for the other javascript moneyFormat function
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2022-05-13 14:22:52 UTC
Size:
2.14 KB
patch
obsolete
>From d15462ec083963a13605c981696534d669f5e3aa Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Fri, 13 May 2022 10:18:22 -0400 >Subject: [PATCH] Bug 30139: Same fix for the other javascript moneyFormat > function > >--- > .../prog/en/modules/members/paycollect.tt | 27 ++++++++++--------- > 1 file changed, 14 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >index b153e3b91a..e97f92d212 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -476,28 +476,29 @@ > var newValue = textObj.value; > var decAmount = ""; > var dolAmount = ""; >- var decFlag = false; >+ var dolFlag = false; > var aChar = ""; > >- for(i=0; i < newValue.length; i++) { >- aChar = newValue.substring(i, i+1); >- if (aChar >= "0" && aChar <= "9") { >- if(decFlag) { >- decAmount = "" + decAmount + aChar; >+ for(var i = newValue.length; 0 < i; i--) { >+ aChar = newValue.substring(i-1, i); >+ if ("0" <= aChar && aChar <= "9") { >+ if(dolFlag) { >+ dolAmount = "" + aChar + dolAmount; > } > else { >- dolAmount = "" + dolAmount + aChar; >+ decAmount = "" + aChar + decAmount; > } > } >- if (aChar == ".") { >- if (decFlag) { >- dolAmount = ""; >- break; >- } >- decFlag = true; >+ if (aChar == "." || aChar == ",") { >+ dolFlag = true; > } > } > >+ if (!dolFlag) { >+ dolAmount = decAmount; >+ decAmount = ""; >+ } >+ > if (dolAmount == "") { > dolAmount = "0"; > } >-- >2.25.1
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 30139
:
134830
|
134842
|
134843
|
134957
|
134969
|
134973
|
134974
|
134976