Web version updated to allow sending emails.
This commit is contained in:
18
templates/add.html
Normal file
18
templates/add.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<link rel="stylesheet" href="/resources/demos/style.css">
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script>
|
||||
$( function() { $( "#tabs" ).tabs(); } );
|
||||
</script>
|
||||
<title>Loan Management</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="header" align="center"><font face="Arial" size=+2 >Web Mortgage Manager</font></p>
|
||||
|
||||
|
||||
<a href="/?loan={{filename}}">Return to Main Screen</a>.
|
||||
</body>
|
||||
</html>
|
||||
19
templates/email.html
Normal file
19
templates/email.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<link rel="stylesheet" href="/resources/demos/style.css">
|
||||
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script>
|
||||
$( function() { $( "#tabs" ).tabs(); } );
|
||||
</script>
|
||||
<title>Loan Management</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="header" align="center"><font face="Arial" size=+2 >Web Mortgage Manager</font></p>
|
||||
|
||||
<p> The email has been sent.</p>
|
||||
<a href="/?loan={{filename}}">Return to Main Screen</a>.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,7 +10,7 @@
|
||||
<title>Loan Management</title>
|
||||
</head>
|
||||
<body>
|
||||
<p align="center">Web Mortgage Manager</p>
|
||||
<p id="header" align="center"><font face="Arial" size=+2 >Web Mortgage Manager</font></p>
|
||||
<form>
|
||||
<table><tr>
|
||||
<td>Loan:</td>
|
||||
@@ -131,21 +131,24 @@
|
||||
</div>
|
||||
<div id="email">
|
||||
<form name="Send Statement" method="post" action="/send_statement">
|
||||
<table>
|
||||
<tr><td colspan="2">Generate and Send Statement</td></tr>
|
||||
<tr><td>Send From:</td><td>{{model.email.from_address}}</td></tr>
|
||||
<tr><td>Send To:</td><td>{{model.email.to_address}}</td></tr>
|
||||
<tr><td>Topic:</td><td><input type="text" name="title" value="{{model.email.subject}}"></td></tr>
|
||||
<tr><td>Message Body:</td><td><input type="textarea" name="message" value="{{model.email.body}}"></td></tr>
|
||||
<tr><td>Send Statement As:</td><td><select name="style">
|
||||
<option value="attach">Attachment</option>
|
||||
<option value="embed">Embedded</option>
|
||||
</select></td></tr>
|
||||
<tr><td>Include Future Amortization</td>
|
||||
<td><select name="amort">
|
||||
<option value="yes">Yes</option>
|
||||
<option value="no">No</option>
|
||||
</select></td></tr>
|
||||
<table align="center" border='1px' width="75%">
|
||||
<tr><td align="center" bgcolor="darkgrey">Generate and Send Statement</td></tr>
|
||||
<tr><td>Send From: {{model.email.from_address}}<br/>Send To: {{model.email.to_address}}</td></tr>
|
||||
<tr><td bgcolor="beige">Subject:</td></tr>
|
||||
<tr><td align="center"><textarea type="text" cols="120" name="subject">{{model.email.subject}}</textarea></td></tr>
|
||||
<tr><td bgcolor="beige">Message:</td></tr>
|
||||
<tr><td align="center"><textarea rows="8" cols="120" name="message">{{model.email.body}}</textarea></td></tr>
|
||||
<tr><td bgcolor="beige">Send Statement As:</td></tr>
|
||||
<tr><td>
|
||||
<input type="checkbox" name="html" value="html"/> HTML
|
||||
<input type="checkbox" name="pdf" value="pdf"/> PDF
|
||||
<input type="checkbox" name="text" value="text" /> Plain Text
|
||||
</td></tr>
|
||||
<tr><td bgcolor="beige">Include Future Amortization</td></tr>
|
||||
<tr><td>
|
||||
<input name="amortization" type="radio" value="yes" checked>Yes
|
||||
<input name="amortization" type="radio" value="no">No
|
||||
</td></tr>
|
||||
<tr><td><button>Send Statement</button></td></tr>
|
||||
</table>
|
||||
<input hidden="loan" name='loan' value="{{filename}}" />
|
||||
|
||||
84
templates/statement.html.jinja
Normal file
84
templates/statement.html.jinja
Normal file
@@ -0,0 +1,84 @@
|
||||
<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%'> </th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Borrower: {{ model.borrower.name }} </td> <td>Account Number: {{ model.parameters.account_number }}</td></tr>
|
||||
<tr><td>{{ model.borrower.address }} </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>
|
||||
84
templates/statement.pdf.jinja
Normal file
84
templates/statement.pdf.jinja
Normal file
@@ -0,0 +1,84 @@
|
||||
<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%'> </th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Borrower: {{ model.borrower.name }} </td> <td>Account Number: {{ model.parameters.account_number }}</td></tr>
|
||||
<tr><td>{{ model.borrower.address }} </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>
|
||||
49
templates/statement.text.jinja
Normal file
49
templates/statement.text.jinja
Normal file
@@ -0,0 +1,49 @@
|
||||
Original Principal Balance: {{ original_principal_balance }}
|
||||
|
||||
Payment History
|
||||
#\tBill Date
|
||||
Payment Date
|
||||
Days of Interest
|
||||
Payment Amount
|
||||
Principal Payment
|
||||
Interest Payment
|
||||
New Balance
|
||||
|
||||
{% for item in past_payments %}
|
||||
{{ item.payment_number }}
|
||||
{{ item.bill_date }}
|
||||
{{ item.payment_date }}
|
||||
{{ item.days_of_interest }}
|
||||
{{ item.payment_amount }}
|
||||
{{ item.principal_payment }}
|
||||
{{ item.interest_payment }}
|
||||
{{ item.new_balance }}
|
||||
|
||||
{% if item.print_interest_total %}
|
||||
{{ item.interest_total_message }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Total interest paid to date is {{ total_interest_paid_to_date }}.
|
||||
|
||||
|
||||
Remaining Amortization
|
||||
#
|
||||
Days of Interest
|
||||
Due Date
|
||||
Payment Amount
|
||||
Scheduled Principal Payment
|
||||
Scheduled Interest Payment
|
||||
Expected New Balance
|
||||
|
||||
{% for item in future_payments %}
|
||||
{{ item.payment_number }}
|
||||
{{ item.days_of_interest }}
|
||||
{{ item.payment_date }}
|
||||
{{ item.payment_amount }}
|
||||
{{ item.principal_payment }}
|
||||
{{ item.interest_payment }}
|
||||
{{ item.new_balance }}
|
||||
{% endfor %}
|
||||
|
||||
Balloon Payment Due: {{ balloon_payment }}
|
||||
|
||||
Reference in New Issue
Block a user