Resolve error thrown when entering payment from accounting menu.

This commit is contained in:
Patrick Fic
2023-05-26 14:57:04 -07:00
parent 094160ebf3
commit 6d2c3c81c7

View File

@@ -178,21 +178,24 @@ function PaymentModalContainer({
</span>
}
>
<Space>
<PaymentReexportButton payment={context} refetch={actions.refetch} />
<PaymentMarkForExportButton
bodyshop={bodyshop}
payment={context}
refetch={actions.refetch}
/>
</Space>
{!context || (context && !context.id) ? null : (
<Space>
<PaymentReexportButton payment={context} refetch={actions.refetch} />
<PaymentMarkForExportButton
bodyshop={bodyshop}
payment={context}
refetch={actions.refetch}
/>
</Space>
)}
<Form
onFinish={handleFinish}
autoComplete={"off"}
form={form}
layout="vertical"
initialValues={context || {}}
disabled={context.exportedat}
disabled={context?.exportedat}
>
<PaymentForm form={form} />
</Form>