Files
arrr-erp/app/modules/accounting/templates/accounting/historical_sales_learning.html
T
2026-08-23 00:10:26 +05:30

1 line
2.3 KiB
HTML

{% extends "ui/templates/base/layout.html" %}{% block content %}<div class="space-y-6"><div class="flex justify-between gap-3"><div><p class="text-xs font-semibold uppercase tracking-[0.16em] text-emerald-700">Sales & Income</p><h1 class="mt-1 text-2xl font-semibold">Historical Sales Learning</h1><p class="mt-1 text-sm text-slate-500">Read-only Tally Sales-voucher evidence. Purchase history remains separate.</p></div><a href="/tools/accounting/sales-learning{% if selected_client %}?client_id={{ selected_client.id }}{% endif %}" class="rounded-xl border border-emerald-300 bg-emerald-50 px-4 py-2 text-sm font-semibold text-emerald-800 h-fit">Collect Sales History</a></div><section class="rounded-2xl bg-white p-5 shadow-soft"><form method="get" class="grid gap-4 md:grid-cols-[1fr_auto]"><label class="text-sm font-semibold">ERP Client<select name="client_id" required class="mt-1 w-full rounded-xl border border-slate-300 bg-white px-3 py-2"><option value="">Select client</option>{% for c in clients %}<option value="{{ c.id }}" {% if selected_client and selected_client.id==c.id %}selected{% endif %}>{{ c.client_name }}</option>{% endfor %}</select></label><div class="flex items-end"><button class="rounded-xl bg-brand-600 px-4 py-2 text-sm font-semibold text-white">Open</button></div></form></section>{% if selected_client %}<section class="rounded-2xl bg-white shadow-soft overflow-x-auto"><table class="min-w-full text-sm"><thead><tr class="border-b bg-slate-50 text-left text-xs uppercase text-slate-500"><th class="px-3 py-3">Customer Ledger</th><th class="px-3 py-3">Sales/Income Ledger</th><th class="px-3 py-3">Voucher</th><th class="px-3 py-3">Count</th><th class="px-3 py-3">Amount</th><th class="px-3 py-3">Last Used</th></tr></thead><tbody>{% for e in evidence %}<tr class="border-b"><td class="px-3 py-3 font-semibold">{{ e.party_ledger_name }}</td><td class="px-3 py-3">{{ e.counter_ledger_name }}</td><td class="px-3 py-3">{{ e.voucher_type_name }}</td><td class="px-3 py-3">{{ e.voucher_count }}</td><td class="px-3 py-3">₹{{ '%.2f'|format(e.absolute_amount_total) }}</td><td class="px-3 py-3">{{ e.last_voucher_date or '—' }}</td></tr>{% else %}<tr><td colspan="6" class="p-8 text-center text-slate-500">No historical Sales evidence yet.</td></tr>{% endfor %}</tbody></table></section>{% endif %}</div>{% endblock %}