IO-1822 Add manual ATS calculation.

This commit is contained in:
Patrick Fic
2022-04-13 12:34:31 -07:00
parent 44ff032acc
commit 77ed64969e
8 changed files with 209 additions and 3 deletions

View File

@@ -88,6 +88,33 @@ export function JobsDetailRates({ jobRO, form, job, bodyshop }) {
</Form.Item>
<CABCpvrtCalculator form={form} disabled={jobRO} />
</Space>
<Form.Item
label={t("jobs.fields.auto_add_ats")}
name="auto_add_ats"
valuePropName="checked"
>
<Switch disabled={jobRO} />
</Form.Item>
<Form.Item
nostyle
shouldUpdate={(prev, cur) => prev.auto_add_ats !== cur.auto_add_ats}
>
{() => {
if (form.getFieldValue("auto_add_ats"))
return (
<Form.Item
label={t("jobs.fields.rate_ats")}
name="rate_ats"
initialValue={bodyshop.shoprates.rate_atp}
>
<CurrencyInput disabled={jobRO} />
</Form.Item>
);
return null;
}}
</Form.Item>
</FormRow>
<FormRow>
<Form.Item
@@ -100,7 +127,13 @@ export function JobsDetailRates({ jobRO, form, job, bodyshop }) {
label={t("jobs.fields.state_tax_rate")}
name="state_tax_rate"
>
<InputNumber min={0} max={1} precision={2} disabled={jobRO} autoComplete="new-password"/>
<InputNumber
min={0}
max={1}
precision={2}
disabled={jobRO}
autoComplete="new-password"
/>
</Form.Item>
<Form.Item
label={t("jobs.fields.local_tax_rate")}

View File

@@ -611,6 +611,8 @@ export const GET_JOB_BY_PK = gql`
ownerid
ded_note
materials
auto_add_ats
rate_ats
owner {
id
ownr_fn

View File

@@ -1245,6 +1245,7 @@
"08": "Left Rear Side",
"09": "Left Side"
},
"auto_add_ats": "Automatically Add/Update ATS",
"ca_bc_pvrt": "PVRT",
"ca_customer_gst": "Customer Portion of GST",
"ca_gst_registrant": "GST Registrant",
@@ -1392,6 +1393,7 @@
"production_vars": {
"note": "Production Note"
},
"rate_ats": "ATS Rate",
"rate_la1": "LA1",
"rate_la2": "LA2",
"rate_la3": "LA3",

View File

@@ -1245,6 +1245,7 @@
"08": "",
"09": ""
},
"auto_add_ats": "",
"ca_bc_pvrt": "",
"ca_customer_gst": "",
"ca_gst_registrant": "",
@@ -1392,6 +1393,7 @@
"production_vars": {
"note": ""
},
"rate_ats": "",
"rate_la1": "Tarifa LA1",
"rate_la2": "Tarifa LA2",
"rate_la3": "Tarifa LA3",

View File

@@ -1245,6 +1245,7 @@
"08": "",
"09": ""
},
"auto_add_ats": "",
"ca_bc_pvrt": "",
"ca_customer_gst": "",
"ca_gst_registrant": "",
@@ -1392,6 +1393,7 @@
"production_vars": {
"note": ""
},
"rate_ats": "",
"rate_la1": "Taux LA1",
"rate_la2": "Taux LA2",
"rate_la3": "Taux LA3",