From b967bb6d4ef81ade6877bef034efcd4b32604b7b Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 29 Jun 2023 10:45:52 -0700 Subject: [PATCH] IO-2342 Trim Comany Name after SubString --- server/accounting/qbxml/qbxml-receivables.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/accounting/qbxml/qbxml-receivables.js b/server/accounting/qbxml/qbxml-receivables.js index d74509158..5489f859e 100644 --- a/server/accounting/qbxml/qbxml-receivables.js +++ b/server/accounting/qbxml/qbxml-receivables.js @@ -262,10 +262,10 @@ const generateInvoiceQbxml = ( RefNumber: jobs_by_pk.ro_number, BillAddress: { Addr1: jobs_by_pk.ownr_co_nm - ? jobs_by_pk.ownr_co_nm.substring(0, 30) - : `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`}` + ? jobs_by_pk.ownr_co_nm.substring(0, 30).trim() + : `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}` .substring(0, 30) - .trim(), + .trim()}`, Addr2: jobs_by_pk.ownr_addr1, Addr3: jobs_by_pk.ownr_addr2, City: jobs_by_pk.ownr_city, @@ -274,10 +274,10 @@ const generateInvoiceQbxml = ( }, ShipAddress: { Addr1: jobs_by_pk.ownr_co_nm - ? jobs_by_pk.ownr_co_nm.substring(0, 30) - : `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`}` + ? jobs_by_pk.ownr_co_nm.substring(0, 30).trim() + : `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}` .substring(0, 30) - .trim(), + .trim()}`, Addr2: jobs_by_pk.ownr_addr1, Addr3: jobs_by_pk.ownr_addr2, City: jobs_by_pk.ownr_city,