mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
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:
@@ -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,payee_name,vendors(name),customers(name)")
|
||||
.select("amount,type,date,description,category,reference,vendors(name),customers(name)")
|
||||
.eq("company_id", cid)
|
||||
.gte("date", from)
|
||||
.lte("date", to)
|
||||
|
||||
@@ -150,7 +150,7 @@ export default function AccountingReconcileDetailPage() {
|
||||
// and not voided.
|
||||
const { data } = await accounting
|
||||
.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)
|
||||
.is("reconciliation_id", null)
|
||||
.eq("voided", false)
|
||||
|
||||
Reference in New Issue
Block a user