diff --git a/_reference/OEC/Audatex.xsl b/_reference/OEC/Audatex.xsl
new file mode 100644
index 000000000..5a5d61e78
--- /dev/null
+++ b/_reference/OEC/Audatex.xsl
@@ -0,0 +1,586 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OECTrans.ImportTrans
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CHEV
+ CHEV
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ Audatex.xml
+ Audatex.xsl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Salvage or Assembly
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PAN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 0
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+ False
+
+
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+
+
+
+
+ False
+
+
+ False
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/_reference/OEC/AudatexMapping.xml b/_reference/OEC/AudatexMapping.xml
new file mode 100644
index 000000000..0068c7229
--- /dev/null
+++ b/_reference/OEC/AudatexMapping.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Audatex.xsl
+
+
diff --git a/_reference/OEC/CCC.xsl b/_reference/OEC/CCC.xsl
new file mode 100644
index 000000000..96e58c428
--- /dev/null
+++ b/_reference/OEC/CCC.xsl
@@ -0,0 +1,607 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OECTrans.ImportTrans
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ CCC.xml
+ CCC.xsl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PAN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Salvage or Assembly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PAN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 4
+ 0
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 4
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ False
+ False
+ False
+ False
+ True
+
+
+
+
+ False
+
+
+ False
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/_reference/OEC/CCCMapping.xml b/_reference/OEC/CCCMapping.xml
new file mode 100644
index 000000000..ab4d3b4a1
--- /dev/null
+++ b/_reference/OEC/CCCMapping.xml
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ccc.xsl
+
+
diff --git a/_reference/OEC/Mitchell.xsl b/_reference/OEC/Mitchell.xsl
new file mode 100644
index 000000000..48fbd5d65
--- /dev/null
+++ b/_reference/OEC/Mitchell.xsl
@@ -0,0 +1,580 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OECTrans.ImportTrans
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+ Mitchell.xml
+ Mitchell.xsl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Salvage or Assembly
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PAN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 4
+ 4
+ 0
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 4
+ 4
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+ False
+
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+
+
+
+
+ False
+
+
+ False
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/_reference/OEC/MitchellMapping.xml b/_reference/OEC/MitchellMapping.xml
new file mode 100644
index 000000000..91ba33d17
--- /dev/null
+++ b/_reference/OEC/MitchellMapping.xml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mitchell.xsl
+
+
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 3dd56671f..6556d2dc7 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -6491,6 +6491,27 @@
+
+ pag
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
pal
false
@@ -12146,6 +12167,37 @@
+
+ dms
+
+
+ labels
+
+
+ refreshallocations
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
+
+
+
+
documents
@@ -17809,6 +17861,32 @@
+
+ labels
+
+
+ refreshallocations
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
+
+
post
false
@@ -18315,6 +18393,27 @@
+
+ sendtodms
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
sync
false
@@ -20419,6 +20518,27 @@
+
+ dms_allocation
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
driveable
false
@@ -22151,6 +22271,27 @@
+
+ po_number
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
policy_no
false
diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx
index 22aa62f23..29bd6cbc7 100644
--- a/client/src/components/bill-form/bill-form.lines.component.jsx
+++ b/client/src/components/bill-form/bill-form.lines.component.jsx
@@ -14,6 +14,7 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
+import CiecaSelect, { GetPartTypeName } from "../../utils/Ciecaselect";
import BillLineSearchSelect from "../bill-line-search-select/bill-line-search-select.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
@@ -72,11 +73,13 @@ export function BillEnterModalLinesComponent({
quantity: opt.part_qty || 1,
actual_price: opt.cost,
cost_center: opt.part_type
- ? responsibilityCenters.defaults &&
- (responsibilityCenters.defaults.costs[
- opt.part_type
- ] ||
- null)
+ ? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid
+ ? GetPartTypeName(opt.part_type)
+ : responsibilityCenters.defaults &&
+ (responsibilityCenters.defaults.costs[
+ opt.part_type
+ ] ||
+ null)
: null,
};
}
@@ -224,6 +227,7 @@ export function BillEnterModalLinesComponent({
key: `${field.index}cost_center`,
name: [field.name, "cost_center"],
label: t("billlines.fields.cost_center"),
+ valuePropName: "value",
rules: [
{
required: true,
@@ -233,10 +237,12 @@ export function BillEnterModalLinesComponent({
};
},
formInput: (record, index) => (
-
- {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber)&& (
+ {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
<>
{form.getFieldValue("cdk_dealerid")}
@@ -164,7 +164,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
},
]}
>
-
+
{t("jobs.fields.ro_number")}
@@ -582,7 +582,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-ats`}
name={[field.name, "costs", "ATS"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -613,7 +613,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAA`}
name={[field.name, "costs", "LAA"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -644,7 +644,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAB`}
name={[field.name, "costs", "LAB"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -675,7 +675,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAD`}
name={[field.name, "costs", "LAD"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -706,7 +706,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAE`}
name={[field.name, "costs", "LAE"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -737,7 +737,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAF`}
name={[field.name, "costs", "LAF"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -768,7 +768,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAG`}
name={[field.name, "costs", "LAG"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -799,7 +799,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAM`}
name={[field.name, "costs", "LAM"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -830,7 +830,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAR`}
name={[field.name, "costs", "LAR"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -861,7 +861,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAS`}
name={[field.name, "costs", "LAS"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -892,7 +892,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LAU`}
name={[field.name, "costs", "LAU"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -923,7 +923,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LA1`}
name={[field.name, "costs", "LA1"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -954,7 +954,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LA2`}
name={[field.name, "costs", "LA2"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -985,7 +985,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LA3`}
name={[field.name, "costs", "LA3"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1016,7 +1016,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-LA4`}
name={[field.name, "costs", "LA4"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1047,7 +1047,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAA`}
name={[field.name, "costs", "PAA"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1078,7 +1078,38 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAC`}
name={[field.name, "costs", "PAC"]}
>
-
+
+ {costOptions.map((item, idx) => (
+
+ {item}
+
+ ))}
+
+
+ ({
+ validator(rule, value) {
+ if (costOptions.includes(value)) {
+ return Promise.resolve();
+ }
+ return Promise.reject(
+ t("bodyshop.validation.centermustexist")
+ );
+ },
+ }),
+ ]}
+ key={`${index}costs-PAG`}
+ name={[field.name, "costs", "PAG"]}
+ >
+
{costOptions.map((item, idx) => (
{item}
@@ -1109,7 +1140,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAL`}
name={[field.name, "costs", "PAL"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1140,7 +1171,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAM`}
name={[field.name, "costs", "PAM"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1171,7 +1202,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAN`}
name={[field.name, "costs", "PAN"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1202,7 +1233,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAO`}
name={[field.name, "costs", "PAO"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1233,7 +1264,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAP`}
name={[field.name, "costs", "PAP"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1264,7 +1295,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAR`}
name={[field.name, "costs", "PAR"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1295,7 +1326,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PAS`}
name={[field.name, "costs", "PAS"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1326,7 +1357,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-PASL`}
name={[field.name, "costs", "PASL"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1357,7 +1388,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-TOW`}
name={[field.name, "costs", "TOW"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1388,7 +1419,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-MAPA`}
name={[field.name, "costs", "MAPA"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1419,7 +1450,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}costs-MASH`}
name={[field.name, "costs", "MASH"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -1454,7 +1485,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-ATS`}
name={[field.name, "profits", "ATS"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1485,7 +1516,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAA`}
name={[field.name, "profits", "LAA"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1516,7 +1547,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAB`}
name={[field.name, "profits", "LAB"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1547,7 +1578,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAD`}
name={[field.name, "profits", "LAD"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1578,7 +1609,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAE`}
name={[field.name, "profits", "LAE"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1609,7 +1640,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAF`}
name={[field.name, "profits", "LAF"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1640,7 +1671,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAG`}
name={[field.name, "profits", "LAG"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1671,7 +1702,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAM`}
name={[field.name, "profits", "LAM"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1702,7 +1733,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAR`}
name={[field.name, "profits", "LAR"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1733,7 +1764,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAS`}
name={[field.name, "profits", "LAS"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1764,7 +1795,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LAU`}
name={[field.name, "profits", "LAU"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1795,7 +1826,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LA1`}
name={[field.name, "profits", "LA1"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1826,7 +1857,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LA2`}
name={[field.name, "profits", "LA2"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1857,7 +1888,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LA3`}
name={[field.name, "profits", "LA3"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1888,7 +1919,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-LA4`}
name={[field.name, "profits", "LA4"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1919,7 +1950,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAA`}
name={[field.name, "profits", "PAA"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -1950,7 +1981,38 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAC`}
name={[field.name, "profits", "PAC"]}
>
-
+
+ {profitOptions.map((item, idx) => (
+
+ {item}
+
+ ))}
+
+
+ ({
+ validator(rule, value) {
+ if (profitOptions.includes(value)) {
+ return Promise.resolve();
+ }
+ return Promise.reject(
+ t("bodyshop.validation.centermustexist")
+ );
+ },
+ }),
+ ]}
+ key={`${index}profits-PAG`}
+ name={[field.name, "profits", "PAG"]}
+ >
+
{profitOptions.map((item, idx) => (
{item}
@@ -1981,7 +2043,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAL`}
name={[field.name, "profits", "PAL"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2012,7 +2074,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAM`}
name={[field.name, "profits", "PAM"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2043,7 +2105,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAN`}
name={[field.name, "profits", "PAN"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2074,7 +2136,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAO`}
name={[field.name, "profits", "PAO"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2105,7 +2167,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAP`}
name={[field.name, "profits", "PAP"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2136,7 +2198,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAR`}
name={[field.name, "profits", "PAR"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2167,7 +2229,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PAS`}
name={[field.name, "profits", "PAS"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2198,7 +2260,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-PASL`}
name={[field.name, "profits", "PASL"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2229,7 +2291,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-TOW`}
name={[field.name, "profits", "TOW"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2260,7 +2322,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-MAPA`}
name={[field.name, "profits", "MAPA"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2291,7 +2353,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
key={`${index}profits-MASH`}
name={[field.name, "profits", "MASH"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -2342,7 +2404,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "ATS"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2370,7 +2432,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAA"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2398,7 +2460,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAB"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2426,7 +2488,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAD"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2454,7 +2516,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAE"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2482,7 +2544,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAF"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2510,7 +2572,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAG"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2538,7 +2600,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAM"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2566,7 +2628,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAR"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2594,7 +2656,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAS"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2622,7 +2684,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LAU"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2650,7 +2712,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LA1"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2678,7 +2740,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LA2"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2706,7 +2768,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LA3"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2734,7 +2796,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "LA4"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2762,7 +2824,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAA"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2790,7 +2852,35 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAC"]}
>
-
+
+ {costOptions.map((item, idx) => (
+
+ {item}
+
+ ))}
+
+
+ ({
+ validator(rule, value) {
+ if (costOptions.includes(value)) {
+ return Promise.resolve();
+ }
+ return Promise.reject(
+ t("bodyshop.validation.centermustexist")
+ );
+ },
+ }),
+ ]}
+ name={["md_responsibility_centers", "defaults", "costs", "PAG"]}
+ >
+
{costOptions.map((item, idx) => (
{item}
@@ -2818,7 +2908,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAL"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2846,7 +2936,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAM"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2874,7 +2964,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAN"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2902,7 +2992,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAO"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2930,7 +3020,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAP"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2958,7 +3048,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAR"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -2986,7 +3076,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PAS"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -3014,7 +3104,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "PASL"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -3042,7 +3132,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "TOW"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -3070,7 +3160,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "MAPA"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -3098,7 +3188,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "costs", "MASH"]}
>
-
+
{costOptions.map((item, idx) => (
{item}
@@ -3128,7 +3218,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "ATS"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3156,7 +3246,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAA"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3184,7 +3274,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAB"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3212,7 +3302,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAD"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3240,7 +3330,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAE"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3268,7 +3358,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAF"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3296,7 +3386,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAG"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3324,7 +3414,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAM"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3352,7 +3442,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAR"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3380,7 +3470,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAS"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3408,7 +3498,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LAU"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3436,7 +3526,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LA1"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3464,7 +3554,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LA2"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3492,7 +3582,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LA3"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3520,7 +3610,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "LA4"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3548,7 +3638,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAA"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3576,7 +3666,35 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAC"]}
>
-
+
+ {profitOptions.map((item, idx) => (
+
+ {item}
+
+ ))}
+
+
+ ({
+ validator(rule, value) {
+ if (profitOptions.includes(value)) {
+ return Promise.resolve();
+ }
+ return Promise.reject(
+ t("bodyshop.validation.centermustexist")
+ );
+ },
+ }),
+ ]}
+ name={["md_responsibility_centers", "defaults", "profits", "PAG"]}
+ >
+
{profitOptions.map((item, idx) => (
{item}
@@ -3604,7 +3722,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAL"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3632,7 +3750,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAM"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3660,7 +3778,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAN"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3688,7 +3806,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAO"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3716,7 +3834,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAP"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3744,7 +3862,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAR"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3772,7 +3890,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PAS"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3800,7 +3918,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "PASL"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3828,7 +3946,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "TOW"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3856,7 +3974,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "MAPA"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
@@ -3884,7 +4002,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
]}
name={["md_responsibility_centers", "defaults", "profits", "MASH"]}
>
-
+
{profitOptions.map((item, idx) => (
{item}
diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx
index 3a2fbfd0d..bab15fbf6 100644
--- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx
+++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx
@@ -47,9 +47,13 @@ export function TimeTicketModalComponent({
>
{emps &&
emps.rates.map((item) => (
-
+
{item.cost_center === "timetickets.labels.shift"
? t(item.cost_center)
+ : bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
+ ? t(
+ `joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`
+ )
: item.cost_center}
))}
@@ -137,6 +141,7 @@ export function TimeTicketModalComponent({
- bodyshop.md_responsibility_centers.defaults.costs[key] ===
- changedFields.cost_center
- ),
+ ciecacode:
+ bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
+ ? changedFields.cost_center
+ : Object.keys(
+ bodyshop.md_responsibility_centers.defaults.costs
+ ).find(
+ (key) =>
+ bodyshop.md_responsibility_centers.defaults.costs[key] ===
+ changedFields.cost_center
+ ),
});
}
};
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index c3edbd04f..6729a1138 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -1695,6 +1695,7 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
ro_number
invoice_allocation
ins_co_id
+ dms_allocation
id
ded_amt
ded_status
diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx
index 50ccae32e..058e9be74 100644
--- a/client/src/pages/jobs-close/jobs-close.component.jsx
+++ b/client/src/pages/jobs-close/jobs-close.component.jsx
@@ -9,6 +9,7 @@ import {
Divider,
PageHeader,
InputNumber,
+ Input,
} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -26,6 +27,8 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import LayoutFormRow from "../../components/layout-form-row/layout-form-row.component";
import DateTimePicker from "../../components/form-date-time-picker/form-date-time-picker.component";
import moment from "moment";
+import { Link } from "react-router-dom";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
@@ -59,6 +62,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
actual_delivery: values.actual_delivery,
kmin: values.kmin,
kmout: values.kmout,
+ dms_allocation: values.dms_allocation,
},
},
refetchQueries: ["QUERY_JOB_CLOSE_DETAILS"],
@@ -117,6 +121,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
: job.scheduled_delivery && moment(job.scheduled_delivery),
kmin: job.kmin,
kmout: job.kmout,
+ dms_allocation: job.dms_allocation,
}}
scrollToFirstError
>
@@ -141,7 +146,11 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
{t("general.actions.close")}
-
+
+
+
}
@@ -247,6 +256,19 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
)}
+ {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
+
+
+
+ )}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 30b9fc6ac..51497bf15 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -413,6 +413,7 @@
"mash": "Shop Materials",
"paa": "Aftermarket",
"pac": "Chrome",
+ "pag": "Glass",
"pal": "LKQ",
"pam": "Remanufactured",
"pan": "OEM",
@@ -759,6 +760,11 @@
"projectedmonthlysales": "Projected Monthly Sales"
}
},
+ "dms": {
+ "labels": {
+ "refreshallocations": "Refresh to see DMS Allocataions."
+ }
+ },
"documents": {
"actions": {
"delete": "Delete Selected Documents",
@@ -1107,6 +1113,9 @@
"createnewcustomer": "Create New Customer",
"findmakemodelcode": "Find Make/Model Code",
"getmakes": "",
+ "labels": {
+ "refreshallocations": "Refresh this component to see the DMS allocations."
+ },
"post": "Post",
"refetchmakesmodels": "Refetch Make and Model Codes",
"usegeneric": "Use Generic Customer",
@@ -1132,6 +1141,7 @@
"removefromproduction": "Remove from Production",
"schedule": "Schedule",
"sendcsi": "Send CSI",
+ "sendtodms": "Send to DMS",
"sync": "Sync",
"uninvoice": "Uninvoice",
"unvoid": "Unvoid Job",
@@ -1241,6 +1251,7 @@
"story": "Story",
"vinowner": "VIN Owner"
},
+ "dms_allocation": "DMS Allocation",
"driveable": "Driveable",
"employee_body": "Body",
"employee_csr": "Customer Service Rep.",
@@ -1327,6 +1338,7 @@
"pas": "Sublet",
"pay_date": "Pay Date",
"phoneshort": "PH",
+ "po_number": "PO Number",
"policy_no": "Policy #",
"ponumber": "PO Number",
"production_vars": {
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index e79d937b3..bd1524e12 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -413,6 +413,7 @@
"mash": "",
"paa": "",
"pac": "",
+ "pag": "",
"pal": "",
"pam": "",
"pan": "",
@@ -759,6 +760,11 @@
"projectedmonthlysales": ""
}
},
+ "dms": {
+ "labels": {
+ "refreshallocations": ""
+ }
+ },
"documents": {
"actions": {
"delete": "",
@@ -1107,6 +1113,9 @@
"createnewcustomer": "",
"findmakemodelcode": "",
"getmakes": "",
+ "labels": {
+ "refreshallocations": ""
+ },
"post": "",
"refetchmakesmodels": "",
"usegeneric": "",
@@ -1132,6 +1141,7 @@
"removefromproduction": "",
"schedule": "Programar",
"sendcsi": "",
+ "sendtodms": "",
"sync": "",
"uninvoice": "",
"unvoid": "",
@@ -1241,6 +1251,7 @@
"story": "",
"vinowner": ""
},
+ "dms_allocation": "",
"driveable": "",
"employee_body": "",
"employee_csr": "Representante de servicio al cliente.",
@@ -1327,6 +1338,7 @@
"pas": "",
"pay_date": "Fecha de Pay",
"phoneshort": "PH",
+ "po_number": "",
"policy_no": "Política #",
"ponumber": "numero postal",
"production_vars": {
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 9caebf657..86d79c2d0 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -413,6 +413,7 @@
"mash": "",
"paa": "",
"pac": "",
+ "pag": "",
"pal": "",
"pam": "",
"pan": "",
@@ -759,6 +760,11 @@
"projectedmonthlysales": ""
}
},
+ "dms": {
+ "labels": {
+ "refreshallocations": ""
+ }
+ },
"documents": {
"actions": {
"delete": "",
@@ -1107,6 +1113,9 @@
"createnewcustomer": "",
"findmakemodelcode": "",
"getmakes": "",
+ "labels": {
+ "refreshallocations": ""
+ },
"post": "",
"refetchmakesmodels": "",
"usegeneric": "",
@@ -1132,6 +1141,7 @@
"removefromproduction": "",
"schedule": "Programme",
"sendcsi": "",
+ "sendtodms": "",
"sync": "",
"uninvoice": "",
"unvoid": "",
@@ -1241,6 +1251,7 @@
"story": "",
"vinowner": ""
},
+ "dms_allocation": "",
"driveable": "",
"employee_body": "",
"employee_csr": "représentant du service à la clientèle",
@@ -1327,6 +1338,7 @@
"pas": "",
"pay_date": "Date d'Pay",
"phoneshort": "PH",
+ "po_number": "",
"policy_no": "Politique #",
"ponumber": "Numéro de bon de commande",
"production_vars": {
diff --git a/client/src/utils/Ciecaselect.jsx b/client/src/utils/Ciecaselect.jsx
new file mode 100644
index 000000000..3b22deb5a
--- /dev/null
+++ b/client/src/utils/Ciecaselect.jsx
@@ -0,0 +1,103 @@
+import React from "react";
+import { Select } from "antd";
+import i18n from "../translations/i18n";
+
+export default function CiecaSelect(parts = true, labor = true) {
+ return (
+ <>
+ {labor && (
+ <>
+
+ {i18n.t("joblines.fields.lbr_types.LAA")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAB")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAD")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAE")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAF")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAG")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAM")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAR")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAS")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LAU")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LA1")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LA2")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LA3")}
+
+
+ {i18n.t("joblines.fields.lbr_types.LA4")}
+
+ >
+ )}
+ {parts && (
+ <>
+
+ {i18n.t("joblines.fields.part_types.PAA")}
+
+
+ {i18n.t("joblines.fields.part_types.PAC")}
+
+
+
+ {i18n.t("joblines.fields.part_types.PAL")}
+
+
+ {i18n.t("joblines.fields.part_types.PAG")}
+
+
+ {i18n.t("joblines.fields.part_types.PAM")}
+
+
+ {i18n.t("joblines.fields.part_types.PAP")}
+
+
+ {i18n.t("joblines.fields.part_types.PAN")}
+
+
+ {i18n.t("joblines.fields.part_types.PAO")}
+
+
+ {i18n.t("joblines.fields.part_types.PAR")}
+
+
+ {i18n.t("joblines.fields.part_types.PAS")}
+
+ >
+ )}
+ >
+ );
+}
+
+export function GetPartTypeName(part_type) {
+ console.log(part_type);
+ if (!part_type) return null;
+ return i18n.t(`joblines.fields.part_types.${part_type.toUpperCase()}`);
+}
+
+export function Get(part_type) {
+ console.log(part_type);
+ if (!part_type) return null;
+ return i18n.t(`joblines.fields.part_types.${part_type.toUpperCase()}`);
+}
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index 237c695b7..9bdea1b51 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -2616,6 +2616,7 @@
- ded_status
- deliverchecklist
- depreciation_taxes
+ - dms_allocation
- driveable
- employee_body
- employee_csr
@@ -2868,6 +2869,7 @@
- ded_status
- deliverchecklist
- depreciation_taxes
+ - dms_allocation
- driveable
- employee_body
- employee_csr
@@ -3130,6 +3132,7 @@
- ded_status
- deliverchecklist
- depreciation_taxes
+ - dms_allocation
- driveable
- employee_body
- employee_csr
diff --git a/hasura/migrations/1638467360308_alter_table_public_jobs_add_column_dms_allocation/down.sql b/hasura/migrations/1638467360308_alter_table_public_jobs_add_column_dms_allocation/down.sql
new file mode 100644
index 000000000..c434a9935
--- /dev/null
+++ b/hasura/migrations/1638467360308_alter_table_public_jobs_add_column_dms_allocation/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."jobs" add column "dms_allocation" text
+-- null;
diff --git a/hasura/migrations/1638467360308_alter_table_public_jobs_add_column_dms_allocation/up.sql b/hasura/migrations/1638467360308_alter_table_public_jobs_add_column_dms_allocation/up.sql
new file mode 100644
index 000000000..34284d636
--- /dev/null
+++ b/hasura/migrations/1638467360308_alter_table_public_jobs_add_column_dms_allocation/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."jobs" add column "dms_allocation" text
+ null;
diff --git a/server/cdk/cdk-calculate-allocations.js b/server/cdk/cdk-calculate-allocations.js
index dc386e618..f7db405b8 100644
--- a/server/cdk/cdk-calculate-allocations.js
+++ b/server/cdk/cdk-calculate-allocations.js
@@ -106,10 +106,23 @@ exports.default = async function (socket, jobid) {
return acc;
}, {});
+ const selectedDmsAllocationConfig =
+ bodyshop.md_responsibility_centers.dms_defaults.find(
+ (d) => d.name === job.dms_allocation
+ );
+ CdkBase.createLogEvent(
+ socket,
+ "DEBUG",
+ `Using DMS Allocation ${
+ selectedDmsAllocationConfig && selectedDmsAllocationConfig.name
+ } for cost export.`
+ );
+
const costCenterHash = job.bills.reduce((bill_acc, bill_val) => {
bill_val.billlines.map((line_val) => {
- if (!bill_acc[line_val.cost_center])
- bill_acc[line_val.cost_center] = Dinero();
+ if (!bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]])
+ bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]] =
+ Dinero();
let lineDinero = Dinero({
amount: Math.round((line_val.actual_cost || 0) * 100),
@@ -117,8 +130,10 @@ exports.default = async function (socket, jobid) {
.multiply(line_val.quantity)
.multiply(bill_val.is_credit_memo ? -1 : 1);
- bill_acc[line_val.cost_center] =
- bill_acc[line_val.cost_center].add(lineDinero);
+ bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]] =
+ bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]].add(
+ lineDinero
+ );
return null;
});
return bill_acc;
@@ -136,17 +151,19 @@ exports.default = async function (socket, jobid) {
),
});
//Add it to the right cost center.
- if (!costCenterHash[ticket.cost_center])
- costCenterHash[ticket.cost_center] = Dinero();
+ if (!costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]])
+ costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]] =
+ Dinero();
- costCenterHash[ticket.cost_center] =
- costCenterHash[ticket.cost_center].add(TicketTotal);
+ costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]] =
+ costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]].add(
+ TicketTotal
+ );
});
if (!hasMapaLine && job.job_totals.rates.mapa.total.amount > 0) {
// console.log("Adding MAPA Line Manually.");
- const mapaAccountName =
- bodyshop.md_responsibility_centers.defaults.profits.MAPA;
+ const mapaAccountName = selectedDmsAllocationConfig.profits.MAPA;
const mapaAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === mapaAccountName
@@ -167,8 +184,7 @@ exports.default = async function (socket, jobid) {
if (!hasMashLine && job.job_totals.rates.mash.total.amount > 0) {
// console.log("Adding MASH Line Manually.");
- const mashAccountName =
- bodyshop.md_responsibility_centers.defaults.profits.MASH;
+ const mashAccountName = selectedDmsAllocationConfig.profits.MASH;
const mashAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === mashAccountName
@@ -198,7 +214,7 @@ exports.default = async function (socket, jobid) {
if (job.towing_payable && job.towing_payable !== 0) {
const towAccountName =
- bodyshop.md_responsibility_centers.defaults.profits.TOW;
+ selectedDmsAllocationConfig.profits.TOW;
const towAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === towAccountName
@@ -219,7 +235,7 @@ exports.default = async function (socket, jobid) {
}
if (job.storage_payable && job.storage_payable !== 0) {
const storageAccountName =
- bodyshop.md_responsibility_centers.defaults.profits.TOW;
+ selectedDmsAllocationConfig.profits.TOW;
const towAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === storageAccountName
@@ -243,7 +259,7 @@ exports.default = async function (socket, jobid) {
if (job.adjustment_bottom_line && job.adjustment_bottom_line !== 0) {
const otherAccountName =
- bodyshop.md_responsibility_centers.defaults.profits.PAO;
+ selectedDmsAllocationConfig.profits.PAO;
const otherAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === otherAccountName
diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js
index 580ca169c..fd30f7242 100644
--- a/server/graphql-client/queries.js
+++ b/server/graphql-client/queries.js
@@ -253,6 +253,7 @@ query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
ro_number
clm_total
clm_no
+ dms_allocation
invoice_allocation
ownerid
ownr_ln
@@ -1200,6 +1201,7 @@ exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
cdk_configuration
}
ro_number
+ dms_allocation
invoice_allocation
ins_co_id
id
@@ -1261,6 +1263,7 @@ exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
cost_center
productivehrs
rate
+ ciecacode
employee {
flat_rate
}