Skip to content

Commit 4feabdc

Browse files
authored
feat: get monthly cashflow collection by year (#60)
1 parent c7446a8 commit 4feabdc

File tree

95 files changed

+628
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+628
-459
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ root = true
22

33
[{*.cjs,*.js,*.js,*.ts}]
44
charset = utf-8
5-
end_of_line = crlf
5+
end_of_line = lf
66
indent_size = 2
77
indent_style = space
88
insert_final_newline = true

docs/_media/badge.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/account/i-user-goal/interfaces/IUserGoal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Interface: IUserGoal
88

9-
Defined in: [account/i-user-goal.ts:3](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-goal.ts#L3)
9+
Defined in: [account/i-user-goal.ts:3](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-goal.ts#L3)
1010

1111
## Extended by
1212

@@ -18,7 +18,7 @@ Defined in: [account/i-user-goal.ts:3](https://github.com/kvernon/realty-investo
1818

1919
> **monthlyIncomeAmountGoal**: `number`
2020
21-
Defined in: [account/i-user-goal.ts:7](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-goal.ts#L7)
21+
Defined in: [account/i-user-goal.ts:7](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-goal.ts#L7)
2222

2323
used to determine how much you need want for monthly expenses
2424

@@ -28,7 +28,7 @@ used to determine how much you need want for monthly expenses
2828

2929
> **metMonthlyGoal**(`today`, `properties`): `boolean`
3030
31-
Defined in: [account/i-user-goal.ts:13](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-goal.ts#L13)
31+
Defined in: [account/i-user-goal.ts:14](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-goal.ts#L14)
3232

3333
method used to help determine if you have met your expenses
3434

docs/account/i-user-investor-check/interfaces/IUserInvestorCheck.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Interface: IUserInvestorCheck
88

9-
Defined in: [account/i-user-investor-check.ts:9](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L9)
9+
Defined in: [account/i-user-investor-check.ts:9](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L9)
1010

1111
## Extends
1212

@@ -22,7 +22,7 @@ Defined in: [account/i-user-investor-check.ts:9](https://github.com/kvernon/real
2222

2323
> **holdRules**: [`IRuleEvaluation`](../../../rules/rule-evaluation/interfaces/IRuleEvaluation.md)\<[`HoldRuleTypes`](../../../rules/hold-rule-types/enumerations/HoldRuleTypes.md)\>[]
2424
25-
Defined in: [account/i-user-investor-check.ts:23](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L23)
25+
Defined in: [account/i-user-investor-check.ts:23](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L23)
2626

2727
a system to determine how to hold onto the properties the longest. This scenario says as long as it meets 1 rule
2828

@@ -32,7 +32,7 @@ a system to determine how to hold onto the properties the longest. This scenario
3232

3333
> `readonly` **ledgerCollection**: [`ILedgerCollection`](../../../ledger/ledger-collection/interfaces/ILedgerCollection.md)
3434
35-
Defined in: [account/i-user-investor-check.ts:13](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L13)
35+
Defined in: [account/i-user-investor-check.ts:13](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L13)
3636

3737
the collection which is used to keep a balance sheet.
3838

@@ -42,7 +42,7 @@ the collection which is used to keep a balance sheet.
4242

4343
> **loanSettings**: [`ILoanSetting`](../../../loans/i-loan-settings/interfaces/ILoanSetting.md)[]
4444
45-
Defined in: [account/i-user-investor-check.ts:18](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L18)
45+
Defined in: [account/i-user-investor-check.ts:18](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L18)
4646

4747
a collection of loan settings for how to get a loan for single family or some other kind of property
4848

@@ -52,7 +52,7 @@ a collection of loan settings for how to get a loan for single family or some ot
5252

5353
> **monthlyIncomeAmountGoal**: `number`
5454
55-
Defined in: [account/i-user-goal.ts:7](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-goal.ts#L7)
55+
Defined in: [account/i-user-goal.ts:7](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-goal.ts#L7)
5656

5757
used to determine how much you need want for monthly expenses
5858

@@ -66,7 +66,7 @@ used to determine how much you need want for monthly expenses
6666

6767
> **purchaseRules**: [`IRuleEvaluation`](../../../rules/rule-evaluation/interfaces/IRuleEvaluation.md)\<[`PurchaseRuleTypes`](../../../rules/purchase-rule-types/enumerations/PurchaseRuleTypes.md)\>[]
6868
69-
Defined in: [account/i-user-investor-check.ts:60](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L60)
69+
Defined in: [account/i-user-investor-check.ts:60](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L60)
7070

7171
a system to weed out the properties you don't want. This scenario says as long as it meets 1 rule
7272

@@ -76,7 +76,7 @@ a system to weed out the properties you don't want. This scenario says as long a
7676

7777
> **getAvailableSavings**(`date`, `properties`): `number`
7878
79-
Defined in: [account/i-user-investor-check.ts:55](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L55)
79+
Defined in: [account/i-user-investor-check.ts:55](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L55)
8080

8181
should be the total balance - savings, using [getMinimumSavings](IUserInvestorCheck.md#getminimumsavings), for determining monthly cash to save for single family properties
8282

@@ -100,7 +100,7 @@ should be the total balance - savings, using [getMinimumSavings](IUserInvestorCh
100100

101101
> **getMinimumSavings**(`date`, `properties`): `number`
102102
103-
Defined in: [account/i-user-investor-check.ts:48](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L48)
103+
Defined in: [account/i-user-investor-check.ts:48](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L48)
104104

105105
used to retrieve the amount required to keep in savings
106106

@@ -124,7 +124,7 @@ used to retrieve the amount required to keep in savings
124124

125125
> **hasMinimumSavings**(`date`, `properties`): `boolean`
126126
127-
Defined in: [account/i-user-investor-check.ts:41](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L41)
127+
Defined in: [account/i-user-investor-check.ts:41](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L41)
128128

129129
a way to determine if the user has enough money. This is different because with
130130
single family homes, you would have to save a certain amount of monthly mortgage
@@ -149,7 +149,7 @@ single family homes, you would have to save a certain amount of monthly mortgage
149149

150150
> **hasMoneyToInvest**(`date`, `properties`, `contribution`?): `boolean`
151151
152-
Defined in: [account/i-user-investor-check.ts:33](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-investor-check.ts#L33)
152+
Defined in: [account/i-user-investor-check.ts:33](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-investor-check.ts#L33)
153153

154154
based upon [getMinimumSavings](IUserInvestorCheck.md#getminimumsavings), it checks to see if there is an amount remaining that can be used along with the [contribution](IUserInvestorCheck.md#contribution).
155155

@@ -183,7 +183,7 @@ availableSavings - contribution >= 0;
183183

184184
> **metMonthlyGoal**(`today`, `properties`): `boolean`
185185
186-
Defined in: [account/i-user-goal.ts:13](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/i-user-goal.ts#L13)
186+
Defined in: [account/i-user-goal.ts:14](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/i-user-goal.ts#L14)
187187

188188
method used to help determine if you have met your expenses
189189

docs/account/user/classes/User.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: User
88

9-
Defined in: [account/user.ts:32](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L32)
9+
Defined in: [account/user.ts:32](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L32)
1010

1111
It's the user... as an interface!
1212

@@ -20,7 +20,7 @@ It's the user... as an interface!
2020

2121
> **new User**(`ledgerCollection`): [`User`](User.md)
2222
23-
Defined in: [account/user.ts:75](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L75)
23+
Defined in: [account/user.ts:75](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L75)
2424

2525
#### Parameters
2626

@@ -38,7 +38,7 @@ Defined in: [account/user.ts:75](https://github.com/kvernon/realty-investor-time
3838

3939
> **holdRules**: [`IRuleEvaluation`](../../../rules/rule-evaluation/interfaces/IRuleEvaluation.md)\<[`HoldRuleTypes`](../../../rules/hold-rule-types/enumerations/HoldRuleTypes.md)\>[]
4040
41-
Defined in: [account/user.ts:82](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L82)
41+
Defined in: [account/user.ts:82](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L82)
4242

4343
a system to determine how to hold onto the properties the longest. This scenario says as long as it meets 1 rule
4444

@@ -52,7 +52,7 @@ a system to determine how to hold onto the properties the longest. This scenario
5252

5353
> `readonly` **ledgerCollection**: [`ILedgerCollection`](../../../ledger/ledger-collection/interfaces/ILedgerCollection.md)
5454
55-
Defined in: [account/user.ts:36](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L36)
55+
Defined in: [account/user.ts:36](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L36)
5656

5757
the collection which is used to keep a balance sheet.
5858

@@ -66,7 +66,7 @@ the collection which is used to keep a balance sheet.
6666

6767
> **loanSettings**: [`ILoanSetting`](../../../loans/i-loan-settings/interfaces/ILoanSetting.md)[]
6868
69-
Defined in: [account/user.ts:41](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L41)
69+
Defined in: [account/user.ts:41](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L41)
7070

7171
a collection of loan settings for how to get a loan for single family or some other kind of property
7272

@@ -80,7 +80,7 @@ a collection of loan settings for how to get a loan for single family or some ot
8080

8181
> **monthlyIncomeAmountGoal**: `number`
8282
83-
Defined in: [account/user.ts:46](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L46)
83+
Defined in: [account/user.ts:46](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L46)
8484

8585
used to determine how much you need want for monthly expenses
8686

@@ -94,7 +94,7 @@ used to determine how much you need want for monthly expenses
9494

9595
> **monthlySavedAmount**: `number`
9696
97-
Defined in: [account/user.ts:73](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L73)
97+
Defined in: [account/user.ts:73](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L73)
9898

9999
an amount which the user can save per month after expenses, like, after my pay check I could put this amount into savings
100100

@@ -108,7 +108,7 @@ an amount which the user can save per month after expenses, like, after my pay c
108108

109109
> **purchaseRules**: [`IRuleEvaluation`](../../../rules/rule-evaluation/interfaces/IRuleEvaluation.md)\<[`PurchaseRuleTypes`](../../../rules/purchase-rule-types/enumerations/PurchaseRuleTypes.md)\>[]
110110
111-
Defined in: [account/user.ts:87](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L87)
111+
Defined in: [account/user.ts:87](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L87)
112112

113113
a system to weed out the properties you don't want. This scenario says as long as it meets 1 rule
114114

@@ -122,7 +122,7 @@ a system to weed out the properties you don't want. This scenario says as long a
122122

123123
> **clone**(): [`IUser`](../interfaces/IUser.md)
124124
125-
Defined in: [account/user.ts:171](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L171)
125+
Defined in: [account/user.ts:171](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L171)
126126

127127
#### Returns
128128

@@ -138,7 +138,7 @@ Defined in: [account/user.ts:171](https://github.com/kvernon/realty-investor-tim
138138

139139
> **getAvailableSavings**(`date`, `properties`): `number`
140140
141-
Defined in: [account/user.ts:155](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L155)
141+
Defined in: [account/user.ts:155](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L155)
142142

143143
should be the total balance - savings, using [getMinimumSavings](User.md#getminimumsavings), for determining monthly cash to save for single family properties
144144

@@ -166,7 +166,7 @@ should be the total balance - savings, using [getMinimumSavings](User.md#getmini
166166

167167
> **getEstimatedMonthlyCashFlow**(`today`, `properties`): `number`
168168
169-
Defined in: [account/user.ts:57](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L57)
169+
Defined in: [account/user.ts:57](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L57)
170170

171171
method used to help determine if you have met your expenses
172172

@@ -194,7 +194,7 @@ method used to help determine if you have met your expenses
194194

195195
> **getMinimumSavings**(`date`, `properties`): `number`
196196
197-
Defined in: [account/user.ts:137](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L137)
197+
Defined in: [account/user.ts:137](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L137)
198198

199199
used to retrieve the amount required to keep in savings
200200

@@ -222,7 +222,7 @@ used to retrieve the amount required to keep in savings
222222

223223
> **hasMinimumSavings**(`date`, `properties`): `boolean`
224224
225-
Defined in: [account/user.ts:119](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L119)
225+
Defined in: [account/user.ts:119](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L119)
226226

227227
a way to determine if the user has enough money. This is different because with
228228
single family homes, you would have to save a certain amount of monthly mortgage
@@ -251,7 +251,7 @@ single family homes, you would have to save a certain amount of monthly mortgage
251251

252252
> **hasMoneyToInvest**(`date`, `properties`, `contribution`?): `boolean`
253253
254-
Defined in: [account/user.ts:97](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L97)
254+
Defined in: [account/user.ts:97](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L97)
255255

256256
based upon [getMinimumSavings](User.md#getminimumsavings), it checks to see if there is an amount remaining that can be used along with the [contribution](User.md#contribution).
257257

@@ -289,7 +289,7 @@ availableSavings - contribution >= 0;
289289

290290
> **metMonthlyGoal**(`today`, `properties`): `boolean`
291291
292-
Defined in: [account/user.ts:53](https://github.com/kvernon/realty-investor-timeline/blob/cec7f590aef4aded8ee94008f5b37aa0db4daadd/src/account/user.ts#L53)
292+
Defined in: [account/user.ts:53](https://github.com/kvernon/realty-investor-timeline/blob/c7446a8a5576468ac5874a2dd8323180fa97a55b/src/account/user.ts#L53)
293293

294294
method used to help determine if you have met your expenses
295295

0 commit comments

Comments
 (0)