From 4c70351429e882b56251f593816b3d346d3a8c7b Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 9 Feb 2022 16:00:07 -0800 Subject: [PATCH 1/2] Remove OEC from return modal. --- .../parts-order-modal/parts-order-modal.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/parts-order-modal/parts-order-modal.component.jsx b/client/src/components/parts-order-modal/parts-order-modal.component.jsx index 04f6e4fdd..3d51d7131 100644 --- a/client/src/components/parts-order-modal/parts-order-modal.component.jsx +++ b/client/src/components/parts-order-modal/parts-order-modal.component.jsx @@ -240,7 +240,7 @@ export function PartsOrderModalComponent({ {t("general.labels.none")} {t("parts_orders.labels.email")} {t("parts_orders.labels.print")} - {OEConnection.treatment === "on" && ( + {OEConnection.treatment === "on" && isReturn === false && ( {t("parts_orders.labels.oec")} )} From f8695972a3e105c365fbc3a862d6957dde56b383 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 9 Feb 2022 16:29:16 -0800 Subject: [PATCH 2/2] IO-1708 Remove timezone from date fields on server calcuations. --- server/accounting/qbo/qbo-payables.js | 4 ++-- server/accounting/qbo/qbo-payments.js | 7 +++++-- server/accounting/qbxml/qbxml-payables.js | 4 ++-- server/accounting/qbxml/qbxml-payments.js | 4 ++-- server/cdk/cdk-job-export.js | 8 ++++---- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/server/accounting/qbo/qbo-payables.js b/server/accounting/qbo/qbo-payables.js index 9af53cb24..b7bddd1a7 100644 --- a/server/accounting/qbo/qbo-payables.js +++ b/server/accounting/qbo/qbo-payables.js @@ -179,11 +179,11 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor) { value: vendor.Id, }, TxnDate: moment(bill.date) - .tz(bill.job.bodyshop.timezone) + //.tz(bill.job.bodyshop.timezone) .format("YYYY-MM-DD"), ...(bill.vendor.due_date && { DueDate: moment(bill.date) - .tz(bill.job.bodyshop.timezone) + //.tz(bill.job.bodyshop.timezone) .add(bill.vendor.due_date, "days") .format("YYYY-MM-DD"), }), diff --git a/server/accounting/qbo/qbo-payments.js b/server/accounting/qbo/qbo-payments.js index 4ff7762a8..f943b57f3 100644 --- a/server/accounting/qbo/qbo-payments.js +++ b/server/accounting/qbo/qbo-payments.js @@ -207,7 +207,8 @@ async function InsertPayment( CustomerRef: { value: parentRef.Id, }, - TxnDate: moment(payment.date).tz(bodyshop.timezone).format("YYYY-MM-DD"), + TxnDate: moment(payment.date) //.tz(bodyshop.timezone) + .format("YYYY-MM-DD"), //DueDate: bill.due_date && moment(bill.due_date).format("YYYY-MM-DD"), DocNumber: payment.paymentnum, TotalAmt: Dinero({ @@ -392,7 +393,9 @@ async function InsertCreditMemo( CustomerRef: { value: parentRef.Id, }, - TxnDate: moment(payment.date).tz(bodyshop.timezone).format("YYYY-MM-DD"), + TxnDate: moment(payment.date) + //.tz(bodyshop.timezone) + .format("YYYY-MM-DD"), DocNumber: payment.paymentnum, ...(invoices && invoices[0] ? { InvoiceRef: { value: invoices[0].Id } } diff --git a/server/accounting/qbxml/qbxml-payables.js b/server/accounting/qbxml/qbxml-payables.js index 80b293981..07d426da7 100644 --- a/server/accounting/qbxml/qbxml-payables.js +++ b/server/accounting/qbxml/qbxml-payables.js @@ -73,11 +73,11 @@ const generateBill = (bill) => { FullName: bill.vendor.name, }, TxnDate: moment(bill.date) - .tz(bill.job.bodyshop.timezone) + //.tz(bill.job.bodyshop.timezone) .format("YYYY-MM-DD"), ...(bill.vendor.due_date && { DueDate: moment(bill.date) - .tz(bill.job.bodyshop.timezone) + // .tz(bill.job.bodyshop.timezone) .add(bill.vendor.due_date, "days") .format("YYYY-MM-DD"), }), diff --git a/server/accounting/qbxml/qbxml-payments.js b/server/accounting/qbxml/qbxml-payments.js index 2427d00fe..b09168d79 100644 --- a/server/accounting/qbxml/qbxml-payments.js +++ b/server/accounting/qbxml/qbxml-payments.js @@ -129,7 +129,7 @@ const generatePayment = (payment, isThreeTier, twoTierPref, bodyshop) => { payment.job.bodyshop.md_responsibility_centers.ar.accountname, }, TxnDate: moment(payment.date) - .tz(bodyshop.timezone) + // .tz(bodyshop.timezone) .format("YYYY-MM-DD"), //Trim String RefNumber: payment.paymentnum || payment.transactionid, TotalAmount: Dinero({ @@ -175,7 +175,7 @@ const generatePayment = (payment, isThreeTier, twoTierPref, bodyshop) => { payment.job.bodyshop.md_responsibility_centers.ar.accountname, }, TxnDate: moment(payment.date) - .tz(bodyshop.timezone) + //.tz(bodyshop.timezone) .format("YYYY-MM-DD"), //Trim String RefNumber: payment.paymentnum || payment.stripeid || payment.transactionid, diff --git a/server/cdk/cdk-job-export.js b/server/cdk/cdk-job-export.js index f860a1df3..92d4fb018 100644 --- a/server/cdk/cdk-job-export.js +++ b/server/cdk/cdk-job-export.js @@ -716,7 +716,7 @@ async function InsertDmsVehicle(socket) { dealerNumber: socket.JobData.bodyshop.cdk_dealerid, ...(socket.txEnvelope.inservicedate && { inServiceDate: moment(socket.txEnvelope.inservicedate) - .tz(socket.JobData.bodyshop.timezone) + //.tz(socket.JobData.bodyshop.timezone) .startOf("day") .toISOString(), }), @@ -725,7 +725,7 @@ async function InsertDmsVehicle(socket) { manufacturer: {}, vehicle: { deliveryDate: moment() - .tz(socket.JobData.bodyshop.timezone) + // .tz(socket.JobData.bodyshop.timezone) .format("YYYYMMDD"), licensePlateNo: socket.JobData.plate_no, make: socket.txEnvelope.dms_make, @@ -854,14 +854,14 @@ async function UpdateDmsVehicle(socket) { socket.DMSVeh.dealer.inServiceDate || socket.txEnvelope.inservicedate ) - .tz(socket.JobData.bodyshop.timezone) + // .tz(socket.JobData.bodyshop.timezone) .toISOString(), }), }, vehicle: { ...socket.DMSVeh.vehicle, deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate) - .tz(socket.JobData.bodyshop.timezone) + //.tz(socket.JobData.bodyshop.timezone) .toISOString(), }, owners: ids,