From b718f49071e0ea636e1078779389b56a353f27df Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 25 Oct 2021 17:05:21 -0700 Subject: [PATCH] IO-256 Resolve QBO Payable Vendor Insert. --- server/accounting/qbo/qbo-payables.js | 2 +- server/accounting/qbo/qbo-receivables.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/accounting/qbo/qbo-payables.js b/server/accounting/qbo/qbo-payables.js index 5a26fc978..ce96dc3de 100644 --- a/server/accounting/qbo/qbo-payables.js +++ b/server/accounting/qbo/qbo-payables.js @@ -152,7 +152,7 @@ async function InsertVendorRecord(oauthClient, qbo_realmId, req, bill) { body: JSON.stringify(Vendor), }); setNewRefreshToken(req.user.email, result); - return result && result.Vendor; + return result && result.json && result.json.Vendor; } catch (error) { logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, { error: diff --git a/server/accounting/qbo/qbo-receivables.js b/server/accounting/qbo/qbo-receivables.js index 0a797435a..7f2991234 100644 --- a/server/accounting/qbo/qbo-receivables.js +++ b/server/accounting/qbo/qbo-receivables.js @@ -458,7 +458,7 @@ async function InsertInvoice( body: JSON.stringify(invoiceObj), }); setNewRefreshToken(req.user.email, result); - return result && result.Invoice; + return result && result.json && result.json.Invoice; } catch (error) { logger.log("qbo-receivables-error", "DEBUG", req.user.email, job.id, { error,