mcs150: fill all checkboxes/radios correctly + stamp explicit checkmarks
Fixes a batch of missing fields the FMCSA census does not provide and the filler was mis-mapping: - Corrected the question->field mapping to match the actual form: Q22 = COMPANY OPERATIONS (interstate/intrastate, 22xBox), Q23 = OPERATION CLASSIFICATIONS (for-hire/private/govt, 23xBox). These were swapped, and the bogus entity-type->23xBox map (no entity-type question exists on this form revision) was removed. - Added proper radio-group handling for Reason for Filing (Biennial Update), Mailing-address (Same as principal vs below), and Q28 USDOT-revoked, with correct option indices (these are /0../n radios, not /Yes checkboxes; the old code set them to /Yes and never selected the right option). - Map interstate/intrastate from the FMCSA census carrierOperationCode, and populate email/phone/mileage/cargo from intake. - AcroForm checkbox/radio appearances use a ZapfDingbats glyph that poppler/Preview fail to render (value set but box looks empty). Now stamp an explicit X overlay into the page content for every 'on' box so it shows in every viewer and in the faxed output.
This commit is contained in:
parent
386467bedf
commit
b95ee04752
2 changed files with 185 additions and 38 deletions
|
|
@ -460,6 +460,23 @@ class MCS150UpdateHandler:
|
|||
"power_units": s(c.get("totalPowerUnits")),
|
||||
"drivers": s(c.get("totalDrivers")),
|
||||
}
|
||||
|
||||
# Interstate vs intrastate (form Q26/27). The census exposes this as
|
||||
# carrierOperation.carrierOperationCode: A=Interstate, B=Intrastate
|
||||
# Hazmat, C=Intrastate Non-Hazmat.
|
||||
op = c.get("carrierOperation") or {}
|
||||
code = (op.get("carrierOperationCode") or "").strip().upper()
|
||||
if code == "A":
|
||||
out["interstate_intrastate"] = "interstate"
|
||||
elif code == "B":
|
||||
out["interstate_intrastate"] = "intrastate_hazmat"
|
||||
elif code == "C":
|
||||
out["interstate_intrastate"] = "intrastate_non_hazmat"
|
||||
|
||||
# Passenger carrier flag (form Q29 passenger compliance cert).
|
||||
if s(c.get("isPassengerCarrier")).upper() == "Y":
|
||||
out["is_passenger_carrier"] = "yes"
|
||||
|
||||
return {k: v for k, v in out.items() if v}
|
||||
|
||||
def _check_current_status(self, dot_number: str) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue