projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0cc8bb
)
added missing numberformat in java-script
author
Rolf Fluehmann
<rolf.fluehmann@revamp-it.ch>
Thu, 9 Jun 2016 14:33:40 +0000
(16:33 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 16 Jun 2016 14:23:23 +0000
(16:23 +0200)
js/common.js
patch
|
blob
|
history
diff --git
a/js/common.js
b/js/common.js
index
43bb7de
..
b4784f4
100644
(file)
--- a/
js/common.js
+++ b/
js/common.js
@@
-1,6
+1,6
@@
function setupPoints(numberformat, wrongFormat) {
function setupPoints(numberformat, wrongFormat) {
- decpoint = numberformat.substring((numberformat.substring(1, 2).match(/\.|\,
/) ? 5 : 4), (numberformat.substring(1, 2).match(/\.|\,
/) ? 6 : 5));
- if (numberformat.substring(1, 2).match(/\.|\,/)) {
+ decpoint = numberformat.substring((numberformat.substring(1, 2).match(/\.|\,
|\'/) ? 5 : 4), (numberformat.substring(1, 2).match(/\.|\,|\'
/) ? 6 : 5));
+ if (numberformat.substring(1, 2).match(/\.|\,
|\'
/)) {
thpoint = numberformat.substring(1, 2);
}
else {
thpoint = numberformat.substring(1, 2);
}
else {
@@
-44,6
+44,9
@@
function check_right_number_format(input_name) {
if(thpoint && thpoint == '.'){
test_val = test_val.replace(/\./g, '');
}
if(thpoint && thpoint == '.'){
test_val = test_val.replace(/\./g, '');
}
+ if(thpoint && thpoint == "'"){
+ test_val = test_val.replace(/\'/g, '');
+ }
if(decpoint && decpoint == ','){
test_val = test_val.replace(/,/g, '.');
}
if(decpoint && decpoint == ','){
test_val = test_val.replace(/,/g, '.');
}