774f916dae
Item 1 — server-side guard (defense in depth) on payment-source / deposit / reconcilable account selections. New AccountGuard.IsValidMoneyAccountAsync checks the submitted account is active, company-owned, and an Asset or Liability before any GL posting, at: bill RecordPayment, bill Create (payNow), bill EditPayment, BankReconciliation.Create, and deposit Record. The dropdowns already constrain normal users; this rejects tampered/stale POSTs. Per the "trust the operator" decision it still allows A/R etc. (any Asset/Liability) — it only blocks non-money types. Item 2 — account AccountType is now derived from the chosen AccountSubType on create/edit via the new AccountClassification.TypeForSubType (single source of truth, also used by the Create pre-select). The two can no longer disagree, so the sub-type-based debit/credit sign convention is always consistent with the account's type. A read-only sweep of the dev DB found 0 existing mismatches, so no repair tool was built. Audit doc updated: both backlog items marked resolved. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>