fix: use correct column name for accounts table in budget planning query

The accounts table uses 'name' not 'account_name'. Alias it correctly
in the getPlan JOIN query.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-16 10:37:47 -04:00
parent e6fe2314de
commit f2b0b57535

View File

@@ -25,7 +25,7 @@ export class BudgetPlanningService {
const plan = plans[0];
const lines = await this.tenant.query(
`SELECT bpl.*, a.account_number, a.account_name, a.account_type, a.fund_type as account_fund_type
`SELECT bpl.*, a.account_number, a.name as account_name, a.account_type, a.fund_type as account_fund_type
FROM budget_plan_lines bpl
JOIN accounts a ON a.id = bpl.account_id
WHERE bpl.budget_plan_id = $1