Resolve sales tax code issue on payables IO-738

This commit is contained in:
Patrick Fic
2021-03-04 16:33:36 -08:00
parent 0d75b97718
commit e1e85214cc

View File

@@ -122,7 +122,10 @@ const findTaxCode = (billLine, taxcode) => {
applicable_taxes: { local, state, federal }, applicable_taxes: { local, state, federal },
} = billLine; } = billLine;
const t = taxcode.filter( const t = taxcode.filter(
(t) => t.local === local && t.state === state && t.federal === federal (t) =>
!!t.local === !!local &&
!!t.state === !!state &&
!!t.federal === !!federal
); );
if (t.length === 1) { if (t.length === 1) {
console.log(t); console.log(t);