@cubedelement.com/realty-investor-timeline 5.7.2 → 5.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.7.3](https://github.com/kvernon/realty-investor-timeline/compare/v5.7.2...v5.7.3) (2026-01-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * ledger-item filter method update ([#78](https://github.com/kvernon/realty-investor-timeline/issues/78)) ([e8b1c86](https://github.com/kvernon/realty-investor-timeline/commit/e8b1c86c3a290041e67b794811899e2c5d888953))
7
+
1
8
  ## [5.7.2](https://github.com/kvernon/realty-investor-timeline/compare/v5.7.1...v5.7.2) (2026-01-15)
2
9
 
3
10
 
@@ -134,17 +134,13 @@ class LedgerCollection {
134
134
  }
135
135
  const quarter = (0, get_date_quarter_1.getDateQuarter)(date);
136
136
  const boundary = this.filter((li) => {
137
- return li.dateLessThanOrEqualToAndQuarter(date, quarter);
137
+ return li.dateLessThanOrEqualToAndQuarter(date, quarter) && li.typeMatches(ledger_item_type_1.LedgerItemType.CashFlow);
138
138
  });
139
139
  if (boundary.length === 0) {
140
140
  return 0;
141
141
  }
142
- const cashFlowItems = boundary.filter((x) => x.typeMatches(ledger_item_type_1.LedgerItemType.CashFlow));
143
- if (cashFlowItems.length === 0) {
144
- return 0;
145
- }
146
- const firstMonth = cashFlowItems[0].created.getUTCMonth();
147
- const lastMonth = cashFlowItems[cashFlowItems.length - 1].created.getUTCMonth();
142
+ const firstMonth = boundary[0].created.getUTCMonth();
143
+ const lastMonth = boundary[boundary.length - 1].created.getUTCMonth();
148
144
  const monthsWithData = lastMonth - firstMonth + 1;
149
145
  if (monthsWithData <= 0) {
150
146
  return 0;
@@ -79,7 +79,7 @@ class LedgerItem {
79
79
  if (!this.created) {
80
80
  return false;
81
81
  }
82
- if (!this.dateLessThanOrEqualTo(date)) {
82
+ if (!this.dateLessThanOrEqualTo(date) || !this.dateMatchesYear(date.getUTCFullYear())) {
83
83
  return false;
84
84
  }
85
85
  return this.getQuarter() === quarter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubedelement.com/realty-investor-timeline",
3
- "version": "5.7.2",
3
+ "version": "5.7.3",
4
4
  "description": "A way to determine if and when your expenses would be covered",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",