@cubedelement.com/realty-investor-timeline 5.7.0 → 5.7.1
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.1](https://github.com/kvernon/realty-investor-timeline/compare/v5.7.0...v5.7.1) (2026-01-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* interface and infinity corrections ([#76](https://github.com/kvernon/realty-investor-timeline/issues/76)) ([3b38a43](https://github.com/kvernon/realty-investor-timeline/commit/3b38a43046b821670eff699553e7a59aa48f70f6))
|
|
7
|
+
|
|
1
8
|
# [5.7.0](https://github.com/kvernon/realty-investor-timeline/compare/v5.6.0...v5.7.0) (2026-01-15)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -45,7 +45,7 @@ export interface ILedgerCollection {
|
|
|
45
45
|
* @param date
|
|
46
46
|
*/
|
|
47
47
|
getCashFlowYearAverage(date?: Date): number;
|
|
48
|
-
getSummaryMonth(date: Date):
|
|
48
|
+
getSummaryMonth(date: Date): ILedgerDetailSummary;
|
|
49
49
|
getSummaryAnnual(year?: number): ILedgerSummary;
|
|
50
50
|
getSummariesAnnual(year?: number): ILedgerSummary[];
|
|
51
51
|
/**
|
|
@@ -147,6 +147,9 @@ class LedgerCollection {
|
|
|
147
147
|
const lastMonth = cashFlowItems[cashFlowItems.length - 1].created.getUTCMonth();
|
|
148
148
|
const monthsWithData = lastMonth - firstMonth + 1;
|
|
149
149
|
const totalCashFlow = this.getCashFlowQuarter(date);
|
|
150
|
+
if (totalCashFlow === 0) {
|
|
151
|
+
return 0;
|
|
152
|
+
}
|
|
150
153
|
return (0, currency_1.default)(totalCashFlow / monthsWithData);
|
|
151
154
|
}
|
|
152
155
|
getCashFlowQuarter(date) {
|
package/package.json
CHANGED