import { Col, Collapse, Form, Input, InputNumber, Row, Switch } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import { bodyshopHasDmsKey } from "../../utils/dmsUtils.js";
import "./shop-info.responsibilitycenters.taxes.styles.scss";

const mapStateToProps = createStructuredSelector({
  //currentUser: selectCurrentUser
  bodyshop: selectBodyshop
});
const mapDispatchToProps = () => ({
  //setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoResponsibilityCenters);

const taxRootColProps = {
  xs: 24,
  sm: 12,
  md: 8,
  lg: { flex: "0 0 280px" },
  xl: { flex: "0 0 240px" },
  xxl: { flex: "0 0 300px" }
};

const taxTierFieldColProps = {
  xs: 24,
  sm: 12,
  lg: 6
};

export function ShopInfoResponsibilityCenters({ bodyshop, form }) {
  const { t } = useTranslation();
  const profileTaxCards = [];
  for (let typeNum = 1; typeNum <= 5; typeNum++) {
    const rootTaxItems = getRootTaxFormItems({ typeNum, bodyshop, t });

    profileTaxCards.push(
      <LayoutFormRow key={`profile-tax-type-${typeNum}`} header={t("bodyshop.labels.responsibilitycenters.tax_type_card", { typeNum })}>
        <div style={{ display: "grid", rowGap: 12 }}>
          <Row gutter={[16, 16]} wrap>
            {rootTaxItems.map((item, index) => (
              <Col key={item.key ?? `tax-root-${typeNum}-${index}`} {...taxRootColProps}>
                {item}
              </Col>
            ))}
          </Row>
          <Row gutter={[12, 12]} wrap className="responsibility-centers-tax-tier-grid">
            {Array.from({ length: 5 }, (_, index) => {
              const typeNumIterator = index + 1;
              const tierTaxItems = getTierTaxFormItems({
                typeNum,
                typeNumIterator,
                t
              });

              return (
                <Col
                  key={`tax-tier-row-${typeNum}-${typeNumIterator}`}
                  xs={24}
                  className="responsibility-centers-tax-tier-grid__col"
                >
                  <LayoutFormRow
                    header={t("bodyshop.labels.responsibilitycenters.tax_tier_card", { typeNumIterator })}
                    style={{ marginBottom: 0 }}
                    styles={{
                      header: {
                        paddingInline: 12
                      },
                      body: {
                        padding: 12
                      }
                    }}
                  >
                    <Row gutter={[12, 8]} wrap>
                      {tierTaxItems.map((item, tierIndex) => (
                        <Col key={item.key ?? `tax-tier-${typeNum}-${typeNumIterator}-${tierIndex}`} {...taxTierFieldColProps}>
                          {item}
                        </Col>
                      ))}
                    </Row>
                  </LayoutFormRow>
                </Col>
              );
            })}
          </Row>
        </div>
      </LayoutFormRow>
    );
  }

  return (
    <>
      <LayoutFormRow header={t("jobs.labels.cieca_pft")}>
        <div>{profileTaxCards}</div>
      </LayoutFormRow>

      <LayoutFormRow header={t("bodyshop.labels.responsibilitycenters.default_tax_setup")}>
        <Collapse
          items={[
            {
              key: "cieca_pfl",
              label: t("jobs.labels.cieca_pfl"),
              forceRender: true,
              children: (
                <>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAB")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAB",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAB", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAD")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAD",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAD", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAE")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAE",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAE", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAF")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAF",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAF", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAG")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAG",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAG", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAM")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAM",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAM", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAR")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAR",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAR", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAS")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAS",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAS", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.lbr_types.LAU")}>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_adjp")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tax_in")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.cieca_pfl.lbr_taxp")}
                          name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfl",
                                "LAU",
                                "lbr_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={2} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfl.lbr_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfl", "LAU", "lbr_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
              </>
            )
          },
          {
            key: "materials",
            label: t("jobs.fields.materials.materials"),
            forceRender: true,
            children: (
              <>
                <LayoutFormRow header={t("jobs.fields.materials.MAPA")}>
                  <Form.Item
                    label={t("jobs.fields.materials.cal_maxdlr")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "cal_maxdlr"]}
                  >
                    <InputNumber min={0} precision={2} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.cal_opcode")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "cal_opcode"]}
                  >
                    <Input />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_adjp")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.tax_ind")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "tax_ind"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.materials.mat_taxp")}
                          name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfm",
                                "MAPA",
                                "tax_ind"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfm", "MAPA", "mat_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("jobs.fields.materials.MASH")}>
                  <Form.Item
                    label={t("jobs.fields.materials.cal_maxdlr")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "cal_maxdlr"]}
                  >
                    <InputNumber min={0} precision={2} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.cal_opcode")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "cal_opcode"]}
                  >
                    <Input />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_adjp")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_adjp"]}
                  >
                    <InputNumber min={-100} max={100} precision={4} suffix="%" />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.tax_ind")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "tax_ind"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item shouldUpdate>
                    {() => {
                      return (
                        <Form.Item
                          label={t("jobs.fields.materials.mat_taxp")}
                          name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_taxp"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "cieca_pfm",
                                "MASH",
                                "tax_ind"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} suffix="%" />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in1")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in2")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in3")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in4")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.materials.mat_tx_in5")}
                    name={["md_responsibility_centers", "cieca_pfm", "MASH", "mat_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                </>
              )
            },
            {
              key: "cieca_pfo",
              label: t("jobs.labels.cieca_pfo"),
              forceRender: true,
              children: (
                <>
                <LayoutFormRow noDivider>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.tow_t_in1")}
                    name={["md_responsibility_centers", "cieca_pfo", "tow_t_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.tow_t_in2")}
                    name={["md_responsibility_centers", "cieca_pfo", "tow_t_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.tow_t_in3")}
                    name={["md_responsibility_centers", "cieca_pfo", "tow_t_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.tow_t_in4")}
                    name={["md_responsibility_centers", "cieca_pfo", "tow_t_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.tow_t_in5")}
                    name={["md_responsibility_centers", "cieca_pfo", "tow_t_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>

                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.stor_t_in1")}
                    name={["md_responsibility_centers", "cieca_pfo", "stor_t_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.stor_t_in2")}
                    name={["md_responsibility_centers", "cieca_pfo", "stor_t_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.stor_t_in3")}
                    name={["md_responsibility_centers", "cieca_pfo", "stor_t_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.stor_t_in4")}
                    name={["md_responsibility_centers", "cieca_pfo", "stor_t_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.cieca_pfo.stor_t_in5")}
                    name={["md_responsibility_centers", "cieca_pfo", "stor_t_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
              </>
            )
          },
          {
            key: "rates",
            label: t("jobs.labels.parts_tax_rates"),
            forceRender: true,
            children: (
              <>
                <LayoutFormRow header={t("joblines.fields.part_types.PAA")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "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={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAA",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAA", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAC")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "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={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAC",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAC", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAL")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "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={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAL",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAL", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAG")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "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={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAG",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAG", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAM")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "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={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAM",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAM", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAN")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "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={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAN",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    hidden
                    label={t("jobs.fields.parts_tax_rates.prt_tx_ty1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAN", "prt_tx_ty1"]}
                  >
                    <Input />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAO")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "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={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAO",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAO", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAP")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "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={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAP",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAP", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAR")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "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={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAR",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAR", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PAS")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "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={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PAS",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PAS", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.PASL")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "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={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_tax_rt"]}
                          rules={[
                            {
                              required: form.getFieldValue([
                                "md_responsibility_centers",
                                "parts_tax_rates",
                                "PASL",
                                "prt_tax_in"
                              ])
                              //message: t("general.validation.required"),
                            }
                          ]}
                        >
                          <InputNumber min={0} max={100} precision={4} />
                        </Form.Item>
                      );
                    }}
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in1")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_tx_in1"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in2")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_tx_in2"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in3")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_tx_in3"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in4")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_tx_in4"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tx_in5")}
                    name={["md_responsibility_centers", "parts_tax_rates", "PASL", "prt_tx_in5"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.CCDR")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCDR", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCDR", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCDR", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCDR", "prt_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCDR", "prt_tax_rt"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.CCF")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCF", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCF", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCF", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCF", "prt_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCF", "prt_tax_rt"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.CCM")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCM", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCM", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCM", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCM", "prt_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCM", "prt_tax_rt"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.CCC")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCC", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCC", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCC", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCC", "prt_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCC", "prt_tax_rt"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow header={t("joblines.fields.part_types.CCD")}>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_discp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCD", "prt_discp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mktyp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCD", "prt_mktyp"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_mkupp")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCD", "prt_mkupp"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_in")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCD", "prt_tax_in"]}
                    valuePropName="checked"
                  >
                    <Switch />
                  </Form.Item>
                  <Form.Item
                    label={t("jobs.fields.parts_tax_rates.prt_tax_rt")}
                    name={["md_responsibility_centers", "parts_tax_rates", "CCD", "prt_tax_rt"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                </LayoutFormRow>
                <LayoutFormRow>
                  <Form.Item label={t("jobs.fields.tax_tow_rt")} name={["md_responsibility_centers", "tax_tow_rt"]}>
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  <Form.Item label={t("jobs.fields.tax_str_rt")} name={["md_responsibility_centers", "tax_str_rt"]}>
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  {InstanceRenderManager({ imex: true, rome: false }) ? (
                    <>
                      <Form.Item
                        label={t("jobs.fields.tax_paint_mat_rt")}
                        name={["md_responsibility_centers", "tax_paint_mat_rt"]}
                      >
                        <InputNumber min={0} max={100} precision={4} />
                      </Form.Item>
                      <Form.Item
                        label={t("jobs.fields.tax_shop_mat_rt")}
                        name={["md_responsibility_centers", "tax_shop_mat_rt"]}
                      >
                        <InputNumber min={0} max={100} precision={4} />
                      </Form.Item>
                    </>
                  ) : null}
                  <Form.Item label={t("jobs.fields.tax_sub_rt")} name={["md_responsibility_centers", "tax_sub_rt"]}>
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                  {InstanceRenderManager({ imex: true, rome: false }) ? (
                    <Form.Item label={t("jobs.fields.tax_lbr_rt")} name={["md_responsibility_centers", "tax_lbr_rt"]}>
                      <InputNumber min={0} max={100} precision={4} />
                    </Form.Item>
                  ) : null}
                  <Form.Item
                    label={t("jobs.fields.tax_levies_rt")}
                    name={["md_responsibility_centers", "tax_levies_rt"]}
                  >
                    <InputNumber min={0} max={100} precision={4} />
                  </Form.Item>
                </LayoutFormRow>
                </>
              )
            }
          ]}
        />
      </LayoutFormRow>
    </>
  );
}

