Merged in feature/IO-2793-State-Tax-Null-QBO (pull request #1470)
Feature/IO-2793 State Tax Null QBO
This commit is contained in:
@@ -67,6 +67,12 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
//Determine the Tax code grouping.
|
//Determine the Tax code grouping.
|
||||||
|
|
||||||
//Going to always assume that we need to apply GST.
|
//Going to always assume that we need to apply GST.
|
||||||
|
|
||||||
|
//Find out CIECA Code based on profitcenter_part to determine if state tax applies or not.
|
||||||
|
const cieca_code = Object.keys(responsibilityCenters.defaults.profits).find(
|
||||||
|
(key) => responsibilityCenters.defaults.profits[key].toLowerCase() === jobline.profitcenter_part.toLowerCase()
|
||||||
|
);
|
||||||
|
|
||||||
const taxAccountCode = findTaxCode(
|
const taxAccountCode = findTaxCode(
|
||||||
{
|
{
|
||||||
local: false,
|
local: false,
|
||||||
@@ -74,20 +80,34 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|||||||
state:
|
state:
|
||||||
jobline.tax_part === false
|
jobline.tax_part === false
|
||||||
? false
|
? false
|
||||||
: jobline.part_type.toUpperCase() === "PAS" || jobline.part_type.toUpperCase() === "PASL"
|
: cieca_code === "PAS" || cieca_code === "PASL"
|
||||||
? jobs_by_pk.tax_sub_rt === 0
|
? jobs_by_pk.tax_sub_rt === 0
|
||||||
? false
|
? false
|
||||||
: true
|
: true
|
||||||
: jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_in === false ||
|
: cieca_code.startsWith("LA")
|
||||||
jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_rt === 0
|
? jobs_by_pk.tax_lbr_rt === 0
|
||||||
? false
|
? false
|
||||||
: jobline.db_ref === "900511" ||
|
: true
|
||||||
jobline.db_ref === "900510" ||
|
: cieca_code === "MAPA"
|
||||||
(jobline.mod_lb_hrs === 0 && //Extending IO-1375 as a part of IO-2023
|
? jobs_by_pk.tax_paint_mat_rt === 0
|
||||||
jobline.act_price > 0 &&
|
? false
|
||||||
jobline.lbr_op === "OP14")
|
: true
|
||||||
? true
|
: cieca_code === "MASH"
|
||||||
: jobline.tax_part
|
? jobs_by_pk.tax_shop_mat_rt === 0
|
||||||
|
? false
|
||||||
|
: true
|
||||||
|
: cieca_code.startsWith("PA")
|
||||||
|
? jobs_by_pk.parts_tax_rates[`${cieca_code}`].prt_tax_in === false ||
|
||||||
|
jobs_by_pk.parts_tax_rates[`${cieca_code}`].prt_tax_rt === 0
|
||||||
|
? false
|
||||||
|
: true
|
||||||
|
: jobline.db_ref === "900511" ||
|
||||||
|
jobline.db_ref === "900510" ||
|
||||||
|
(jobline.mod_lb_hrs === 0 && //Extending IO-1375 as a part of IO-2023
|
||||||
|
jobline.act_price > 0 &&
|
||||||
|
jobline.lbr_op === "OP14")
|
||||||
|
? true
|
||||||
|
: jobline.tax_part
|
||||||
},
|
},
|
||||||
bodyshop.md_responsibility_centers.sales_tax_codes
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user