Fix: drop non-existent payee_name from transactions selects

The Financial Overview (dashboard Recent Transactions) and the reconciliation
list selected a payee_name column that doesn't exist on accounting.transactions,
so PostgREST errored and the views came back empty. Resolve payee/payor from
vendors/customers only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 23:33:20 -04:00
parent 08c1d66aa1
commit a1926b0623
2 changed files with 2 additions and 2 deletions
@@ -71,7 +71,7 @@ export default function AccountingDashboardPage({ association }: { association?:
accounting.from("bills").select("total,status,issue_date").eq("company_id", cid), accounting.from("bills").select("total,status,issue_date").eq("company_id", cid),
accounting accounting
.from("transactions") .from("transactions")
.select("amount,type,date,description,category,reference,payee_name,vendors(name),customers(name)") .select("amount,type,date,description,category,reference,vendors(name),customers(name)")
.eq("company_id", cid) .eq("company_id", cid)
.gte("date", from) .gte("date", from)
.lte("date", to) .lte("date", to)
@@ -150,7 +150,7 @@ export default function AccountingReconcileDetailPage() {
// and not voided. // and not voided.
const { data } = await accounting const { data } = await accounting
.from("transactions") .from("transactions")
.select("id,date,description,reference,amount,type,cleared,reconciliation_id,voided,payee_name,vendors(name),customers(name)") .select("id,date,description,reference,amount,type,cleared,reconciliation_id,voided,vendors(name),customers(name)")
.eq("account_id", accountId) .eq("account_id", accountId)
.is("reconciliation_id", null) .is("reconciliation_id", null)
.eq("voided", false) .eq("voided", false)