Update QBO Export.
This commit is contained in:
@@ -356,7 +356,11 @@ async function InsertJob(oauthClient, qbo_realmId, req, job, parentTierRef) {
|
|||||||
exports.InsertJob = InsertJob;
|
exports.InsertJob = InsertJob;
|
||||||
async function QueryMetaData(oauthClient, qbo_realmId, req) {
|
async function QueryMetaData(oauthClient, qbo_realmId, req) {
|
||||||
const items = await oauthClient.makeApiCall({
|
const items = await oauthClient.makeApiCall({
|
||||||
url: urlBuilder(qbo_realmId, "query", `select * From Item where active=true maxresults 1000`),
|
url: urlBuilder(
|
||||||
|
qbo_realmId,
|
||||||
|
"query",
|
||||||
|
`select * From Item where active=true maxresults 1000`
|
||||||
|
),
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -431,7 +435,7 @@ async function InsertInvoice(
|
|||||||
qbo: true,
|
qbo: true,
|
||||||
items,
|
items,
|
||||||
taxCodes,
|
taxCodes,
|
||||||
classes
|
classes,
|
||||||
});
|
});
|
||||||
|
|
||||||
const invoiceObj = {
|
const invoiceObj = {
|
||||||
@@ -442,7 +446,9 @@ async function InsertInvoice(
|
|||||||
CustomerMemo: {
|
CustomerMemo: {
|
||||||
value: `${job.clm_no ? `Claim No: ${job.clm_no}` : ``}${
|
value: `${job.clm_no ? `Claim No: ${job.clm_no}` : ``}${
|
||||||
job.po_number ? `PO No: ${job.po_number}` : ``
|
job.po_number ? `PO No: ${job.po_number}` : ``
|
||||||
}`.trim(),
|
} Vehicle:${job.v_model_yr || ""} ${job.v_make_desc || ""} ${
|
||||||
|
job.v_model_desc || ""
|
||||||
|
} ${job.v_vin || ""} ${job.plate_no || ""} `.trim(),
|
||||||
},
|
},
|
||||||
CustomerRef: {
|
CustomerRef: {
|
||||||
value: parentTierRef.Id,
|
value: parentTierRef.Id,
|
||||||
|
|||||||
Reference in New Issue
Block a user