@@ -6092,6 +6092,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>la1</name>
|
<name>la1</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -12170,6 +12191,32 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>dms</name>
|
<name>dms</name>
|
||||||
<children>
|
<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>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Modal
|
<Modal
|
||||||
width={"90%"}
|
width={"90%"}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
@@ -100,6 +100,6 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
|||||||
>
|
>
|
||||||
{t("jobs.actions.dms.findmakemodelcode")}
|
{t("jobs.actions.dms.findmakemodelcode")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import {
|
||||||
|
selectBodyshop,
|
||||||
|
selectCurrentUser,
|
||||||
|
} from "../../redux/user/user.selectors";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
currentUser: selectCurrentUser,
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
@@ -14,9 +17,12 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
});
|
});
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch);
|
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch);
|
||||||
|
|
||||||
export function DmsCdkMakesRefetch({ bodyshop, form, socket }) {
|
export function DmsCdkMakesRefetch({ currentUser, bodyshop, form, socket }) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
if (!currentUser.email.includes("@imex.")) return null;
|
||||||
|
|
||||||
const handleRefetch = async () => {
|
const handleRefetch = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
await axios.post("/cdk/getvehicles", {
|
await axios.post("/cdk/getvehicles", {
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ export function DmsCustomerSelector({ bodyshop }) {
|
|||||||
setVisible(true);
|
setVisible(true);
|
||||||
setDmsType("pbs");
|
setDmsType("pbs");
|
||||||
setcustomerList(customerList);
|
setcustomerList(customerList);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const onUseSelected = () => {
|
const onUseSelected = () => {
|
||||||
@@ -118,7 +117,6 @@ export function DmsCustomerSelector({ bodyshop }) {
|
|||||||
if (!visible) return null;
|
if (!visible) return null;
|
||||||
return (
|
return (
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
{dmsType}
|
|
||||||
<Table
|
<Table
|
||||||
title={() => (
|
title={() => (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import {
|
|||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
|
Menu,
|
||||||
Select,
|
Select,
|
||||||
Space,
|
Space,
|
||||||
Statistic,
|
Statistic,
|
||||||
Menu,
|
|
||||||
Typography,
|
Typography,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
@@ -21,9 +21,9 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { determineDmsType } from "../../pages/dms/dms.container";
|
import { determineDmsType } from "../../pages/dms/dms.container";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import DmsCdkMakes from "../dms-cdk-makes/dms-cdk-makes.component";
|
import DmsCdkMakes from "../dms-cdk-makes/dms-cdk-makes.component";
|
||||||
|
import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -33,7 +33,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
});
|
});
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsPostForm);
|
export default connect(mapStateToProps, mapDispatchToProps)(DmsPostForm);
|
||||||
|
|
||||||
export function DmsPostForm({ bodyshop, socket, job }) {
|
export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
@@ -61,6 +61,14 @@ export function DmsPostForm({ bodyshop, socket, job }) {
|
|||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
txEnvelope: values,
|
txEnvelope: values,
|
||||||
});
|
});
|
||||||
|
console.log(logsRef);
|
||||||
|
if (logsRef) {
|
||||||
|
console.log("executing", logsRef);
|
||||||
|
logsRef.curent &&
|
||||||
|
logsRef.current.scrollIntoView({
|
||||||
|
behavior: "smooth",
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -122,33 +130,36 @@ export function DmsPostForm({ bodyshop, socket, job }) {
|
|||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|
||||||
{bodyshop.cdk_dealerid && (
|
{bodyshop.cdk_dealerid && (
|
||||||
<LayoutFormRow style={{ justifyContent: "center" }} grow>
|
<div>
|
||||||
<Form.Item
|
<LayoutFormRow style={{ justifyContent: "center" }} grow>
|
||||||
name="dms_make"
|
<Form.Item
|
||||||
label={t("jobs.fields.dms.dms_make")}
|
name="dms_make"
|
||||||
rules={[
|
label={t("jobs.fields.dms.dms_make")}
|
||||||
{
|
rules={[
|
||||||
required: true,
|
{
|
||||||
},
|
required: true,
|
||||||
]}
|
},
|
||||||
>
|
]}
|
||||||
<Input disabled />
|
>
|
||||||
</Form.Item>
|
<Input disabled />
|
||||||
<Form.Item
|
</Form.Item>
|
||||||
name="dms_model"
|
<Form.Item
|
||||||
label={t("jobs.fields.dms.dms_model")}
|
name="dms_model"
|
||||||
rules={[
|
label={t("jobs.fields.dms.dms_model")}
|
||||||
{
|
rules={[
|
||||||
required: true,
|
{
|
||||||
},
|
required: true,
|
||||||
]}
|
},
|
||||||
>
|
]}
|
||||||
<Input disabled />
|
>
|
||||||
</Form.Item>
|
<Input disabled />
|
||||||
|
</Form.Item>
|
||||||
<DmsCdkMakes form={form} socket={socket} job={job} />
|
</LayoutFormRow>
|
||||||
<DmsCdkMakesRefetch />
|
<Space>
|
||||||
</LayoutFormRow>
|
<DmsCdkMakes form={form} socket={socket} job={job} />
|
||||||
|
<DmsCdkMakesRefetch />
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="story"
|
name="story"
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
||||||
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
|
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
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 FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||||
|
|
||||||
export default function PartsOrderModalComponent({
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
|
});
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(PartsOrderModalComponent);
|
||||||
|
|
||||||
|
export function PartsOrderModalComponent({
|
||||||
|
bodyshop,
|
||||||
vendorList,
|
vendorList,
|
||||||
sendTypeState,
|
sendTypeState,
|
||||||
isReturn,
|
isReturn,
|
||||||
@@ -16,7 +32,11 @@ export default function PartsOrderModalComponent({
|
|||||||
job,
|
job,
|
||||||
}) {
|
}) {
|
||||||
const [sendType, setSendType] = sendTypeState;
|
const [sendType, setSendType] = sendTypeState;
|
||||||
|
const { OEConnection } = useTreatments(
|
||||||
|
["OEConnection"],
|
||||||
|
{},
|
||||||
|
bodyshop.imexshopid
|
||||||
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -164,7 +184,9 @@ export default function PartsOrderModalComponent({
|
|||||||
<Radio value={"none"}>{t("general.labels.none")}</Radio>
|
<Radio value={"none"}>{t("general.labels.none")}</Radio>
|
||||||
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
|
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
|
||||||
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
|
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
|
||||||
<Radio value={"oec"}>{t("parts_orders.labels.oec")}</Radio>
|
{OEConnection.treatment === "on" && (
|
||||||
|
<Radio value={"oec"}>{t("parts_orders.labels.oec")}</Radio>
|
||||||
|
)}
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -550,6 +550,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t(
|
||||||
|
"bodyshop.fields.responsibilitycenters.gst_override"
|
||||||
|
)}
|
||||||
|
name={[field.name, "gst_override"]}
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
remove(field.name);
|
remove(field.name);
|
||||||
|
|||||||
@@ -1919,6 +1919,7 @@ export const QUERY_JOB_EXPORT_DMS = gql`
|
|||||||
v_model_yr
|
v_model_yr
|
||||||
v_model_desc
|
v_model_desc
|
||||||
area_of_damage
|
area_of_damage
|
||||||
|
date_exported
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import {
|
|||||||
Result,
|
Result,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
Space,
|
Space
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { useLocation, useHistory } from "react-router-dom";
|
import { useHistory, useLocation } from "react-router-dom";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import SocketIO from "socket.io-client";
|
import SocketIO from "socket.io-client";
|
||||||
import AlertComponent from "../../components/alert/alert.component";
|
import AlertComponent from "../../components/alert/alert.component";
|
||||||
@@ -26,7 +26,7 @@ import { auth } from "../../firebase/firebase.utils";
|
|||||||
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
|
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
|
||||||
import {
|
import {
|
||||||
setBreadcrumbs,
|
setBreadcrumbs,
|
||||||
setSelectedHeader,
|
setSelectedHeader
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
|
||||||
@@ -66,6 +66,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
variables: { id: jobId },
|
variables: { id: jobId },
|
||||||
skip: !jobId,
|
skip: !jobId,
|
||||||
});
|
});
|
||||||
|
const logsRef = useRef(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.title = t("titles.dms");
|
document.title = t("titles.dms");
|
||||||
@@ -125,12 +126,15 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
!(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) ||
|
!(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) ||
|
||||||
!(data && data.jobs_by_pk)
|
!(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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col span={10}>
|
<Col md={24} lg={10}>
|
||||||
<DmsAllocationsSummary
|
<DmsAllocationsSummary
|
||||||
title={`${data && data.jobs_by_pk && data.jobs_by_pk.ro_number} | ${
|
title={`${data && data.jobs_by_pk && data.jobs_by_pk.ro_number} | ${
|
||||||
data.jobs_by_pk.ownr_fn || ""
|
data.jobs_by_pk.ownr_fn || ""
|
||||||
@@ -143,51 +147,54 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
jobId={jobId}
|
jobId={jobId}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={14}>
|
<Col md={24} lg={14}>
|
||||||
<DmsPostForm
|
<DmsPostForm
|
||||||
socket={socket}
|
socket={socket}
|
||||||
jobId={jobId}
|
jobId={jobId}
|
||||||
job={data && data.jobs_by_pk}
|
job={data && data.jobs_by_pk}
|
||||||
|
logsRef={logsRef}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<DmsCustomerSelector />
|
<DmsCustomerSelector />
|
||||||
|
|
||||||
<Col span={24}>
|
<div ref={logsRef}>
|
||||||
<Card
|
<Col span={24}>
|
||||||
title={t("jobs.labels.dms.logs")}
|
<Card
|
||||||
extra={
|
title={t("jobs.labels.dms.logs")}
|
||||||
<Space wrap>
|
extra={
|
||||||
<Select
|
<Space wrap>
|
||||||
placeholder="Log Level"
|
<Select
|
||||||
value={logLevel}
|
placeholder="Log Level"
|
||||||
onChange={(value) => {
|
value={logLevel}
|
||||||
setLogLevel(value);
|
onChange={(value) => {
|
||||||
socket.emit("set-log-level", value);
|
setLogLevel(value);
|
||||||
}}
|
socket.emit("set-log-level", value);
|
||||||
>
|
}}
|
||||||
<Select.Option key="TRACE">TRACE</Select.Option>
|
>
|
||||||
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
<Select.Option key="TRACE">TRACE</Select.Option>
|
||||||
<Select.Option key="INFO">INFO</Select.Option>
|
<Select.Option key="DEBUG">DEBUG</Select.Option>
|
||||||
<Select.Option key="WARNING">WARNING</Select.Option>
|
<Select.Option key="INFO">INFO</Select.Option>
|
||||||
<Select.Option key="ERROR">ERROR</Select.Option>
|
<Select.Option key="WARNING">WARNING</Select.Option>
|
||||||
</Select>
|
<Select.Option key="ERROR">ERROR</Select.Option>
|
||||||
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
</Select>
|
||||||
<Button
|
<Button onClick={() => setLogs([])}>Clear Logs</Button>
|
||||||
onClick={() => {
|
<Button
|
||||||
setLogs([]);
|
onClick={() => {
|
||||||
socket.disconnect();
|
setLogs([]);
|
||||||
socket.connect();
|
socket.disconnect();
|
||||||
}}
|
socket.connect();
|
||||||
>
|
}}
|
||||||
Reconnect
|
>
|
||||||
</Button>
|
Reconnect
|
||||||
</Space>
|
</Button>
|
||||||
}
|
</Space>
|
||||||
>
|
}
|
||||||
<DmsLogEvents socket={socket} logs={logs} />
|
>
|
||||||
</Card>
|
<DmsLogEvents socket={socket} logs={logs} />
|
||||||
</Col>
|
</Card>
|
||||||
|
</Col>
|
||||||
|
</div>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -394,6 +394,7 @@
|
|||||||
"ar": "Accounts Receivable",
|
"ar": "Accounts Receivable",
|
||||||
"ats": "ATS",
|
"ats": "ATS",
|
||||||
"federal_tax": "Federal Tax",
|
"federal_tax": "Federal Tax",
|
||||||
|
"gst_override": "GST Override Account #",
|
||||||
"la1": "LA1",
|
"la1": "LA1",
|
||||||
"la2": "LA2",
|
"la2": "LA2",
|
||||||
"la3": "LA3",
|
"la3": "LA3",
|
||||||
@@ -761,6 +762,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"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": {
|
"labels": {
|
||||||
"refreshallocations": "Refresh to see DMS Allocataions."
|
"refreshallocations": "Refresh to see DMS Allocataions."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,6 +394,7 @@
|
|||||||
"ar": "",
|
"ar": "",
|
||||||
"ats": "",
|
"ats": "",
|
||||||
"federal_tax": "",
|
"federal_tax": "",
|
||||||
|
"gst_override": "",
|
||||||
"la1": "",
|
"la1": "",
|
||||||
"la2": "",
|
"la2": "",
|
||||||
"la3": "",
|
"la3": "",
|
||||||
@@ -761,6 +762,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
|
"errors": {
|
||||||
|
"alreadyexported": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"refreshallocations": ""
|
"refreshallocations": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,6 +394,7 @@
|
|||||||
"ar": "",
|
"ar": "",
|
||||||
"ats": "",
|
"ats": "",
|
||||||
"federal_tax": "",
|
"federal_tax": "",
|
||||||
|
"gst_override": "",
|
||||||
"la1": "",
|
"la1": "",
|
||||||
"la2": "",
|
"la2": "",
|
||||||
"la3": "",
|
"la3": "",
|
||||||
@@ -761,6 +762,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
|
"errors": {
|
||||||
|
"alreadyexported": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"refreshallocations": ""
|
"refreshallocations": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,8 +213,7 @@ exports.default = async function (socket, jobid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (job.towing_payable && job.towing_payable !== 0) {
|
if (job.towing_payable && job.towing_payable !== 0) {
|
||||||
const towAccountName =
|
const towAccountName = selectedDmsAllocationConfig.profits.TOW;
|
||||||
selectedDmsAllocationConfig.profits.TOW;
|
|
||||||
|
|
||||||
const towAccount = bodyshop.md_responsibility_centers.profits.find(
|
const towAccount = bodyshop.md_responsibility_centers.profits.find(
|
||||||
(c) => c.name === towAccountName
|
(c) => c.name === towAccountName
|
||||||
@@ -234,8 +233,7 @@ exports.default = async function (socket, jobid) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (job.storage_payable && job.storage_payable !== 0) {
|
if (job.storage_payable && job.storage_payable !== 0) {
|
||||||
const storageAccountName =
|
const storageAccountName = selectedDmsAllocationConfig.profits.TOW;
|
||||||
selectedDmsAllocationConfig.profits.TOW;
|
|
||||||
|
|
||||||
const towAccount = bodyshop.md_responsibility_centers.profits.find(
|
const towAccount = bodyshop.md_responsibility_centers.profits.find(
|
||||||
(c) => c.name === storageAccountName
|
(c) => c.name === storageAccountName
|
||||||
@@ -258,8 +256,7 @@ exports.default = async function (socket, jobid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (job.adjustment_bottom_line && job.adjustment_bottom_line !== 0) {
|
if (job.adjustment_bottom_line && job.adjustment_bottom_line !== 0) {
|
||||||
const otherAccountName =
|
const otherAccountName = selectedDmsAllocationConfig.profits.PAO;
|
||||||
selectedDmsAllocationConfig.profits.PAO;
|
|
||||||
|
|
||||||
const otherAccount = bodyshop.md_responsibility_centers.profits.find(
|
const otherAccount = bodyshop.md_responsibility_centers.profits.find(
|
||||||
(c) => c.name === otherAccountName
|
(c) => c.name === otherAccountName
|
||||||
@@ -310,7 +307,20 @@ exports.default = async function (socket, jobid) {
|
|||||||
taxAllocations[key].cost.getAmount() > 0
|
taxAllocations[key].cost.getAmount() > 0
|
||||||
)
|
)
|
||||||
.map((key) => {
|
.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) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -784,7 +784,7 @@ async function UpdateDmsVehicle(socket) {
|
|||||||
return {
|
return {
|
||||||
id: {
|
id: {
|
||||||
assigningPartyId:
|
assigningPartyId:
|
||||||
o.id.value === socket.dmsCust.id.value ? "CURRENT" : "PREVIOUS",
|
o.id.value === socket.DMSCust.id.value ? "CURRENT" : "PREVIOUS",
|
||||||
value: o.id.value,
|
value: o.id.value,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user