From ef4e3775a94496a6cddf4bf2aad99c043628800e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 10 Apr 2024 16:04:21 -0600 Subject: [PATCH] fix tax amount --- src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx index a88de35a5025..f7bef7671804 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx @@ -41,8 +41,8 @@ function getTaxAmount(transaction: OnyxEntry, taxRates: TaxRatesWit const transactionTaxAmount = TransactionUtils.getAmount(transaction); const transactionTaxCode = transaction?.taxCode ?? ''; const defaultTaxValue = taxRates?.defaultValue; - const editingTaxPercentage = (transactionTaxCode ? taxRates?.taxes[transactionTaxCode]?.value : taxRates?.defaultValue) ?? ''; const moneyRequestTaxPercentage = (transaction?.taxRate ? transaction?.taxRate?.data?.value : defaultTaxValue) ?? ''; + const editingTaxPercentage = (transactionTaxCode ? taxRates?.taxes[transactionTaxCode]?.value : moneyRequestTaxPercentage) ?? ''; const taxPercentage = isEditing ? editingTaxPercentage : moneyRequestTaxPercentage; return CurrencyUtils.convertToBackendAmount(TransactionUtils.calculateTaxAmount(taxPercentage, transactionTaxAmount)); }