rabocsv2qif 1.1.4 → 1.1.5
raw patch · 2 files changed
+5/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Rabobank.hs +4/−3
- rabocsv2qif.cabal +1/−1
Rabobank.hs view
@@ -46,6 +46,7 @@ data Transaction = Transaction { date :: String -- ^ The transaction date , amount :: Double -- ^ The amount of the transaction , description :: String -- ^ The transaction description+ , payee :: String -- ^ The payee , accountNumber :: String -- ^ The account number } deriving (Show) @@ -78,7 +79,7 @@ -- specification, and then intercalate then with newlines, thereby returning a -- 'String' with this data, separated by newlines, just what we need. transactionToQif :: Transaction -> String-transactionToQif t = intercalate "\n" ['P':description t, 'N':accountNumber t, +transactionToQif t = intercalate "\n" ['P':payee t, 'M': description t, 'N':accountNumber t, 'D':date t, 'T':printf "%.2f" (amount t)] ++ "\n^" -- |'rowToTransaction' turns a list of 'String's to a 'Transaction'. It will@@ -86,8 +87,8 @@ -- into a correct 'Transaction' for use with 'transactionToQif'. rowToTransaction :: [String] -> Maybe Transaction rowToTransaction- (date:debitcredit:amount:accountNumber:descriptionfields) =- Just (Transaction correctDate correctAmount correctDescription accountNumber)+ (date:debitcredit:amount:accountNumber:payee:descriptionfields) =+ Just (Transaction correctDate correctAmount correctDescription payee accountNumber) where correctDate = intercalate "/" $ splitPlaces [4,2,2] date correctAmount = creditDebit (read amount :: Double) (toTransactionType debitcredit) correctDescription = intercalate ", " descriptionfields
rabocsv2qif.cabal view
@@ -1,5 +1,5 @@ Name: rabocsv2qif-Version: 1.1.4+Version: 1.1.5 Synopsis : A library and program to create QIF files from Rabobank CSV exports. License: GPL License-file: LICENSE