Fixed the program to print the annual interest paid.
This commit is contained in:
@@ -123,6 +123,8 @@ def amortizeLoan(loan):
|
||||
|
||||
# create the payment record for the template to render
|
||||
payment_record = {}
|
||||
payment_record['year']=next_bill_date.year
|
||||
payment_record['month']=next_bill_date.month
|
||||
payment_record['payment_number'] = payment_number
|
||||
payment_record['bill_date'] = next_bill_date
|
||||
payment_record['payment_date'] = payment_date
|
||||
@@ -276,11 +278,11 @@ def main():
|
||||
# at closing. The first payment will incur interest from one month before the bill is due.
|
||||
|
||||
# read in the file
|
||||
# filename = "./10Kloan.txt"
|
||||
#filename = "./10Kloan.json"
|
||||
filename = "./testloan.json"
|
||||
# filename = "./10Kloan.json"
|
||||
# filename = "./dadmortgage.json"
|
||||
# filename = "./brendamortgage.json"
|
||||
filename = "./greenfield_mortgage.json"
|
||||
#filename = "./greenfield_mortgage.json"
|
||||
template_filename = "statement.pdf.jinja"
|
||||
|
||||
loan = loadLoanInformation(filename)
|
||||
|
||||
Reference in New Issue
Block a user