$0DB Updates, quantity ignore.

This commit is contained in:
Patrick Fic
2022-02-17 09:17:00 -08:00
parent 9b64d90361
commit 54d4625a6a
8 changed files with 54 additions and 36 deletions

View File

@@ -9,15 +9,17 @@ export function CalculateJobRpsDollars(job, returnSumActPrice) {
.filter((j) => !j.ignore)
.reduce((acc, val) => {
actPriceSum = actPriceSum.add(
Dinero({ amount: Math.round((val.act_price || 0) * 100) }).multiply(
val.part_qty || 1
)
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
// .multiply(
// val.part_qty || 1
// )
);
// if (val.price_diff > 0) { //
return acc.add(
Dinero({ amount: Math.round((val.price_diff || 0) * 100) }).multiply(
val.part_qty || 1
)
Dinero({ amount: Math.round((val.price_diff || 0) * 100) })
// .multiply(
// val.part_qty || 1
// )
);
// } else {
// return acc;
@@ -39,9 +41,10 @@ export function CalculateJobRpsPc(
.filter((j) => !j.ignore)
.reduce((acc, val) => {
return acc.add(
Dinero({ amount: Math.round((val.db_price || 0) * 100) }).multiply(
val.part_qty || 1
)
Dinero({ amount: Math.round((val.db_price || 0) * 100) })
// .multiply(
// val.part_qty || 1
// )
);
}, Dinero());