From 5167668958592fda7d2748b1623ab305c7a365c4 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 13 Apr 2022 15:02:07 -0700 Subject: [PATCH] IO-1824 Allow posting to closed ROs. --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../bill-detail-edit.container.jsx | 2 -- .../bill-form/bill-form.component.jsx | 1 + .../shop-info/shop-info.general.component.jsx | 7 +++++++ client/src/graphql/bodyshop.queries.js | 2 ++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 8 files changed, 34 insertions(+), 2 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 41d273976..56e402f25 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -3654,6 +3654,27 @@ + + bill_allow_post_to_closed + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + bill_federal_tax_rate false diff --git a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx index d16ba9ecc..c8eb78281 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx @@ -177,8 +177,6 @@ export function BillDetailEditcontainer({ useEffect(() => { if (search.billid && data) { form.resetFields(); - form.resetFields(); - form.setFieldsValue(transformData(data)); } }, [form, search.billid, data]); diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index ada281f6a..0c48a61df 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -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) && diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index 8dfba38f9..0eeb78d4a 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -558,6 +558,13 @@ export default function ShopInfoGeneral({ form }) { > + + +