Fixed bugs on parts allocations + added totals BOD-131
This commit is contained in:
@@ -7,6 +7,7 @@ import AllocationTags from "../jobs-close-allocation-tags/jobs-close-allocation-
|
||||
export default function JobsClosePartsAllocation({
|
||||
partsAllocations,
|
||||
setPartsAllocations,
|
||||
partsAllocatedTotal,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -65,8 +66,15 @@ export default function JobsClosePartsAllocation({
|
||||
})}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
{Dinero({
|
||||
amount: Object.keys(partsAllocations).reduce((acc, val) => {
|
||||
return (acc =
|
||||
acc + partsAllocations[val].total.getAmount());
|
||||
}, 0),
|
||||
}).toFormat()}
|
||||
</td>
|
||||
<td>{partsAllocatedTotal.toFormat()}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user