Fixed rounding bug on invoice total calculation BOD-120. Added documents viewing to edit invoice BOD-75 BOD-63.
This commit is contained in:
@@ -23,7 +23,7 @@ export default function InvoiceFormComponent({
|
||||
lineData,
|
||||
responsibilityCenters,
|
||||
loadLines,
|
||||
hideVendor,
|
||||
invoiceEdit,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -61,6 +61,7 @@ export default function InvoiceFormComponent({
|
||||
>
|
||||
<JobSearchSelect
|
||||
options={roAutoCompleteOptions}
|
||||
disabled={invoiceEdit}
|
||||
onBlur={() => {
|
||||
if (form.getFieldValue("jobid") !== null) {
|
||||
loadLines({ variables: { id: form.getFieldValue("jobid") } });
|
||||
@@ -71,7 +72,7 @@ export default function InvoiceFormComponent({
|
||||
<Form.Item
|
||||
label={t("invoices.fields.vendor")}
|
||||
name="vendorid"
|
||||
style={{ display: hideVendor ? "none" : null }}
|
||||
style={{ display: invoiceEdit ? "none" : null }}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
@@ -162,6 +163,7 @@ export default function InvoiceFormComponent({
|
||||
<Form.Item
|
||||
name="upload"
|
||||
label="Upload"
|
||||
style={{ display: invoiceEdit ? "none" : null }}
|
||||
valuePropName="fileList"
|
||||
getValueFromEvent={(e) => {
|
||||
console.log("Upload event:", e);
|
||||
@@ -239,10 +241,6 @@ export default function InvoiceFormComponent({
|
||||
return null;
|
||||
}}
|
||||
</Form.Item>
|
||||
|
||||
<Button onClick={() => console.log(form.getFieldsValue())}>
|
||||
Get Values
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user