Dinero rounding for reconciliation totals IO-608
This commit is contained in:
@@ -28,16 +28,18 @@ export default function JobReconciliationTotals({
|
||||
.filter((jl) => !!jlLookup[jl.id])
|
||||
.reduce((acc, val) => {
|
||||
return acc.add(
|
||||
Dinero({ amount: val.act_price * 100 }).multiply(val.part_qty || 1)
|
||||
Dinero({ amount: Math.round((val.act_price || 0) * 100) }).multiply(
|
||||
val.part_qty || 1
|
||||
)
|
||||
);
|
||||
}, Dinero()),
|
||||
billLinesTotal: billLines
|
||||
.filter((bl) => !!billLookup[bl.id])
|
||||
.reduce((acc, val) => {
|
||||
return acc.add(
|
||||
Dinero({ amount: val.actual_price * 100 }).multiply(
|
||||
val.quantity || 1
|
||||
)
|
||||
Dinero({
|
||||
amount: Math.round((val.actual_price || 0) * 100),
|
||||
}).multiply(val.quantity || 1)
|
||||
);
|
||||
}, Dinero()),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user