Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/TransactionItemRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ function TransactionItemRow({
const hasConvertedAmount = transactionItem.convertedAmount != null;
// Offline expenses don't have a BE-computed convertedAmount yet — fall back to the unconverted
// amount in the transaction's own currency so users don't see a misleading $0.00 placeholder.
const totalAmount = hasConvertedAmount ? getConvertedAmount(transactionItem, isFromExpenseReport, false, true) : getAmount(transactionItem, isFromExpenseReport, false, true);
// Pass isFromExpenseReport so IOU reports stay positive while expense reports get NewDot's signed display.
const totalAmount = hasConvertedAmount ? getConvertedAmount(transactionItem, isFromExpenseReport) : getAmount(transactionItem, isFromExpenseReport);
// When converted, display in the report's output currency; otherwise use the transaction's own currency.
const totalCurrency = hasConvertedAmount ? (report?.currency ?? policy?.outputCurrency ?? getCurrency(transactionItem)) : getCurrency(transactionItem);
return (
Expand Down
8 changes: 5 additions & 3 deletions src/libs/SearchUIUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5320,9 +5320,11 @@ function getColumnsToShow({
columns[CONST.SEARCH.TABLE_COLUMNS.CARD] = true;
}

// If the transaction has any tax info (code, value, or amount),
// show both TAX_RATE and TAX_AMOUNT columns. Zero is valid tax data.
const hasTaxInfo = !!transaction.taxCode || transaction.taxAmount != null || (transaction.taxValue !== undefined && transaction.taxValue !== '');
// Show both TAX_RATE and TAX_AMOUNT when the transaction has a meaningful tax signal.
// Use truthy checks so default/no-tax values (0, null, '', undefined) don't trigger
// false positives — buildOptimisticTransaction seeds taxAmount: 0 on every new draft,
// which would otherwise flash tax columns on for offline-pending transactions.
const hasTaxInfo = !!transaction.taxCode || !!transaction.taxAmount || !!transaction.taxValue;
if (hasTaxInfo) {
columns[CONST.SEARCH.TABLE_COLUMNS.TAX_RATE] = true;
columns[CONST.SEARCH.TABLE_COLUMNS.TAX_AMOUNT] = true;
Expand Down
Loading