IO-1003 Added max customer GST payable in field to be max 100% of GST.

This commit is contained in:
Patrick Fic
2021-05-06 14:45:28 -07:00
parent c82a8e6706
commit c246124e0f

View File

@@ -14,7 +14,8 @@ const mapStateToProps = createStructuredSelector({
jobRO: selectJobReadOnly, jobRO: selectJobReadOnly,
}); });
export function JobsDetailRates({ jobRO, form }) { export function JobsDetailRates({ jobRO, form, job }) {
console.log(form.getFieldsValue());
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<div> <div>
@@ -33,7 +34,13 @@ export function JobsDetailRates({ jobRO, form }) {
label={t("jobs.fields.ca_customer_gst")} label={t("jobs.fields.ca_customer_gst")}
name="ca_customer_gst" name="ca_customer_gst"
> >
<CurrencyInput disabled={jobRO} /> <CurrencyInput
disabled={jobRO}
max={
((job.job_totals && job.job_totals.totals.federal_tax.amount) ||
0) / 100
}
/>
</Form.Item> </Form.Item>
</Tooltip> </Tooltip>
<Form.Item <Form.Item