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>
</>
)}
/>
);

View File

@@ -528,6 +528,7 @@ export const GET_JOB_BY_PK = gql`
tax_part
db_ref
manual_line
prt_dsmk_p
billlines(limit: 1, order_by: { bill: { date: desc } }) {
id
quantity

View File

@@ -1316,6 +1316,7 @@
"partstotal": "This is the total of all parts and sublet amounts on the vehicle (some of these may require an in-house invoice).<br/>\nItems such as shop and paint materials, labor online lines, etc. are not included in this total.",
"totalreturns": "The total amount of returns created for this job."
},
"prt_dsmk_total": "Line Item Markup",
"rates": "Rates",
"rates_subtotal": "All Rates Subtotal",
"reconciliation": {

View File

@@ -1316,6 +1316,7 @@
"partstotal": "",
"totalreturns": ""
},
"prt_dsmk_total": "",
"rates": "Tarifas",
"rates_subtotal": "",
"reconciliation": {

View File

@@ -1316,6 +1316,7 @@
"partstotal": "",
"totalreturns": ""
},
"prt_dsmk_total": "",
"rates": "Les taux",
"rates_subtotal": "",
"reconciliation": {