Added part type totals BOD-260
This commit is contained in:
@@ -189,6 +189,15 @@ export function JobsTotalsTableComponent({ bodyshop, job }) {
|
|||||||
<div className="job-totals-half">
|
<div className="job-totals-half">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{Object.keys(totals.parts.parts.list).map((key, idx) => (
|
||||||
|
<tr key={idx}>
|
||||||
|
<td>{t(`jobs.fields.${key.toLowerCase()}`)}</td>
|
||||||
|
<td className="currency">
|
||||||
|
{totals.parts.parts.list[key].total.toFormat()}
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{t("jobs.labels.partstotal")}</td>
|
<td>{t("jobs.labels.partstotal")}</td>
|
||||||
<td className="currency">
|
<td className="currency">
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
}, Dinero({ amount: 0 }));
|
}, Dinero({ amount: 0 }));
|
||||||
console.log("job.federal_tax_rate ", job.federal_tax_rate);
|
|
||||||
console.log(subtotal.percentage((job.federal_tax_rate || 0) * 100));
|
|
||||||
let ret = {
|
let ret = {
|
||||||
subtotal: subtotal,
|
subtotal: subtotal,
|
||||||
federal_tax: subtotal.percentage((job.federal_tax_rate || 0) * 100),
|
federal_tax: subtotal.percentage((job.federal_tax_rate || 0) * 100),
|
||||||
@@ -242,6 +240,7 @@ function CalculatePartsTotals(jobLines) {
|
|||||||
// case "PAP":
|
// case "PAP":
|
||||||
// case "PAR":
|
// case "PAR":
|
||||||
default:
|
default:
|
||||||
|
if (value.part_type === null) return acc;
|
||||||
return {
|
return {
|
||||||
...acc,
|
...acc,
|
||||||
parts: {
|
parts: {
|
||||||
|
|||||||
Reference in New Issue
Block a user