feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checkpoint

This commit is contained in:
Dave
2025-11-05 12:04:14 -05:00
parent da28fe8592
commit 9341806b0f
5 changed files with 49 additions and 51 deletions

View File

@@ -315,9 +315,7 @@ function registerRREvents({ socket, redisHelpers }) {
if (create === true || !selectedCustNo) {
CreateRRLogEvent(socket, "DEBUG", `{3.1} Creating RR customer`);
const created = await createRRCustomer({ bodyshop, job, socket });
selectedCustNo = String(
created?.custNo || created?.customerNo || created?.CustomerNo || created?.dmsRecKey || ""
);
selectedCustNo = String(created?.customerNo);
if (!selectedCustNo) throw new Error("RR create customer returned no custNo");
CreateRRLogEvent(socket, "DEBUG", `{3.2} Created customer`, { custNo: selectedCustNo });
}
@@ -350,7 +348,7 @@ function registerRREvents({ socket, redisHelpers }) {
const result = await exportJobToRR({
bodyshop,
job,
selectedCustomer: { custNo: String(selectedCustNo) },
selectedCustomer: { customerNo: String(selectedCustNo), custNo: String(selectedCustNo) },
advisorNo: String(advisorNo),
existing: txEnvelope?.existing,
socket