Reconcile date configuration is pulled from ledgerrc

This commit is contained in:
Craig Earls 2013-03-08 19:33:16 -05:00
parent 404e84cd44
commit bfe360d4c9

View file

@ -285,13 +285,15 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(if (looking-at "(") (if (looking-at "(")
(read (current-buffer))))))))) ;current-buffer is the *temp* created above (read (current-buffer))))))))) ;current-buffer is the *temp* created above
(if (and ledger-success (> (length xacts) 0)) (if (and ledger-success (> (length xacts) 0))
(progn (let ((date-format (cdr (assoc "date-format" ledger-environment-alist))))
(dolist (xact xacts) (dolist (xact xacts)
(dolist (posting (nthcdr 5 xact)) (dolist (posting (nthcdr 5 xact))
(let ((beg (point)) (let ((beg (point))
(where (ledger-marker-where-xact-is xact posting))) (where (ledger-marker-where-xact-is xact posting)))
(insert (format "%s %-4s %-30s %-30s %15s\n" (insert (format "%s %-4s %-30s %-30s %15s\n"
(format-time-string "%Y/%m/%d" (nth 2 xact)) (format-time-string (if date-format
date-format
"%Y/%m/%d") (nth 2 xact))
(if (nth 3 xact) (if (nth 3 xact)
(nth 3 xact) (nth 3 xact)
"") "")