imp:bal:budget:csv,tsv output: show 0 not empty when there's no amount
This commit is contained in:
parent
37f9d6b239
commit
ffdde364de
@ -246,9 +246,9 @@ combineBudgetAndActual ropts j
|
||||
| PeriodicReportRow acct budgetgoals budgettot budgetavg <- budgetrows
|
||||
, displayFull acct `notElem` map prrFullName actualsplusgoals
|
||||
, let acctBudgetByPeriod = Map.fromList $ zip budgetperiods budgetgoals :: Map DateSpan BudgetGoal
|
||||
, let amtandgoals = [ (Nothing, Map.lookup p acctBudgetByPeriod) | p <- periods ] :: [BudgetCell]
|
||||
, let totamtandgoal = (Nothing, Just budgettot)
|
||||
, let avgamtandgoal = (Nothing, Just budgetavg)
|
||||
, let amtandgoals = [ (Just 0, Map.lookup p acctBudgetByPeriod) | p <- periods ] :: [BudgetCell]
|
||||
, let totamtandgoal = (Just 0, Just budgettot)
|
||||
, let avgamtandgoal = (Just 0, Just budgetavg)
|
||||
]
|
||||
|
||||
-- combine and re-sort rows
|
||||
|
||||
@ -579,7 +579,7 @@ $ hledger bal -f- --budget -TA not:income -O csv
|
||||
"expenses:bills","$80","$370","$80","$370","$80","$370"
|
||||
"expenses:bills:a","$10","$20","$10","$20","$10","$20"
|
||||
"expenses:bills:b","$40","$200","$40","$200","$40","$200"
|
||||
"expenses:bills:c","","$50","","$50","","$50"
|
||||
"expenses:bills:c","0","$50","0","$50","0","$50"
|
||||
"expenses:bills:f","$10","0","$10","0","$10","0"
|
||||
"Total:","$80","$370","$80","$370","$80","$370"
|
||||
|
||||
@ -589,7 +589,7 @@ Account 2019-01-01..2019-01-02 budget Total budget Average budget
|
||||
expenses:bills $80 $370 $80 $370 $80 $370
|
||||
expenses:bills:a $10 $20 $10 $20 $10 $20
|
||||
expenses:bills:b $40 $200 $40 $200 $40 $200
|
||||
expenses:bills:c $50 $50 $50
|
||||
expenses:bills:c 0 $50 0 $50 0 $50
|
||||
expenses:bills:f $10 0 $10 0 $10 0
|
||||
Total: $80 $370 $80 $370 $80 $370
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user