fix(views): keep a post visible when its only figure is an unconfirmed occurrence (I4)
hasActivity only checked carriedIn/allocation/charges, so an archived post whose sole activity this month was an unconfirmed recurring occurrence (zero remaining, nonzero expected/projected) was dropped from monthView.rows — its Projected figure never reached the month view even though ExpectedBand listed the same occurrence. remaining and projected are both fully derived from five raw fields; the check now covers all five.
This commit is contained in:
1 parent
5a047f53de
commit
093521b2c8
2 files changed
+45
-1
No files matched your search
+11
-1
@@ -28,8 +28,18 @@ export interface MonthViewModel {
|
||||
}
|
||||
|
||||
function hasActivity(figures: PostMonthFigures): boolean {
|
||||
// `remaining` and `projected` are both fully derived from these five raw
|
||||
// fields, so checking all five is what keeps a post visible whenever either
|
||||
// column would show a nonzero figure. `expected` and `projectedCarriedIn`
|
||||
// are the two the recurring-costs feature added: an archived post whose
|
||||
// only activity this month is an unconfirmed occurrence has a zero
|
||||
// `remaining` but a nonzero `projected`, and must not be dropped.
|
||||
return (
|
||||
figures.carriedIn !== 0 || figures.allocation !== 0 || figures.charges !== 0
|
||||
figures.carriedIn !== 0 ||
|
||||
figures.allocation !== 0 ||
|
||||
figures.charges !== 0 ||
|
||||
figures.expected !== 0 ||
|
||||
figures.projectedCarriedIn !== 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user