05/31 Phase 7

This commit is contained in:
2026-05-31 17:04:18 -04:00
parent 46a604a73a
commit 84f48a7b4d
14 changed files with 1202 additions and 1 deletions
+30
View File
@@ -47,6 +47,36 @@
{{ form.notes(class="form-control", rows=2, placeholder="Optional notes") }}
</div>
{% if txn and txn.receipt %}
<div class="mb-3 p-3" style="background:#f8fafc;border-radius:8px;">
<div class="d-flex justify-content-between align-items-center">
<div style="font-size:13px;">
<i class="bi bi-paperclip me-1 text-muted"></i>
<a href="{{ url_for('settings.view_receipt', filename=txn.receipt.filename) }}" target="_blank">
{{ txn.receipt.original_filename }}
</a>
</div>
<form method="POST" action="{{ url_for('settings.delete_receipt', txn_id=txn.id) }}" onsubmit="return confirm('Delete receipt?')">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="btn btn-sm btn-outline-danger" style="font-size:11px;padding:2px 8px;">Remove</button>
</form>
</div>
</div>
{% elif txn %}
<div class="mb-3">
<label class="form-label fw-medium" style="font-size:13px;">Receipt</label>
<form method="POST" action="{{ url_for('settings.upload_receipt', txn_id=txn.id) }}" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="input-group input-group-sm">
<input type="file" name="receipt" class="form-control" accept=".png,.jpg,.jpeg,.gif,.pdf" style="font-size:12px;">
<button type="submit" class="btn btn-outline-secondary" style="font-size:12px;">Upload</button>
</div>
<small class="text-muted" style="font-size:11px;">PNG, JPG, GIF, PDF — max 10MB</small>
</form>
</div>
{% endif %}
<div class="d-flex gap-2">
<button type="submit" class="btn {% if txn_type=='income' %}btn-success{% else %}btn-danger{% endif %}">
Save {{ txn_type | title }}