mcs150: enrich intake from FMCSA carrier census before PDF fill

The MCS-150 biennial update re-confirms the carrier's existing FMCSA
record. Previously the PDF filler only had whatever the intake form
collected; rescued/sparse orders (or orders where the carrier's data
lives in FMCSA, not the intake) produced near-empty forms. Now we pull
the carrier census (legal name, address, EIN, fleet counts) from the
FMCSA carrier API and merge it under any customer-provided intake values
(customer edits win), so the form is pre-filled with the carrier's
current registered data. Refactored the FMCSA fetch into a shared
_fetch_fmcsa_carrier helper used by both enrichment and status check.
This commit is contained in:
justin 2026-06-10 12:35:43 -05:00
parent 7e5946d65a
commit d5e66786a2
8 changed files with 294 additions and 15 deletions

View file

@ -224,6 +224,27 @@ export const COMPLIANCE_SERVICES: Record<string, ComplianceService> = {
erpnext_item: "FOREIGN-QUAL-MULTI",
discountable: true,
},
// ── Business name reservation ────────────────────────────────────────
// Sell the binding Name RESERVATION (the SOS holds the name for a fixed
// window), not a non-binding "search". State fee passed through at cost.
// Free instant pre-check on the order form stays free (lead magnet).
// See docs/name-reservation-product.md.
"name-reservation-tx": {
name: "Texas Name Reservation (Form 501, 120 days)",
price_cents: 7900, // flat service fee
gov_fee_cents: 4000, // TX SOS name reservation fee
gov_fee_label: "Texas SOS name reservation fee (Form 501)",
erpnext_item: "NAME-RESERVATION",
discountable: true,
},
"name-reservation-nv": {
name: "Nevada Name Reservation (90 days)",
price_cents: 7900, // flat service fee
gov_fee_cents: 2500, // NV SOS name reservation fee
gov_fee_label: "Nevada SOS name reservation fee",
erpnext_item: "NAME-RESERVATION",
discountable: true,
},
// Business entity formation (used by the trucking new-carrier flow when the
// carrier needs to form an LLC/corp before registering). Formation is also
// available via the dedicated /order/formation flow; these catalog entries