more small stuff
This commit is contained in:
		
							parent
							
								
									0542e2f2f6
								
							
						
					
					
						commit
						dabc30e115
					
				| @ -1,5 +1,7 @@ | ||||
| module Ledger | ||||
| where | ||||
| import qualified Data.Map as Map | ||||
| 
 | ||||
| import Utils | ||||
| import AccountName | ||||
| import BasicTypes | ||||
| @ -32,6 +34,9 @@ ledgerTransactionsMatching (acctregexps,descregexps) l = | ||||
|     (concat [filter (matchTransactionDescription r) ts | r <- descregexps]) | ||||
|     where ts = ledgerTransactions l | ||||
| 
 | ||||
| ledgerTransactionsInAccount :: Ledger -> AccountName -> [EntryTransaction] | ||||
| ledgerTransactionsInAccount l a = ledgerTransactionsMatching (["^" ++ a ++ "$"], []) l | ||||
|             | ||||
| accountNamesFromTransactions :: [EntryTransaction] -> [AccountName] | ||||
| accountNamesFromTransactions ts = nub $ map account ts | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user