function getRootTaxFormItems({ typeNum, bodyshop, t }) {
  return [
    <Form.Item
      key={`tax_type_${typeNum}_type`}
      label={t("bodyshop.fields.responsibilitycenter_tax_type", { typeNum })}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, `tax_type${typeNum}`]}
    >
      <Input />
    </Form.Item>,
    <Form.Item
      key={`tax_type_${typeNum}_name`}
      label={t("bodyshop.fields.responsibilitycenters.state_tax")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, "name"]}
    >
      <Input />
    </Form.Item>,
    <Form.Item
      key={`tax_type_${typeNum}_accountdesc`}
      label={t("bodyshop.fields.responsibilitycenter_accountdesc")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, "accountdesc"]}
    >
      <Input />
    </Form.Item>,
    <Form.Item
      key={`tax_type_${typeNum}_accountitem`}
      label={t("bodyshop.fields.responsibilitycenter_accountitem")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, "accountitem"]}
    >
      <Input />
    </Form.Item>,
    ...(bodyshopHasDmsKey(bodyshop)
      ? [
          <Form.Item
            key={`tax_type_${typeNum}_dms_acctnumber`}
            label={t("bodyshop.fields.dms.dms_acctnumber")}
            rules={[
              {
                required: true
                //message: t("general.validation.required"),
              }
            ]}
            name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, "dms_acctnumber"]}
          >
            <Input />
          </Form.Item>
        ]
      : [])
  ];
}

