Refactored how in house invoices are created IO-460

This commit is contained in:
Patrick Fic
2021-01-08 11:40:32 -08:00
parent 3ca416c5cf
commit 6f96bcfa7e
15 changed files with 323 additions and 41 deletions

View File

@@ -39,6 +39,7 @@ export function BillFormComponent({
responsibilityCenters,
loadLines,
billEdit,
disableInvNumber,
}) {
const { t } = useTranslation();
const client = useApolloClient();
@@ -142,7 +143,15 @@ export function BillFormComponent({
}),
]}
>
<Input disabled={disabled} />
<Input disabled={disabled || disableInvNumber} />
</Form.Item>
<Form.Item
// label={t("bills.fields.isinhouse")}
style={{ display: "none" }}
name="isinhouse"
valuePropName="checked"
>
<Switch />
</Form.Item>
<Form.Item
label={t("bills.fields.date")}
@@ -193,7 +202,6 @@ export function BillFormComponent({
>
<CurrencyInput min={0} />
</Form.Item>
<Form.Item label={t("bills.fields.allpartslocation")} name="location">
<Select style={{ width: "10rem" }} disabled={disabled}>
{bodyshop.md_parts_locations.map((loc, idx) => (