IO-256 Resolve QBO issues.
This commit is contained in:
@@ -40,7 +40,7 @@ export function PayableExportAll({
|
||||
setLoading(true);
|
||||
if (!!loadingCallback) loadingCallback(true);
|
||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
||||
PartnerResponse = await axios.post(`/qbo/payables`, {
|
||||
bills: billids,
|
||||
});
|
||||
} else {
|
||||
|
||||
21504
logs/oAuthClient-log.log
21504
logs/oAuthClient-log.log
File diff suppressed because one or more lines are too long
@@ -41,7 +41,7 @@ exports.default = async (req, res) => {
|
||||
res.status(401).json({ error: "No company associated." });
|
||||
return;
|
||||
}
|
||||
await refreshOauthToken(oauthClient, qbo_realmId, req);
|
||||
await refreshOauthToken(oauthClient, req);
|
||||
|
||||
const BearerToken = req.headers.authorization;
|
||||
const { bills: billsToQuery } = req.body;
|
||||
@@ -67,7 +67,6 @@ exports.default = async (req, res) => {
|
||||
vendorRecord = await QueryVendorRecord(
|
||||
oauthClient,
|
||||
qbo_realmId,
|
||||
qbo_realmId,
|
||||
req,
|
||||
bill
|
||||
);
|
||||
@@ -96,7 +95,7 @@ exports.default = async (req, res) => {
|
||||
success: false,
|
||||
errorMessage:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -133,7 +132,7 @@ async function QueryVendorRecord(oauthClient, qbo_realmId, req, bill) {
|
||||
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
|
||||
error:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
method: "QueryVendorRecord",
|
||||
});
|
||||
throw error;
|
||||
@@ -158,7 +157,7 @@ async function InsertVendorRecord(oauthClient, qbo_realmId, req, bill) {
|
||||
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
|
||||
error:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
method: "InsertVendorRecord",
|
||||
});
|
||||
throw error;
|
||||
@@ -217,7 +216,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor) {
|
||||
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
|
||||
error:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
method: "InsertBill",
|
||||
});
|
||||
throw error;
|
||||
|
||||
@@ -48,7 +48,7 @@ exports.default = async (req, res) => {
|
||||
res.status(401).json({ error: "No company associated." });
|
||||
return;
|
||||
}
|
||||
await refreshOauthToken(oauthClient, qbo_realmId, req);
|
||||
await refreshOauthToken(oauthClient, req);
|
||||
|
||||
const BearerToken = req.headers.authorization;
|
||||
const { payments: paymentsToQuery } = req.body;
|
||||
@@ -141,7 +141,7 @@ exports.default = async (req, res) => {
|
||||
logger.log("qbo-payment-create-error", "ERROR", req.user.email, {
|
||||
error:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
});
|
||||
|
||||
ret.push({
|
||||
@@ -149,7 +149,7 @@ exports.default = async (req, res) => {
|
||||
success: false,
|
||||
errorMessage:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -229,7 +229,7 @@ async function InsertPayment(
|
||||
return result && result.Bill;
|
||||
} catch (error) {
|
||||
logger.log("qbo-payables-error", "DEBUG", req.user.email, payment.id, {
|
||||
error: JSON.stringify(error),
|
||||
error: error && error.message,
|
||||
method: "InsertPayment",
|
||||
});
|
||||
throw error;
|
||||
|
||||
@@ -145,7 +145,7 @@ exports.default = async (req, res) => {
|
||||
success: false,
|
||||
errorMessage:
|
||||
(error && error.authResponse && error.authResponse.body) ||
|
||||
JSON.stringify(error),
|
||||
(error && error.message),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user