function getTierTaxFormItems({ typeNum, typeNumIterator, t }) {
  return [
    <Form.Item
      key={`tax_type_${typeNum}_tier_${typeNumIterator}`}
      label={t("bodyshop.labels.responsibilitycenters.tax_tier_short")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, `ty${typeNum}_tier${typeNumIterator}`]}
    >
      <InputNumber precision={0} min={0} />
    </Form.Item>,
    <Form.Item
      key={`tax_type_${typeNum}_threshold_${typeNumIterator}`}
      label={t("bodyshop.labels.responsibilitycenters.tax_threshold_short")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, `ty${typeNum}_thres${typeNumIterator}`]}
    >
      <InputNumber min={0} precision={2} />
    </Form.Item>,
    <Form.Item
      key={`tax_type_${typeNum}_rate_${typeNumIterator}`}
      label={t("bodyshop.labels.responsibilitycenters.tax_rate_short")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, `ty${typeNum}_rate${typeNumIterator}`]}
    >
      <InputNumber min={0} precision={2} suffix="%" />
    </Form.Item>,
    <Form.Item
      key={`tax_type_${typeNum}_surcharge_${typeNumIterator}`}
      label={t("bodyshop.labels.responsibilitycenters.tax_surcharge_short")}
      rules={[
        {
          required: true
          //message: t("general.validation.required"),
        }
      ]}
      name={["md_responsibility_centers", "taxes", `tax_ty${typeNum}`, `ty${typeNum}_sur${typeNumIterator}`]}
    >
      <InputNumber min={0} precision={2} suffix="%" />
    </Form.Item>
  ];
}
