Coverage for apps/disclosures/services.py: 100%
4 statements
« prev ^ index » next coverage.py v7.17.0, created at 2026-11-04 17:24 +0000
« prev ^ index » next coverage.py v7.17.0, created at 2026-11-04 17:24 +0000
1"""Shared, loan-scoped disclosure helpers used by both apps/disclosures and
2apps/fees_trid (design.md D2)."""
4from __future__ import annotations
6from apps.core_los.models import Loan
9def loan_is_disclosed(loan: Loan) -> bool:
10 """True once the loan's Loan Estimate has been sent (or fully signed) — the point
11 at which further fee edits must go through the Change-of-Circumstance endpoint
12 instead of a direct fee replace."""
13 return loan.disclosures.filter(
14 package_type="LoanEstimate", status__in=["SentForEsign", "Completed"]
15 ).exists()