@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project be_version="2.7.1" version="1.2">
|
<babeledit_project version="1.2" be_version="2.7.1">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -1789,6 +1789,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>jobclosedwithbypass</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>jobconverted</name>
|
<name>jobconverted</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -34201,6 +34222,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>profitbypassrequired</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>profits</name>
|
<name>profits</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -34587,27 +34629,6 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>ro_guard</name>
|
<name>ro_guard</name>
|
||||||
<children>
|
<children>
|
||||||
<concept_node>
|
|
||||||
<name>eforce_profit</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>enforce_ar</name>
|
<name>enforce_ar</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -34713,6 +34734,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>enforce_profit</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>enforce_sublet</name>
|
<name>enforce_sublet</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Alert, Card, Col, Row, Space, Statistic, Tooltip, Typography } from 'antd';
|
import { Alert, Card, Col, Row, Space, Statistic, Tooltip, Typography } from "antd";
|
||||||
import Dinero from 'dinero.js';
|
import Dinero from "dinero.js";
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from "react-i18next";
|
||||||
import InstanceRenderManager from '../../utils/instanceRenderMgr';
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
import AlertComponent from '../alert/alert.component';
|
import AlertComponent from "../alert/alert.component";
|
||||||
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
|
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||||
import './job-bills-total.styles.scss';
|
import "./job-bills-total.styles.scss";
|
||||||
|
|
||||||
export default function JobBillsTotalComponent({
|
export default function JobBillsTotalComponent({
|
||||||
loading,
|
loading,
|
||||||
@@ -13,16 +13,16 @@ export default function JobBillsTotalComponent({
|
|||||||
partsOrders,
|
partsOrders,
|
||||||
jobTotals,
|
jobTotals,
|
||||||
showWarning,
|
showWarning,
|
||||||
warningCallback,
|
warningCallback
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
if (loading) return <LoadingSkeleton />;
|
if (loading) return <LoadingSkeleton />;
|
||||||
if (!!!jobTotals) {
|
if (!!!jobTotals) {
|
||||||
if (showWarning && warningCallback && typeof warningCallback === 'function') {
|
if (showWarning && warningCallback && typeof warningCallback === "function") {
|
||||||
warningCallback({ key: 'bills', warning: t('jobs.errors.nofinancial') });
|
warningCallback({ key: "bills", warning: t("jobs.errors.nofinancial") });
|
||||||
}
|
}
|
||||||
return <AlertComponent type="error" message={t('jobs.errors.nofinancial')} />;
|
return <AlertComponent type="error" message={t("jobs.errors.nofinancial")} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const totals = jobTotals;
|
const totals = jobTotals;
|
||||||
@@ -109,64 +109,60 @@ export default function JobBillsTotalComponent({
|
|||||||
const discrepWithCms = discrepWithLbrAdj.add(totalReturns);
|
const discrepWithCms = discrepWithLbrAdj.add(totalReturns);
|
||||||
const calculatedCreditsNotReceived = totalReturns.subtract(billCms); //billCms is tracked as a negative number.
|
const calculatedCreditsNotReceived = totalReturns.subtract(billCms); //billCms is tracked as a negative number.
|
||||||
|
|
||||||
if (showWarning && warningCallback && typeof warningCallback === 'function') {
|
if (showWarning && warningCallback && typeof warningCallback === "function") {
|
||||||
if (
|
if (discrepWithCms.getAmount() !== 0) {
|
||||||
discrepWithCms.getAmount() !== 0 ||
|
|
||||||
discrepWithLbrAdj.getAmount() !== 0 ||
|
|
||||||
discrepancy.getAmount() !== 0
|
|
||||||
) {
|
|
||||||
warningCallback({
|
warningCallback({
|
||||||
key: 'bills',
|
key: "bills",
|
||||||
warning: t('jobs.labels.outstanding_reconciliation_discrep'),
|
warning: t("jobs.labels.outstanding_reconciliation_discrep")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (calculatedCreditsNotReceived.getAmount() > 0) {
|
if (calculatedCreditsNotReceived.getAmount() > 0) {
|
||||||
warningCallback({ key: 'cm', warning: t('jobs.labels.outstanding_credit_memos') });
|
warningCallback({ key: "cm", warning: t("jobs.labels.outstanding_credit_memos") });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col md={24} lg={18}>
|
<Col md={24} lg={18}>
|
||||||
<Card title={t('jobs.labels.jobtotals')} style={{ height: '100%' }}>
|
<Card title={t("jobs.labels.jobtotals")} style={{ height: "100%" }}>
|
||||||
<Space wrap size="large">
|
<Space wrap size="large">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.partstotal'),
|
__html: t("jobs.labels.plitooltips.partstotal")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic title={t('jobs.labels.rosaletotal')} value={totalPartsSublet.toFormat()} />
|
<Statistic title={t("jobs.labels.rosaletotal")} value={totalPartsSublet.toFormat()} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Typography.Title>-</Typography.Title>
|
<Typography.Title>-</Typography.Title>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.billtotal'),
|
__html: t("jobs.labels.plitooltips.billtotal")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic title={t('bills.labels.retailtotal')} value={billTotals.toFormat()} />
|
<Statistic title={t("bills.labels.retailtotal")} value={billTotals.toFormat()} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Typography.Title>=</Typography.Title>
|
<Typography.Title>=</Typography.Title>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.discrep1'),
|
__html: t("jobs.labels.plitooltips.discrep1")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t('bills.labels.discrepancy')}
|
title={t("bills.labels.discrepancy")}
|
||||||
valueStyle={{
|
valueStyle={{
|
||||||
color: discrepancy.getAmount() === 0 ? 'green' : 'red',
|
color: discrepancy.getAmount() === 0 ? "green" : "red"
|
||||||
}}
|
}}
|
||||||
value={discrepancy.toFormat()}
|
value={discrepancy.toFormat()}
|
||||||
/>
|
/>
|
||||||
@@ -176,27 +172,27 @@ export default function JobBillsTotalComponent({
|
|||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.laboradj'),
|
__html: t("jobs.labels.plitooltips.laboradj")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic title={t('bills.labels.dedfromlbr')} value={lbrAdjustments.toFormat()} />
|
<Statistic title={t("bills.labels.dedfromlbr")} value={lbrAdjustments.toFormat()} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Typography.Title>=</Typography.Title>
|
<Typography.Title>=</Typography.Title>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.discrep2'),
|
__html: t("jobs.labels.plitooltips.discrep2")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t('bills.labels.discrepancy')}
|
title={t("bills.labels.discrepancy")}
|
||||||
valueStyle={{
|
valueStyle={{
|
||||||
color: discrepWithLbrAdj.getAmount() === 0 ? 'green' : 'red',
|
color: discrepWithLbrAdj.getAmount() === 0 ? "green" : "red"
|
||||||
}}
|
}}
|
||||||
value={discrepWithLbrAdj.toFormat()}
|
value={discrepWithLbrAdj.toFormat()}
|
||||||
/>
|
/>
|
||||||
@@ -206,27 +202,27 @@ export default function JobBillsTotalComponent({
|
|||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.creditmemos'),
|
__html: t("jobs.labels.plitooltips.creditmemos")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic title={t('bills.labels.totalreturns')} value={totalReturns.toFormat()} />
|
<Statistic title={t("bills.labels.totalreturns")} value={totalReturns.toFormat()} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Typography.Title>=</Typography.Title>
|
<Typography.Title>=</Typography.Title>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.discrep3'),
|
__html: t("jobs.labels.plitooltips.discrep3")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t('bills.labels.discrepancy')}
|
title={t("bills.labels.discrepancy")}
|
||||||
valueStyle={{
|
valueStyle={{
|
||||||
color: discrepWithCms.getAmount() === 0 ? 'green' : 'red',
|
color: discrepWithCms.getAmount() === 0 ? "green" : "red"
|
||||||
}}
|
}}
|
||||||
value={discrepWithCms.toFormat()}
|
value={discrepWithCms.toFormat()}
|
||||||
/>
|
/>
|
||||||
@@ -238,40 +234,40 @@ export default function JobBillsTotalComponent({
|
|||||||
discrepWithLbrAdj.getAmount() !== 0 ||
|
discrepWithLbrAdj.getAmount() !== 0 ||
|
||||||
discrepancy.getAmount() !== 0) && (
|
discrepancy.getAmount() !== 0) && (
|
||||||
<Alert
|
<Alert
|
||||||
style={{ margin: '8px 0px' }}
|
style={{ margin: "8px 0px" }}
|
||||||
type="warning"
|
type="warning"
|
||||||
message={t('jobs.labels.outstanding_reconciliation_discrep')}
|
message={t("jobs.labels.outstanding_reconciliation_discrep")}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={24} lg={6}>
|
<Col md={24} lg={6}>
|
||||||
<Card title={t('jobs.labels.returntotals')} style={{ height: '100%' }}>
|
<Card title={t("jobs.labels.returntotals")} style={{ height: "100%" }}>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.totalreturns'),
|
__html: t("jobs.labels.plitooltips.totalreturns")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic title={t('bills.labels.totalreturns')} value={totalReturns.toFormat()} />
|
<Statistic title={t("bills.labels.totalreturns")} value={totalReturns.toFormat()} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.calculatedcreditsnotreceived'),
|
__html: t("jobs.labels.plitooltips.calculatedcreditsnotreceived")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t('bills.labels.calculatedcreditsnotreceived')}
|
title={t("bills.labels.calculatedcreditsnotreceived")}
|
||||||
valueStyle={{
|
valueStyle={{
|
||||||
color: calculatedCreditsNotReceived.getAmount() <= 0 ? 'green' : 'red',
|
color: calculatedCreditsNotReceived.getAmount() <= 0 ? "green" : "red"
|
||||||
}}
|
}}
|
||||||
value={
|
value={
|
||||||
calculatedCreditsNotReceived.getAmount() >= 0
|
calculatedCreditsNotReceived.getAmount() >= 0
|
||||||
@@ -284,15 +280,15 @@ export default function JobBillsTotalComponent({
|
|||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: t('jobs.labels.plitooltips.creditsnotreceived'),
|
__html: t("jobs.labels.plitooltips.creditsnotreceived")
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t('bills.labels.creditsnotreceived')}
|
title={t("bills.labels.creditsnotreceived")}
|
||||||
valueStyle={{
|
valueStyle={{
|
||||||
color: totalReturnsMarkedNotReceived.getAmount() <= 0 ? 'green' : 'red',
|
color: totalReturnsMarkedNotReceived.getAmount() <= 0 ? "green" : "red"
|
||||||
}}
|
}}
|
||||||
value={
|
value={
|
||||||
totalReturnsMarkedNotReceived.getAmount() >= 0
|
totalReturnsMarkedNotReceived.getAmount() >= 0
|
||||||
@@ -303,11 +299,7 @@ export default function JobBillsTotalComponent({
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Space>
|
</Space>
|
||||||
{showWarning && calculatedCreditsNotReceived.getAmount() > 0 && (
|
{showWarning && calculatedCreditsNotReceived.getAmount() > 0 && (
|
||||||
<Alert
|
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_credit_memos")} />
|
||||||
style={{ margin: '8px 0px' }}
|
|
||||||
type="warning"
|
|
||||||
message={t('jobs.labels.outstanding_credit_memos')}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
import { useQuery } from '@apollo/client';
|
import { useQuery } from "@apollo/client";
|
||||||
import { useSplitTreatments } from '@splitsoftware/splitio-react';
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { connect } from 'react-redux';
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from 'reselect';
|
import { createStructuredSelector } from "reselect";
|
||||||
import { GET_LINE_TICKET_BY_PK } from '../../graphql/jobs-lines.queries';
|
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
|
||||||
import { selectJobReadOnly } from '../../redux/application/application.selectors';
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import AlertComponent from '../alert/alert.component';
|
import AlertComponent from "../alert/alert.component";
|
||||||
import LaborAllocationsTableComponent from '../labor-allocations-table/labor-allocations-table.component';
|
import LaborAllocationsTableComponent from "../labor-allocations-table/labor-allocations-table.component";
|
||||||
import PayrollLaborAllocationsTable from '../labor-allocations-table/labor-allocations-table.payroll.component';
|
import PayrollLaborAllocationsTable from "../labor-allocations-table/labor-allocations-table.payroll.component";
|
||||||
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
|
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
@@ -24,21 +24,21 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardLabor
|
|||||||
export function JobCloseRoGuardLabor({ job, jobRO, bodyshop, form, warningCallback }) {
|
export function JobCloseRoGuardLabor({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||||
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
|
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
|
||||||
variables: { id: job.id },
|
variables: { id: job.id },
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: 'network-only',
|
nextFetchPolicy: "network-only"
|
||||||
});
|
});
|
||||||
const {
|
const {
|
||||||
treatments: { Enhanced_Payroll },
|
treatments: { Enhanced_Payroll }
|
||||||
} = useSplitTreatments({
|
} = useSplitTreatments({
|
||||||
attributes: {},
|
attributes: {},
|
||||||
names: ['Enhanced_Payroll'],
|
names: ["Enhanced_Payroll"],
|
||||||
splitKey: bodyshop.imexshopid,
|
splitKey: bodyshop.imexshopid
|
||||||
});
|
});
|
||||||
|
|
||||||
if (loading) return <LoadingSkeleton />;
|
if (loading) return <LoadingSkeleton />;
|
||||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||||
|
|
||||||
return Enhanced_Payroll.treatment === 'on' ? (
|
return Enhanced_Payroll.treatment === "on" ? (
|
||||||
<PayrollLaborAllocationsTable
|
<PayrollLaborAllocationsTable
|
||||||
jobId={job.id}
|
jobId={job.id}
|
||||||
timetickets={data ? data.timetickets : []}
|
timetickets={data ? data.timetickets : []}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from "react";
|
||||||
|
|
||||||
import { Alert, Card } from 'antd';
|
import { Alert, Card } from "antd";
|
||||||
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 { selectJobReadOnly } from '../../redux/application/application.selectors';
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from "react";
|
||||||
import Dinero from 'dinero.js';
|
import Dinero from "dinero.js";
|
||||||
import DataLabel from '../data-label/data-label.component';
|
import DataLabel from "../data-label/data-label.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
@@ -41,25 +41,21 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (balance.getAmount() !== 0) {
|
if (balance.getAmount() !== 0) {
|
||||||
warningCallback({ key: 'ar', warning: t('jobs.labels.outstanding_ar') });
|
warningCallback({ key: "ar", warning: t("jobs.labels.outstanding_ar") });
|
||||||
}
|
}
|
||||||
}, [balance, t, warningCallback]);
|
}, [balance, t, warningCallback]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t('jobs.labels.accountsreceivable')} style={{ height: '100%' }}>
|
<Card title={t("jobs.labels.accountsreceivable")} style={{ height: "100%" }}>
|
||||||
<DataLabel label={t('payments.labels.totalpayments')}>{total.toFormat()}</DataLabel>
|
<DataLabel label={t("payments.labels.totalpayments")}>{total.toFormat()}</DataLabel>
|
||||||
<DataLabel
|
<DataLabel
|
||||||
valueStyle={{ color: balance.getAmount() !== 0 ? 'red' : 'green' }}
|
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }}
|
||||||
label={t('payments.labels.balance')}
|
label={t("payments.labels.balance")}
|
||||||
>
|
>
|
||||||
{balance.toFormat()}
|
{balance.toFormat()}
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
{balance.getAmount() !== 0 && (
|
{balance.getAmount() !== 0 && (
|
||||||
<Alert
|
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_ar")} />
|
||||||
style={{ margin: '8px 0px' }}
|
|
||||||
type="warning"
|
|
||||||
message={t('jobs.labels.outstanding_ar')}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
import { useQuery } from '@apollo/client';
|
import { useQuery } from "@apollo/client";
|
||||||
import { connect } from 'react-redux';
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from 'reselect';
|
import { createStructuredSelector } from "reselect";
|
||||||
import { QUERY_BILLS_BY_JOBID } from '../../graphql/bills.queries';
|
import { QUERY_BILLS_BY_JOBID } from "../../graphql/bills.queries";
|
||||||
import { selectJobReadOnly } from '../../redux/application/application.selectors';
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import AlertComponent from '../alert/alert.component';
|
import AlertComponent from "../alert/alert.component";
|
||||||
import JobBillsTotalComponent from '../job-bills-total/job-bills-total.component';
|
import JobBillsTotalComponent from "../job-bills-total/job-bills-total.component";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
@@ -21,8 +21,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardBills
|
|||||||
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
|
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||||
const { loading, error, data } = useQuery(QUERY_BILLS_BY_JOBID, {
|
const { loading, error, data } = useQuery(QUERY_BILLS_BY_JOBID, {
|
||||||
variables: { jobid: job.id },
|
variables: { jobid: job.id },
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: 'network-only',
|
nextFetchPolicy: "network-only"
|
||||||
});
|
});
|
||||||
|
|
||||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||||
|
|||||||
@@ -76,20 +76,21 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
|
|||||||
<Col className="ro-guard-col-multiple" md={24} lg={6}>
|
<Col className="ro-guard-col-multiple" md={24} lg={6}>
|
||||||
<Row gutter={[32, 32]} style={{ height: "100%" }}>
|
<Row gutter={[32, 32]} style={{ height: "100%" }}>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<JobCloseRoGuardProfit
|
<JobCloseRoGuardProfit job={job} form={form} warningCallback={warningCallback} />
|
||||||
job={job}
|
|
||||||
form={form} //warningCallback={warningCallback}
|
|
||||||
/>
|
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<JobCloseRoGuardAr job={job} form={form} warningCallback={warningCallback} />
|
<JobCloseRoGuardAr job={job} form={form} warningCallback={warningCallback} />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col className="ro-guard-col-50" md={24} lg={8}>
|
{InstanceRenderManager({
|
||||||
<JobCloseRoGuardSublet job={job} warningCallback={warningCallback} />
|
rome: (
|
||||||
{InstanceRenderManager({ rome: <JobCloseRoGuardPpd job={job} warningCallback={warningCallback} /> })}
|
<Col md={24} lg={8}>
|
||||||
</Col>
|
{/* <JobCloseRoGuardSublet job={job} warningCallback={warningCallback} /> */}
|
||||||
|
<JobCloseRoGuardPpd job={job} warningCallback={warningCallback} />
|
||||||
|
</Col>
|
||||||
|
)
|
||||||
|
})}
|
||||||
<Col className="ro-guard-col" md={24} lg={10}>
|
<Col className="ro-guard-col" md={24} lg={10}>
|
||||||
<JobCloseRoGuardLabor job={job} form={form} warningCallback={warningCallback} />
|
<JobCloseRoGuardLabor job={job} form={form} warningCallback={warningCallback} />
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { LockOutlined } from '@ant-design/icons';
|
import { Alert, Card } from "antd";
|
||||||
import { Card, Form, Input } from 'antd';
|
import axios from "axios";
|
||||||
import axios from 'axios';
|
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 { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectJobReadOnly } from '../../redux/application/application.selectors';
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
import JobCostingStatistics from "../job-costing-statistics/job-costing-statistics.component";
|
||||||
import JobCostingStatistics from '../job-costing-statistics/job-costing-statistics.component';
|
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||||
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
@@ -31,7 +30,7 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
|
|||||||
try {
|
try {
|
||||||
if (job.id) {
|
if (job.id) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const { data } = await axios.post('/job/costing', { jobid: job.id });
|
const { data } = await axios.post("/job/costing", { jobid: job.id });
|
||||||
setCostingData(data);
|
setCostingData(data);
|
||||||
}
|
}
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
@@ -45,16 +44,19 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
|
|||||||
parseFloat(costingData?.summaryData.gppercent) < bodyshop?.md_ro_guard?.totalgppercent_minimum;
|
parseFloat(costingData?.summaryData.gppercent) < bodyshop?.md_ro_guard?.totalgppercent_minimum;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (enforceProfitPassword && typeof warningCallback === 'function') {
|
if (enforceProfitPassword && typeof warningCallback === "function") {
|
||||||
warningCallback({ key: 'profit', warning: t('jobs.labels.profitbypassrequired') });
|
warningCallback({ key: "profit", warning: t("jobs.labels.profitbypassrequired") });
|
||||||
}
|
}
|
||||||
}, [enforceProfitPassword, t, warningCallback]);
|
}, [enforceProfitPassword, t, warningCallback]);
|
||||||
|
|
||||||
if (loading || !costingData) return <LoadingSkeleton />;
|
if (loading || !costingData) return <LoadingSkeleton />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t('jobs.labels.profits')} style={{ height: '100%' }}>
|
<Card title={t("jobs.labels.profits")} style={{ height: "100%" }}>
|
||||||
<JobCostingStatistics summaryData={costingData?.summaryData} onlyGP />
|
<JobCostingStatistics summaryData={costingData?.summaryData} onlyGP />
|
||||||
|
{enforceProfitPassword && (
|
||||||
|
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.profitbypassrequired")} />
|
||||||
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from "react";
|
||||||
|
|
||||||
import { Alert, Card, Table } from 'antd';
|
import { Alert, Card, Table } from "antd";
|
||||||
import { t } from 'i18next';
|
import { t } from "i18next";
|
||||||
import { connect } from 'react-redux';
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from 'reselect';
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectJobReadOnly } from '../../redux/application/application.selectors';
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import CurrencyFormatter from '../../utils/CurrencyFormatter';
|
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||||
import { alphaSort } from '../../utils/sorters';
|
import { alphaSort } from "../../utils/sorters";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
@@ -20,69 +20,56 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRGuardSublet
|
|||||||
|
|
||||||
export function JobCloseRGuardSublet({ job, jobRO, bodyshop, form, warningCallback }) {
|
export function JobCloseRGuardSublet({ job, jobRO, bodyshop, form, warningCallback }) {
|
||||||
const subletsNotDone = job?.joblines.filter(
|
const subletsNotDone = job?.joblines.filter(
|
||||||
(j) =>
|
(j) => (j.part_type === "PAS" || j.part_type === "PASL") && (!j.sublet_completed || !j.sublet_ignored)
|
||||||
(j.part_type === 'PAS' || j.part_type === 'PASL') &&
|
|
||||||
(!j.sublet_completed || !j.sublet_ignored)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: t('joblines.fields.line_desc'),
|
title: t("joblines.fields.line_desc"),
|
||||||
dataIndex: 'line_desc',
|
dataIndex: "line_desc",
|
||||||
fixed: 'left',
|
fixed: "left",
|
||||||
key: 'line_desc',
|
key: "line_desc",
|
||||||
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
|
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
|
||||||
onCell: (record) => ({
|
onCell: (record) => ({
|
||||||
className: record.manual_line && 'job-line-manual',
|
className: record.manual_line && "job-line-manual",
|
||||||
style: {
|
style: {
|
||||||
...(record.critical ? { boxShadow: ' -.5em 0 0 #FFC107' } : {}),
|
...(record.critical ? { boxShadow: " -.5em 0 0 #FFC107" } : {})
|
||||||
},
|
}
|
||||||
}),
|
}),
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('joblines.fields.act_price'),
|
title: t("joblines.fields.act_price"),
|
||||||
dataIndex: 'act_price',
|
dataIndex: "act_price",
|
||||||
key: 'act_price',
|
key: "act_price",
|
||||||
sorter: (a, b) => a.act_price - b.act_price,
|
sorter: (a, b) => a.act_price - b.act_price,
|
||||||
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (text, record) => <CurrencyFormatter>{record.act_price}</CurrencyFormatter>,
|
render: (text, record) => <CurrencyFormatter>{record.act_price}</CurrencyFormatter>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('joblines.fields.part_qty'),
|
title: t("joblines.fields.part_qty"),
|
||||||
dataIndex: 'part_qty',
|
dataIndex: "part_qty",
|
||||||
key: 'part_qty',
|
key: "part_qty"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('joblines.fields.notes'),
|
title: t("joblines.fields.notes"),
|
||||||
dataIndex: 'notes',
|
dataIndex: "notes",
|
||||||
key: 'notes',
|
key: "notes"
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (subletsNotDone.length > 0) {
|
if (subletsNotDone.length > 0) {
|
||||||
warningCallback({ key: 'sublet', warning: t('jobs.labels.outstanding_sublets') });
|
warningCallback({ key: "sublet", warning: t("jobs.labels.outstanding_sublets") });
|
||||||
}
|
}
|
||||||
}, [subletsNotDone.length, warningCallback]);
|
}, [subletsNotDone.length, warningCallback]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t('jobs.labels.subletsnotcompleted')}>
|
<Card title={t("jobs.labels.subletsnotcompleted")}>
|
||||||
<Table
|
<Table dataSource={subletsNotDone} columns={columns} pagination={false} rowKey="id" bordered size="small" />
|
||||||
dataSource={subletsNotDone}
|
|
||||||
columns={columns}
|
|
||||||
pagination={false}
|
|
||||||
rowKey="id"
|
|
||||||
bordered
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
{subletsNotDone.length > 0 && (
|
{subletsNotDone.length > 0 && (
|
||||||
<Alert
|
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_sublets")} />
|
||||||
style={{ margin: '8px 0px' }}
|
|
||||||
type="warning"
|
|
||||||
message={t('jobs.labels.outstanding_sublets')}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from 'reselect';
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectJobReadOnly } from '../../redux/application/application.selectors';
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from '../../redux/user/user.selectors';
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import JobLifecycleComponent from '../job-lifecycle/job-lifecycle.component';
|
import JobLifecycleComponent from "../job-lifecycle/job-lifecycle.component";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useQuery } from "@apollo/client";
|
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 React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
@@ -44,13 +44,25 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
|
|||||||
? data.parts_order_lines.map((line) => ({
|
? data.parts_order_lines.map((line) => ({
|
||||||
key: line.id,
|
key: line.id,
|
||||||
children: (
|
children: (
|
||||||
<Space split={<Divider type="vertical" />} wrap>
|
<Row wrap>
|
||||||
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.parts_order.id}`}>
|
<Col span={4}>
|
||||||
{line.parts_order.order_number}
|
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.parts_order.id}`}>
|
||||||
</Link>
|
{line.parts_order.order_number}
|
||||||
<DateFormatter>{line.parts_order.order_date}</DateFormatter>
|
</Link>
|
||||||
{line.parts_order.vendor.name}
|
</Col>
|
||||||
</Space>
|
<Col span={4}>
|
||||||
|
<DateFormatter>{line.parts_order.order_date}</DateFormatter>
|
||||||
|
</Col>
|
||||||
|
<Col span={4}>{line.parts_order.vendor.name}</Col>
|
||||||
|
{line.backordered_eta ? (
|
||||||
|
<Col span={4}>
|
||||||
|
<span>
|
||||||
|
{`${t("parts_orders.fields.backordered_eta")}: `}
|
||||||
|
<DateFormatter>{line.backordered_eta}</DateFormatter>
|
||||||
|
</span>
|
||||||
|
</Col>
|
||||||
|
) : null}
|
||||||
|
</Row>
|
||||||
)
|
)
|
||||||
}))
|
}))
|
||||||
: [
|
: [
|
||||||
@@ -62,6 +74,37 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
|
|||||||
}
|
}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col md={24} lg={8}>
|
||||||
|
<Typography.Title level={4}>{t("parts_dispatch.labels.parts_dispatch")}</Typography.Title>
|
||||||
|
<Timeline
|
||||||
|
items={
|
||||||
|
data.parts_dispatch_lines.length > 0
|
||||||
|
? data.parts_dispatch_lines.map((line) => ({
|
||||||
|
key: line.id,
|
||||||
|
children: (
|
||||||
|
<Row>
|
||||||
|
<Col span={8}>
|
||||||
|
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.id}`}>{line.parts_dispatch.number}</Link>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
{bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<Space>
|
||||||
|
{t("parts_dispatch_lines.fields.accepted_at")}
|
||||||
|
<DateFormatter>{line.accepted_at}</DateFormatter>
|
||||||
|
</Space>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
)
|
||||||
|
}))
|
||||||
|
: {
|
||||||
|
key: "dispatch-lines",
|
||||||
|
children: t("parts_orders.labels.notyetordered")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
<Col md={24} lg={8}>
|
<Col md={24} lg={8}>
|
||||||
<Typography.Title level={4}>{t("bills.labels.bills")}</Typography.Title>
|
<Typography.Title level={4}>{t("bills.labels.bills")}</Typography.Title>
|
||||||
<Timeline
|
<Timeline
|
||||||
@@ -104,31 +147,6 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={24} lg={8}>
|
|
||||||
<Typography.Title level={4}>{t("parts_dispatch.labels.parts_dispatch")}</Typography.Title>
|
|
||||||
<Timeline
|
|
||||||
items={
|
|
||||||
data.parts_dispatch_lines.length > 0
|
|
||||||
? data.parts_dispatch_lines.map((line) => ({
|
|
||||||
key: line.id,
|
|
||||||
children: (
|
|
||||||
<Space split={<Divider type="vertical" />} wrap>
|
|
||||||
<Link to={`/manage/jobs/${jobid}?partsorderid=${line.id}`}>{line.parts_dispatch.number}</Link>
|
|
||||||
{bodyshop.employees.find((e) => e.id === line.parts_dispatch.employeeid)?.first_name}
|
|
||||||
<Space>
|
|
||||||
{t("parts_dispatch_lines.fields.accepted_at")}
|
|
||||||
<DateFormatter>{line.accepted_at}</DateFormatter>
|
|
||||||
</Space>
|
|
||||||
</Space>
|
|
||||||
)
|
|
||||||
}))
|
|
||||||
: {
|
|
||||||
key: "dispatch-lines",
|
|
||||||
children: t("parts_orders.labels.notyetordered")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col md={24} lg={24}>
|
<Col md={24} lg={24}>
|
||||||
<TaskListContainer
|
<TaskListContainer
|
||||||
parentJobId={jobid}
|
parentJobId={jobid}
|
||||||
|
|||||||
@@ -608,13 +608,12 @@ function ResolveCCCLineIssues(estData, bodyshop) {
|
|||||||
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
||||||
if (line.unq_seq === 0) return;
|
if (line.unq_seq === 0) return;
|
||||||
if (index0ActPrice !== line.act_price) {
|
if (index0ActPrice !== line.act_price) {
|
||||||
line.notes += ` | Price override.`;
|
// line.notes += ` | Price override.`;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
||||||
estData.joblines.data[
|
//estData.joblines.data[indexInEstData].notes +=
|
||||||
indexInEstData
|
// ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
||||||
].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].act_price = 0;
|
||||||
estData.joblines.data[indexInEstData].db_price = 0;
|
estData.joblines.data[indexInEstData].db_price = 0;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ export function PartsOrderModalComponent({ bodyshop, vendorList, sendTypeState,
|
|||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber min={1} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("parts_orders.fields.act_price")}
|
label={t("parts_orders.fields.act_price")}
|
||||||
|
|||||||
@@ -59,25 +59,33 @@ export function ScheduleCalendarHeaderComponent({
|
|||||||
{loadData && loadData.allJobsOut ? (
|
{loadData && loadData.allJobsOut ? (
|
||||||
loadData.allJobsOut.map((j) => (
|
loadData.allJobsOut.map((j) => (
|
||||||
<tr key={j.id}>
|
<tr key={j.id}>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link>
|
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link> (
|
||||||
|
{j.status})
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
<OwnerNameDisplay ownerObject={j} />
|
<OwnerNameDisplay ownerObject={j} />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
{`(${(j.labhrs.aggregate.sum.mod_lb_hrs + j.larhrs.aggregate.sum.mod_lb_hrs).toFixed(
|
{`(${j.labhrs.aggregate.sum.mod_lb_hrs.toFixed(
|
||||||
1
|
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")})`}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
<DateTimeFormatter>{j.scheduled_completion}</DateTimeFormatter>
|
<DateTimeFormatter>
|
||||||
|
{j.scheduled_completion}
|
||||||
|
</DateTimeFormatter>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{t("appointments.labels.nocompletingjobs")}</td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
|
{t("appointments.labels.nocompletingjobs")}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -92,26 +100,30 @@ export function ScheduleCalendarHeaderComponent({
|
|||||||
{loadData && loadData.allJobsIn ? (
|
{loadData && loadData.allJobsIn ? (
|
||||||
loadData.allJobsIn.map((j) => (
|
loadData.allJobsIn.map((j) => (
|
||||||
<tr key={j.id}>
|
<tr key={j.id}>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link>
|
<Link to={`/manage/jobs/${j.id}`}>{j.ro_number}</Link>
|
||||||
{j.status}
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
<OwnerNameDisplay ownerObject={j} />
|
<OwnerNameDisplay ownerObject={j} />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
{`(${(j.labhrs.aggregate.sum.mod_lb_hrs + j.larhrs.aggregate.sum.mod_lb_hrs).toFixed(
|
{`(${j.labhrs.aggregate.sum.mod_lb_hrs.toFixed(
|
||||||
1
|
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")})`}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
<DateTimeFormatter>{j.scheduled_in}</DateTimeFormatter>
|
<DateTimeFormatter>{j.scheduled_in}</DateTimeFormatter>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<tr>
|
<tr>
|
||||||
<td>{t("appointments.labels.noarrivingjobs")}</td>
|
<td style={{ padding: "2.5px" }}>
|
||||||
|
{t("appointments.labels.noarrivingjobs")}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -121,27 +133,33 @@ export function ScheduleCalendarHeaderComponent({
|
|||||||
|
|
||||||
const LoadComponent = loadData ? (
|
const LoadComponent = loadData ? (
|
||||||
<div>
|
<div>
|
||||||
<Space align="center">
|
<Space align="center">
|
||||||
<Popover
|
<Popover
|
||||||
placement={"bottom"}
|
placement={"bottom"}
|
||||||
content={jobsInPopup}
|
content={jobsInPopup}
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
title={t("appointments.labels.arrivingjobs")}
|
title={t("appointments.labels.arrivingjobs")}
|
||||||
>
|
>
|
||||||
<Icon component={MdFileDownload} style={{ color: "green" }} />
|
<Icon component={MdFileDownload} style={{ color: "green" }} />
|
||||||
{(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(2)}
|
{(loadData.allHoursInBody || 0) &&
|
||||||
</Popover>
|
loadData.allHoursInBody.toFixed(1)}
|
||||||
<Popover
|
/
|
||||||
placement={"bottom"}
|
{(loadData.allHoursInRefinish || 0) &&
|
||||||
content={jobsOutPopup}
|
loadData.allHoursInRefinish.toFixed(1)}
|
||||||
trigger="hover"
|
/{(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(1)}
|
||||||
title={t("appointments.labels.completingjobs")}
|
</Popover>
|
||||||
>
|
<Popover
|
||||||
<Icon component={MdFileUpload} style={{ color: "red" }} />
|
placement={"bottom"}
|
||||||
{(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(2)}
|
content={jobsOutPopup}
|
||||||
</Popover>
|
trigger="hover"
|
||||||
<ScheduleCalendarHeaderGraph loadData={loadData} />
|
title={t("appointments.labels.completingjobs")}
|
||||||
</Space>
|
>
|
||||||
|
<Icon component={MdFileUpload} style={{ color: "red" }} />
|
||||||
|
{(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(1)}
|
||||||
|
</Popover>
|
||||||
|
<ScheduleCalendarHeaderGraph loadData={loadData} />
|
||||||
|
</Space>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ul style={{ listStyleType: "none", columns: "2 auto", padding: 0 }}>
|
<ul style={{ listStyleType: "none", columns: "2 auto", padding: 0 }}>
|
||||||
{Object.keys(ATSToday).map((key, idx) => (
|
{Object.keys(ATSToday).map((key, idx) => (
|
||||||
|
|||||||
@@ -2269,6 +2269,8 @@ export const GET_JOB_LINE_ORDERS = gql`
|
|||||||
parts_order_lines(where: { job_line_id: { _eq: $joblineid } }) {
|
parts_order_lines(where: { job_line_id: { _eq: $joblineid } }) {
|
||||||
id
|
id
|
||||||
act_price
|
act_price
|
||||||
|
backordered_eta
|
||||||
|
backordered_on
|
||||||
parts_order {
|
parts_order {
|
||||||
id
|
id
|
||||||
order_date
|
order_date
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions";
|
|||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import JobCloseRoGuardContainer from '../../components/job-close-ro-guard/job-close-ro-guard.container';
|
import JobCloseRoGuardContainer from "../../components/job-close-ro-guard/job-close-ro-guard.container";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -120,6 +120,13 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
|
|||||||
operation: AuditTrailMapping.jobinvoiced(),
|
operation: AuditTrailMapping.jobinvoiced(),
|
||||||
type: "jobinvoiced"
|
type: "jobinvoiced"
|
||||||
});
|
});
|
||||||
|
if (values.masterbypass) {
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.jobclosedwithbypass(),
|
||||||
|
type: "jobclosedwithbypass"
|
||||||
|
});
|
||||||
|
}
|
||||||
// history(`/manage/jobs/${job.id}`);
|
// history(`/manage/jobs/${job.id}`);
|
||||||
} else {
|
} else {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -184,7 +191,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
|
|||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<JobCloseRoGuardContainer form={form} job={job} />
|
<JobCloseRoGuardContainer form={form} job={job} />
|
||||||
<Space wrap direction="vertical" style={{ width: "100%" }}>
|
<Space wrap direction="vertical" style={{ width: "100%" }}>
|
||||||
<FormsFieldChanged form={form} />
|
<FormsFieldChanged form={form} />
|
||||||
{!job.actual_in && job.scheduled_in && <Alert type="warning" message={t("jobs.labels.actual_in_inferred")} />}
|
{!job.actual_in && job.scheduled_in && <Alert type="warning" message={t("jobs.labels.actual_in_inferred")} />}
|
||||||
|
|||||||
@@ -111,7 +111,12 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
(load[itemDate].allHoursIn || 0) +
|
(load[itemDate].allHoursIn || 0) +
|
||||||
item.labhrs.aggregate.sum.mod_lb_hrs +
|
item.labhrs.aggregate.sum.mod_lb_hrs +
|
||||||
item.larhrs.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.
|
//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.
|
// Make sure it also hasn't already been completed, or isn't an in and out job.
|
||||||
//This prevents the duplicate counting.
|
//This prevents the duplicate counting.
|
||||||
@@ -119,7 +124,15 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
if (AddJobForSchedulingCalc) {
|
if (AddJobForSchedulingCalc) {
|
||||||
load[itemDate].jobsIn.push(item);
|
load[itemDate].jobsIn.push(item);
|
||||||
load[itemDate].hoursIn =
|
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 {
|
} else {
|
||||||
load[itemDate] = {
|
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.
|
jobsIn: AddJobForSchedulingCalc ? [item] : [], //Same as above, only add it if it isn't already in production.
|
||||||
jobsOut: [],
|
jobsOut: [],
|
||||||
allJobsOut: [],
|
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
|
hoursIn: AddJobForSchedulingCalc
|
||||||
? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
|
? item.labhrs.aggregate.sum.mod_lb_hrs +
|
||||||
: 0
|
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) +
|
(load[itemDate].allHoursOut || 0) +
|
||||||
item.labhrs.aggregate.sum.mod_lb_hrs +
|
item.labhrs.aggregate.sum.mod_lb_hrs +
|
||||||
item.larhrs.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.
|
//Add only the jobs that are still in production to get rid of.
|
||||||
//If it's not in production, we'd subtract unnecessarily.
|
//If it's not in production, we'd subtract unnecessarily.
|
||||||
load[itemDate].allJobsOut.push(item);
|
load[itemDate].allJobsOut.push(item);
|
||||||
@@ -161,6 +191,12 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
(load[itemDate].hoursOut || 0) +
|
(load[itemDate].hoursOut || 0) +
|
||||||
item.labhrs.aggregate.sum.mod_lb_hrs +
|
item.labhrs.aggregate.sum.mod_lb_hrs +
|
||||||
item.larhrs.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 {
|
} else {
|
||||||
load[itemDate] = {
|
load[itemDate] = {
|
||||||
@@ -169,7 +205,11 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
hoursOut: AddJobForSchedulingCalc
|
hoursOut: AddJobForSchedulingCalc
|
||||||
? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
|
? item.labhrs.aggregate.sum.mod_lb_hrs + item.larhrs.aggregate.sum.mod_lb_hrs
|
||||||
: 0,
|
: 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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -116,7 +116,8 @@
|
|||||||
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
||||||
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
||||||
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
|
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
|
||||||
"jobconverted": "Job converted and assigned number {{ro_number}}.",
|
"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}}.",
|
"jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.",
|
||||||
"jobexported": "",
|
"jobexported": "",
|
||||||
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
||||||
@@ -1984,7 +1985,7 @@
|
|||||||
"outstanding_ar": "A balance is outstanding on this RO. Payments can still be entered when the job is closed. ",
|
"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_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_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_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. ",
|
"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.",
|
"outstandinghours": "There are outstanding hours on the job that have not been paid or have been overpaid.",
|
||||||
"override_header": "Override estimate header on import?",
|
"override_header": "Override estimate header on import?",
|
||||||
@@ -2012,7 +2013,7 @@
|
|||||||
},
|
},
|
||||||
"ppc": "This line contains a part price change.",
|
"ppc": "This line contains a part price change.",
|
||||||
"ppdnotexported": "PPDs not Exported",
|
"ppdnotexported": "PPDs not Exported",
|
||||||
"profileadjustments": "Profile Disc./Mkup",
|
"profileadjustments": "Profile Disc./Mkup","profitbypassrequired": "Minimum gross profit requirements have not been met.",
|
||||||
"profits": "Job Profits",
|
"profits": "Job Profits",
|
||||||
"prt_dsmk_total": "Line Item Adjustment",
|
"prt_dsmk_total": "Line Item Adjustment",
|
||||||
"rates": "Rates",
|
"rates": "Rates",
|
||||||
@@ -2034,12 +2035,13 @@
|
|||||||
"remove_from_ar": "Remove from AR",
|
"remove_from_ar": "Remove from AR",
|
||||||
"returntotals": "Return Totals",
|
"returntotals": "Return Totals",
|
||||||
"ro_guard": {
|
"ro_guard": {
|
||||||
"eforce_profit": "Profit margins enforced.",
|
|
||||||
"enforce_ar": "AR collection enforced.",
|
"enforce_ar": "AR collection enforced.",
|
||||||
"enforce_bills": "Bill discrepancy enforced.",
|
"enforce_bills": "Bill discrepancy enforced.",
|
||||||
"enforce_cm": "Credit memo entry enforced.",
|
"enforce_cm": "Credit memo entry enforced.",
|
||||||
"enforce_labor": "Labor allocations enforced.",
|
"enforce_labor": "Labor allocations enforced.",
|
||||||
"enforce_ppd": "PPD sync enforced.",
|
"enforce_ppd": "PPD sync enforced.",
|
||||||
|
"enforce_profit": "Profit marginsenforced.",
|
||||||
"enforce_sublet": "Sublet completion enforced.",
|
"enforce_sublet": "Sublet completion enforced.",
|
||||||
"enforce_validation": "Master Bypass Required: {{message}}",
|
"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."
|
"enforced": "This check has been enforced by your shop manager. Enter the master bypass password to close the Job."
|
||||||
|
|||||||
@@ -116,7 +116,8 @@
|
|||||||
"jobassignmentchange": "",
|
"jobassignmentchange": "",
|
||||||
"jobassignmentremoved": "",
|
"jobassignmentremoved": "",
|
||||||
"jobchecklist": "",
|
"jobchecklist": "",
|
||||||
"jobconverted": "",
|
"jobclosedwithbypass": "",
|
||||||
|
"jobconverted": "",
|
||||||
"jobdelivery": "",
|
"jobdelivery": "",
|
||||||
"jobexported": "",
|
"jobexported": "",
|
||||||
"jobfieldchanged": "",
|
"jobfieldchanged": "",
|
||||||
@@ -2012,7 +2013,8 @@
|
|||||||
"ppc": "",
|
"ppc": "",
|
||||||
"ppdnotexported": "",
|
"ppdnotexported": "",
|
||||||
"profileadjustments": "",
|
"profileadjustments": "",
|
||||||
"profits": "",
|
"profitbypassrequired": "",
|
||||||
|
"profits": "",
|
||||||
"prt_dsmk_total": "",
|
"prt_dsmk_total": "",
|
||||||
"rates": "Tarifas",
|
"rates": "Tarifas",
|
||||||
"rates_subtotal": "",
|
"rates_subtotal": "",
|
||||||
@@ -2033,12 +2035,11 @@
|
|||||||
"remove_from_ar": "",
|
"remove_from_ar": "",
|
||||||
"returntotals": "",
|
"returntotals": "",
|
||||||
"ro_guard": {
|
"ro_guard": {
|
||||||
"eforce_profit": "",
|
|
||||||
"enforce_ar": "",
|
"enforce_ar": "",
|
||||||
"enforce_bills": "",
|
"enforce_bills": "",
|
||||||
"enforce_cm": "",
|
"enforce_cm": "",
|
||||||
"enforce_labor": "",
|
"enforce_labor": "",
|
||||||
"enforce_ppd": "",
|
"enforce_ppd": "","enforce_profit": "",
|
||||||
"enforce_sublet": "",
|
"enforce_sublet": "",
|
||||||
"enforce_validation": "",
|
"enforce_validation": "",
|
||||||
"enforced": ""
|
"enforced": ""
|
||||||
|
|||||||
@@ -116,7 +116,8 @@
|
|||||||
"jobassignmentchange": "",
|
"jobassignmentchange": "",
|
||||||
"jobassignmentremoved": "",
|
"jobassignmentremoved": "",
|
||||||
"jobchecklist": "",
|
"jobchecklist": "",
|
||||||
"jobconverted": "",
|
"jobclosedwithbypass": "",
|
||||||
|
"jobconverted": "",
|
||||||
"jobdelivery": "",
|
"jobdelivery": "",
|
||||||
"jobexported": "",
|
"jobexported": "",
|
||||||
"jobfieldchanged": "",
|
"jobfieldchanged": "",
|
||||||
@@ -2012,7 +2013,8 @@
|
|||||||
"ppc": "",
|
"ppc": "",
|
||||||
"ppdnotexported": "",
|
"ppdnotexported": "",
|
||||||
"profileadjustments": "",
|
"profileadjustments": "",
|
||||||
"profits": "",
|
"profitbypassrequired": "",
|
||||||
|
"profits": "",
|
||||||
"prt_dsmk_total": "",
|
"prt_dsmk_total": "",
|
||||||
"rates": "Les taux",
|
"rates": "Les taux",
|
||||||
"rates_subtotal": "",
|
"rates_subtotal": "",
|
||||||
@@ -2033,12 +2035,11 @@
|
|||||||
"remove_from_ar": "",
|
"remove_from_ar": "",
|
||||||
"returntotals": "",
|
"returntotals": "",
|
||||||
"ro_guard": {
|
"ro_guard": {
|
||||||
"eforce_profit": "",
|
|
||||||
"enforce_ar": "",
|
"enforce_ar": "",
|
||||||
"enforce_bills": "",
|
"enforce_bills": "",
|
||||||
"enforce_cm": "",
|
"enforce_cm": "",
|
||||||
"enforce_labor": "",
|
"enforce_labor": "",
|
||||||
"enforce_ppd": "",
|
"enforce_ppd": "","enforce_profit": "",
|
||||||
"enforce_sublet": "",
|
"enforce_sublet": "",
|
||||||
"enforce_validation": "",
|
"enforce_validation": "",
|
||||||
"enforced": ""
|
"enforced": ""
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ const AuditTrailMapping = {
|
|||||||
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
||||||
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
||||||
jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
|
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 }),
|
jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
|
||||||
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
|
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
|
||||||
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
||||||
|
|||||||
@@ -925,7 +925,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
thresholdAmount === 9999.99 ||
|
thresholdAmount === 9999.99 ||
|
||||||
InstanceMgr({
|
InstanceMgr({
|
||||||
imex: false,
|
imex: false,
|
||||||
rome: false,
|
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1,
|
||||||
promanager: thresholdAmount === 0 && parseInt(tyCounter) === 1
|
promanager: thresholdAmount === 0 && parseInt(tyCounter) === 1
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user