IO-981 Remove job detail back arrow.
This commit is contained in:
@@ -219,6 +219,79 @@ export function BillFormComponent({
|
|||||||
>
|
>
|
||||||
<CurrencyInput min={0} />
|
<CurrencyInput min={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item shouldUpdate grow>
|
||||||
|
{() => {
|
||||||
|
const values = form.getFieldsValue([
|
||||||
|
"billlines",
|
||||||
|
"total",
|
||||||
|
"federal_tax_rate",
|
||||||
|
"state_tax_rate",
|
||||||
|
"local_tax_rate",
|
||||||
|
]);
|
||||||
|
let totals;
|
||||||
|
if (
|
||||||
|
!!values.total &&
|
||||||
|
!!values.billlines &&
|
||||||
|
values.billlines.length > 0
|
||||||
|
)
|
||||||
|
totals = CalculateBillTotal(values);
|
||||||
|
if (!!totals)
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Space split={<Divider type="vertical" />} wrap>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.subtotal")}
|
||||||
|
value={totals.subtotal.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.federal_tax")}
|
||||||
|
value={totals.federalTax.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.state_tax")}
|
||||||
|
value={totals.stateTax.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.local_tax")}
|
||||||
|
value={totals.localTax.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.entered_total")}
|
||||||
|
value={totals.enteredTotal.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.bill_total")}
|
||||||
|
value={totals.invoiceTotal.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("bills.labels.discrepancy")}
|
||||||
|
valueStyle={{
|
||||||
|
color:
|
||||||
|
totals.discrepancy.getAmount() === 0
|
||||||
|
? "green"
|
||||||
|
: "red",
|
||||||
|
}}
|
||||||
|
value={totals.discrepancy.toFormat()}
|
||||||
|
precision={2}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
{form.getFieldValue("is_credit_memo") ? (
|
||||||
|
<AlertComponent
|
||||||
|
type="warning"
|
||||||
|
message={t("bills.labels.enteringcreditmemo")}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Divider orientation="left">{t("bills.labels.bill_lines")}</Divider>
|
<Divider orientation="left">{t("bills.labels.bill_lines")}</Divider>
|
||||||
<BillFormLines
|
<BillFormLines
|
||||||
@@ -244,77 +317,6 @@ export function BillFormComponent({
|
|||||||
<Button>Click to upload</Button>
|
<Button>Click to upload</Button>
|
||||||
</Upload>
|
</Upload>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item shouldUpdate>
|
|
||||||
{() => {
|
|
||||||
const values = form.getFieldsValue([
|
|
||||||
"billlines",
|
|
||||||
"total",
|
|
||||||
"federal_tax_rate",
|
|
||||||
"state_tax_rate",
|
|
||||||
"local_tax_rate",
|
|
||||||
]);
|
|
||||||
let totals;
|
|
||||||
if (
|
|
||||||
!!values.total &&
|
|
||||||
!!values.billlines &&
|
|
||||||
values.billlines.length > 0
|
|
||||||
)
|
|
||||||
totals = CalculateBillTotal(values);
|
|
||||||
if (!!totals)
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Space split={<Divider type="vertical" />}>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.subtotal")}
|
|
||||||
value={totals.subtotal.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.federal_tax")}
|
|
||||||
value={totals.federalTax.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.state_tax")}
|
|
||||||
value={totals.stateTax.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.local_tax")}
|
|
||||||
value={totals.localTax.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.entered_total")}
|
|
||||||
value={totals.enteredTotal.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.bill_total")}
|
|
||||||
value={totals.invoiceTotal.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
<Statistic
|
|
||||||
title={t("bills.labels.discrepancy")}
|
|
||||||
valueStyle={{
|
|
||||||
color:
|
|
||||||
totals.discrepancy.getAmount() === 0 ? "green" : "red",
|
|
||||||
}}
|
|
||||||
value={totals.discrepancy.toFormat()}
|
|
||||||
precision={2}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
{form.getFieldValue("is_credit_memo") ? (
|
|
||||||
<AlertComponent
|
|
||||||
type="warning"
|
|
||||||
message={t("bills.labels.enteringcreditmemo")}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
return null;
|
|
||||||
}}
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export function JobsDetailPage({
|
|||||||
initialValues={transormJobToForm(job)}
|
initialValues={transormJobToForm(job)}
|
||||||
>
|
>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
onBack={() => window.history.back()}
|
// onBack={() => window.history.back()}
|
||||||
title={job.ro_number || t("general.labels.na")}
|
title={job.ro_number || t("general.labels.na")}
|
||||||
extra={menuExtra}
|
extra={menuExtra}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user