projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cb1887
)
Fixed get_amount to return 0 on invalid input.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Thu, 12 Feb 2009 17:41:34 +0000
(17:41 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Thu, 12 Feb 2009 17:41:34 +0000
(17:41 +0000)
js/utils.js
patch
|
blob
|
history
diff --git
a/js/utils.js
b/js/utils.js
index 8f9346ccddef17475198c19a4c1c2dd9e7ae6b19..98733d667d84f2542f72b59f3d5f1f1e4d99b23d 100644
(file)
--- a/
js/utils.js
+++ b/
js/utils.js
@@
-201,8
+201,8
@@
function get_amount(doc, label) {
else
var val = document.getElementsByName(doc)[0].value;
val = val.replace(new RegExp('\\'+user.ts, 'g'),'');
- val = val.replace(new RegExp('\\'+user.ds, 'g'),'.');
- return
1*
val;
+ val =
+
val.replace(new RegExp('\\'+user.ds, 'g'),'.');
+ return
isNaN(val) ? 0 :
val;
}
function goBack() {