mcs150: only check Q29 passenger-cert box for passenger carriers

certifyBox is the Q29 Passenger Carrier Compliance Certification YES box
(page 3, y=530), not a general perjury checkbox. It was being checked
unconditionally, which wrongly marked freight/property carriers as passenger
carriers. Now only check it when the carrier is a passenger carrier; the
Q31 perjury declaration is made via the signature.
This commit is contained in:
justin 2026-06-10 13:44:34 -05:00
parent b95ee04752
commit 96f31e7c31

View file

@ -261,9 +261,17 @@ def fill_mcs150(intake: dict, order_number: str = "") -> str:
if cargo in CARGO_TYPE_MAP:
checkbox_on[CARGO_TYPE_MAP[cargo]] = True
# The bottom certification ("I ... certify ...") box is always checked --
# the client signs the perjury certification.
checkbox_on["certifyBox"] = True
# Q29 Passenger Carrier Compliance Certification "YES" box. Only motor
# passenger carriers certify here -- leave it unchecked for freight/property
# carriers. (The Q31 perjury declaration is made via the signature, not a
# checkbox.)
is_passenger = (
intake.get("is_passenger_carrier") == "yes"
or carrier_op in ("private_passengers_business", "private_passengers_non_business",
"private_passengers")
)
if is_passenger:
checkbox_on["certifyBox"] = True
# ── Radio-button groups (value /0../4, not /Yes) ─────────────────
# These are single-select radio fields; the selected option index is the