Merged in feature/IO-2927-qbo-usa-gst-itc (pull request #1707)

IO-2927 Update QBO Payable to use ITC.

Approved-by: Allan Carr
This commit is contained in:
Patrick Fic
2024-09-12 20:04:33 +00:00
committed by Allan Carr
2 changed files with 6 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
AccountBasedExpenseLineDetail: { AccountBasedExpenseLineDetail: {
...(bill.job.class ? { ClassRef: { value: classes[bill.job.class] } } : {}), ...(bill.job.class ? { ClassRef: { value: classes[bill.job.class] } } : {}),
AccountRef: { AccountRef: {
value: accounts[bodyshop.md_responsibility_centers.taxes.federal.accountdesc] value: accounts[bodyshop.md_responsibility_centers.taxes.federal_itc.accountdesc] // 373559-1
} }
}, },
@@ -274,6 +274,8 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
} catch (error) { } catch (error) {
logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, { logger.log("qbo-payables-error", "DEBUG", req.user.email, bill.id, {
error: error, //(error && error.authResponse && error.authResponse.body) || (error && error.message), error: error, //(error && error.authResponse && error.authResponse.body) || (error && error.message),
validationError: JSON.stringify(error?.response?.data),
accountmeta: JSON.stringify({ accounts, taxCodes, classes }),
method: "InsertBill" method: "InsertBill"
}); });
throw error; throw error;

View File

@@ -575,7 +575,9 @@ async function InsertInvoice(oauthClient, qbo_realmId, req, job, bodyshop, paren
} catch (error) { } catch (error) {
logger.log("qbo-receivables-error", "DEBUG", req.user.email, job.id, { logger.log("qbo-receivables-error", "DEBUG", req.user.email, job.id, {
error, error,
method: "InsertOwner" method: "InsertInvoice",
validationError: JSON.stringify(error?.response?.data),
accountmeta: JSON.stringify({ accounts, taxCodes, classes })
}); });
throw error; throw error;
} }