Skip to content

Commit

Permalink
Merge pull request #40049 from Expensify/cmartins-fixTaxAmount
Browse files Browse the repository at this point in the history
[CP Staging] Fix tax amount error

(cherry picked from commit 338d90f)
  • Loading branch information
MonilBhavsar authored and OSBotify committed Apr 11, 2024
1 parent 7c577b4 commit 67bcc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function getTaxAmount(transaction: OnyxEntry<Transaction>, 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));
}
Expand Down

0 comments on commit 67bcc10

Please sign in to comment.