packages feed

hledger-interest 1.4.2 → 1.4.3

raw patch · 2 files changed

+13/−9 lines, 2 filesdep ~hledger-lib

Dependency ranges changed: hledger-lib

Files

Hledger/Interest.hs view
@@ -45,7 +45,7 @@  processTransaction :: Transaction -> Computer () processTransaction ts = do-  let day = fromMaybe (tdate ts) (teffectivedate ts)+  let day = fromMaybe (tdate ts) (tdate2 ts)   computeInterest day   interestAcc <- asks interestAccount   let posts = [ p | p <- tpostings ts, interestAcc == paccount p ]@@ -82,7 +82,7 @@   perDayScalar <- daysInYear day   let t = Transaction           { tdate          = day-          , teffectivedate = Nothing+          , tdate2         = Nothing           , tstatus        = False           , tcode          = ""           , tdescription   = showPercent ratePerAnno ++ "% interest for " ++ showMixedAmount bal ++ " over " ++ show days ++ " days"@@ -92,7 +92,9 @@           , ttags          = []           }       pTarget = Posting-          { pstatus        = False+          { pdate          = Nothing+          , pdate2         = Nothing+          , pstatus        = False           , paccount       = targetAcc           , pamount        = Mixed [ a { aquantity = (aquantity a * ratePerAnno) / fromInteger perDayScalar * fromInteger days } | a <- amounts bal ]           , pcomment       = ""@@ -101,7 +103,9 @@           , ptags          = []           }       pSource = Posting-          { pstatus        = False+          { pdate          = Nothing+          , pdate2         = Nothing+          , pstatus        = False           , paccount       = srcAcc           , pamount        = negate (pamount pTarget)           , pcomment       = ""
hledger-interest.cabal view
@@ -1,5 +1,5 @@ Name:                   hledger-interest-Version:                1.4.2+Version:                1.4.3 Synopsis:               computes interest for a given account License:                BSD3 License-file:           LICENSE@@ -9,7 +9,7 @@ Category:               Finance Build-type:             Simple Cabal-version:          >= 1.6-Tested-with:            GHC >= 7.0.4 && <= 7.6.1+Tested-with:            GHC >= 7.0.4 && <= 7.6.3 Data-files:             README.md Description:  hledger-interest is a small command-line utility based on Simon@@ -18,8 +18,8 @@  configured to use various schemes for day-counting, such as act\/act,  30\/360, 30E\/360, and 30\/360isda. Furthermore, it supports a (small)  number of interest schemes, i.e. annual interest with a fixed rate and- the scheme mandated by the German BGB288 (Basiszins für- Verbrauchergeschäfte). Extending support for other schemes is fairly+ the scheme mandated by the German BGB288 (Basiszins fuer+ Verbrauchergeschaefte). Extending support for other schemes is fairly  easy, but currently requires changes to the source code.  .  As an example, consider the following loan, stored in a file called@@ -112,7 +112,7 @@  Executable hledger-interest   Main-is:              Main.hs-  Build-depends:        base >= 3 && < 5, hledger-lib >= 0.19.3, time, mtl, Cabal+  Build-depends:        base >= 3 && < 5, hledger-lib >= 0.20, time, mtl, Cabal   other-modules:        Hledger.Interest                         Hledger.Interest.DayCountConvention                         Hledger.Interest.Rate