Skip to content

Commit

Permalink
Dispaly a positive tax amount when BE returns negative amount
Browse files Browse the repository at this point in the history
  • Loading branch information
etCoderDysto committed Jul 9, 2024
1 parent dd96852 commit 7d1ade1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/MoneyRequestConfirmationListFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ function MoneyRequestConfirmationListFooter({
const shouldShowBillable = policy?.disabledFields?.defaultBillable === false;
// Do not hide fields in case of paying someone
const shouldShowAllFields = !!isDistanceRequest || shouldExpandFields || !shouldShowSmartScanFields || isTypeSend || !!isEditingSplitBill;
// Calculate the formatted tax amount based on the transaction's tax amount and the IOU currency code
const formattedTaxAmount = CurrencyUtils.convertToDisplayString(transaction?.taxAmount, iouCurrencyCode);
// Calculate the formatted tax amount based on the transaction's tax amount returned from getTaxAmount and the IOU currency code
const taxAmount = TransactionUtils.getTaxAmount(transaction, false);
const formattedTaxAmount = CurrencyUtils.convertToDisplayString(taxAmount, iouCurrencyCode);
// Get the tax rate title based on the policy and transaction
const taxRateTitle = TransactionUtils.getTaxName(policy, transaction);
// Determine if the merchant error should be displayed
Expand Down

0 comments on commit 7d1ade1

Please sign in to comment.