IO-1152 Add in part mark up for BC Economical claims.

This commit is contained in:
Patrick Fic
2021-05-26 09:06:05 -07:00
parent 6ae9de7df3
commit e8b7e2f0b9
11 changed files with 147 additions and 50 deletions

View File

@@ -155,7 +155,14 @@ export function JobLinesComponent({
state.sortedInfo.columnKey === "act_price" && state.sortedInfo.order,
ellipsis: true,
render: (text, record) => (
<CurrencyFormatter>{record.act_price}</CurrencyFormatter>
<>
<CurrencyFormatter>{record.act_price}</CurrencyFormatter>
{record.prt_dsmk_p !== 0 && (
<span
style={{ marginLeft: ".2rem" }}
>{`(${record.prt_dsmk_p}%)`}</span>
)}
</>
),
},
{

View File

@@ -69,17 +69,28 @@ export default function JobTotalsTableParts({ job }) {
x: true,
}}
summary={() => (
<Table.Summary.Row>
<Table.Summary.Cell>
<strong>{t("jobs.labels.partstotal")}</strong>
</Table.Summary.Cell>
<>
<Table.Summary.Row>
<Table.Summary.Cell>
{t("jobs.labels.prt_dsmk_total")}
</Table.Summary.Cell>
<Table.Summary.Cell align="right">
<strong>
{Dinero(job.job_totals.parts.parts.total).toFormat()}
</strong>
</Table.Summary.Cell>
</Table.Summary.Row>
<Table.Summary.Cell align="right">
{Dinero(job.job_totals.parts.parts.prt_dsmk_total).toFormat()}
</Table.Summary.Cell>
</Table.Summary.Row>
<Table.Summary.Row>
<Table.Summary.Cell>
<strong>{t("jobs.labels.partstotal")}</strong>
</Table.Summary.Cell>
<Table.Summary.Cell align="right">
<strong>
{Dinero(job.job_totals.parts.parts.total).toFormat()}
</strong>
</Table.Summary.Cell>
</Table.Summary.Row>
</>
)}
/>
);