Resolve QBO Receivables incorrectly labels.

This commit is contained in:
Patrick Fic
2022-02-02 14:10:11 -08:00
parent ddd5ce4bf0
commit 932c89f8f9

View File

@@ -438,6 +438,11 @@ async function InsertInvoice(
TxnDate: moment(job.date_invoiced).format("YYYY-MM-DD"),
DocNumber: job.ro_number,
...(job.class ? { ClassRef: { Id: classes[job.class] } } : {}),
CustomerMemo: {
value: `${job.clm_no ? `Claim No: ${job.clm_no}` : ``}${
job.po_number ? `PO No: ${job.po_number}` : ``
}`.trim(),
},
CustomerRef: {
value: parentTierRef.Id,
},
@@ -447,6 +452,18 @@ async function InsertInvoice(
...(bodyshop.accountingconfig.emaillater && job.ownr_ea
? { EmailStatus: "NeedToSend" }
: {}),
BillAddr: {
Line3: `${job.ownr_city || ""}, ${job.ownr_st || ""} ${
job.ownr_zip || ""
}`.trim(),
Line2: job.ownr_addr1 || "",
Line1: `${job.ownr_fn || ""} ${job.ownr_ln || ""} ${
job.ownr_co_nm || ""
}`,
Long: "-122.1141681",
Lat: "37.4238562",
Id: "95",
},
};
logger.log("qbo-receivable-objectlog", "DEBUG", req.user.email, job.id, {