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:
@@ -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]",
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "courtesycars_idx_fleet" on
|
||||||
|
"public"."courtesycars" using btree ("fleetnumber");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."courtesycars_idx_fleet";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_ownrfn" on
|
||||||
|
"public"."jobs" using gin ("ownr_fn");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_ownrfn";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_ownrln" on
|
||||||
|
"public"."jobs" using gin ("ownr_ln");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_ownrln";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "jobs_idx_iouparent" on
|
||||||
|
"public"."jobs" using btree ("iouparent");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."jobs_idx_iouparent";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_ronumber" on
|
||||||
|
"public"."jobs" using gin ("ro_number");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_ronumber";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_clmno" on
|
||||||
|
"public"."jobs" using gin ("clm_no");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_clmno";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_vmodeldesc" on
|
||||||
|
"public"."jobs" using gin ("v_model_desc");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_vmodeldesc";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_vmakedesc" on
|
||||||
|
"public"."jobs" using gin ("v_make_desc");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_vmakedesc";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_jobs_plateno" on
|
||||||
|
"public"."jobs" using gin ("plate_no");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_jobs_plateno";
|
||||||
@@ -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]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user