diff --git a/server/accounting/qbxml/qbxml-utils.js b/server/accounting/qbxml/qbxml-utils.js index cd47eced8..b012c9baf 100644 --- a/server/accounting/qbxml/qbxml-utils.js +++ b/server/accounting/qbxml/qbxml-utils.js @@ -17,12 +17,13 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => { if (isThreeTier) { //It's always gonna be the owner now. Same as 2 tier by name return jobs_by_pk.ownr_co_nm - ? `${jobs_by_pk.ownr_co_nm} - ${jobs_by_pk.ownr_ln || ""} ${ - jobs_by_pk.ownr_fn || "" - } #${jobs_by_pk.owner.accountingid || ""}` - : `${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""} #${ + ? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${ jobs_by_pk.owner.accountingid || "" - }`; + }` + : `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`.substring( + 0, + 30 + )} #${jobs_by_pk.owner.accountingid || ""}`; } else { //What's the 2 tier pref? if (twotierpref === "source") { @@ -31,12 +32,12 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => { } else { //Same as 3 tier return jobs_by_pk.ownr_co_nm - ? `${jobs_by_pk.ownr_co_nm} - ${jobs_by_pk.ownr_ln || ""} ${ - jobs_by_pk.ownr_fn || "" - } #${jobs_by_pk.owner.accountingid || ""}` - : `${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""} #${ + ? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${ jobs_by_pk.owner.accountingid || "" - }`; + }` + : `${`${jobs_by_pk.ownr_ln || ""} ${ + jobs_by_pk.ownr_fn || "" + }`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`; } } }; diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index ef0501f62..32db12ae6 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -57,6 +57,7 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) { ownerid ownr_ln ownr_fn + ownr_co_nm ownr_addr1 ownr_addr2 ownr_zip