IO-1805 QBO Modifications for No 1 group.

This commit is contained in:
Patrick Fic
2022-03-31 12:50:06 -07:00
parent c125cd8ca2
commit 28f0d9a4b2
10 changed files with 31071 additions and 15 deletions

View File

@@ -611,6 +611,32 @@ exports.default = function ({
}
}
//QB USA with GST
//This was required for the No. 1 Collision Group.
if (
bodyshop.accountingconfig &&
bodyshop.accountingconfig.qbo &&
bodyshop.accountingconfig.qbo_usa &&
bodyshop.region_config.includes("CA_")
) {
InvoiceLineAdd.push({
DetailType: "SalesItemLineDetail",
Amount: Dinero(jobs_by_pk.job_totals.totals.federal_tax).toFormat(
DineroQbFormat
),
SalesItemLineDetail: {
...(jobs_by_pk.class
? { ClassRef: { value: classes[jobs_by_pk.class] } }
: {}),
ItemRef: {
value:
items[bodyshop.md_responsibility_centers.taxes.federal.accountitem],
},
Qty: 1,
},
});
}
return InvoiceLineAdd;
};
@@ -626,7 +652,7 @@ const findTaxCode = ({ local, state, federal }, taxcode) => {
} else if (t.length > 1) {
return "Multiple Tax Codes Match";
} else {
return "No Tax Code Matches";
return "";
}
};
exports.findTaxCode = findTaxCode;