From f3265901b6b39981b45cfdb436791739058ea075 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Fri, 20 Sep 2024 13:30:23 -0400 Subject: [PATCH 1/4] Adhoc - Add PR Helper Utility to Reference directory Signed-off-by: Dave Richer --- _reference/prHelper.html | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 _reference/prHelper.html diff --git a/_reference/prHelper.html b/_reference/prHelper.html new file mode 100644 index 000000000..fd5ad7c71 --- /dev/null +++ b/_reference/prHelper.html @@ -0,0 +1,59 @@ + + + + + + IMEX IO Extractor + + + +

IMEX IO Extractor

+ +
+ + +
+ + + + + From 70d857bfec308fbc64b385c2fa0e4d0ea0b5fe80 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 20 Sep 2024 13:14:15 -0700 Subject: [PATCH 2/4] IO-2933 resolve missing account details on --- .../card-payment-modal/card-payment-modal.component..jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/card-payment-modal/card-payment-modal.component..jsx b/client/src/components/card-payment-modal/card-payment-modal.component..jsx index 29a95b87b..fcdbd417c 100644 --- a/client/src/components/card-payment-modal/card-payment-modal.component..jsx +++ b/client/src/components/card-payment-modal/card-payment-modal.component..jsx @@ -45,7 +45,7 @@ const CardPaymentModalComponent = ({ const [, { data, refetch, queryLoading }] = useLazyQuery(QUERY_RO_AND_OWNER_BY_JOB_PKS, { variables: { jobids: [context.jobid] }, - skip: true + skip: !context?.jobid }); //Initialize the intellipay window. @@ -244,7 +244,8 @@ const CardPaymentModalComponent = ({ - prevValues.payments?.map((p) => p?.jobid).join() !== curValues.payments?.map((p) => p?.jobid).join() + prevValues.payments?.map((p) => p?.jobid + p?.amount).join() !== + curValues.payments?.map((p) => p?.jobid + p?.amount).join() } > {() => { From f018a2b2a6e7168b755df8843159105a456dddf3 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 20 Sep 2024 14:57:31 -0700 Subject: [PATCH 3/4] Add additional Hasura Indexes --- hasura/migrations/1726868398933_run_sql_migration/down.sql | 3 +++ hasura/migrations/1726868398933_run_sql_migration/up.sql | 1 + .../1726868654375_create_index_idx_jobs_vehicleid/down.sql | 1 + .../1726868654375_create_index_idx_jobs_vehicleid/up.sql | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 hasura/migrations/1726868398933_run_sql_migration/down.sql create mode 100644 hasura/migrations/1726868398933_run_sql_migration/up.sql create mode 100644 hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/down.sql create mode 100644 hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/up.sql diff --git a/hasura/migrations/1726868398933_run_sql_migration/down.sql b/hasura/migrations/1726868398933_run_sql_migration/down.sql new file mode 100644 index 000000000..20f7cb64f --- /dev/null +++ b/hasura/migrations/1726868398933_run_sql_migration/down.sql @@ -0,0 +1,3 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- CREATE INDEX idx_jobs_created_at_desc ON jobs (created_at DESC); diff --git a/hasura/migrations/1726868398933_run_sql_migration/up.sql b/hasura/migrations/1726868398933_run_sql_migration/up.sql new file mode 100644 index 000000000..e68cba2a2 --- /dev/null +++ b/hasura/migrations/1726868398933_run_sql_migration/up.sql @@ -0,0 +1 @@ +CREATE INDEX idx_jobs_created_at_desc ON jobs (created_at DESC); diff --git a/hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/down.sql b/hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/down.sql new file mode 100644 index 000000000..edec33bc5 --- /dev/null +++ b/hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/down.sql @@ -0,0 +1 @@ +DROP INDEX IF EXISTS "public"."idx_jobs_vehicleid"; diff --git a/hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/up.sql b/hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/up.sql new file mode 100644 index 000000000..0027bbc21 --- /dev/null +++ b/hasura/migrations/1726868654375_create_index_idx_jobs_vehicleid/up.sql @@ -0,0 +1,2 @@ +CREATE INDEX "idx_jobs_vehicleid" on + "public"."jobs" using btree ("vehicleid"); From da7b97042ea45388792ba8252a71536180270fd1 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Fri, 20 Sep 2024 15:19:24 -0700 Subject: [PATCH 4/4] IO-2928 Adjust accumulator in reducer for tax Signed-off-by: Allan Carr --- server/accounting/qbo/qbo-payables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/accounting/qbo/qbo-payables.js b/server/accounting/qbo/qbo-payables.js index 30f5b1f62..c0673cbc5 100644 --- a/server/accounting/qbo/qbo-payables.js +++ b/server/accounting/qbo/qbo-payables.js @@ -221,7 +221,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop) Amount: Dinero({ amount: Math.round( bill.billlines.reduce((acc, val) => { - return acc + val.applicable_taxes?.federal ? (val.actual_cost * val.quantity ?? 0) : 0; + return acc + (val.applicable_taxes?.federal ? (val.actual_cost * val.quantity ?? 0) : 0); }, 0) * 100 ) })