IO-1475 Totals update for Mitchell Cloud discounts.

This commit is contained in:
Patrick Fic
2021-10-21 08:53:15 -07:00
parent 14af45baf0
commit da08fc74f1
3 changed files with 19 additions and 5 deletions

View File

@@ -70,7 +70,12 @@ exports.default = async function (socket, jobid) {
amount: Math.round(val.act_price * 100),
}).multiply(val.part_qty || 1);
if ((val.prt_dsmk_p && val.prt_dsmk_p !== 0) || val.prt_dsmk_m !== 0) {
if (
(val.prt_dsmk_p && val.prt_dsmk_p !== 0) ||
((val.db_ref === "900511" || val.db_ref === "900510") &&
val.prt_dsmk_m &&
val.prt_dsmk_m !== 0)
) {
// console.log("Have a part discount", val);
DineroAmount = DineroAmount.add(
val.prt_dsmk_m && val.prt_dsmk_m !== 0