IO-1182 Restrict manual posting to in house vendor.
This commit is contained in:
@@ -2527,6 +2527,27 @@
|
||||
<folder_node>
|
||||
<name>validation</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>manualinhouse</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>unique_invoice_number</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -106,6 +106,18 @@ export function BillFormComponent({
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
validator(rule, value) {
|
||||
if (
|
||||
value &&
|
||||
!getFieldValue(["isinhouse"]) &&
|
||||
value === bodyshop.inhousevendorid
|
||||
) {
|
||||
return Promise.reject(t("bills.validation.manualinhouse"));
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<VendorSearchSelect
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
"exported": "Bill exported successfully."
|
||||
},
|
||||
"validation": {
|
||||
"manualinhouse": "Manual posting to the in house vendor is restricted. ",
|
||||
"unique_invoice_number": "This invoice number has already been entered for this vendor."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
"exported": ""
|
||||
},
|
||||
"validation": {
|
||||
"manualinhouse": "",
|
||||
"unique_invoice_number": ""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
"exported": ""
|
||||
},
|
||||
"validation": {
|
||||
"manualinhouse": "",
|
||||
"unique_invoice_number": ""
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user