Permalink
Browse files

Fixed balance reports

  • Loading branch information...
1 parent 1dbd30d commit 38f609be8453368c845c570c26fe637c6738651d @jwiegley committed Dec 10, 2007
Showing with 9 additions and 5 deletions.
  1. +4 −0 doc/sample.dat
  2. +4 −3 transforms/totals.lisp
  3. +1 −2 transforms/transform.lisp
View
@@ -29,3 +29,7 @@ Y 2004
Liabilities:MasterCard $20.00
Assets:Bank:Checking
+05/29 Book Store
+ Expenses:Books $20.00
+ Liabilities:MasterCard
+
View
@@ -48,9 +48,10 @@
(let (root-account)
(iterate ((xact xact-series))
(unless root-account
- (setf root-account
- (binder-root-account (journal-binder
- (entry-journal (xact-entry xact))))))
+ (let ((binder (journal-binder (entry-journal (xact-entry xact)))))
+ (reset-accounts binder)
+ (setf root-account (binder-root-account binder))))
+
(let* ((account (xact-account xact))
(subtotal (account-value account :subtotal)))
(account-set-value account :subtotal
@@ -8,8 +8,7 @@
;; Reset the computed values of all transactions
(setf xacts (map-fn 'transaction
#'(lambda (xact)
- (setf (xact-data xact) nil
- (account-data (xact-account xact)) nil)
+ (setf (xact-data xact) nil)
xact)
xacts))

0 comments on commit 38f609b

Please sign in to comment.