From: Julien Moutinho Date: Wed, 23 Jul 2014 21:24:22 +0000 (+0200) Subject: Correction : devises. X-Git-Tag: v2014.08.02~10 X-Git-Url: https://git.cyclocoop.org/?p=tool%2Fhledger.git;a=commitdiff_plain;h=c1dd60ccf0a37d4aa6601b0ca59cadc6659a920e;ds=sidebyside Correction : devises. --- diff --git a/chart/Association_1901/Cyclofficine.Plan_comptable.hledger b/chart/Association_1901/Cyclofficine.Plan_comptable.hledger index a0998f5..d37296e 100644 --- a/chart/Association_1901/Cyclofficine.Plan_comptable.hledger +++ b/chart/Association_1901/Cyclofficine.Plan_comptable.hledger @@ -18,7 +18,7 @@ ; A.ZZZ:B.YYY:C.XXX 0 ; ABC. INTITULÉ OFFICIEL DU COMPTE ; ---- -D 1,000.00€ ; NOTE: précise le format de la devise. +D 1.000,00€ ; NOTE: précise le format de la devise. 01/01 Initialisation des comptes 1.Capital 0 ; 1. COMPTES DE CAPITAUX diff --git a/hledger-print-csv.hs b/hledger-print-csv.hs index efb7a6e..cac402a 100755 --- a/hledger-print-csv.hs +++ b/hledger-print-csv.hs @@ -30,11 +30,12 @@ chomp = reverse . dropWhile isSpace . reverse . dropWhile isSpace postingToCSV :: Posting -> CSV postingToCSV p = - map (\((Amount {aquantity=q,acommodity=c})) -> - let amount = show q in + map (\(a@(Amount {aquantity=q,acommodity=c})) -> + let a_ = a{acommodity=""} in + let amount = showAmount a_ in let commodity = c in - let credit = if q < 0 then show $ negate q else "" in - let debit = if q > 0 then show q else "" in + let credit = if q < 0 then showAmount $ negate a_ else "" in + let debit = if q > 0 then showAmount a_ else "" in account:amount:commodity:credit:debit:status:comment:[]) amounts where