From 6142847dd26d5859ff691e6c6b73a54dbbeb384f Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 10 Sep 2011 20:05:21 +0000 Subject: [PATCH] web: fix wrong transaction amount in account register with virtual postings --- hledger-lib/Hledger/Reports.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Reports.hs b/hledger-lib/Hledger/Reports.hs index e22f14422..aa9ba7f57 100644 --- a/hledger-lib/Hledger/Reports.hs +++ b/hledger-lib/Hledger/Reports.hs @@ -433,7 +433,7 @@ accountTransactionsReportItems matcher thisacctmatcher bal signfn (t:ts) = (psthisacct,psotheracct) = case thisacctmatcher of Just m -> partition (matchesPosting m) psmatched Nothing -> ([],psmatched) numotheraccts = length $ nub $ map paccount psotheracct - amt = sum $ map pamount psotheracct + amt = negate $ sum $ map pamount psthisacct acct | isNothing thisacctmatcher = summarisePostings psmatched -- journal register | numotheraccts == 0 = "transfer between " ++ summarisePostingAccounts psthisacct | otherwise = prefix ++ summarisePostingAccounts psotheracct