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,