mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 07:09:28 +03:00
sort register by date
This commit is contained in:
parent
a266a9b2e0
commit
b2b9aba791
@ -2,7 +2,6 @@ module Ledger
|
||||
where
|
||||
import qualified Data.Map as Map
|
||||
import Data.Map ((!))
|
||||
import Data.Ord (comparing)
|
||||
|
||||
import Utils
|
||||
import Types
|
||||
|
2
Utils.hs
2
Utils.hs
@ -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
|
||||
|
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user