IO-3570 Fix Regex to include numbers

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2026-02-19 11:59:36 -08:00
parent 38fc3285b4
commit c7875c7be3

View File

@@ -427,8 +427,8 @@ async function QueryDmsCustomerByName({ socket, redisHelpers, JobData }) {
? //? [["firstName", JobData.ownr_co_nm.replace(replaceSpecialRegex, "").toUpperCase()]] // Commented out until we receive direction.
[["phone", JobData.ownr_ph1?.replace(replaceSpecialRegex, "")]]
: [
["firstName", JobData.ownr_fn?.replace(/[^a-zA-Z-]/g, "").toUpperCase()],
["lastName", JobData.ownr_ln?.replace(/[^a-zA-Z-]/g, "").toUpperCase()]
["firstName", JobData.ownr_fn?.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()],
["lastName", JobData.ownr_ln?.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()]
];
try {
const result = await MakeFortellisCall({
@@ -471,9 +471,9 @@ async function InsertDmsCustomer({ socket, redisHelpers, JobData }) {
: {
customerName: {
//"suffix": "Mr.",
firstName: JobData.ownr_fn && JobData.ownr_fn.replace(/[^a-zA-Z-]/g, "").toUpperCase(),
firstName: JobData.ownr_fn && JobData.ownr_fn.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase(),
//"middleName": "",
lastName: JobData.ownr_ln && JobData.ownr_ln.replace(/[^a-zA-Z-]/g, "").toUpperCase()
lastName: JobData.ownr_ln && JobData.ownr_ln.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()
//"title": "",
//"nickName": ""
}