Added parts marking BOD-102
This commit is contained in:
@@ -149,11 +149,7 @@ export default function InvoiceFormComponent({
|
||||
form={form}
|
||||
responsibilityCenters={responsibilityCenters}
|
||||
/>
|
||||
{
|
||||
// <Form.Item name="upload" label="Upload">
|
||||
// <DocumentsUploadContainer jobId={form.getFieldValue("jobid")} />
|
||||
// </Form.Item>
|
||||
}
|
||||
|
||||
<Form.Item
|
||||
name='upload'
|
||||
label='Upload'
|
||||
|
||||
@@ -16,13 +16,13 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
const { setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
return (
|
||||
<Form.List name="invoicelines">
|
||||
<Form.List name='invoicelines'>
|
||||
{(fields, { add, remove }) => {
|
||||
return (
|
||||
<div className="invoice-form-lines-wrapper">
|
||||
<div className='invoice-form-lines-wrapper'>
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item required={false} key={field.key}>
|
||||
<div className="invoice-form-line">
|
||||
<div className='invoice-form-line'>
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.jobline")}
|
||||
key={`${index}joblinename`}
|
||||
@@ -32,8 +32,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<InvoiceLineSearchSelect
|
||||
options={lineData}
|
||||
onBlur={null}
|
||||
@@ -48,7 +47,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
line_desc: opt.line_desc,
|
||||
actual_price: opt.cost,
|
||||
cost_center: opt.part_type
|
||||
? responsibilityCenters.defaults[
|
||||
? responsibilityCenters.defaults.costs[
|
||||
opt.part_type
|
||||
] || null
|
||||
: null,
|
||||
@@ -69,8 +68,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
@@ -82,8 +80,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<CurrencyInput
|
||||
onBlur={(e) => {
|
||||
setFieldsValue({
|
||||
@@ -113,8 +110,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<CurrencyInput />
|
||||
</Form.Item>
|
||||
<Form.Item shouldUpdate>
|
||||
@@ -143,11 +139,12 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Select style={{ width: "150px" }}>
|
||||
{responsibilityCenters.costs.map((item) => (
|
||||
<Select.Option key={item.name}>{item.name}</Select.Option>
|
||||
<Select.Option key={item.name}>
|
||||
{item.name}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
@@ -155,25 +152,22 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
label={t("invoicelines.fields.federal_tax_applicable")}
|
||||
key={`${index}fedtax`}
|
||||
initialValue={true}
|
||||
valuePropName="checked"
|
||||
name={[field.name, "applicable_taxes", "federal"]}
|
||||
>
|
||||
valuePropName='checked'
|
||||
name={[field.name, "applicable_taxes", "federal"]}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.state_tax_applicable")}
|
||||
key={`${index}statetax`}
|
||||
valuePropName="checked"
|
||||
name={[field.name, "applicable_taxes", "state"]}
|
||||
>
|
||||
valuePropName='checked'
|
||||
name={[field.name, "applicable_taxes", "state"]}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.local_tax_applicable")}
|
||||
key={`${index}localtax`}
|
||||
valuePropName="checked"
|
||||
name={[field.name, "applicable_taxes", "local"]}
|
||||
>
|
||||
valuePropName='checked'
|
||||
name={[field.name, "applicable_taxes", "local"]}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
@@ -186,12 +180,11 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
type='dashed'
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "50%" }}
|
||||
>
|
||||
style={{ width: "50%" }}>
|
||||
{t("invoicelines.actions.newline")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user