From 4940b10910a5a231da31a295581e5652fe4fa6f8 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 20 Jun 2024 08:30:58 -0700 Subject: [PATCH 1/3] 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 { From ace16ba873aff0e54868812f927f6268dbefb53b Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 20 Jun 2024 13:46:54 -0700 Subject: [PATCH 2/3] IO-2793 Adjustment for parts Signed-off-by: Allan Carr --- server/accounting/qb-receivables-lines.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/accounting/qb-receivables-lines.js b/server/accounting/qb-receivables-lines.js index 1207ae6e0..bcd2fff6c 100644 --- a/server/accounting/qb-receivables-lines.js +++ b/server/accounting/qb-receivables-lines.js @@ -910,10 +910,8 @@ function checkStateTax(jobline, jobs_by_pk) { if (jobline.part_type) { if ( - (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) + 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 ) { return false; } else { From d7ddbf7e8d77b3b977a61ab535d49690ec1bfcee Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 20 Jun 2024 14:15:10 -0700 Subject: [PATCH 3/3] IO-2793 Change Additional Costs tax item Signed-off-by: Allan Carr --- server/accounting/qb-receivables-lines.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/accounting/qb-receivables-lines.js b/server/accounting/qb-receivables-lines.js index bcd2fff6c..631be177d 100644 --- a/server/accounting/qb-receivables-lines.js +++ b/server/accounting/qb-receivables-lines.js @@ -897,9 +897,6 @@ function checkStateTax(jobline, jobs_by_pk) { (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; @@ -908,6 +905,9 @@ function checkStateTax(jobline, jobs_by_pk) { } } + if (jobline.tax_part === false) { + return false; + } else { if (jobline.part_type) { if ( jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_in === false ||