fix cash flow calc again 4
authorgniibe <gniibe@fsij.org>
Mon, 11 Jun 2012 11:43:24 +0000 (20:43 +0900)
committergniibe <gniibe@fsij.org>
Mon, 11 Jun 2012 11:43:24 +0000 (20:43 +0900)
accounting/models.py

index 3cca45a..132f49b 100644 (file)
@@ -122,7 +122,7 @@ class GeneralLedgerEntry(object):
                 total = -le.amount
             try:
                 cores_le = le.t.ledgerentry_set.get(account__is_cash=True)
-                if le.account.is_cash or (cores_le.is_credit == le.is_credit):
+                if le.account.is_cash or (le.account.type != 3 and le.account.type != 4):
                     cash_total = 0
                 else:
                     if total > cores_le: