diff --git a/client/src/components/job-detail-lines/job-lines-expander.component.jsx b/client/src/components/job-detail-lines/job-lines-expander.component.jsx
index 1152dc546..16d2d6fa5 100644
--- a/client/src/components/job-detail-lines/job-lines-expander.component.jsx
+++ b/client/src/components/job-detail-lines/job-lines-expander.component.jsx
@@ -1,5 +1,5 @@
import { useQuery } from "@apollo/client";
-import { Col, Divider, Row, Skeleton, Space, Timeline, Typography } from "antd";
+import { Col, Row, Skeleton, Space, Timeline, Typography } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
@@ -43,13 +43,25 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
? data.parts_order_lines.map((line) => ({
key: line.id,
children: (
-
} wrap>
-
- {line.parts_order.order_number}
-
-
{line.parts_order.order_date}
- {line.parts_order.vendor.name}
-
+
+
+
+ {line.parts_order.order_number}
+
+
+
+ {line.parts_order.order_date}
+
+ {line.parts_order.vendor.name}
+ {line.backordered_eta ? (
+
+
+ {`${t("parts_orders.fields.backordered_eta")}: `}
+ {line.backordered_eta}
+
+
+ ) : null}
+
)
}))
: [
@@ -61,6 +73,37 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
}
/>{" "}
+
+
{t("parts_dispatch.labels.parts_dispatch")}
+
0
+ ? data.parts_dispatch_lines.map((line) => ({
+ key: line.id,
+ children: (
+
+
+ {line.parts_dispatch.number}
+
+
+ {bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
+
+
+
+ {t("parts_dispatch_lines.fields.accepted_at")}
+ {line.accepted_at}
+
+
+
+ )
+ }))
+ : {
+ key: "dispatch-lines",
+ children: t("parts_orders.labels.notyetordered")
+ }
+ }
+ />
+
{t("bills.labels.bills")}
-
- {t("parts_dispatch.labels.parts_dispatch")}
- 0
- ? data.parts_dispatch_lines.map((line) => ({
- key: line.id,
- children: (
- } wrap>
- {line.parts_dispatch.number}
- {bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
-
- {t("parts_dispatch_lines.fields.accepted_at")}
- {line.accepted_at}
-
-
- )
- }))
- : {
- key: "dispatch-lines",
- children: t("parts_orders.labels.notyetordered")
- }
- }
- />
-
);
}
diff --git a/client/src/components/job-payments/job-payments.component.jsx b/client/src/components/job-payments/job-payments.component.jsx
index bfb74d8fc..979b23d44 100644
--- a/client/src/components/job-payments/job-payments.component.jsx
+++ b/client/src/components/job-payments/job-payments.component.jsx
@@ -133,6 +133,7 @@ export function JobPayments({
}
];
+ //Same as in RO guard. If changed, update in both.
const total = useMemo(() => {
return (
job.payments &&
diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx
index 117d0f407..90ced9d1c 100644
--- a/client/src/components/job-search-select/job-search-select.component.jsx
+++ b/client/src/components/job-search-select/job-search-select.component.jsx
@@ -1,3 +1,4 @@
+import { LoadingOutlined } from "@ant-design/icons";
import { useLazyQuery } from "@apollo/client";
import { Select, Space, Spin, Tag } from "antd";
import _ from "lodash";
@@ -6,8 +7,6 @@ import { useTranslation } from "react-i18next";
import { SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
import AlertComponent from "../alert/alert.component";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
-import { SearchOutlined } from "@ant-design/icons";
-import { LoadingOutlined } from "@ant-design/icons";
const { Option } = Select;
@@ -19,9 +18,14 @@ const JobSearchSelect = (
const [theOptions, setTheOptions] = useState([]);
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_JOBS_FOR_AUTOCOMPLETE, {});
- const [callIdSearch, { loading: idLoading, error: idError, data: idData }] = useLazyQuery(
- SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE
- );
+ const [
+ callIdSearch,
+ {
+ //loading: idLoading,
+ error: idError,
+ data: idData
+ }
+ ] = useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
const executeSearch = (v) => {
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
@@ -86,9 +90,9 @@ const JobSearchSelect = (
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
o.ro_number || t("general.labels.na")
- } | ${OwnerNameDisplayFunction(o)} | ${
- o.v_model_yr || ""
- } ${o.v_make_desc || ""} ${o.v_model_desc || ""}`}
+ } | ${OwnerNameDisplayFunction(o)} | ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
+ o.v_model_desc || ""
+ }`}
{o.status}
diff --git a/client/src/components/jobs-available-table/jobs-available-table.container.jsx b/client/src/components/jobs-available-table/jobs-available-table.container.jsx
index a8784fda8..5e7681853 100644
--- a/client/src/components/jobs-available-table/jobs-available-table.container.jsx
+++ b/client/src/components/jobs-available-table/jobs-available-table.container.jsx
@@ -592,32 +592,34 @@ function ResolveCCCLineIssues(estData, bodyshop) {
//Group by line no
// For everything but the first one, strip out the price number in
- // InstanceRenderManager({executeFunction:true, args:[], promanager: () => {
- // const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
- // Object.keys(groupedByLineRef).forEach((lineRef) => {
- // let index0ActPrice;
- // groupedByLineRef[lineRef].forEach((line, index) => {
- // //Let the first one keep it
- // if (index === 0){
- // index0ActPrice = line.act_price;
- // return;}
- // //Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
- // if (line.unq_seq === 0) return;
- // if(index0ActPrice !== line.act_price){
- // line.notes += ` | Price override.`;
- // return;
- // }
- // const indexInEstData = estData.joblines.data.findIndex(
- // (l) => l.unq_seq === line.unq_seq
- // );
- // estData.joblines.data[
- // indexInEstData
- // ].notes += ` | Scrubbed due to the line_ref issue. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
- // estData.joblines.data[indexInEstData].act_price = 0;
- // estData.joblines.data[indexInEstData].db_price = 0;
- // });
- // })
- // }})
+ InstanceRenderManager({
+ executeFunction: true,
+ args: [],
+ promanager: () => {
+ const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
+ Object.keys(groupedByLineRef).forEach((lineRef) => {
+ let index0ActPrice;
+ groupedByLineRef[lineRef].forEach((line, index) => {
+ //Let the first one keep it
+ if (index === 0) {
+ index0ActPrice = line.act_price;
+ return;
+ }
+ //Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
+ if (line.unq_seq === 0) return;
+ if (index0ActPrice !== line.act_price) {
+ // line.notes += ` | Price override.`;
+ return;
+ }
+ const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
+ //estData.joblines.data[indexInEstData].notes +=
+ // ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
+ estData.joblines.data[indexInEstData].act_price = 0;
+ estData.joblines.data[indexInEstData].db_price = 0;
+ });
+ });
+ }
+ });
InstanceRenderManager({
executeFunction: true,
diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
index 649f49584..e9e842d6a 100644
--- a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
+++ b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
@@ -1,5 +1,5 @@
import { EditFilled } from "@ant-design/icons";
-import { Card, Col, Row, Space, Table, Typography } from "antd";
+import { Alert, Card, Col, Row, Space, Table, Typography } from "antd";
import _ from "lodash";
import React, { useEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -18,7 +18,17 @@ const mapStateToProps = createStructuredSelector({
technician: selectTechnician
});
-export function LaborAllocationsTable({ jobId, joblines, timetickets, bodyshop, adjustments, technician }) {
+export function LaborAllocationsTable({
+ jobId,
+ joblines,
+ timetickets,
+ bodyshop,
+ adjustments,
+ technician,
+ showWarning,
+ warningCallback,
+ disabled
+}) {
const { t } = useTranslation();
const [totals, setTotals] = useState([]);
const [state, setState] = useState({
@@ -73,7 +83,7 @@ export function LaborAllocationsTable({ jobId, joblines, timetickets, bodyshop,
render: (text, record) => (
{record.adjustments.toFixed(1)}
- {!technician && (
+ {!technician && !disabled && (
@@ -227,6 +241,9 @@ export function LaborAllocationsTable({ jobId, joblines, timetickets, bodyshop,
)}
+ {showWarning && summary.difference !== 0 && (
+
+ )}
);
}
diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
index 164c75fb2..3e8adc17b 100644
--- a/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
+++ b/client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
@@ -1,4 +1,4 @@
-import { Button, Card, Col, notification, Row, Space, Table, Typography } from "antd";
+import { Alert, Button, Card, Col, notification, Row, Space, Table, Typography } from "antd";
import { SyncOutlined } from "@ant-design/icons";
import axios from "axios";
import _ from "lodash";
@@ -23,7 +23,9 @@ export function PayrollLaborAllocationsTable({
bodyshop,
adjustments,
technician,
- refetch
+ refetch,
+ showWarning,
+ warningCallback
}) {
const { t } = useTranslation();
const [totals, setTotals] = useState([]);
@@ -191,6 +193,10 @@ export function PayrollLaborAllocationsTable({
{ hrs_total: 0, hrs_claimed: 0, adjustments: 0, difference: 0 }
);
+ if (summary.difference !== 0 && typeof warningCallback === "function") {
+ warningCallback({ key: "labor", warning: t("jobs.labels.outstandinghours") });
+ }
+
return (
@@ -285,6 +291,9 @@ export function PayrollLaborAllocationsTable({
)}
+ {showWarning && summary.difference !== 0 && (
+
+ )}
);
}
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 946b29bad..86ab18aac 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
@@ -182,7 +182,7 @@ export function PartsOrderModalComponent({ bodyshop, vendorList, sendTypeState,
}
]}
>
-
+
({
setPaymentContext: (context) => dispatch(setModalContext({ context: context, modal: "payment" }))
});
-const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentContext, currentUser }) => {
+const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentContext, currentUser, paymentModal }) => {
const { t } = useTranslation();
const [insertExportLog, { loading: exportLogLoading }] = useMutation(INSERT_EXPORT_LOG);
const [updatePayment, { loading: updatePaymentLoading }] = useMutation(UPDATE_PAYMENT);
@@ -56,16 +58,21 @@ const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentCont
refetch
},
context: {
+ ...paymentModal.context,
+ ...paymentModal.context,
...payment,
+ smartRefetch: true,
exportedat: today
}
});
- if (refetch)
- refetch(
- paymentUpdateResponse &&
- paymentUpdateResponse.data.update_payments.returning[0]
- );
+ if (refetch) {
+ if (paymentModal.context.refetchRequiresContext) {
+ refetch(paymentUpdateResponse && paymentUpdateResponse.data.update_payments.returning[0]);
+ } else {
+ refetch();
+ }
+ }
} else {
notification["error"]({
message: t("payments.errors.exporting", {
diff --git a/client/src/components/payment-modal/payment-modal.container.jsx b/client/src/components/payment-modal/payment-modal.container.jsx
index 1502f1e48..6535005d2 100644
--- a/client/src/components/payment-modal/payment-modal.container.jsx
+++ b/client/src/components/payment-modal/payment-modal.container.jsx
@@ -1,33 +1,30 @@
-import { useMutation } from "@apollo/client";
-
-import { Button, Form, Modal, notification, Space } from "antd";
-import React, { useEffect, useState } from "react";
-import { useTranslation } from "react-i18next";
-import { connect } from "react-redux";
-import { createStructuredSelector } from "reselect";
-import { INSERT_NEW_PAYMENT, UPDATE_PAYMENT } from "../../graphql/payments.queries";
-import { setEmailOptions } from "../../redux/email/email.actions";
-import { toggleModalVisible } from "../../redux/modals/modals.actions";
-import { selectPayment } from "../../redux/modals/modals.selectors";
-import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
-import { GenerateDocument } from "../../utils/RenderTemplate";
-import { TemplateList } from "../../utils/TemplateConstants";
+import {useMutation} from "@apollo/client";
+import {Button, Form, Modal, notification, Space} from "antd";
+import React, {useEffect, useState} from "react";
+import {useTranslation} from "react-i18next";
+import {connect} from "react-redux";
+import {createStructuredSelector} from "reselect";
+import {INSERT_NEW_PAYMENT, UPDATE_PAYMENT} from "../../graphql/payments.queries";
+import {toggleModalVisible} from "../../redux/modals/modals.actions";
+import {selectPayment} from "../../redux/modals/modals.selectors";
+import {selectBodyshop} from "../../redux/user/user.selectors";
+import {GenerateDocument} from "../../utils/RenderTemplate";
+import {TemplateList} from "../../utils/TemplateConstants";
import PaymentForm from "../payment-form/payment-form.component";
-import PaymentMarkForExportButton from "../payment-mark-export-button/payment-mark-export-button-component";
+import PaymentMarkForExportButton
+ from "../payment-mark-export-button/payment-mark-export-button-component";
import PaymentReexportButton from "../payment-reexport-button/payment-reexport-button.component";
const mapStateToProps = createStructuredSelector({
paymentModal: selectPayment,
bodyshop: selectBodyshop,
- currentUser: selectCurrentUser
});
const mapDispatchToProps = (dispatch) => ({
- setEmailOptions: (e) => dispatch(setEmailOptions(e)),
toggleModalVisible: () => dispatch(toggleModalVisible("payment"))
});
-function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, currentUser, setEmailOptions }) {
+function PaymentModalContainer({paymentModal, toggleModalVisible, bodyshop }) {
const [form] = Form.useForm();
const [enterAgain, setEnterAgain] = useState(false);
const [insertPayment] = useMutation(INSERT_NEW_PAYMENT);
@@ -35,7 +32,6 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
const { t } = useTranslation();
const { context, actions, open } = paymentModal;
-
const [loading, setLoading] = useState(false);
const handleFinish = async (values) => {
@@ -85,13 +81,19 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
});
if (!!!updatedPayment.errors) {
- notification["success"]({ message: t("payments.successes.payment") });
+ notification["success"]({ message: t("payments.successes.paymentupdate") });
} else {
- notification["error"]({ message: t("payments.errors.payment") });
+ notification["error"]({ message: t("payments.errors.paymentupdate") });
}
}
- if (actions.refetch) actions.refetch(updatedPayment && updatedPayment.data.update_payments.returning[0]);
+ if (actions.refetch) {
+ if (context.refetchRequiresContext) {
+ actions.refetch(updatedPayment && updatedPayment.data.update_payments.returning[0]);
+ } else {
+ actions.refetch();
+ }
+ }
if (enterAgain) {
const prev = form.getFieldsValue(["date"]);
@@ -166,13 +168,7 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
)}
-
diff --git a/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx b/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx
index 5325231e4..3abd5bfd5 100644
--- a/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx
+++ b/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx
@@ -3,14 +3,20 @@ import { Button, notification } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
+import { createStructuredSelector } from "reselect";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
+import { selectPayment } from "../../redux/modals/modals.selectors";
+
+const mapStateToProps = createStructuredSelector({
+ paymentModal: selectPayment
+});
const mapDispatchToProps = (dispatch) => ({
setPaymentContext: (context) => dispatch(setModalContext({ context: context, modal: "payment" }))
});
-const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
+const PaymentReexportButton = ({ paymentModal, payment, refetch, setPaymentContext }) => {
const { t } = useTranslation();
const [updatePayment, { loading }] = useMutation(UPDATE_PAYMENT);
@@ -34,15 +40,20 @@ const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
refetch
},
context: {
+ ...paymentModal.context,
+ ...paymentModal.context,
...payment,
exportedat: null
}
});
- if (refetch)
- refetch(
- paymentUpdateResponse &&
- paymentUpdateResponse.data.update_payments.returning[0]
- );
+
+ if (refetch) {
+ if (paymentModal.context.refetchRequiresContext) {
+ refetch(paymentUpdateResponse && paymentUpdateResponse.data.update_payments.returning[0]);
+ } else {
+ refetch();
+ }
+ }
} else {
notification["error"]({
message: t("payments.errors.exporting", {
@@ -59,4 +70,4 @@ const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
);
};
-export default connect(null, mapDispatchToProps)(PaymentReexportButton);
+export default connect(mapStateToProps, mapDispatchToProps)(PaymentReexportButton);
diff --git a/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx b/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx
index 1a5dd6774..c325c0f7a 100644
--- a/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx
+++ b/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx
@@ -14,11 +14,11 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
import { TemplateList } from "../../utils/TemplateConstants";
+import { pageLimit } from "../../utils/config";
import { alphaSort } from "../../utils/sorters";
import CaBcEtfTableModalContainer from "../ca-bc-etf-table-modal/ca-bc-etf-table-modal.container";
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
-import { pageLimit } from "../../utils/config";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -171,7 +171,7 @@ export function PaymentsListPaginated({
}
: refetch
},
- context: apolloResults ? apolloResults : record
+ context: { ...(apolloResults ? apolloResults : record), refetchRequiresContext: true }
});
}}
>
diff --git a/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx b/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
index fd53d25ab..6639f14f3 100644
--- a/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
+++ b/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
@@ -1,4 +1,13 @@
-import { Button, Card, Form, InputNumber, notification, Popover, Radio } from "antd";
+import {
+ Button,
+ Card,
+ Form,
+ InputNumber,
+ notification,
+ Popover,
+ Radio,
+ Space,
+} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -95,10 +104,16 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
>
-
-
+
+
+
+
+
+
);
diff --git a/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.jsx b/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.jsx
index 7acbd6668..fd0d6cb2f 100644
--- a/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.jsx
+++ b/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.jsx
@@ -59,25 +59,33 @@ export function ScheduleCalendarHeaderComponent({
{loadData && loadData.allJobsOut ? (
loadData.allJobsOut.map((j) => (
- |
- {j.ro_number}
+ |
+ {j.ro_number} (
+ {j.status})
|
-
+ |
|
-
- {`(${(j.labhrs.aggregate.sum.mod_lb_hrs + j.larhrs.aggregate.sum.mod_lb_hrs).toFixed(
+ |
+ {`(${j.labhrs.aggregate.sum.mod_lb_hrs.toFixed(
1
- )} ${t("general.labels.hours")})`}
+ )}/${j.larhrs.aggregate.sum.mod_lb_hrs.toFixed(1)}/${(
+ j.labhrs.aggregate.sum.mod_lb_hrs +
+ j.larhrs.aggregate.sum.mod_lb_hrs
+ ).toFixed(1)} ${t("general.labels.hours")})`}
|
-
- {j.scheduled_completion}
+ |
+
+ {j.scheduled_completion}
+
|
))
) : (
- | {t("appointments.labels.nocompletingjobs")} |
+
+ {t("appointments.labels.nocompletingjobs")}
+ |
)}
@@ -92,26 +100,30 @@ export function ScheduleCalendarHeaderComponent({
{loadData && loadData.allJobsIn ? (
loadData.allJobsIn.map((j) => (
- |
+ |
{j.ro_number}
- {j.status}
|
-
+ |
|
-
- {`(${(j.labhrs.aggregate.sum.mod_lb_hrs + j.larhrs.aggregate.sum.mod_lb_hrs).toFixed(
+ |
+ {`(${j.labhrs.aggregate.sum.mod_lb_hrs.toFixed(
1
- )} ${t("general.labels.hours")})`}
+ )}/${j.larhrs.aggregate.sum.mod_lb_hrs.toFixed(1)}/${(
+ j.labhrs.aggregate.sum.mod_lb_hrs +
+ j.larhrs.aggregate.sum.mod_lb_hrs
+ ).toFixed(1)} ${t("general.labels.hours")})`}
|
-
+ |
{j.scheduled_in}
|
))
) : (
- | {t("appointments.labels.noarrivingjobs")} |
+
+ {t("appointments.labels.noarrivingjobs")}
+ |
)}
@@ -121,27 +133,33 @@ export function ScheduleCalendarHeaderComponent({
const LoadComponent = loadData ? (
-
-
-
- {(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(2)}
-
-
-
- {(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(2)}
-
-
-
+
+
+
+ {(loadData.allHoursInBody || 0) &&
+ loadData.allHoursInBody.toFixed(1)}
+ /
+ {(loadData.allHoursInRefinish || 0) &&
+ loadData.allHoursInRefinish.toFixed(1)}
+ /{(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(1)}
+
+
+
+ {(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(1)}
+
+
+
+
{Object.keys(ATSToday).map((key, idx) => (
diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx
index 90f4a5034..fd9ba96a8 100644
--- a/client/src/components/shop-info/shop-info.component.jsx
+++ b/client/src/components/shop-info/shop-info.component.jsx
@@ -1,24 +1,25 @@
-import { useSplitTreatments } from "@splitsoftware/splitio-react";
-import { Button, Card, Tabs } 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 ShopInfoGeneral from "./shop-info.general.component";
-import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
-import ShopInfoLaborRates from "./shop-info.laborrates.component";
-import ShopInfoOrderStatusComponent from "./shop-info.orderstatus.component";
-import ShopInfoPartsScan from "./shop-info.parts-scan";
-import ShopInfoRbacComponent from "./shop-info.rbac.component";
-import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycenters.component";
-import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
-import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
-import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
-import { useLocation, useNavigate } from "react-router-dom";
-import ShopInfoTaskPresets from "./shop-info.task-presets.component";
-import queryString from "query-string";
-import InstanceRenderManager from "../../utils/instanceRenderMgr";
+import { useSplitTreatments } from '@splitsoftware/splitio-react';
+import { Button, Card, Tabs } 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 ShopInfoGeneral from './shop-info.general.component';
+import ShopInfoIntakeChecklistComponent from './shop-info.intake.component';
+import ShopInfoLaborRates from './shop-info.laborrates.component';
+import ShopInfoOrderStatusComponent from './shop-info.orderstatus.component';
+import ShopInfoPartsScan from './shop-info.parts-scan';
+import ShopInfoRbacComponent from './shop-info.rbac.component';
+import ShopInfoResponsibilityCenterComponent from './shop-info.responsibilitycenters.component';
+import ShopInfoROStatusComponent from './shop-info.rostatus.component';
+import ShopInfoSchedulingComponent from './shop-info.scheduling.component';
+import ShopInfoSpeedPrint from './shop-info.speedprint.component';
+import { useLocation, useNavigate } from 'react-router-dom';
+import ShopInfoTaskPresets from './shop-info.task-presets.component';
+import queryString from 'query-string';
+import InstanceRenderManager from '../../utils/instanceRenderMgr';
+import ShopInfoRoGuard from './shop-info.roguard.component';
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -111,7 +112,18 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
children:
}
]
- : [])
+ : []),
+ ...InstanceRenderManager({
+ imex: [
+ {
+ key: 'roguard',
+ label: t('bodyshop.labels.roguard.title'),
+ children: ,
+ },
+ ],
+ rome: 'USE_IMEX',
+ promanager: [],
+ }),
];
return (
+
+
+
+
+
+
+ {() => {
+ const disabled = !form.getFieldValue(["md_ro_guard", "enabled"]);
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {InstanceRenderManager({
+ rome: (
+
+
+
+ )
+ })}
+
+
+
+
+
+ );
+ }}
+
+
+ );
+}
diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js
index e1d5b93e1..6bbafe6e3 100644
--- a/client/src/graphql/bodyshop.queries.js
+++ b/client/src/graphql/bodyshop.queries.js
@@ -138,6 +138,7 @@ export const QUERY_BODYSHOP = gql`
tt_enforce_hours_for_tech_console
md_tasks_presets
use_paint_scale_data
+ md_ro_guard
employee_teams(order_by: { name: asc }, where: { active: { _eq: true } }) {
id
name
@@ -265,6 +266,7 @@ export const UPDATE_SHOP = gql`
enforce_conversion_category
tt_enforce_hours_for_tech_console
md_tasks_presets
+ md_ro_guard
employee_teams(order_by: { name: asc }, where: { active: { _eq: true } }) {
id
name
diff --git a/client/src/graphql/courtesy-car.queries.js b/client/src/graphql/courtesy-car.queries.js
index 173cb4e19..a7433e940 100644
--- a/client/src/graphql/courtesy-car.queries.js
+++ b/client/src/graphql/courtesy-car.queries.js
@@ -41,7 +41,7 @@ export const QUERY_AVAILABLE_CC = gql`
`;
export const CHECK_CC_FLEET_NUMBER = gql`
- query CHECK_VENDOR_NAME($name: String!) {
+ query CHECK_CC_FLEET_NUMBER($name: String!) {
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
aggregate {
count
diff --git a/client/src/graphql/jobs-lines.queries.js b/client/src/graphql/jobs-lines.queries.js
index bb7b7cf20..b755ee705 100644
--- a/client/src/graphql/jobs-lines.queries.js
+++ b/client/src/graphql/jobs-lines.queries.js
@@ -219,6 +219,12 @@ export const UPDATE_JOB_LINE = gql`
id
notes
mod_lbr_ty
+ mod_lb_hrs
+ part_type
+ op_code_desc
+ prt_dsmk_m
+ prt_dsmk_p
+ tax_part
part_qty
db_price
act_price
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 1dd4ea175..ed0415b0a 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -1969,6 +1969,19 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
kmout
qb_multiple_payers
lbr_adjustments
+ payments {
+ amount
+ created_at
+ date
+ exportedat
+ id
+ jobid
+ memo
+ payer
+ paymentnum
+ transactionid
+ type
+ }
joblines(where: { removed: { _eq: false } }, order_by: { line_no: asc }) {
id
removed
@@ -1981,6 +1994,7 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
db_price
act_price
part_qty
+ notes
mod_lbr_ty
db_hrs
mod_lb_hrs
@@ -1992,6 +2006,9 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
prt_dsmk_p
convertedtolbr
convertedtolbr_data
+ act_price_before_ppc
+ sublet_ignored
+ sublet_completed
}
}
}
@@ -2221,6 +2238,8 @@ export const GET_JOB_LINE_ORDERS = gql`
parts_order_lines(where: { job_line_id: { _eq: $joblineid } }) {
id
act_price
+ backordered_eta
+ backordered_on
parts_order {
id
order_date
diff --git a/client/src/pages/bills/bills.page.component.jsx b/client/src/pages/bills/bills.page.component.jsx
index eba2096d6..175f6a5c0 100644
--- a/client/src/pages/bills/bills.page.component.jsx
+++ b/client/src/pages/bills/bills.page.component.jsx
@@ -216,7 +216,7 @@ export function BillsListPage({ loading, data, refetch, total, setPartsOrderCont
extra={
{search.search && (
- <>
+
{t("general.labels.searchresults", { search: search.search })}
@@ -229,7 +229,7 @@ export function BillsListPage({ loading, data, refetch, total, setPartsOrderCont
>
{t("general.actions.clear")}
- >
+
)}
}
/>
-
+
{!job.actual_in && job.scheduled_in && }
diff --git a/client/src/redux/application/application.sagas.js b/client/src/redux/application/application.sagas.js
index 3aca6fa5d..a07c5a244 100644
--- a/client/src/redux/application/application.sagas.js
+++ b/client/src/redux/application/application.sagas.js
@@ -111,7 +111,12 @@ export function* calculateScheduleLoad({ payload: end }) {
(load[itemDate].allHoursIn || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
-
+ load[itemDate].allHoursInBody =
+ (load[itemDate].allHoursInBody || 0) +
+ item.labhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].allHoursInRefinish =
+ (load[itemDate].allHoursInRefinish || 0) +
+ item.larhrs.aggregate.sum.mod_lb_hrs;
//If the job hasn't already arrived, add it to the jobs in list.
// Make sure it also hasn't already been completed, or isn't an in and out job.
//This prevents the duplicate counting.
@@ -119,7 +124,15 @@ export function* calculateScheduleLoad({ payload: end }) {
if (AddJobForSchedulingCalc) {
load[itemDate].jobsIn.push(item);
load[itemDate].hoursIn =
- (load[itemDate].hoursIn || 0) + item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs;
+ (load[itemDate].hoursIn || 0) +
+ item.labhrs.aggregate.sum.mod_lb_hrs +
+ item.larhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].hoursInBody =
+ (load[itemDate].hoursInBody || 0) +
+ item.labhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].hoursInRefinish =
+ (load[itemDate].hoursInRefinish || 0) +
+ item.larhrs.aggregate.sum.mod_lb_hrs;
}
} else {
load[itemDate] = {
@@ -127,10 +140,21 @@ export function* calculateScheduleLoad({ payload: end }) {
jobsIn: AddJobForSchedulingCalc ? [item] : [], //Same as above, only add it if it isn't already in production.
jobsOut: [],
allJobsOut: [],
- allHoursIn: item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs,
+ allHoursIn:
+ item.labhrs.aggregate.sum.mod_lb_hrs +
+ item.larhrs.aggregate.sum.mod_lb_hrs,
+ allHoursInBody: item.labhrs.aggregate.sum.mod_lb_hrs,
+ allHoursInRefinish: item.larhrs.aggregate.sum.mod_lb_hrs,
hoursIn: AddJobForSchedulingCalc
- ? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
- : 0
+ ? item.labhrs.aggregate.sum.mod_lb_hrs +
+ item.larhrs.aggregate.sum.mod_lb_hrs
+ : 0,
+ hoursInBody: AddJobForSchedulingCalc
+ ? item.labhrs.aggregate.sum.mod_lb_hrs
+ : 0,
+ hoursInRefinish: AddJobForSchedulingCalc
+ ? item.larhrs.aggregate.sum.mod_lb_hrs
+ : 0,
};
}
});
@@ -151,6 +175,12 @@ export function* calculateScheduleLoad({ payload: end }) {
(load[itemDate].allHoursOut || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].allHoursOutBody =
+ (load[itemDate].allHoursOutBody || 0) +
+ item.labhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].allHoursOutRefinish =
+ (load[itemDate].allHoursOutRefinish || 0) +
+ item.larhrs.aggregate.sum.mod_lb_hrs;
//Add only the jobs that are still in production to get rid of.
//If it's not in production, we'd subtract unnecessarily.
load[itemDate].allJobsOut.push(item);
@@ -161,6 +191,12 @@ export function* calculateScheduleLoad({ payload: end }) {
(load[itemDate].hoursOut || 0) +
item.labhrs.aggregate.sum.mod_lb_hrs +
item.larhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].hoursOutBody =
+ (load[itemDate].hoursOutBody || 0) +
+ item.labhrs.aggregate.sum.mod_lb_hrs;
+ load[itemDate].hoursOutRefinish =
+ (load[itemDate].hoursOutRefinish || 0) +
+ item.larhrs.aggregate.sum.mod_lb_hrs;
}
} else {
load[itemDate] = {
@@ -169,7 +205,11 @@ export function* calculateScheduleLoad({ payload: end }) {
hoursOut: AddJobForSchedulingCalc
? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
: 0,
- allHoursOut: item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
+ allHoursOut:
+ item.labhrs.aggregate.sum.mod_lb_hrs +
+ item.larhrs.aggregate.sum.mod_lb_hrs,
+ allHoursOutBody: item.labhrs.aggregate.sum.mod_lb_hrs,
+ allHoursOutRefinish: item.larhrs.aggregate.sum.mod_lb_hrs,
};
}
});
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 804a6fc90..74a51fa23 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -116,6 +116,7 @@
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
+ "jobclosedwithbypass": "Job was invoiced using the master bypass password. ",
"jobconverted": "Job converted and assigned number {{ro_number}}.",
"jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.",
"jobexported": "",
@@ -223,8 +224,9 @@
"markexported": "Mark Exported",
"markforreexport": "Mark for Re-export",
"new": "New Bill",
+ "nobilllines": "This part has not yet been recieved.",
"noneselected": "No bill selected.",
- "onlycmforinvoiced": "Only credit memos can be entered for any Job that has been invoiced, exported, or voided.",
+ "onlycmforinvoiced": "Only credit memos can be entered for any Job that has been invoiced, exported, or voided.",
"printlabels": "Print Labels",
"retailtotal": "Bills Retail Total",
"savewithdiscrepancy": "You are about to save this bill with a discrepancy. The system will continue to use the calculated amount using the bill lines. Press cancel to return to the bill.",
@@ -367,6 +369,18 @@
},
"md_payment_types": "Payment Types",
"md_referral_sources": "Referral Sources",
+ "md_ro_guard": {
+ "enabled": "RO Guard Enabled?",
+ "enforce_ar": "Enforce AR Balance",
+ "enforce_bills": "Enforce Bill Discrepancy",
+ "enforce_cm": "Enforce Credit Memo Entry",
+ "enforce_labor": "Enforce Labor Allocation",
+ "enforce_ppd": "Enforce PPD Sync",
+ "enforce_profit": "Enforce Profit Requirement",
+ "enforce_sublet": "Enforce Sublet Completion",
+ "masterbypass": "Master Bypass Password (not encrypted)",
+ "totalgppercent_minimum": "Minimum Total Gross Profit %"
+ },
"md_tasks_presets": {
"enable_tasks": "Enable Hour Flagging",
"hourstype": "Hour Types",
@@ -639,6 +653,7 @@
"laborrates": "Labor Rates",
"licensing": "Licensing",
"md_parts_scan": "Parts Scan Rules",
+ "md_ro_guard": "RO Guard",
"md_tasks_presets": "Tasks Presets",
"md_to_emails": "Preset To Emails",
"md_to_emails_emails": "Emails",
@@ -660,6 +675,9 @@
"tax_accounts": "Tax Accounts",
"title": "Responsibility Centers"
},
+ "roguard": {
+ "title": "RO Guard"
+ },
"scheduling": "SMART Scheduling",
"scoreboardsetup": "Scoreboard Setup",
"shopinfo": "Shop Information",
@@ -1356,6 +1374,7 @@
},
"fields": {
"act_price": "Retail Price",
+ "act_price_before_ppc": "Original Part Price",
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
"assigned_team": "Team",
"assigned_team_name": "Team {{name}}",
@@ -1825,6 +1844,7 @@
"scheddates": "Schedule Dates"
},
"labels": {
+ "accountsreceivable": "Accounts Receivable",
"act_price_ppc": "New Part Price",
"actual_completion_inferred": "$t(jobs.fields.actual_completion) inferred using $t(jobs.fields.scheduled_completion).",
"actual_delivery_inferred": "$t(jobs.fields.actual_delivery) inferred using $t(jobs.fields.scheduled_delivery).",
@@ -1944,6 +1964,7 @@
"mapa": "Paint Materials",
"markforreexport": "Mark for Re-export",
"mash": "Shop Materials",
+ "masterbypass": "Master Bypass Password",
"materials": {
"mapa": ""
},
@@ -1952,6 +1973,12 @@
"net_repairs": "Net Repairs",
"notes": "Notes",
"othertotal": "Other Totals",
+ "outstanding_ar": "A balance is outstanding on this RO. Payments can still be entered when the job is closed. ",
+ "outstanding_credit_memos": "Outstanding credit memos have not been entered against this job. Credit Memos may still be posted once the job is closed.",
+ "outstanding_ppd": "There are outstanding PPDs that may not have been synced back to the estimate.",
+ "outstanding_reconciliation_discrep": "At least one discrepancy is not $0. This may indicate that this job is not properly reconciled and should not be closed.",
+ "outstanding_sublets": "There are sublet lines on the job which have not been marked as completed. ",
+ "outstandinghours": "There are outstanding hours on the job that have not been paid or have been overpaid.",
"override_header": "Override estimate header on import?",
"ownerassociation": "Owner Association",
"parts": "Parts",
@@ -1961,6 +1988,7 @@
"partsfilter": "Parts Only",
"partssubletstotal": "Parts & Sublets Total",
"partstotal": "Parts Total (ex. Taxes)",
+ "performance": "Performance",
"pimraryamountpayable": "Total Primary Payable",
"plitooltips": {
"billtotal": "The total amount of all bill lines that have been posted against this RO (not including credits, taxes, or labor adjustments).",
@@ -1975,7 +2003,10 @@
"totalreturns": "The total retail amount of returns created for this job."
},
"ppc": "This line contains a part price change.",
+ "ppdnotexported": "PPDs not Exported",
"profileadjustments": "Profile Disc./Mkup",
+ "profitbypassrequired": "Minimum gross profit requirements have not been met.",
+ "profits": "Job Profits",
"prt_dsmk_total": "Line Item Adjustment",
"rates": "Rates",
"rates_subtotal": "All Rates Subtotal",
@@ -1995,6 +2026,19 @@
"relatedros": "Related ROs",
"remove_from_ar": "Remove from AR",
"returntotals": "Return Totals",
+ "ro_guard": {
+ "enforce_ar": "AR collection enforced.",
+ "enforce_bills": "Bill discrepancy enforced.",
+ "enforce_cm": "Credit memo entry enforced.",
+ "enforce_labor": "Labor allocations enforced.",
+ "enforce_ppd": "PPD sync enforced.",
+ "enforce_profit": "Profit margins enforced.",
+ "enforce_sublet": "Sublet completion enforced.",
+ "enforce_validation": "Master Bypass Required: {{message}}",
+ "enforced": "This check has been enforced by your shop manager. Enter the master bypass password to close the Job."
+ },
+ "roguard": "RO Guard",
+ "roguardwarnings": "RO Guard Warnings",
"rosaletotal": "RO Parts Total",
"sale_additional": "Sales - Additional",
"sale_labor": "Sales - Labor",
@@ -2005,6 +2049,7 @@
"scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the Job. ",
"specialcoveragepolicy": "Special Coverage Policy Applies",
"state_tax_amt": "Provincial/State Taxes",
+ "subletsnotcompleted": "Outstanding Sublets",
"subletstotal": "Sublets Total",
"subtotal": "Subtotal",
"supplementnote": "The Job had a supplement imported.",
@@ -2462,6 +2507,7 @@
"markexported": "Payment(s) marked exported.",
"markreexported": "Payment marked for re-export successfully",
"payment": "Payment created successfully. ",
+ "paymentupdate": "Payment updated successfully. ",
"stripe": "Credit card transaction charged successfully."
}
},
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 06ed0e4b9..5edd152fa 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -116,6 +116,7 @@
"jobassignmentchange": "",
"jobassignmentremoved": "",
"jobchecklist": "",
+ "jobclosedwithbypass": "",
"jobconverted": "",
"jobdelivery": "",
"jobexported": "",
@@ -367,6 +368,18 @@
},
"md_payment_types": "",
"md_referral_sources": "",
+ "md_ro_guard": {
+ "enabled": "",
+ "enforce_ar": "",
+ "enforce_bills": "",
+ "enforce_cm": "",
+ "enforce_labor": "",
+ "enforce_ppd": "",
+ "enforce_profit": "",
+ "enforce_sublet": "",
+ "masterbypass": "",
+ "totalgppercent_minimum": ""
+ },
"md_tasks_presets": {
"enable_tasks": "",
"hourstype": "",
@@ -639,6 +652,7 @@
"laborrates": "",
"licensing": "",
"md_parts_scan": "",
+ "md_ro_guard": "",
"md_tasks_presets": "",
"md_to_emails": "",
"md_to_emails_emails": "",
@@ -660,6 +674,9 @@
"tax_accounts": "",
"title": ""
},
+ "roguard": {
+ "title": ""
+ },
"scheduling": "",
"scoreboardsetup": "",
"shopinfo": "",
@@ -1356,6 +1373,7 @@
},
"fields": {
"act_price": "Precio actual",
+ "act_price_before_ppc": "",
"ah_detail_line": "",
"assigned_team": "",
"assigned_team_name": "",
@@ -1825,6 +1843,7 @@
"scheddates": ""
},
"labels": {
+ "accountsreceivable": "",
"act_price_ppc": "",
"actual_completion_inferred": "",
"actual_delivery_inferred": "",
@@ -1944,6 +1963,7 @@
"mapa": "",
"markforreexport": "",
"mash": "",
+ "masterbypass": "",
"materials": {
"mapa": ""
},
@@ -1952,6 +1972,12 @@
"net_repairs": "",
"notes": "Notas",
"othertotal": "",
+ "outstanding_ar": "",
+ "outstanding_credit_memos": "",
+ "outstanding_ppd": "",
+ "outstanding_reconciliation_discrep": "",
+ "outstanding_sublets": "",
+ "outstandinghours": "",
"override_header": "¿Anular encabezado estimado al importar?",
"ownerassociation": "",
"parts": "Partes",
@@ -1961,6 +1987,7 @@
"partsfilter": "",
"partssubletstotal": "",
"partstotal": "",
+ "performance": "",
"pimraryamountpayable": "",
"plitooltips": {
"billtotal": "",
@@ -1975,7 +2002,10 @@
"totalreturns": ""
},
"ppc": "",
+ "ppdnotexported": "",
"profileadjustments": "",
+ "profitbypassrequired": "",
+ "profits": "",
"prt_dsmk_total": "",
"rates": "Tarifas",
"rates_subtotal": "",
@@ -1995,6 +2025,19 @@
"relatedros": "",
"remove_from_ar": "",
"returntotals": "",
+ "ro_guard": {
+ "enforce_ar": "",
+ "enforce_bills": "",
+ "enforce_cm": "",
+ "enforce_labor": "",
+ "enforce_ppd": "",
+ "enforce_profit": "",
+ "enforce_sublet": "",
+ "enforce_validation": "",
+ "enforced": ""
+ },
+ "roguard": "",
+ "roguardwarnings": "",
"rosaletotal": "",
"sale_additional": "",
"sale_labor": "",
@@ -2005,6 +2048,7 @@
"scheduledinchange": "",
"specialcoveragepolicy": "",
"state_tax_amt": "",
+ "subletsnotcompleted": "",
"subletstotal": "",
"subtotal": "",
"supplementnote": "",
@@ -2462,6 +2506,7 @@
"markexported": "",
"markreexported": "",
"payment": "",
+ "paymentupdate": "",
"stripe": ""
}
},
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 120a39d8d..22329414b 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -116,6 +116,7 @@
"jobassignmentchange": "",
"jobassignmentremoved": "",
"jobchecklist": "",
+ "jobclosedwithbypass": "",
"jobconverted": "",
"jobdelivery": "",
"jobexported": "",
@@ -367,6 +368,18 @@
},
"md_payment_types": "",
"md_referral_sources": "",
+ "md_ro_guard": {
+ "enabled": "",
+ "enforce_ar": "",
+ "enforce_bills": "",
+ "enforce_cm": "",
+ "enforce_labor": "",
+ "enforce_ppd": "",
+ "enforce_profit": "",
+ "enforce_sublet": "",
+ "masterbypass": "",
+ "totalgppercent_minimum": ""
+ },
"md_tasks_presets": {
"enable_tasks": "",
"hourstype": "",
@@ -639,6 +652,7 @@
"laborrates": "",
"licensing": "",
"md_parts_scan": "",
+ "md_ro_guard": "",
"md_tasks_presets": "",
"md_to_emails": "",
"md_to_emails_emails": "",
@@ -660,6 +674,9 @@
"tax_accounts": "",
"title": ""
},
+ "roguard": {
+ "title": ""
+ },
"scheduling": "",
"scoreboardsetup": "",
"shopinfo": "",
@@ -1356,6 +1373,7 @@
},
"fields": {
"act_price": "Prix actuel",
+ "act_price_before_ppc": "",
"ah_detail_line": "",
"assigned_team": "",
"assigned_team_name": "",
@@ -1825,6 +1843,7 @@
"scheddates": ""
},
"labels": {
+ "accountsreceivable": "",
"act_price_ppc": "",
"actual_completion_inferred": "",
"actual_delivery_inferred": "",
@@ -1944,6 +1963,7 @@
"mapa": "",
"markforreexport": "",
"mash": "",
+ "masterbypass": "",
"materials": {
"mapa": ""
},
@@ -1952,6 +1972,12 @@
"net_repairs": "",
"notes": "Remarques",
"othertotal": "",
+ "outstanding_ar": "",
+ "outstanding_credit_memos": "",
+ "outstanding_ppd": "",
+ "outstanding_reconciliation_discrep": "",
+ "outstanding_sublets": "",
+ "outstandinghours": "",
"override_header": "Remplacer l'en-tête d'estimation à l'importation?",
"ownerassociation": "",
"parts": "les pièces",
@@ -1961,6 +1987,7 @@
"partsfilter": "",
"partssubletstotal": "",
"partstotal": "",
+ "performance": "",
"pimraryamountpayable": "",
"plitooltips": {
"billtotal": "",
@@ -1975,7 +2002,10 @@
"totalreturns": ""
},
"ppc": "",
+ "ppdnotexported": "",
"profileadjustments": "",
+ "profitbypassrequired": "",
+ "profits": "",
"prt_dsmk_total": "",
"rates": "Les taux",
"rates_subtotal": "",
@@ -1995,6 +2025,19 @@
"relatedros": "",
"remove_from_ar": "",
"returntotals": "",
+ "ro_guard": {
+ "enforce_ar": "",
+ "enforce_bills": "",
+ "enforce_cm": "",
+ "enforce_labor": "",
+ "enforce_ppd": "",
+ "enforce_profit": "",
+ "enforce_sublet": "",
+ "enforce_validation": "",
+ "enforced": ""
+ },
+ "roguard": "",
+ "roguardwarnings": "",
"rosaletotal": "",
"sale_additional": "",
"sale_labor": "",
@@ -2005,6 +2048,7 @@
"scheduledinchange": "",
"specialcoveragepolicy": "",
"state_tax_amt": "",
+ "subletsnotcompleted": "",
"subletstotal": "",
"subtotal": "",
"supplementnote": "",
@@ -2462,6 +2506,7 @@
"markexported": "",
"markreexported": "",
"payment": "",
+ "paymentupdate": "",
"stripe": ""
}
},
diff --git a/client/src/utils/AuditTrailMappings.js b/client/src/utils/AuditTrailMappings.js
index f2de52319..62f3d6133 100644
--- a/client/src/utils/AuditTrailMappings.js
+++ b/client/src/utils/AuditTrailMappings.js
@@ -24,6 +24,7 @@ const AuditTrailMapping = {
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
+ jobclosedwithbypass: () => i18n.t("audit_trail.messages.jobclosedwithbypass"),
jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
diff --git a/client/vite.config.js b/client/vite.config.js
index ab618e43b..3d9f3fb7b 100644
--- a/client/vite.config.js
+++ b/client/vite.config.js
@@ -5,6 +5,8 @@ import * as path from "path";
import * as url from "url";
import { defineConfig } from "vite";
import { ViteEjsPlugin } from "vite-plugin-ejs";
+import eslint from 'vite-plugin-eslint';
+
//import CompressionPlugin from 'vite-plugin-compression';
import { VitePWA } from "vite-plugin-pwa";
import InstanceRenderManager from "./src/utils/instanceRenderMgr";
@@ -100,7 +102,8 @@ export default defineConfig({
}
}),
reactVirtualized(),
- react()
+ react(),
+ eslint(),
// CompressionPlugin(), //Cloudfront already compresses assets, so not needed.
],
define: {
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index 516852dbc..67888b140 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -969,6 +969,7 @@
- md_rbac
- md_referral_sources
- md_responsibility_centers
+ - md_ro_guard
- md_ro_statuses
- md_tasks_presets
- md_to_emails
@@ -1068,6 +1069,7 @@
- md_rbac
- md_referral_sources
- md_responsibility_centers
+ - md_ro_guard
- md_ro_statuses
- md_tasks_presets
- md_to_emails
diff --git a/hasura/migrations/1712162752434_alter_table_public_bodyshops_add_column_md_ro_guard/down.sql b/hasura/migrations/1712162752434_alter_table_public_bodyshops_add_column_md_ro_guard/down.sql
new file mode 100644
index 000000000..8f554a895
--- /dev/null
+++ b/hasura/migrations/1712162752434_alter_table_public_bodyshops_add_column_md_ro_guard/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."bodyshops" add column "md_ro_guard" jsonb
+-- null default jsonb_build_object();
diff --git a/hasura/migrations/1712162752434_alter_table_public_bodyshops_add_column_md_ro_guard/up.sql b/hasura/migrations/1712162752434_alter_table_public_bodyshops_add_column_md_ro_guard/up.sql
new file mode 100644
index 000000000..a932a2446
--- /dev/null
+++ b/hasura/migrations/1712162752434_alter_table_public_bodyshops_add_column_md_ro_guard/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."bodyshops" add column "md_ro_guard" jsonb
+ null default jsonb_build_object();
diff --git a/package-lock.json b/package-lock.json
index 2418f4954..3b809e36f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -56,6 +56,7 @@
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2",
+ "prettier": "^3.2.5",
"source-map-explorer": "^2.5.2"
},
"engines": {
@@ -5900,6 +5901,21 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/prettier": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
+ "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
diff --git a/package.json b/package.json
index b99b6e4fe..249d3504c 100644
--- a/package.json
+++ b/package.json
@@ -66,6 +66,7 @@
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2",
+ "prettier": "^3.2.5",
"source-map-explorer": "^2.5.2"
}
}
diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js
index 700ea451d..7617099ff 100644
--- a/server/job/job-totals-USA.js
+++ b/server/job/job-totals-USA.js
@@ -924,9 +924,8 @@ function CalculateTaxesTotals(job, otherTotals) {
if (
thresholdAmount === 9999.99 ||
InstanceMgr({
- debug: true,
imex: false,
- rome: false,
+ rome: thresholdAmount === 0 && parseInt(tyCounter) === 1,
promanager: thresholdAmount === 0 && parseInt(tyCounter) === 1
})
) {