{
remove(field.name);
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 6729a1138..cad9a6a1f 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -1919,6 +1919,7 @@ export const QUERY_JOB_EXPORT_DMS = gql`
v_model_yr
v_model_desc
area_of_damage
+ date_exported
}
}
`;
diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx
index ac95b4b58..98493b605 100644
--- a/client/src/pages/dms/dms.container.jsx
+++ b/client/src/pages/dms/dms.container.jsx
@@ -125,7 +125,10 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
!(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) ||
!(data && data.jobs_by_pk)
)
- return ;
+ return ;
+
+ if (data.jobs_by_pk && data.jobs_by_pk.date_exported)
+ return ;
return (
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 51497bf15..a290fe4e7 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -394,6 +394,7 @@
"ar": "Accounts Receivable",
"ats": "ATS",
"federal_tax": "Federal Tax",
+ "gst_override": "GST Override Account #",
"la1": "LA1",
"la2": "LA2",
"la3": "LA3",
@@ -761,6 +762,9 @@
}
},
"dms": {
+ "errors": {
+ "alreadyexported": "This job has already been sent to the DMS. If you need to resend it, please use admin permissions to mark the job for re-export."
+ },
"labels": {
"refreshallocations": "Refresh to see DMS Allocataions."
}
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index bd1524e12..55aada7d9 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -394,6 +394,7 @@
"ar": "",
"ats": "",
"federal_tax": "",
+ "gst_override": "",
"la1": "",
"la2": "",
"la3": "",
@@ -761,6 +762,9 @@
}
},
"dms": {
+ "errors": {
+ "alreadyexported": ""
+ },
"labels": {
"refreshallocations": ""
}
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 86d79c2d0..5f17415dc 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -394,6 +394,7 @@
"ar": "",
"ats": "",
"federal_tax": "",
+ "gst_override": "",
"la1": "",
"la2": "",
"la3": "",
@@ -761,6 +762,9 @@
}
},
"dms": {
+ "errors": {
+ "alreadyexported": ""
+ },
"labels": {
"refreshallocations": ""
}
diff --git a/server/cdk/cdk-calculate-allocations.js b/server/cdk/cdk-calculate-allocations.js
index f7db405b8..0b7d84912 100644
--- a/server/cdk/cdk-calculate-allocations.js
+++ b/server/cdk/cdk-calculate-allocations.js
@@ -213,8 +213,7 @@ exports.default = async function (socket, jobid) {
}
if (job.towing_payable && job.towing_payable !== 0) {
- const towAccountName =
- selectedDmsAllocationConfig.profits.TOW;
+ const towAccountName = selectedDmsAllocationConfig.profits.TOW;
const towAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === towAccountName
@@ -234,8 +233,7 @@ exports.default = async function (socket, jobid) {
}
}
if (job.storage_payable && job.storage_payable !== 0) {
- const storageAccountName =
- selectedDmsAllocationConfig.profits.TOW;
+ const storageAccountName = selectedDmsAllocationConfig.profits.TOW;
const towAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === storageAccountName
@@ -258,8 +256,7 @@ exports.default = async function (socket, jobid) {
}
if (job.adjustment_bottom_line && job.adjustment_bottom_line !== 0) {
- const otherAccountName =
- selectedDmsAllocationConfig.profits.PAO;
+ const otherAccountName = selectedDmsAllocationConfig.profits.PAO;
const otherAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === otherAccountName
@@ -310,7 +307,20 @@ exports.default = async function (socket, jobid) {
taxAllocations[key].cost.getAmount() > 0
)
.map((key) => {
- return { ...taxAllocations[key], tax: key };
+ if (
+ key === "federal" &&
+ selectedDmsAllocationConfig.gst_override &&
+ selectedDmsAllocationConfig.gst_override !== ""
+ ) {
+ const ret = { ...taxAllocations[key], tax: key };
+ ret.costCenter.dms_acctnumber =
+ selectedDmsAllocationConfig.gst_override;
+ ret.profitCenter.dms_acctnumber =
+ selectedDmsAllocationConfig.gst_override;
+ return ret;
+ } else {
+ return { ...taxAllocations[key], tax: key };
+ }
}),
];
} catch (error) {
diff --git a/server/cdk/cdk-job-export.js b/server/cdk/cdk-job-export.js
index 96c7335b9..14e39a3c1 100644
--- a/server/cdk/cdk-job-export.js
+++ b/server/cdk/cdk-job-export.js
@@ -784,7 +784,7 @@ async function UpdateDmsVehicle(socket) {
return {
id: {
assigningPartyId:
- o.id.value === socket.dmsCust.id.value ? "CURRENT" : "PREVIOUS",
+ o.id.value === socket.DMSCust.id.value ? "CURRENT" : "PREVIOUS",
value: o.id.value,
},
};