Merge branch 'feature/qbo' into test
This commit is contained in:
@@ -280,6 +280,7 @@ async function QueryMetaData(oauthClient, req) {
|
|||||||
|
|
||||||
taxCodes.json &&
|
taxCodes.json &&
|
||||||
taxCodes.json.QueryResponse &&
|
taxCodes.json.QueryResponse &&
|
||||||
|
taxCodes.json.QueryResponse.TaxCode &&
|
||||||
taxCodes.json.QueryResponse.TaxCode.forEach((t) => {
|
taxCodes.json.QueryResponse.TaxCode.forEach((t) => {
|
||||||
taxCodeMapping[t.Name] = t.Id;
|
taxCodeMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
@@ -288,6 +289,7 @@ async function QueryMetaData(oauthClient, req) {
|
|||||||
|
|
||||||
accounts.json &&
|
accounts.json &&
|
||||||
accounts.json.QueryResponse &&
|
accounts.json.QueryResponse &&
|
||||||
|
accounts.json.QueryResponse.Account &&
|
||||||
accounts.json.QueryResponse.Account.forEach((t) => {
|
accounts.json.QueryResponse.Account.forEach((t) => {
|
||||||
accountMapping[t.Name] = t.Id;
|
accountMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
@@ -295,6 +297,7 @@ async function QueryMetaData(oauthClient, req) {
|
|||||||
const classMapping = {};
|
const classMapping = {};
|
||||||
classes.json &&
|
classes.json &&
|
||||||
classes.json.QueryResponse &&
|
classes.json.QueryResponse &&
|
||||||
|
classes.json.QueryResponse.Class &&
|
||||||
classes.json.QueryResponse.Class.forEach((t) => {
|
classes.json.QueryResponse.Class.forEach((t) => {
|
||||||
accountMapping[t.Name] = t.Id;
|
accountMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ async function QueryMetaData(oauthClient, req, ro_number) {
|
|||||||
|
|
||||||
paymentMethods.json &&
|
paymentMethods.json &&
|
||||||
paymentMethods.json.QueryResponse &&
|
paymentMethods.json.QueryResponse &&
|
||||||
|
paymentMethods.json.QueryResponse.PaymentMethod &&
|
||||||
paymentMethods.json.QueryResponse.PaymentMethod.forEach((t) => {
|
paymentMethods.json.QueryResponse.PaymentMethod.forEach((t) => {
|
||||||
paymentMethodMapping[t.Name] = t.Id;
|
paymentMethodMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ async function QueryMetaData(oauthClient, req) {
|
|||||||
|
|
||||||
taxCodes.json &&
|
taxCodes.json &&
|
||||||
taxCodes.json.QueryResponse &&
|
taxCodes.json.QueryResponse &&
|
||||||
|
taxCodes.json.QueryResponse.TaxCode &&
|
||||||
taxCodes.json.QueryResponse.TaxCode.forEach((t) => {
|
taxCodes.json.QueryResponse.TaxCode.forEach((t) => {
|
||||||
taxCodeMapping[t.Name] = t.Id;
|
taxCodeMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
@@ -355,6 +356,7 @@ async function QueryMetaData(oauthClient, req) {
|
|||||||
|
|
||||||
items.json &&
|
items.json &&
|
||||||
items.json.QueryResponse &&
|
items.json.QueryResponse &&
|
||||||
|
items.json.QueryResponse.Item &&
|
||||||
items.json.QueryResponse.Item.forEach((t) => {
|
items.json.QueryResponse.Item.forEach((t) => {
|
||||||
itemMapping[t.Name] = t.Id;
|
itemMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
@@ -362,6 +364,7 @@ async function QueryMetaData(oauthClient, req) {
|
|||||||
const classMapping = {};
|
const classMapping = {};
|
||||||
classes.json &&
|
classes.json &&
|
||||||
classes.json.QueryResponse &&
|
classes.json.QueryResponse &&
|
||||||
|
classes.json.QueryResponse.Class &&
|
||||||
classes.json.QueryResponse.Class.forEach((t) => {
|
classes.json.QueryResponse.Class.forEach((t) => {
|
||||||
itemMapping[t.Name] = t.Id;
|
itemMapping[t.Name] = t.Id;
|
||||||
});
|
});
|
||||||
@@ -394,7 +397,7 @@ async function InsertInvoice(oauthClient, req, job, bodyshop, parentTierRef) {
|
|||||||
...(bodyshop.accountingconfig.printlater
|
...(bodyshop.accountingconfig.printlater
|
||||||
? { PrintStatus: "NeedToPrint" }
|
? { PrintStatus: "NeedToPrint" }
|
||||||
: {}),
|
: {}),
|
||||||
...(bodyshop.accountingconfig.emaillater
|
...(bodyshop.accountingconfig.emaillater && job.ownr_ea
|
||||||
? { EmailStatus: "NeedToSend" }
|
? { EmailStatus: "NeedToSend" }
|
||||||
: {}),
|
: {}),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user