sort register by date

This commit is contained in:
Simon Michael 2007-07-03 19:06:47 +00:00
parent a266a9b2e0
commit b2b9aba791
3 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,6 @@ module Ledger
where
import qualified Data.Map as Map
import Data.Map ((!))
import Data.Ord (comparing)
import Utils
import Types

View File

@ -4,6 +4,7 @@ module Utils (
module Char,
module Data.List,
module Data.Tree,
module Data.Ord,
module Text.Printf,
module Text.Regex,
module Debug.Trace,
@ -14,6 +15,7 @@ where
import Char
import Data.List
import Data.Tree
import Data.Ord
import Text.Printf
import Text.Regex
import Debug.Trace

View File

@ -45,7 +45,7 @@ register opts acctpats descpats = do
where
printRegister l =
putStr $ showTransactionsWithBalances
(ledgerTransactionsMatching (acctpats,descpats) l)
(sortBy (comparing date) (ledgerTransactionsMatching (acctpats,descpats) l))
0
balance :: [Flag] -> [String] -> [String] -> IO ()