From 96f31e7c31592e4dcd2e738fc2c6da93f2157e9d Mon Sep 17 00:00:00 2001 From: justin Date: Wed, 10 Jun 2026 13:44:34 -0500 Subject: [PATCH] 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. --- .../document_gen/templates/mcs150_pdf_filler.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/document_gen/templates/mcs150_pdf_filler.py b/scripts/document_gen/templates/mcs150_pdf_filler.py index c81c3f8..3725838 100644 --- a/scripts/document_gen/templates/mcs150_pdf_filler.py +++ b/scripts/document_gen/templates/mcs150_pdf_filler.py @@ -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