mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 13:22:27 +03:00
; comments
This commit is contained in:
parent
6948b05db6
commit
654ab4243a
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user