IO-1824 Allow posting to closed ROs.

This commit is contained in:
Patrick Fic
2022-04-13 15:02:07 -07:00
parent 1eacf43669
commit 5167668958
8 changed files with 34 additions and 2 deletions

View File

@@ -177,8 +177,6 @@ export function BillDetailEditcontainer({
useEffect(() => {
if (search.billid && data) {
form.resetFields();
form.resetFields();
form.setFieldsValue(transformData(data));
}
}, [form, search.billid, data]);

View File

@@ -229,6 +229,7 @@ export function BillFormComponent({
({ getFieldValue }) => ({
validator(rule, value) {
if (
!bodyshop.bill_allow_post_to_closed &&
(job.status === bodyshop.md_ro_statuses.default_invoiced ||
job.status === bodyshop.md_ro_statuses.default_exported ||
job.status === bodyshop.md_ro_statuses.default_void) &&

View File

@@ -558,6 +558,13 @@ export default function ShopInfoGeneral({ form }) {
>
<Switch />
</Form.Item>
<Form.Item
name={["bill_allow_post_to_closed"]}
label={t("bodyshop.fields.bill_allow_post_to_closed")}
valuePropName="checked"
>
<Switch />
</Form.Item>
<Form.Item
name={["md_ded_notes"]}
label={t("bodyshop.fields.md_ded_notes")}