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

@@ -6,11 +6,11 @@ exports.addQbxmlHeader = addQbxmlHeader = (xml) => {
};
exports.generateSourceTier = (jobs_by_pk) => {
return jobs_by_pk.ins_co_nm && jobs_by_pk.ins_co_nm.trim();
return jobs_by_pk.ins_co_nm && jobs_by_pk.ins_co_nm.trim().replace(":", " ");
};
exports.generateJobTier = (jobs_by_pk) => {
return jobs_by_pk.ro_number && jobs_by_pk.ro_number.trim();
return jobs_by_pk.ro_number && jobs_by_pk.ro_number.trim().replace(":", " ");
};
exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
@@ -24,7 +24,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
).trim();
)
.trim()
.replace(":", " ");
} else {
//What's the 2 tier pref?
if (twotierpref === "source") {
@@ -40,7 +42,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
).trim();
)
.trim()
.replace(":", " ");
}
}
};