IO-256 Resolve QBO Aposstroph Issues

This commit is contained in:
Patrick Fic
2021-10-27 11:36:40 -07:00
parent 34e220dcad
commit 2c00e5ee79
3 changed files with 17 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
const urlBuilder = require("./qbo").urlBuilder;
const StandardizeName = require("./qbo").StandardizeName;
const path = require("path");
require("dotenv").config({
path: path.resolve(
@@ -114,7 +115,9 @@ async function QueryVendorRecord(oauthClient, qbo_realmId, req, bill) {
url: urlBuilder(
qbo_realmId,
"query",
`select * From vendor where DisplayName = '${bill.vendor.name}'`
`select * From vendor where DisplayName = '${StandardizeName(
bill.vendor.name
)}'`
),
method: "POST",
headers: {