|
|
|
@ -94,7 +94,7 @@
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
{% for e in entries %}
|
|
|
|
{% for e in entries %}
|
|
|
|
<tr>
|
|
|
|
<tr data-entry-row="{{ e.id }}">
|
|
|
|
<td>{{ e.created_at|human_time }}</td>
|
|
|
|
<td>{{ e.created_at|human_time }}</td>
|
|
|
|
<td>{{ e.kind }}</td>
|
|
|
|
<td>{{ e.kind }}</td>
|
|
|
|
<td>{{ A if e.payer=='A' else B }}</td>
|
|
|
|
<td>{{ A if e.payer=='A' else B }}</td>
|
|
|
|
@ -106,8 +106,35 @@
|
|
|
|
{{ currency }}{{ '%.2f'|format(e.delta) }}
|
|
|
|
{{ currency }}{{ '%.2f'|format(e.delta) }}
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<td>
|
|
|
|
<form method="post" action="{{ url_for('delete', entry_id=e.id) }}" onsubmit="return confirm('Delete this entry?');">
|
|
|
|
<div style="display:flex; gap:6px; justify-content:flex-end">
|
|
|
|
<button class="btn danger" type="submit">Delete</button>
|
|
|
|
<button class="btn" type="button" data-edit="{{ e.id }}">Edit</button>
|
|
|
|
|
|
|
|
<form method="post" action="{{ url_for('delete', entry_id=e.id) }}" onsubmit="return confirm('Delete this entry?');">
|
|
|
|
|
|
|
|
<button class="btn danger" type="submit">Delete</button>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr id="edit-row-{{ e.id }}" class="edit-row" style="display:none">
|
|
|
|
|
|
|
|
<td colspan="9">
|
|
|
|
|
|
|
|
<form class="edit-form" method="post" action="{{ url_for('edit', entry_id=e.id) }}" style="display:flex; gap:8px; align-items:center; flex-wrap:wrap">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<label style="display:block; font-size:12px; color:#9aa0a6">Date</label>
|
|
|
|
|
|
|
|
<input type="datetime-local" name="created_at" value="{{ e.created_at }}">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<label style="display:block; font-size:12px; color:#9aa0a6">Amount</label>
|
|
|
|
|
|
|
|
<input type="number" step="0.0001" min="0" name="total" value="{{ '%.4f'|format(e.total) }}">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if e.kind == 'bill' %}
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<label style="display:block; font-size:12px; color:#9aa0a6">Your share %</label>
|
|
|
|
|
|
|
|
<input type="number" step="0.0001" min="0" max="100" name="a_share_pct" value="{{ '%.4f'|format(e.a_share * 100) }}">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div style="margin-left:auto; display:flex; gap:8px">
|
|
|
|
|
|
|
|
<button class="btn" type="submit">Save</button>
|
|
|
|
|
|
|
|
<button class="btn" type="button" data-cancel-edit="{{ e.id }}">Cancel</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
|