Fix bugs: monthly actuals month filter, unit assessments, project funding logic, UI cleanup
- Fix monthly actuals showing same data for all months (SQL JOIN excluded month filter from SUM — added je.id IS NOT NULL guard) - Fix units displaying $0 assessment by reading from assessment group instead of stale unit field; add special assessment column - Replace proportional project funding with priority-based sequential allocation — near-term items get fully funded first; add is_funding_locked flag so users can manually lock a project's fund balance - Remove post-creation opening balance UI (keep only initial balance on account creation); remove redundant Fund filter dropdown from Accounts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,8 +28,10 @@ export class MonthlyActualsService {
|
||||
a.fund_type,
|
||||
COALESCE(b.${budgetCol}, 0) as budget_amount,
|
||||
COALESCE(SUM(
|
||||
CASE WHEN a.account_type IN ('expense', 'asset') THEN jel.debit - jel.credit
|
||||
ELSE jel.credit - jel.debit END
|
||||
CASE WHEN je.id IS NOT NULL THEN
|
||||
CASE WHEN a.account_type IN ('expense', 'asset') THEN jel.debit - jel.credit
|
||||
ELSE jel.credit - jel.debit END
|
||||
END
|
||||
), 0) as actual_amount
|
||||
FROM accounts a
|
||||
LEFT JOIN budgets b ON b.account_id = a.id AND b.fiscal_year = $1
|
||||
|
||||
Reference in New Issue
Block a user