OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/hledger-interest?expand=0&rev=13
This commit is contained in:
parent
68cc0081bd
commit
f0ad1b0b48
@ -1,35 +0,0 @@
|
|||||||
From e0694605be0c89c9b97629a893696a7947dc7fcb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dmitry Astapov <dastapov@gmail.com>
|
|
||||||
Date: Wed, 10 Mar 2021 23:47:56 +0000
|
|
||||||
Subject: [PATCH] Allow building with hledger-lib version 1.21.x
|
|
||||||
|
|
||||||
---
|
|
||||||
Main.hs | 6 +++---
|
|
||||||
hledger-interest.cabal | 4 ++--
|
|
||||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Main.hs b/Main.hs
|
|
||||||
index 042da78..bb07b7b 100644
|
|
||||||
--- a/Main.hs
|
|
||||||
+++ b/Main.hs
|
|
||||||
@@ -95,12 +95,12 @@ main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() -> do
|
|
||||||
jnl' <- readJournalFiles ledgerInputOptions (reverse (optInput opts)) >>= either fail return
|
|
||||||
interestAcc <- case args of
|
|
||||||
[] -> commandLineError "required argument ACCOUNT is missing\n"
|
|
||||||
- [acc] -> return acc
|
|
||||||
+ [acc] -> return $ T.pack acc
|
|
||||||
_ -> commandLineError "only one interest ACCOUNT may be specified\n"
|
|
||||||
let jnl = filterJournalTransactions (Acct (toRegex' interestAcc)) jnl'
|
|
||||||
ts = sortOn tdate (jtxns jnl)
|
|
||||||
cfg = Config
|
|
||||||
- { interestAccount = T.pack interestAcc
|
|
||||||
+ { interestAccount = interestAcc
|
|
||||||
, sourceAccount = T.pack (optSourceAcc opts)
|
|
||||||
, targetAccount = T.pack (optTargetAcc opts)
|
|
||||||
, dayCountConvention = fromJust (optDCC opts)
|
|
||||||
@@ -114,4 +114,4 @@ main = bracket (return ()) (\() -> hFlush stdout >> hFlush stderr) $ \() -> do
|
|
||||||
result
|
|
||||||
| optVerbose opts = ts' ++ ts
|
|
||||||
| otherwise = ts'
|
|
||||||
- mapM_ (putStr . showTransactionUnelided) (sortOn tdate result)
|
|
||||||
+ mapM_ (putStr . T.unpack . showTransaction) (sortOn tdate result)
|
|
Loading…
Reference in New Issue
Block a user