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

@@ -91,9 +91,9 @@ async function createRRCustomer({ bodyshop, job, overrides = {}, socket }) {
const trx = res?.statusBlocks?.transaction;
// Primary: map dmsRecKey -> custNo
let custNo = data?.dmsRecKey;
let customerNo = data?.dmsRecKey;
if (!custNo) {
if (!customerNo) {
log("error", "RR insertCustomer returned no dmsRecKey/custNo", {
status: trx?.status,
statusCode: trx?.statusCode,
@@ -108,10 +108,10 @@ async function createRRCustomer({ bodyshop, job, overrides = {}, socket }) {
}
// Normalize to string for safety
custNo = String(custNo);
customerNo = String(customerNo);
// Preserve existing return shape so callers dont need changes
return { custNo, raw: data };
return { customerNo, raw: data };
}
module.exports = {