56 lines
2.3 KiB
HTML
56 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Line of Credit Interest Calculator</title>
|
|
<style>
|
|
.date, .type {
|
|
text-align: center
|
|
}
|
|
.amount, .balance {
|
|
text-align: right
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1 id="header" align="center">Line of Credit Interest Calculator</h1>
|
|
<hr>
|
|
<form method="POST" enctype="multipart/form-data" action="{{ url_for('hello') }}">
|
|
<table>
|
|
<tr>
|
|
<td><label>Interest Year:</label></td><td><input type="text" name="year" value="{{model.year}}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>Interest Rate:</label></td><td><input type="text" name="rate" value="{{model.rate}}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>Starting Principal Balance:</label></td><td><input type="text" name="starting_balance" value="{{model.starting_balance}}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>Principal Account:</label></td><td><input type="text" name="principal_account" value="{{model.principal_account}}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>Interest Account:</label></td><td><input type="text" name="interest_account" value="{{model.interest_account}}"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>Transaction CSV File:</label></td><td><input type="file" name="transactions" accept=".csv"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="submit" value="Generate Interest Posts"/> </td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<hr>
|
|
<h2>Interest Postings</h2>
|
|
<textarea rows="20" cols="80">{% for item in model.int_txns %}{{item}}{% endfor %}</textarea>
|
|
<hr>
|
|
<h2>Transcript</h2>
|
|
<table width="75%">
|
|
<thead><th>Date</th><th>Type</th><th>Amount</th><th>Balance</th></thead>
|
|
{% for item in model.transcript %}<tr><td class="date">{{ item.date }}</td><td class="type">{{ item.type }}</td><td class="balance">{{ item.amount }}</td><td class="balance">{{ item.balance }}</td></tr>{% endfor %}
|
|
</table>
|
|
<hr>
|
|
<h2>BQL Query to Execute in Fava to Get the CSV File</h2>
|
|
<p>select date, number where year=2022 And account~".*:CreditLine"</p>
|
|
</body>
|
|
</html> |