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">
|
||||
<table>
|
||||
<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>
|
||||
<td>{t("jobs.labels.partstotal")}</td>
|
||||
<td className="currency">
|
||||
|
||||
@@ -36,8 +36,6 @@ function CalculateTaxesTotals(job, otherTotals) {
|
||||
return acc;
|
||||
}
|
||||
}, 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 = {
|
||||
subtotal: subtotal,
|
||||
federal_tax: subtotal.percentage((job.federal_tax_rate || 0) * 100),
|
||||
@@ -242,6 +240,7 @@ function CalculatePartsTotals(jobLines) {
|
||||
// case "PAP":
|
||||
// case "PAR":
|
||||
default:
|
||||
if (value.part_type === null) return acc;
|
||||
return {
|
||||
...acc,
|
||||
parts: {
|
||||
|
||||
Reference in New Issue
Block a user