Ensure target balance is actually parseable as a number
This commit is contained in:
parent
52dd81ca9e
commit
8da79a8967
1 changed files with 17 additions and 16 deletions
|
|
@ -126,14 +126,15 @@ longer ones are after the value."
|
|||
|
||||
(defun ledger-read-commodity-string (prompt)
|
||||
(let ((str (read-from-minibuffer
|
||||
(concat prompt " (" ledger-reconcile-default-commodity "): ")))
|
||||
comm)
|
||||
(if (> (length str) 0)
|
||||
(progn
|
||||
(setq comm (ledger-split-commodity-string str))
|
||||
(if (cadr comm)
|
||||
comm
|
||||
(list (car comm) ledger-reconcile-default-commodity))))))
|
||||
(concat prompt " (" ledger-reconcile-default-commodity "): ")))
|
||||
comm)
|
||||
(if (and (> (length str) 0)
|
||||
(ledger-split-commodity-string str))
|
||||
(progn
|
||||
(setq comm (ledger-split-commodity-string str))
|
||||
(if (cadr comm)
|
||||
comm
|
||||
(list (car comm) ledger-reconcile-default-commodity))))))
|
||||
|
||||
(provide 'ldg-commodities)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue