From 173e9a278ce7acab6ba4e0f1d15b18061157674f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 3 Feb 2022 11:15:23 -0800 Subject: [PATCH] QBO Updates. --- server/accounting/qbo/qbo-payables.js | 3 +-- server/accounting/qbo/qbo-receivables.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/accounting/qbo/qbo-payables.js b/server/accounting/qbo/qbo-payables.js index 9f75a5a9a..978dcc5ac 100644 --- a/server/accounting/qbo/qbo-payables.js +++ b/server/accounting/qbo/qbo-payables.js @@ -181,7 +181,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor) { TxnDate: moment(bill.date).format("YYYY-MM-DD"), //DueDate: bill.due_date && moment(bill.due_date).format("YYYY-MM-DD"), DocNumber: bill.invoice_number, - ...(bill.job.class ? { ClassRef: { Id: classes[bill.job.class] } } : {}), + //...(bill.job.class ? { ClassRef: { Id: classes[bill.job.class] } } : {}), PrivateNote: `RO ${bill.job.ro_number || ""} OWNER ${ bill.job.ownr_fn || "" @@ -249,7 +249,6 @@ const generateBillLine = ( ) => { const account = costCenters.find((c) => c.name === billLine.cost_center); - console.log(account.accountname, accounts[account.accountname]); return { DetailType: "AccountBasedExpenseLineDetail", diff --git a/server/accounting/qbo/qbo-receivables.js b/server/accounting/qbo/qbo-receivables.js index c23fb1158..450621030 100644 --- a/server/accounting/qbo/qbo-receivables.js +++ b/server/accounting/qbo/qbo-receivables.js @@ -356,7 +356,7 @@ async function InsertJob(oauthClient, qbo_realmId, req, job, parentTierRef) { exports.InsertJob = InsertJob; async function QueryMetaData(oauthClient, qbo_realmId, req) { const items = await oauthClient.makeApiCall({ - url: urlBuilder(qbo_realmId, "query", `select * From Item`), + url: urlBuilder(qbo_realmId, "query", `select * From Item where active=true maxresults 1000`), method: "POST", headers: { "Content-Type": "application/json",