Fixed the program to print the annual interest paid.
This commit is contained in:
@@ -39,7 +39,8 @@
|
|||||||
["2018-09-06", "803.00"],
|
["2018-09-06", "803.00"],
|
||||||
["2018-10-11", "803.00"],
|
["2018-10-11", "803.00"],
|
||||||
["2018-11-13", "803.00"],
|
["2018-11-13", "803.00"],
|
||||||
["2018-12-13", "803.00"]
|
["2018-12-13", "803.00"],
|
||||||
|
["2018-01-11", "803.00"]
|
||||||
],
|
],
|
||||||
"borrower": {
|
"borrower": {
|
||||||
"name": "Bear Houses, LLC",
|
"name": "Bear Houses, LLC",
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ def amortizeLoan(loan):
|
|||||||
|
|
||||||
# create the payment record for the template to render
|
# create the payment record for the template to render
|
||||||
payment_record = {}
|
payment_record = {}
|
||||||
|
payment_record['year']=next_bill_date.year
|
||||||
|
payment_record['month']=next_bill_date.month
|
||||||
payment_record['payment_number'] = payment_number
|
payment_record['payment_number'] = payment_number
|
||||||
payment_record['bill_date'] = next_bill_date
|
payment_record['bill_date'] = next_bill_date
|
||||||
payment_record['payment_date'] = payment_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.
|
# at closing. The first payment will incur interest from one month before the bill is due.
|
||||||
|
|
||||||
# read in the file
|
# read in the file
|
||||||
# filename = "./10Kloan.txt"
|
filename = "./testloan.json"
|
||||||
#filename = "./10Kloan.json"
|
# filename = "./10Kloan.json"
|
||||||
# filename = "./dadmortgage.json"
|
# filename = "./dadmortgage.json"
|
||||||
# filename = "./brendamortgage.json"
|
# filename = "./brendamortgage.json"
|
||||||
filename = "./greenfield_mortgage.json"
|
#filename = "./greenfield_mortgage.json"
|
||||||
template_filename = "statement.pdf.jinja"
|
template_filename = "statement.pdf.jinja"
|
||||||
|
|
||||||
loan = loadLoanInformation(filename)
|
loan = loadLoanInformation(filename)
|
||||||
|
|||||||
@@ -43,13 +43,13 @@
|
|||||||
<td align='right'> {{ "$%.2f"|format(item.interest_payment) }} </td>
|
<td align='right'> {{ "$%.2f"|format(item.interest_payment) }} </td>
|
||||||
<td align='right'> {{ "$%.2f"|format(item.new_balance) }} </td>
|
<td align='right'> {{ "$%.2f"|format(item.new_balance) }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if item.print_interest_total %}
|
{% if item.month == '12' or loop.last %}
|
||||||
<tr><td colspan='8'"> {{ item.interest_total_message }} </td></tr>
|
<tr><td colspan='8'"> Total interest paid in {{item.year}} is {{ "$%.2f"|format(item.annual_interest_to_date) }}.</td></tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<tr><td colspan='8'"> Total interest paid to date is {{ "$%.2f"|format(model.total_interest_paid_to_date) }}.</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>Total interest paid to date is {{ "$%.2f"|format(model.total_interest_paid_to_date) }}.</p>
|
|
||||||
<p/> <p/>
|
<p/> <p/>
|
||||||
|
|
||||||
<p class='section_header'><font face='arial' size='14'>Remaining Amortization</font></p>
|
<p class='section_header'><font face='arial' size='14'>Remaining Amortization</font></p>
|
||||||
|
|||||||
Reference in New Issue
Block a user