From 17ceb9039b70724cc768f522f878b67af5f25870 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 16 Oct 2008 08:48:25 +0000 Subject: [PATCH] rename sumLedgerTransactions --- Ledger/Entry.hs | 2 +- Ledger/RawTransaction.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ledger/Entry.hs b/Ledger/Entry.hs index 0532223a4..1dbacdf4d 100644 --- a/Ledger/Entry.hs +++ b/Ledger/Entry.hs @@ -24,7 +24,7 @@ isEntryBalanced :: Entry -> Bool isEntryBalanced (Entry {etransactions=ts}) = isZeroAmount sum && numcommodities==1 where realts = filter isReal ts - sum = sumLedgerTransactions realts + sum = sumRawTransactions realts numcommodities = length $ nub $ map (symbol . commodity . tamount) realts -- | Fill in a missing balance in this entry, if there is one, diff --git a/Ledger/RawTransaction.hs b/Ledger/RawTransaction.hs index a8a95a473..25e75496f 100644 --- a/Ledger/RawTransaction.hs +++ b/Ledger/RawTransaction.hs @@ -34,7 +34,7 @@ autofillTransactions ts = (reals, _) = partition isReal ts (realamounts, missingamounts) = partition hasAmount reals balance t = if (isReal t) && (not $ hasAmount t) - then t{tamount = -(sumLedgerTransactions realamounts)} + then t{tamount = -(sumRawTransactions realamounts)} else t isReal :: RawTransaction -> Bool @@ -43,5 +43,5 @@ isReal t = rttype t == RegularTransaction hasAmount :: RawTransaction -> Bool hasAmount = ("AUTO" /=) . symbol . commodity . tamount -sumLedgerTransactions :: [RawTransaction] -> Amount -sumLedgerTransactions = sumAmounts . map tamount +sumRawTransactions :: [RawTransaction] -> Amount +sumRawTransactions = sumAmounts . map tamount