IO-774 IO-812 Part Tax and Glass Tax Total calculations
This commit is contained in:
@@ -13656,6 +13656,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>PAP</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>PAR</name>
|
<name>PAR</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
|
|||||||
jobRO={false}
|
jobRO={false}
|
||||||
expanded
|
expanded
|
||||||
required={selected && true}
|
required={selected && true}
|
||||||
|
form={form}
|
||||||
/>
|
/>
|
||||||
<Collapse defaultActiveKey="insurance">
|
<Collapse defaultActiveKey="insurance">
|
||||||
<Collapse.Panel
|
<Collapse.Panel
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export function JobsDetailRates({ jobRO, form }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
|
|
||||||
<JobsDetailRatesParts />
|
<JobsDetailRatesParts form={form} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,16 @@ 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 LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
export function JobsDetailRatesParts({
|
||||||
|
jobRO,
|
||||||
|
expanded,
|
||||||
|
required = true,
|
||||||
|
form,
|
||||||
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -43,17 +47,27 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item shouldUpdate>
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
{() => {
|
||||||
name={["parts_tax_rates", "PAA", "prt_tax_rt"]}
|
return (
|
||||||
rules={[
|
<Form.Item
|
||||||
{
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
required: required,
|
name={["parts_tax_rates", "PAA", "prt_tax_rt"]}
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: form.getFieldValue([
|
||||||
>
|
"parts_tax_rates",
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
"PAA",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAC")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAC")}>
|
||||||
@@ -83,17 +97,27 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item shouldUpdate>
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
{() => {
|
||||||
name={["parts_tax_rates", "PAC", "prt_tax_rt"]}
|
return (
|
||||||
rules={[
|
<Form.Item
|
||||||
{
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
required: required,
|
name={["parts_tax_rates", "PAC", "prt_tax_rt"]}
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: form.getFieldValue([
|
||||||
>
|
"parts_tax_rates",
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
"PAC",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAL")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAL")}>
|
||||||
@@ -123,17 +147,27 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item shouldUpdate>
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
{() => {
|
||||||
name={["parts_tax_rates", "PAL", "prt_tax_rt"]}
|
return (
|
||||||
rules={[
|
<Form.Item
|
||||||
{
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
required: required,
|
name={["parts_tax_rates", "PAL", "prt_tax_rt"]}
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: form.getFieldValue([
|
||||||
>
|
"parts_tax_rates",
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
"PAL",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAG")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAG")}>
|
||||||
@@ -163,17 +197,27 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item shouldUpdate>
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
{() => {
|
||||||
name={["parts_tax_rates", "PAG", "prt_tax_rt"]}
|
return (
|
||||||
rules={[
|
<Form.Item
|
||||||
{
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
required: required,
|
name={["parts_tax_rates", "PAG", "prt_tax_rt"]}
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: form.getFieldValue([
|
||||||
>
|
"parts_tax_rates",
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
"PAG",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAM")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAM")}>
|
||||||
@@ -203,17 +247,27 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item shouldUpdate>
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
{() => {
|
||||||
name={["parts_tax_rates", "PAM", "prt_tax_rt"]}
|
return (
|
||||||
rules={[
|
<Form.Item
|
||||||
{
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
required: required,
|
name={["parts_tax_rates", "PAM", "prt_tax_rt"]}
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: form.getFieldValue([
|
||||||
>
|
"parts_tax_rates",
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
"PAM",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAN")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAN")}>
|
||||||
@@ -243,18 +297,128 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item shouldUpdate>
|
||||||
|
{() => {
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
|
name={["parts_tax_rates", "PAN", "prt_tax_rt"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: form.getFieldValue([
|
||||||
|
"parts_tax_rates",
|
||||||
|
"PAN",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>{" "}
|
||||||
|
<LayoutFormRow header={t("joblines.fields.part_types.PAO")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
label={t("jobs.fields.parts_tax_rates.prt_discp")}
|
||||||
name={["parts_tax_rates", "PAN", "prt_tax_rt"]}
|
name={["parts_tax_rates", "PAO", "prt_discp"]}
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: required,
|
|
||||||
message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
|
||||||
|
name={["parts_tax_rates", "PAO", "prt_mktyp"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
|
||||||
|
name={["parts_tax_rates", "PAO", "prt_mkupp"]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
|
||||||
|
name={["parts_tax_rates", "PAO", "prt_tax_in"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item shouldUpdate>
|
||||||
|
{() => {
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
|
name={["parts_tax_rates", "PAO", "prt_tax_rt"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: form.getFieldValue([
|
||||||
|
"parts_tax_rates",
|
||||||
|
"PAO",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>{" "}
|
||||||
|
<LayoutFormRow header={t("joblines.fields.part_types.PAP")}>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_discp")}
|
||||||
|
name={["parts_tax_rates", "PAP", "prt_discp"]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
|
||||||
|
name={["parts_tax_rates", "PAP", "prt_mktyp"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
|
||||||
|
name={["parts_tax_rates", "PAP", "prt_mkupp"]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
|
||||||
|
name={["parts_tax_rates", "PAP", "prt_tax_in"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item shouldUpdate>
|
||||||
|
{() => {
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
|
name={["parts_tax_rates", "PAP", "prt_tax_rt"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: form.getFieldValue([
|
||||||
|
"parts_tax_rates",
|
||||||
|
"PAP",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAR")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAR")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -283,17 +447,27 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item shouldUpdate>
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
{() => {
|
||||||
name={["parts_tax_rates", "PAR", "prt_tax_rt"]}
|
return (
|
||||||
rules={[
|
<Form.Item
|
||||||
{
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
required: required,
|
name={["parts_tax_rates", "PAR", "prt_tax_rt"]}
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: form.getFieldValue([
|
||||||
>
|
"parts_tax_rates",
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
"PAR",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.PAS")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.PAS")}>
|
||||||
@@ -323,18 +497,78 @@ export function JobsDetailRatesParts({ jobRO, expanded, required = true }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item shouldUpdate>
|
||||||
|
{() => {
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
|
name={["parts_tax_rates", "PAS", "prt_tax_rt"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: form.getFieldValue([
|
||||||
|
"parts_tax_rates",
|
||||||
|
"PAS",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
</LayoutFormRow>
|
||||||
|
<LayoutFormRow header={t("joblines.fields.part_types.PASL")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
label={t("jobs.fields.parts_tax_rates.prt_discp")}
|
||||||
name={["parts_tax_rates", "PAS", "prt_tax_rt"]}
|
name={["parts_tax_rates", "PASL", "prt_discp"]}
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: required,
|
|
||||||
message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
|
||||||
|
name={["parts_tax_rates", "PASL", "prt_mktyp"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
|
||||||
|
name={["parts_tax_rates", "PASL", "prt_mkupp"]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
|
||||||
|
name={["parts_tax_rates", "PASL", "prt_tax_in"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item shouldUpdate>
|
||||||
|
{() => {
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
|
||||||
|
name={["parts_tax_rates", "PASL", "prt_tax_rt"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: form.getFieldValue([
|
||||||
|
"parts_tax_rates",
|
||||||
|
"PASL",
|
||||||
|
"prt_tax_in",
|
||||||
|
]),
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} max={1} precision={2} disabled={jobRO} />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow header={t("joblines.fields.part_types.CCDR")}>
|
<LayoutFormRow header={t("joblines.fields.part_types.CCDR")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -171,6 +171,14 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
prt_tax_in: true,
|
prt_tax_in: true,
|
||||||
prt_tax_rt: bodyshop.bill_tax_rates.state_tax_rate / 100,
|
prt_tax_rt: bodyshop.bill_tax_rates.state_tax_rate / 100,
|
||||||
},
|
},
|
||||||
|
PAG: {
|
||||||
|
prt_type: "PAG",
|
||||||
|
prt_discp: 0,
|
||||||
|
prt_mktyp: false,
|
||||||
|
prt_mkupp: 0,
|
||||||
|
prt_tax_in: true,
|
||||||
|
prt_tax_rt: bodyshop.bill_tax_rates.state_tax_rate / 100,
|
||||||
|
},
|
||||||
PAL: {
|
PAL: {
|
||||||
prt_type: "PAL",
|
prt_type: "PAL",
|
||||||
prt_discp: 0,
|
prt_discp: 0,
|
||||||
|
|||||||
@@ -82,7 +82,13 @@ export function JobsDetailPage({
|
|||||||
const result = await mutationUpdateJob({
|
const result = await mutationUpdateJob({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
job: values,
|
job: {
|
||||||
|
...values,
|
||||||
|
parts_tax_rates: {
|
||||||
|
...job.parts_tax_rates,
|
||||||
|
...values.parts_tax_rates,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const newTotals = await Axios.post("/job/totalsssu", {
|
const newTotals = await Axios.post("/job/totalsssu", {
|
||||||
|
|||||||
@@ -874,6 +874,7 @@
|
|||||||
"PAM": "Remanufactured",
|
"PAM": "Remanufactured",
|
||||||
"PAN": "New/OEM",
|
"PAN": "New/OEM",
|
||||||
"PAO": "Other",
|
"PAO": "Other",
|
||||||
|
"PAP": "OEM Partial",
|
||||||
"PAR": "Recored",
|
"PAR": "Recored",
|
||||||
"PAS": "Sublet",
|
"PAS": "Sublet",
|
||||||
"PASL": "Sublet"
|
"PASL": "Sublet"
|
||||||
@@ -1055,7 +1056,7 @@
|
|||||||
"pam": "Remanufactured",
|
"pam": "Remanufactured",
|
||||||
"pan": "OEM/New",
|
"pan": "OEM/New",
|
||||||
"pao": "Other",
|
"pao": "Other",
|
||||||
"pap": "EOM Partial",
|
"pap": "OEM Partial",
|
||||||
"par": "Re-cored",
|
"par": "Re-cored",
|
||||||
"parts_tax_rates": {
|
"parts_tax_rates": {
|
||||||
"prt_discp": "Discount %",
|
"prt_discp": "Discount %",
|
||||||
|
|||||||
@@ -874,6 +874,7 @@
|
|||||||
"PAM": "",
|
"PAM": "",
|
||||||
"PAN": "",
|
"PAN": "",
|
||||||
"PAO": "",
|
"PAO": "",
|
||||||
|
"PAP": "",
|
||||||
"PAR": "",
|
"PAR": "",
|
||||||
"PAS": "",
|
"PAS": "",
|
||||||
"PASL": ""
|
"PASL": ""
|
||||||
|
|||||||
@@ -874,6 +874,7 @@
|
|||||||
"PAM": "",
|
"PAM": "",
|
||||||
"PAN": "",
|
"PAN": "",
|
||||||
"PAO": "",
|
"PAO": "",
|
||||||
|
"PAP": "",
|
||||||
"PAR": "",
|
"PAR": "",
|
||||||
"PAS": "",
|
"PAS": "",
|
||||||
"PASL": ""
|
"PASL": ""
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ async function Totals(req, res) {
|
|||||||
res.status(400).send(JSON.stringify(error));
|
res.status(400).send(JSON.stringify(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function CalculateRatesTotals(ratesList, shoprates) {
|
function CalculateRatesTotals(ratesList) {
|
||||||
const jobLines = ratesList.joblines.filter((jl) => !jl.removed);
|
const jobLines = ratesList.joblines.filter((jl) => !jl.removed);
|
||||||
|
|
||||||
let ret = {
|
let ret = {
|
||||||
@@ -322,6 +322,14 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
let statePartsTax = Dinero();
|
let statePartsTax = Dinero();
|
||||||
let additionalItemsTax = Dinero();
|
let additionalItemsTax = Dinero();
|
||||||
|
|
||||||
|
//Audatex sends additional glass part types. IO-774
|
||||||
|
const BackupGlassTax =
|
||||||
|
job.parts_tax_rates.PAGD ||
|
||||||
|
job.parts_tax_rates.PAGF ||
|
||||||
|
job.parts_tax_rates.PAGP ||
|
||||||
|
job.parts_tax_rates.PAGQ ||
|
||||||
|
job.parts_tax_rates.PAGR;
|
||||||
|
|
||||||
job.joblines
|
job.joblines
|
||||||
.filter((jl) => !jl.removed)
|
.filter((jl) => !jl.removed)
|
||||||
.forEach((val) => {
|
.forEach((val) => {
|
||||||
@@ -344,6 +352,8 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
((job.parts_tax_rates &&
|
((job.parts_tax_rates &&
|
||||||
job.parts_tax_rates[val.part_type] &&
|
job.parts_tax_rates[val.part_type] &&
|
||||||
job.parts_tax_rates[val.part_type].prt_tax_rt) ||
|
job.parts_tax_rates[val.part_type].prt_tax_rt) ||
|
||||||
|
(val.part_type.startsWith("PAG") &&
|
||||||
|
BackupGlassTax.prt_tax_rt) ||
|
||||||
0) * 100
|
0) * 100
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user