Financial Overview: add Payee/Payor to Recent Transactions

The dashboard's Recent Transactions table (shown on the Financial Overview) now
has a Payee / Payor column — vendor for money out, customer for money in.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 23:27:58 -04:00
parent fa9671b4f5
commit 08c1d66aa1
@@ -71,7 +71,7 @@ export default function AccountingDashboardPage({ association }: { association?:
accounting.from("bills").select("total,status,issue_date").eq("company_id", cid),
accounting
.from("transactions")
.select("amount,type,date,description,category,reference")
.select("amount,type,date,description,category,reference,payee_name,vendors(name),customers(name)")
.eq("company_id", cid)
.gte("date", from)
.lte("date", to)
@@ -376,6 +376,7 @@ export default function AccountingDashboardPage({ association }: { association?:
<tr>
<th className="px-6 py-3 text-left font-medium">Date</th>
<th className="px-6 py-3 text-left font-medium">Description</th>
<th className="px-6 py-3 text-left font-medium">Payee / Payor</th>
<th className="px-6 py-3 text-left font-medium">Category</th>
<th className="px-6 py-3 text-left font-medium">Reference</th>
<th className="px-6 py-3 text-right font-medium">Amount</th>
@@ -386,6 +387,7 @@ export default function AccountingDashboardPage({ association }: { association?:
<tr key={i} className="hover:bg-muted/30">
<td className="px-6 py-3 text-muted-foreground">{fmtDate(t.date)}</td>
<td className="px-6 py-3 font-medium">{t.description}</td>
<td className="px-6 py-3 text-muted-foreground">{t.vendors?.name ?? t.customers?.name ?? t.payee_name ?? "—"}</td>
<td className="px-6 py-3 text-muted-foreground">{t.category ?? "—"}</td>
<td className="px-6 py-3 text-muted-foreground">{t.reference ?? "—"}</td>
<td