IO-233 Add GST override for CDK.
This commit is contained in:
@@ -6092,6 +6092,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>gst_override</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>la1</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -12170,6 +12191,32 @@
|
||||
<folder_node>
|
||||
<name>dms</name>
|
||||
<children>
|
||||
<folder_node>
|
||||
<name>errors</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>alreadyexported</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
<name>labels</name>
|
||||
<children>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
||||
import { useTreatments, useClient } from "@splitsoftware/splitio-react";
|
||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
|
||||
@@ -550,6 +550,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"bodyshop.fields.responsibilitycenters.gst_override"
|
||||
)}
|
||||
name={[field.name, "gst_override"]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
|
||||
@@ -1919,6 +1919,7 @@ export const QUERY_JOB_EXPORT_DMS = gql`
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
area_of_damage
|
||||
date_exported
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -125,7 +125,10 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
!(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) ||
|
||||
!(data && data.jobs_by_pk)
|
||||
)
|
||||
return <Result status="404" />;
|
||||
return <Result status="404" title={t("general.errors.notfound")} />;
|
||||
|
||||
if (data.jobs_by_pk && data.jobs_by_pk.date_exported)
|
||||
return <Result status="warning" title={t("dms.errors.alreadyexported")} />;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
|
||||
@@ -394,6 +394,7 @@
|
||||
"ar": "",
|
||||
"ats": "",
|
||||
"federal_tax": "",
|
||||
"gst_override": "",
|
||||
"la1": "",
|
||||
"la2": "",
|
||||
"la3": "",
|
||||
@@ -761,6 +762,9 @@
|
||||
}
|
||||
},
|
||||
"dms": {
|
||||
"errors": {
|
||||
"alreadyexported": ""
|
||||
},
|
||||
"labels": {
|
||||
"refreshallocations": ""
|
||||
}
|
||||
|
||||
@@ -394,6 +394,7 @@
|
||||
"ar": "",
|
||||
"ats": "",
|
||||
"federal_tax": "",
|
||||
"gst_override": "",
|
||||
"la1": "",
|
||||
"la2": "",
|
||||
"la3": "",
|
||||
@@ -761,6 +762,9 @@
|
||||
}
|
||||
},
|
||||
"dms": {
|
||||
"errors": {
|
||||
"alreadyexported": ""
|
||||
},
|
||||
"labels": {
|
||||
"refreshallocations": ""
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user