Merged in release/2024-09-20 (pull request #1749)

Release/2024 09 20 IO-2934 IO-2920 IO-2936 IO-2933 IO-2921 IO-2939 IO-2933 IO-2949 IO-2928 IO-2782 IO-2948 IO-2932
This commit is contained in:
Patrick Fic
2024-09-20 17:05:40 +00:00
21 changed files with 50 additions and 8 deletions

View File

@@ -87,7 +87,7 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
operationName: eventName, operationName: eventName,
variables: additionalParams, variables: additionalParams,
dbevent: false, dbevent: false,
env: "master" env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
}); });
// console.log( // console.log(
// "%c[Analytics]", // "%c[Analytics]",

View File

@@ -36,7 +36,8 @@ export function* openChatByPhone({ payload }) {
data: { conversations } data: { conversations }
} = yield client.query({ } = yield client.query({
query: CONVERSATION_ID_BY_PHONE, query: CONVERSATION_ID_BY_PHONE,
variables: { phone: p.number } variables: { phone: p.number },
fetchPolicy: 'no-cache'
}); });
if (conversations.length === 0) { if (conversations.length === 0) {

View File

@@ -0,0 +1,2 @@
CREATE INDEX "courtesycars_idx_fleet" on
"public"."courtesycars" using btree ("fleetnumber");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."courtesycars_idx_fleet";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_ownrfn" on
"public"."jobs" using gin ("ownr_fn");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_ownrfn";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_ownrln" on
"public"."jobs" using gin ("ownr_ln");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_ownrln";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "jobs_idx_iouparent" on
"public"."jobs" using btree ("iouparent");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."jobs_idx_iouparent";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_ronumber" on
"public"."jobs" using gin ("ro_number");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_ronumber";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_clmno" on
"public"."jobs" using gin ("clm_no");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_clmno";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_vmodeldesc" on
"public"."jobs" using gin ("v_model_desc");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_vmodeldesc";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_vmakedesc" on
"public"."jobs" using gin ("v_make_desc");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_vmakedesc";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_jobs_plateno" on
"public"."jobs" using gin ("plate_no");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_jobs_plateno";

View File

@@ -194,7 +194,9 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
bodyshop.md_responsibility_centers.sales_tax_codes, bodyshop.md_responsibility_centers.sales_tax_codes,
classes, classes,
taxCodes, taxCodes,
bodyshop.md_responsibility_centers.costs bodyshop.md_responsibility_centers.costs,
bodyshop.accountingconfig,
bodyshop.region_config
) )
); );
@@ -298,17 +300,29 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
// }, // },
// ], // ],
const generateBillLine = (billLine, accounts, jobClass, ioSalesTaxCodes, classes, taxCodes, costCenters) => { const generateBillLine = (
billLine,
accounts,
jobClass,
ioSalesTaxCodes,
classes,
taxCodes,
costCenters,
accountingconfig,
region_config
) => {
const account = costCenters.find((c) => c.name === billLine.cost_center); const account = costCenters.find((c) => c.name === billLine.cost_center);
return { return {
DetailType: "AccountBasedExpenseLineDetail", DetailType: "AccountBasedExpenseLineDetail",
AccountBasedExpenseLineDetail: { AccountBasedExpenseLineDetail: {
...(jobClass ? { ClassRef: { value: classes[jobClass] } } : {}), ...(jobClass ? { ClassRef: { value: classes[jobClass] } } : {}),
TaxCodeRef: { TaxCodeRef:
value: taxCodes[findTaxCode(billLine.applicable_taxes, ioSalesTaxCodes)] accountingconfig.qbo && accountingconfig.qbo_usa && region_config.includes("CA_")
}, ? {}
: {
value: taxCodes[findTaxCode(billLine.applicable_taxes, ioSalesTaxCodes)]
},
AccountRef: { AccountRef: {
value: accounts[account.accountname] value: accounts[account.accountname]
} }