lib: dont raise when there is neither budget nor transactions in the report period

This commit is contained in:
Dmitry Astapov 2019-09-11 23:11:23 +01:00 committed by Simon Michael
parent cf74972148
commit e9d300bef3

View File

@ -286,11 +286,11 @@ budgetReportAsText ropts@ReportOpts{..} budgetr@(PeriodicReport ( _, rows, _)) =
Just (AtDate d _mc) -> ", valued at "++showDate d
Nothing -> "")
actualwidth =
maximum [ maybe 0 (length . showMixedAmountOneLineWithoutPrice) amt
maximum' [ maybe 0 (length . showMixedAmountOneLineWithoutPrice) amt
| (_, _, _, amtandgoals, _, _) <- rows
, (amt, _) <- amtandgoals ]
budgetwidth =
maximum [ maybe 0 (length . showMixedAmountOneLineWithoutPrice) goal
maximum' [ maybe 0 (length . showMixedAmountOneLineWithoutPrice) goal
| (_, _, _, amtandgoals, _, _) <- rows
, (_, goal) <- amtandgoals ]
-- XXX lay out actual, percentage and/or goal in the single table cell for now, should probably use separate cells