Skip to content

Commit 6ff8eea

Browse files
authored
Merge pull request Expensify#83643 from Expensify/claude-fixNegativeExpenseTaxAmount
Use Math.abs for taxable amount in negative expense tax calculation
2 parents 99d9913 + e4d34fb commit 6ff8eea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/MoneyRequestConfirmationList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ function MoneyRequestConfirmationList({
547547
}, [shouldCalculateDistanceAmount, isReadOnly, distanceRequestAmount, transactionID, currency, isTypeSplit, isPolicyExpenseChat, selectedParticipantsProp, transaction]);
548548

549549
// Calculate and set tax amount in transaction draft
550-
const taxableAmount = isDistanceRequest ? DistanceRequestUtils.getTaxableAmount(policy, customUnitRateID, distance) : (transaction?.amount ?? 0);
550+
const taxableAmount = isDistanceRequest ? DistanceRequestUtils.getTaxableAmount(policy, customUnitRateID, distance) : Math.abs(transaction?.amount ?? 0);
551551
// First we'll try to get the tax value from the chosen policy and if not found, we'll try to get it from the policy for moving expenses (only if the transaction is moving from track expense)
552552
const taxPercentage =
553553
getTaxValue(policy, transaction, transaction?.taxCode ?? defaultTaxCode) ??

0 commit comments

Comments
 (0)