summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-26 10:42:30 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-26 10:42:30 -0700
commit821847b0185f3d69bfbe3af3867556335111b9a2 (patch)
tree0e87b34855eaf14aace3986f0837c0612b38ee61
parent09f5e41d96949927c20d9ced2c9d37fa5a9e785a (diff)
downloadfork-ledger-821847b0185f3d69bfbe3af3867556335111b9a2.tar.gz
fork-ledger-821847b0185f3d69bfbe3af3867556335111b9a2.tar.bz2
fork-ledger-821847b0185f3d69bfbe3af3867556335111b9a2.zip
Ensure that commodities using decimal period, have comma separators removed for string-to-number.
-rw-r--r--lisp/ldg-commodities.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ldg-commodities.el b/lisp/ldg-commodities.el
index 7f15ab81..612350b3 100644
--- a/lisp/ldg-commodities.el
+++ b/lisp/ldg-commodities.el
@@ -94,7 +94,9 @@ which must be translated both directions."
(while (string-match "\\." val)
(setq val (replace-match "," nil nil val)))) ;; gets rid of periods
(t
- (error "ledger-commodity-string-number-decimalize: direction not properly specified %S" direction))))
+ (error "ledger-commodity-string-number-decimalize: direction not properly specified %S" direction)))
+ (while (string-match "," val)
+ (setq val (replace-match "" nil nil val))))
val))