From 4940b10910a5a231da31a295581e5652fe4fa6f8 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 20 Jun 2024 08:30:58 -0700 Subject: [PATCH] IO-2793 Adjustmnet for OP14 Signed-off-by: Allan Carr --- server/accounting/qb-receivables-lines.js | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/server/accounting/qb-receivables-lines.js b/server/accounting/qb-receivables-lines.js index 4be412ac9..1207ae6e0 100644 --- a/server/accounting/qb-receivables-lines.js +++ b/server/accounting/qb-receivables-lines.js @@ -891,30 +891,29 @@ function checkStateTax(jobline, jobs_by_pk) { } const isAdditionalCost = - (jobline.lbr_op === "OP13" || (jobline.db_ref && jobline.db_ref.startsWith("9360"))) && !isPaintOrShopMat; - - if (!jobline.part_type && isAdditionalCost) { - if (jobs_by_pk.tax_lbr_rt === 0) { - return false; - } else { - return true; - } - } - - if ( - jobline.db_ref === "900511" || - jobline.db_ref === "900510" || - (jobline.mod_lb_hrs === 0 && jobline.act_price > 0 && jobline.lbr_op === "OP14") - ) - return true; //Extending IO-1375 as a part of IO-2023 + (jobline.lbr_op === "OP13" || + (jobline.lbr_op === "OP14" && jobline.act_price > 0 && jobline.mod_lb_hrs === 0) || + (jobline.db_ref && jobline.db_ref.startsWith("9360")) || + (jobline.db_ref && jobline.db_ref.startsWith("90051"))) && + !isPaintOrShopMat; if (jobline.tax_part === false) { return false; } else { + if (!jobline.part_type && isAdditionalCost) { + if (jobs_by_pk.tax_lbr_rt === 0) { + return false; + } else { + return true; + } + } + if (jobline.part_type) { if ( - jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_in === false || - jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_rt === 0 + (jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_in && + jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_in === false) || + (jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_rt && + jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_rt === 0) ) { return false; } else {