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:
@@ -25,7 +25,7 @@ export class BudgetPlanningService {
|
|||||||
|
|
||||||
const plan = plans[0];
|
const plan = plans[0];
|
||||||
const lines = await this.tenant.query(
|
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
|
FROM budget_plan_lines bpl
|
||||||
JOIN accounts a ON a.id = bpl.account_id
|
JOIN accounts a ON a.id = bpl.account_id
|
||||||
WHERE bpl.budget_plan_id = $1
|
WHERE bpl.budget_plan_id = $1
|
||||||
|
|||||||
Reference in New Issue
Block a user