RO into IO merge as of 02/05/2024.
This commit is contained in:
@@ -10,6 +10,7 @@ const OAuthClient = require("intuit-oauth");
|
||||
const client = require("../../graphql-client/graphql-client").client;
|
||||
const queries = require("../../graphql-client/queries");
|
||||
const {parse, stringify} = require("querystring");
|
||||
const InstanceManager = require("../../utils/instanceMgr");
|
||||
|
||||
const oauthClient = new OAuthClient({
|
||||
clientId: process.env.QBO_CLIENT_ID,
|
||||
@@ -21,10 +22,10 @@ const oauthClient = new OAuthClient({
|
||||
|
||||
let url;
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
url = `https://imex.online`;
|
||||
if (process.env.NODE_ENV === "production") { //TODO:AIO Add in QBO callbacks.
|
||||
url = InstanceManager({imex: `https://imex.online`, rome: `https://romeonline.io`,});
|
||||
} else if (process.env.NODE_ENV === "test") {
|
||||
url = `https://test.imex.online`;
|
||||
url = InstanceManager({imex: `https://test.imex.online`,rome: `https://test.romeonline.io`});
|
||||
} else {
|
||||
url = `http://localhost:3000`;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ const {
|
||||
const OAuthClient = require("intuit-oauth");
|
||||
const CreateInvoiceLines = require("../qb-receivables-lines").default;
|
||||
const moment = require("moment-timezone");
|
||||
const GraphQLClient = require("graphql-request").GraphQLClient;
|
||||
const {generateOwnerTier} = require("../qbxml/qbxml-utils");
|
||||
const {createMultiQbPayerLines} = require("../qb-receivables-lines");
|
||||
|
||||
@@ -240,6 +241,11 @@ exports.default = async (req, res) => {
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
(error && error.message),
|
||||
});
|
||||
console.log(error);
|
||||
logger.log("qbo-receivable-create-error", "ERROR", req.user.email, {
|
||||
error: error.message,
|
||||
stack: error.stack,
|
||||
});
|
||||
//Add the export log error.
|
||||
if (elgen) {
|
||||
const result = await client
|
||||
@@ -642,8 +648,7 @@ async function InsertInvoice(
|
||||
],
|
||||
...(bodyshop.accountingconfig &&
|
||||
bodyshop.accountingconfig.qbo &&
|
||||
bodyshop.accountingconfig.qbo_usa &&
|
||||
bodyshop.region_config.includes("CA_") && {
|
||||
bodyshop.accountingconfig.qbo_usa && {
|
||||
TxnTaxDetail: {
|
||||
TxnTaxCodeRef: {
|
||||
value:
|
||||
|
||||
Reference in New Issue
Block a user