summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2014-01-02 18:44:15 +0100
committerMoritz Ulrich <moritz@tarn-vedra.de>2014-01-02 18:44:15 +0100
commit09ef323a7364d7f27c44bcfdce01e9b41063284c (patch)
tree3b312c32ec5921cd58f720ca566960d9e6402dc2 /lisp
parent26bc890d882586e808b9def9ddf68a752b4c8e18 (diff)
downloadfork-ledger-09ef323a7364d7f27c44bcfdce01e9b41063284c.tar.gz
fork-ledger-09ef323a7364d7f27c44bcfdce01e9b41063284c.tar.bz2
fork-ledger-09ef323a7364d7f27c44bcfdce01e9b41063284c.zip
ledger-reconcile: Add option to insert an effective date when clearing transactions.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-reconcile.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index 44e60532..47f0e176 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -80,6 +80,11 @@ reconcile-finish will mark all pending posting cleared."
:type 'string
:group 'ledger-reconcile)
+(defcustom ledger-reconcile-insert-effective-date nil
+ "If t, prompt for effective date when clearing transactions during reconciliation."
+ :type 'boolean
+ :group 'ledger-reconcile)
+
(defun ledger-reconcile-get-cleared-or-pending-balance (buffer account)
"Calculate the cleared or pending balance of the account."
@@ -136,7 +141,10 @@ And calculate the target-delta of the account being reconciled."
(forward-char)
(setq status (ledger-toggle-current (if ledger-reconcile-toggle-to-pending
'pending
- 'cleared))))
+ 'cleared)))
+ (when ledger-reconcile-insert-effective-date
+ ;; Ask for effective date & insert it
+ (ledger-insert-effective-date)))
;; remove the existing face and add the new face
(remove-text-properties (line-beginning-position)
(line-end-position)