; comments

This commit is contained in:
Simon Michael 2020-11-20 16:44:07 -08:00
parent 6948b05db6
commit 654ab4243a
3 changed files with 6 additions and 6 deletions

View File

@ -89,7 +89,7 @@ type MonthDay = Int -- 1-31
type WeekDay = Int -- 1-7
-- Typical report periods (spans of time), both finite and open-ended.
-- A richer abstraction than DateSpan.
-- A higher-level abstraction than DateSpan.
data Period =
DayPeriod Day
| WeekPeriod Day

View File

@ -69,9 +69,9 @@ type BudgetReport = PeriodicReport DisplayName BudgetCell
type BudgetDisplayCell = ((String, Int), Maybe ((String, Int), Maybe (String, Int)))
-- | Calculate budget goals from all periodic transactions,
-- actual balance changes from the regular transactions,
-- and compare these to get a 'BudgetReport'.
-- | Calculate per-account, per-period budget (balance change) goals
-- from all periodic transactions, calculate actual balance changes
-- from the regular transactions, and compare these to get a 'BudgetReport'.
-- Unbudgeted accounts may be hidden or renamed (see journalWithBudgetAccountNames).
budgetReport :: ReportSpec -> Bool -> DateSpan -> Journal -> BudgetReport
budgetReport rspec assrt reportspan j = dbg4 "sortedbudgetreport" budgetreport
@ -103,7 +103,7 @@ budgetReport rspec assrt reportspan j = dbg4 "sortedbudgetreport" budgetreport
budgetreport = combineBudgetAndActual ropts j budgetgoalreport' actualreport
-- | Use all periodic transactions in the journal to generate
-- budget goal transactions in the specified report period.
-- budget goal transactions in the specified date span.
-- Budget goal transactions are similar to forecast transactions except
-- their purpose and effect is to define balance change goals, per account and period,
-- for BudgetReport.

View File

@ -105,7 +105,7 @@ instance Num b => Semigroup (PeriodicReportRow a b) where
sumPadded as [] = as
sumPadded [] bs = bs
-- | Figure out the overall date span of a PeridicReport
-- | Figure out the overall date span of a PeriodicReport
periodicReportSpan :: PeriodicReport a b -> DateSpan
periodicReportSpan (PeriodicReport [] _ _) = DateSpan Nothing Nothing
periodicReportSpan (PeriodicReport colspans _ _) = DateSpan (spanStart $ head colspans) (spanEnd $ last colspans)