IO-1182 Restrict manual posting to in house vendor.
This commit is contained in:
@@ -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