Files
mortgage/templates/statement.pdf.jinja
2019-07-08 00:27:38 -04:00

84 lines
3.6 KiB
Django/Jinja

<html>
<body>
<font face='arial' size='14'><p align='center'>{{ model.header.title }}</p></font>
<font face='arial' size='10'><p align='center'>{{ model.lender.name }}</p></font>
<font face='arial' size='8'>
<p align='center'>{{ model.lender.phone }} - {{ model.lender.address }} -
{{ model.lender.city }} {{model.lender.state }} {{ model.lender.zip }}</p>
<p align='right'>Statement Date: {{ model.header.date }}</p>
<p/>
<table>
<thead><tr><th width='45%' align='left'>Loan Information</th><th width='45%'>&nbsp;</th></tr></thead>
<tbody>
<tr><td>Borrower: {{ model.borrower.name }}&nbsp;</td> <td>Account Number: {{ model.parameters.account_number }}</td></tr>
<tr><td>{{ model.borrower.address }}&nbsp;</td> <td>Origination Date: {{ model.parameters.start_date }}</td></tr>
<tr><td>{{ model.borrower.city }}, {{model.borrower.state }} {{ model.borrower.zip }}</td>
<td>Original Principal: {{ "$%.2f"|format(model.parameters.principal) }}</td></tr>
<tr><td>Rate: {{model.parameters.interest_rate }}% </td> <td>Term: {{model.parameters.periods }} months </td></tr>
<tr><td>Next Payment Due Date: {{model.parameters.next_due_date}} </td> <td>Payment Due: {{ "$%.2f"|format(model.parameters.next_payment_amt) }} </td></tr>
</tbody>
</table>
<p/>
<p class='section_header' color='red'><font face='arial' size='14'>Payment History</font></p>
<table>
<thead><tr>
<th width='5%'>#</td>
<th width='10%'>Due Date</th>
<th width='10%'>Date Paid</th>
<th width='10%'>Days Interest</th>
<th width='15%' align='right'>Payment Amt</th>
<th width='15%' align='right'>Principal Pmt</th>
<th width='15%' align='right'>Interest Pmt</th>
<th width='20%' align='right'>New Balance</th>
</tr></thead>
<tbody>
{% for item in model.past_payments %}
<tr><td align='center'> {{ item.payment_number }} </td>
<td align='center'> {{ item.bill_date }} </td>
<td align='center'> {{ item.payment_date }} </td>
<td align='center'> {{ item.days_of_interest }} </td>
<td align='right'> {{ "$%.2f"|format(item.payment_amount) }} </td>
<td align='right'> {{ "$%.2f"|format(item.principal_payment) }} </td>
<td align='right'> {{ "$%.2f"|format(item.interest_payment) }} </td>
<td align='right'> {{ "$%.2f"|format(item.new_balance) }} </td>
</tr>
{% if item.month == 12 or loop.last %}
<tr><td colspan='8'"> Total interest paid in {{item.year}} is {{ "$%.2f"|format(item.annual_interest_to_date) }}.</td></tr>
{% endif %}
{% endfor %}
<tr><td colspan='8'"> Total interest paid to date is {{ "$%.2f"|format(model.total_interest_paid_to_date) }}.</td></tr>
</tbody>
</table>
<p/> <p/>
<p class='section_header'><font face='arial' size='14'>Remaining Amortization</font></p>
<table>
<thead>
<tr>
<th width='8%'>#</th>
<th width='15%'>Due Date</th>
<th width='8%'>Days Interest</th>
<th width='15%' align='right'>Payment Amt</th>
<th width='15%' align='right'>Principal Pmt</th>
<th width='15%' align='right'>Interest Pmt</th>
<th width='20%' align='right'>Principal Balance</th>
</tr>
</thead>
<tbody>
{% for item in model.future_payments %}
<tr><td align='center'> {{ item.payment_number }} </td>
<td align='center'> {{ item.payment_date }} </td>
<td align='center'> {{ item.days_of_interest }} </td>
<td align='right'> {{ "$%.2f"|format(item.payment_amount) }} </td>
<td align='right'> {{ "$%.2f"|format(item.principal_payment) }} </td>
<td align='right'> {{ "$%.2f"|format(item.interest_payment) }} </td>
<td align='right'> {{ "$%.2f"|format(item.new_balance) }} </td>
</tr>
{% endfor %}
</tbody>
</table>
<p>Balloon Payment Due: {{ "$%.2f"|format(model.balloon_payment) }} </p>
</font>
</body>
</html>