Creating new baseline. This will be the starting point for the updates.

This commit is contained in:
john
2023-04-02 23:45:26 -04:00
parent bf3e789a25
commit 6261ff7895
4 changed files with 111 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
"format": "html",
"email": {
"body": "Your loan statement is attached.",
"to_address": "johnkent49@gmail.com",
"to_address": "johnakent722@gmail.com",
"from_address": "jkent3rd@gmail.com",
"text": "Please see your most recent account statement.",
"server": "smtp.gmail.com",
@@ -279,6 +279,42 @@
"278.15",
"0.00",
"False"
],
[
"2022-10-31",
"278.15",
"0.00",
"False"
],
[
"2022-12-01",
"278.15",
"0.00",
"False"
],
[
"2023-01-03",
"278.15",
"0.00",
"False"
],
[
"2023-02-01",
"278.15",
"0.00",
"False"
],
[
"2023-03-01",
"278.15",
"0.00",
"False"
],
[
"2023-04-01",
"278.15",
"0.00",
"False"
]
],
"borrower": {

View File

@@ -279,6 +279,42 @@
"278.15",
"0.00",
"False"
],
[
"2022-10-31",
"278.15",
"0.00",
"False"
],
[
"2022-12-01",
"278.15",
"0.00",
"False"
],
[
"2023-01-03",
"278.15",
"0.00",
"False"
],
[
"2023-02-01",
"278.15",
"0.00",
"False"
],
[
"2023-03-01",
"278.15",
"0.00",
"False"
],
[
"2023-04-01",
"278.15",
"0.00",
"False"
]
],
"borrower": {

View File

@@ -49,6 +49,36 @@
"803",
"0.00",
"False"
],
[
"2022-11-17",
"842.93",
"0.00",
"False"
],
[
"2022-12-29",
"842.93",
"0.00",
"False"
],
[
"2023-01-27",
"842.93",
"0.00",
"False"
],
[
"2023-02-10",
"842.93",
"0.00",
"False"
],
[
"2023-03-31",
"0",
"33.68",
"False"
]
],
"borrower": {

View File

@@ -359,6 +359,7 @@ def amortizeLoan(loan):
payment_record['payment_date'] = payment_date
payment_record['days_of_interest'] = days_since_last_payment
payment_record['payment_amount'] = payment_amount
principal_payment = payment_amount - new_interest - late_fee
payment_record['principal_payment'] = payment_amount - new_interest - late_fee
payment_record['interest_payment'] = new_interest
payment_record['new_balance'] = remaining_principal
@@ -369,7 +370,13 @@ def amortizeLoan(loan):
payment_number = payment_number + 1
print("Payment record length: " + str(len(payment)))
print("; Autogenerated 'ledger' transaction")
print(f'{payment_date} * " payee Mortgage Payment {payment_number-1}"')
print(f" Assets:Current:Checking -{payment_amount} USD")
print(f" Liabilities:Mortgages:Mortgage {principal_payment} USD")
print(f" Expenses:Rental:MortgageInterest")
print(";")
#check for the extra payment flag, if its there, don't advance the next payment date
if len(payment) > 3 and payment[3] == "extra":
print("Extra payment flag: " + payment[3])