From dc5ed1a39cd34446869a2bd871025fa6f729ca01 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 26 Jun 2025 18:40:38 -0700 Subject: [PATCH] IO-3284 JobLine Price Lbr Hrs Total Signed-off-by: Allan Carr --- server/job/job-totals-USA.js | 2 +- server/job/job-totals.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js index 5dc0d6740..2f694b65c 100644 --- a/server/job/job-totals-USA.js +++ b/server/job/job-totals-USA.js @@ -381,7 +381,7 @@ async function CalculateRatesTotals({ job, client }) { if (item.mod_lbr_ty) { //Check to see if it has 0 hours and a price instead. - if (item.mod_lb_hrs === 0 && item.act_price > 0 && item.lbr_op === "OP14") { + if (item.lbr_op === "OP14" && item.act_price > 0 && (!item.part_type || item.mod_lb_hrs === 0)) { //Scenario where SGI may pay out hours using a part price. if (!ret[item.mod_lbr_ty.toLowerCase()].total) { ret[item.mod_lbr_ty.toLowerCase()].total = Dinero(); diff --git a/server/job/job-totals.js b/server/job/job-totals.js index d370b57df..5f28ac067 100644 --- a/server/job/job-totals.js +++ b/server/job/job-totals.js @@ -314,7 +314,8 @@ function CalculateRatesTotals(ratesList) { if (item.mod_lbr_ty) { //Check to see if it has 0 hours and a price instead. - if (item.mod_lb_hrs === 0 && item.act_price > 0 && item.lbr_op === "OP14") { + //Extend for when there are hours and a price. + if (item.lbr_op === "OP14" && item.act_price > 0 && (!item.part_type || item.mod_lb_hrs === 0)) { //Scenario where SGI may pay out hours using a part price. if (!ret[item.mod_lbr_ty.toLowerCase()].total) { ret[item.mod_lbr_ty.toLowerCase()].total = Dinero();