IO-1841 Remove special characters on QB Export.

This commit is contained in:
Patrick Fic
2022-06-06 12:20:32 -07:00
parent fd8dab911f
commit a0b238c4bb
3 changed files with 12 additions and 7 deletions

View File

@@ -211,7 +211,7 @@ async function QueryInsuranceCo(oauthClient, qbo_realmId, req, job) {
qbo_realmId,
"query",
`select * From Customer where DisplayName = '${StandardizeName(
job.ins_co_nm
job.ins_co_nm.trim()
)}'`
),
method: "POST",
@@ -239,7 +239,7 @@ async function InsertInsuranceCo(oauthClient, qbo_realmId, req, job, bodyshop) {
const insCo = bodyshop.md_ins_cos.find((i) => i.name === job.ins_co_nm);
const Customer = {
DisplayName: job.ins_co_nm,
DisplayName: job.ins_co_nm.trim(),
BillWithParent: true,
BillAddr: {
City: job.ownr_city,
@@ -269,6 +269,7 @@ async function InsertInsuranceCo(oauthClient, qbo_realmId, req, job, bodyshop) {
}
}
exports.InsertInsuranceCo = InsertInsuranceCo;
async function QueryOwner(oauthClient, qbo_realmId, req, job) {
const ownerName = generateOwnerTier(job, true, null);
const result = await oauthClient.makeApiCall({