From 81bc5b0bc03d1cbf731a4ab2de1e1968e0aef781 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 16 Jul 2024 05:05:34 +0300 Subject: [PATCH] correct logic for existing tax code --- src/libs/ValidationUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index 27880eceff0a..64cae69e0b15 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -480,7 +480,7 @@ function isExistingTaxName(taxName: string, taxRates: TaxRates): boolean { function isExistingTaxCode(taxCode: string, taxRates: TaxRates): boolean { const trimmedTaxCode = taxCode.trim(); - return !!Object.values(taxRates).find((taxRate) => taxRate.code === trimmedTaxCode); + return !!Object.keys(taxRates).find((taxID) => taxID === trimmedTaxCode); } /**