IO-2793 Correct passed Variable
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -71,7 +71,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
|
||||
{
|
||||
local: false,
|
||||
federal: InstanceManager({ imex: true, rome: false }),
|
||||
state: checkStateTax(jobline, jobs_by_pk.parts_tax_rates, responsibilityCenters.defaults.profits, jobline.profitcenter_part)
|
||||
state: checkStateTax(jobline, jobs_by_pk, responsibilityCenters.defaults.profits, jobline.profitcenter_part)
|
||||
},
|
||||
bodyshop.md_responsibility_centers.sales_tax_codes
|
||||
);
|
||||
@@ -870,7 +870,7 @@ exports.createMultiQbPayerLines = function ({ bodyshop, jobs_by_pk, qbo = false,
|
||||
return InvoiceLineAdd;
|
||||
};
|
||||
|
||||
function checkStateTax(jobline, parts_tax_rates, defaultsProfits, profitCenter) {
|
||||
function checkStateTax(jobline, jobs_by_pk, defaultsProfits, profitCenter) {
|
||||
//Find out CIECA Code based on profitcenter_part to determine if state tax applies or not.
|
||||
const cieca_code = Object.keys(defaultsProfits).find(
|
||||
(key) => defaultsProfits[key].toLowerCase() === profitCenter.toLowerCase()
|
||||
@@ -925,8 +925,8 @@ function checkStateTax(jobline, parts_tax_rates, defaultsProfits, profitCenter)
|
||||
// Line is to be sent to QBO as Parts
|
||||
else {
|
||||
if (
|
||||
parts_tax_rates[`${cieca_code}`].prt_tax_in === false ||
|
||||
parts_tax_rates[`${cieca_code}`].prt_tax_rt === 0
|
||||
jobs_by_pk.parts_tax_rates[`${cieca_code}`].prt_tax_in === false ||
|
||||
jobs_by_pk.parts_tax_rates[`${cieca_code}`].prt_tax_rt === 0
|
||||
) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user