Merge work.

This commit is contained in:
Patrick Fic
2020-09-25 13:45:34 -07:00
10 changed files with 67 additions and 19 deletions

View File

@@ -202,8 +202,6 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
</td>
<td>{`(${Dinero(
job.job_totals.parts.parts.subtotal
).toFormat()} ± ${Dinero(
job.job_totals.parts.parts.adjustments
).toFormat()})`}</td>
</tr>
<tr>
@@ -213,8 +211,6 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
</td>
<td>{`(${Dinero(
job.job_totals.parts.sublets.subtotal
).toFormat()} ± ${Dinero(
job.job_totals.parts.sublets.adjustments
).toFormat()})`}</td>
</tr>
<tr>
@@ -339,7 +335,10 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
</div>
<JobCalculateTotals job={job} />
<Editor
value={{ CIECA: job.cieca_ttl.data, ImEXCalc: job.job_totals }}
value={{
CIECA: job.cieca_ttl && job.cieca_ttl.data,
ImEXCalc: job.job_totals,
}}
/>
</div>
</Col>

View File

@@ -19,8 +19,6 @@ export default function JobsCloseTotals({ jobTotals }) {
value={Dinero(jobTotals.parts.parts.total).toFormat()}
suffix={`(${Dinero(
jobTotals.parts.parts.subtotal
).toFormat()} ± ${Dinero(
jobTotals.parts.parts.adjustments
).toFormat()})`}
/>
</Descriptions.Item>
@@ -29,8 +27,6 @@ export default function JobsCloseTotals({ jobTotals }) {
value={Dinero(jobTotals.parts.sublets.total).toFormat()}
suffix={`(${Dinero(
jobTotals.parts.sublets.subtotal
).toFormat()} ± ${Dinero(
jobTotals.parts.sublets.adjustments
).toFormat()})`}
/>
</Descriptions.Item>

View File

@@ -1,9 +1,9 @@
import { Form, Select, Switch } from "antd";
import { Form, InputNumber, Select } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
import FormRow from "../layout-form-row/layout-form-row.component";
import JobsDetailRatesChangeButton from "../jobs-detail-rates-change-button/jobs-detail-rates-change-button.component";
import FormRow from "../layout-form-row/layout-form-row.component";
export default function JobsDetailRates({ job, form }) {
const { t } = useTranslation();
@@ -120,6 +120,24 @@ export default function JobsDetailRates({ job, form }) {
<Form.Item label={t("jobs.fields.rate_matd")} name="rate_matd">
<CurrencyInput />
</Form.Item>
<Form.Item
label={t("jobs.fields.federal_tax_rate")}
name="federal_tax_rate"
>
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
<Form.Item
label={t("jobs.fields.state_tax_rate")}
name="state_tax_rate"
>
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
<Form.Item
label={t("jobs.fields.local_tax_rate")}
name="local_tax_rate"
>
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
</FormRow>
</div>
);