Fixes workflow for using toggle-pending with clear-whole-transactions

This commit is contained in:
Craig Earls 2013-02-13 09:36:44 -07:00
parent a13bcd4109
commit db9ae7dd04
2 changed files with 12 additions and 6 deletions

View file

@ -83,7 +83,6 @@
(defun ledger-reconcile-toggle () (defun ledger-reconcile-toggle ()
(interactive) (interactive)
(let ((where (get-text-property (point) 'where)) (let ((where (get-text-property (point) 'where))
(account ledger-acct)
(inhibit-read-only t) (inhibit-read-only t)
status) status)
(when (ledger-reconcile-get-buffer where) (when (ledger-reconcile-get-buffer where)
@ -173,7 +172,9 @@
(ledger-display-balance)) (ledger-display-balance))
(defun ledger-reconcile-finish () (defun ledger-reconcile-finish ()
"Mark all pending transactions as cleared, save the buffers and exit reconcile mode" "Mark all pending posting or transactions as cleared, depending
on ledger-reconcile-clear-whole-transactions, save the buffers
and exit reconcile mode"
(interactive) (interactive)
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))

View file

@ -219,11 +219,16 @@ dropped."
(progn (progn
(delete-char 1) (delete-char 1)
(if (and style (eq style 'cleared)) (if (and style (eq style 'cleared))
(insert " *"))) (progn
(insert " *")
(setq status 'cleared))))
(if (and style (eq style 'pending)) (if (and style (eq style 'pending))
(progn
(insert " ! ") (insert " ! ")
(insert " * ")) (setq status 'pending))
(setq status t)))) (progn
(insert " * ")
(setq status 'cleared))))))
status)) status))
(provide 'ldg-state) (provide 'ldg-state)