feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Enhance logging
This commit is contained in:
@@ -80,7 +80,8 @@ const buildRRRepairOrderPayload = ({ job, selectedCustomer, advisorNo, story })
|
||||
if (!customerNo) throw new Error("No RR customer selected (customerNo/CustNo missing)");
|
||||
|
||||
const adv = advisorNo != null && String(advisorNo).trim() !== "" ? String(advisorNo).trim() : null;
|
||||
if (!adv) throw new Error("advisorNo is required for RR export");
|
||||
|
||||
if (!adv) throw new Error("advisorNo is required for RR export");
|
||||
|
||||
const vinRaw = job?.v_vin;
|
||||
const vin =
|
||||
@@ -95,24 +96,16 @@ const buildRRRepairOrderPayload = ({ job, selectedCustomer, advisorNo, story })
|
||||
const ro = job?.ro_number != null ? job.ro_number : job?.id != null ? job.id : null;
|
||||
if (ro == null) throw new Error("Missing repair order identifier (ro_number/id)");
|
||||
|
||||
const mileageIn = job.kmin;
|
||||
|
||||
const roStr = String(ro);
|
||||
|
||||
const output = {
|
||||
// ---- RO Number (all variants; library currently requires `outsdRoNo`) ----
|
||||
outsdRoNo: roStr,
|
||||
repairOrderNumber: roStr,
|
||||
// ---- Department type (Body) ----
|
||||
departmentType: "B",
|
||||
// ---- VIN variants ----
|
||||
vin,
|
||||
// ---- Customer number variants ----
|
||||
customerNo: String(customerNo),
|
||||
// ---- Advisor number variants ----
|
||||
advisorNo: adv,
|
||||
// ---- Mileage In (new) ----
|
||||
mileageIn
|
||||
mileageIn: job.kmin
|
||||
};
|
||||
|
||||
if (story) {
|
||||
|
||||
Reference in New Issue
Block a user