fix(checkout): batch SO custom_order_type must be 'compliance' not 'compliance_batch'

ERPNext's PW Order Type select field only allows formation/canada_crtc/bundle/
compliance. A batch is a compliance order (multi-service), so use 'compliance';
the multi-service nature is already captured by the line items + external order
id.
This commit is contained in:
justin 2026-06-09 00:27:17 -05:00
parent baa40443de
commit a308aeed6b

View file

@ -1013,7 +1013,7 @@ router.post("/api/v1/checkout/create-session", async (req, res) => {
customer: erpnextCustomer,
delivery_date: new Date(Date.now() + 30 * 86400000).toISOString().split("T")[0],
custom_external_order_id: order_id,
custom_order_type: "compliance_batch",
custom_order_type: "compliance",
custom_payment_gateway: GATEWAY_LABELS[payment_method] || payment_method,
custom_surcharge_pct: surcharge_pct,
workflow_state: "Received",