32 lines
1.5 KiB
HTML
32 lines
1.5 KiB
HTML
{% extends "tenant/layouts/base.html" %}
|
|
{% block title %}Transactions{% endblock %}
|
|
{% block content %}
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h4 class="fw-bold mb-0">Transactions</h4>
|
|
<input type="date" class="form-control form-control-sm" value="{{ view_date.isoformat() }}"
|
|
onchange="window.location='{{ url_for('pos.transactions') }}?date='+this.value"
|
|
style="width:150px;">
|
|
</div>
|
|
<div class="card shadow-sm">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover mb-0">
|
|
<thead class="table-light"><tr><th>Time</th><th>Customer</th><th>Staff</th><th>Total</th><th>Method</th><th>Tip</th><th></th></tr></thead>
|
|
<tbody>
|
|
{% for t in transactions %}
|
|
<tr>
|
|
<td class="small">{{ t.created_at.strftime('%I:%M %p') }}</td>
|
|
<td class="small">{{ t.customer.name if t.customer else '—' }}</td>
|
|
<td class="small">{{ t.staff.name if t.staff else '—' }}</td>
|
|
<td class="fw-semibold">${{ "%.2f"|format(t.total) }}</td>
|
|
<td class="small">{{ t.payment_method.title() }}</td>
|
|
<td class="small">{% if t.tip_amount > 0 %}${{ "%.2f"|format(t.tip_amount) }}{% else %}—{% endif %}</td>
|
|
<td><a href="{{ url_for('pos.receipt', transaction_id=t.id) }}" class="btn btn-outline-secondary btn-sm">View</a></td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="7" class="text-center text-muted py-4">No transactions for this day.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |