|
|
|
|
@@ -71,16 +71,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state:
|
|
|
|
|
jobs_by_pk.state_tax_rate === 0
|
|
|
|
|
? false
|
|
|
|
|
: 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
|
|
|
|
|
state: checkStateTax(jobline, jobs_by_pk)
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -156,7 +147,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state: jobs_by_pk.state_tax_rate === 0 ? false : true
|
|
|
|
|
state: jobs_by_pk.tax_lbr_rt === 0 ? false : true
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -224,7 +215,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state: jobs_by_pk.state_tax_rate === 0 ? false : true
|
|
|
|
|
state: jobs_by_pk.tax_paint_mat_rt === 0 ? false : true
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -293,7 +284,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state: jobs_by_pk.state_tax_rate === 0 ? false : true
|
|
|
|
|
state: jobs_by_pk.tax_shop_mat_rt === 0 ? false : true
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -379,7 +370,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state: jobs_by_pk.state_tax_rate === 0 ? false : true
|
|
|
|
|
state: jobs_by_pk.tax_tow_rt === 0 ? false : true
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -439,7 +430,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state: jobs_by_pk.state_tax_rate === 0 ? false : true
|
|
|
|
|
state: jobs_by_pk.tax_str_rt === 0 ? false : true
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -499,7 +490,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
|
|
|
|
{
|
|
|
|
|
local: false,
|
|
|
|
|
federal: InstanceManager({ imex: true, rome: false }),
|
|
|
|
|
state: jobs_by_pk.state_tax_rate === 0 ? false : true
|
|
|
|
|
state: jobs_by_pk.tax_lbr_rt === 0 ? false : true
|
|
|
|
|
},
|
|
|
|
|
bodyshop.md_responsibility_centers.sales_tax_codes
|
|
|
|
|
);
|
|
|
|
|
@@ -879,6 +870,63 @@ exports.createMultiQbPayerLines = function ({ bodyshop, jobs_by_pk, qbo = false,
|
|
|
|
|
return InvoiceLineAdd;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function checkStateTax(jobline, jobs_by_pk) {
|
|
|
|
|
const isPaintOrShopMat = jobline.db_ref === "936008" || jobline.db_ref === "936007";
|
|
|
|
|
|
|
|
|
|
if (isPaintOrShopMat) {
|
|
|
|
|
if (jobline.db_ref === "936008") {
|
|
|
|
|
if (jobs_by_pk.tax_paint_mat_rt === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (jobline.db_ref === "936007") {
|
|
|
|
|
if (jobs_by_pk.tax_shop_mat_rt === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const isAdditionalCost =
|
|
|
|
|
(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.part_type && isAdditionalCost) {
|
|
|
|
|
if (jobs_by_pk.tax_lbr_rt === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 ||
|
|
|
|
|
jobs_by_pk.parts_tax_rates[`${jobline.part_type.toUpperCase()}`].prt_tax_rt === 0
|
|
|
|
|
) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (jobs_by_pk.tax_lbr_rt === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function CheckQBOUSATaxID({ jobline, job, type }) {
|
|
|
|
|
//Replacing this to be all non-taxable items with the refactor of parts tax rates.
|
|
|
|
|
return "NON";
|
|
|
|
|
|