diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 4a145d4e79e9..a435a5723670 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -128,6 +128,7 @@ function ReportPreview({ const [isHoldMenuVisible, setIsHoldMenuVisible] = useState(false); const [requestType, setRequestType] = useState(); const [nonHeldAmount, fullAmount] = ReportUtils.getNonHeldAndFullAmount(iouReport, policy); + const hasOnlyHeldExpenses = ReportUtils.hasOnlyHeldExpenses(iouReport?.reportID ?? ''); const {isSmallScreenWidth} = useWindowDimensions(); const [paymentType, setPaymentType] = useState(); @@ -203,6 +204,18 @@ function ReportPreview({ } }; + const getSettlementAmount = () => { + if (hasOnlyHeldExpenses) { + return ''; + } + + if (ReportUtils.hasHeldExpenses(iouReport?.reportID) && canAllowSettlement) { + return nonHeldAmount; + } + + return CurrencyUtils.convertToDisplayString(reimbursableSpend, iouReport?.currency); + }; + const getDisplayAmount = (): string => { if (totalDisplaySpend) { return CurrencyUtils.convertToDisplayString(totalDisplaySpend, iouReport?.currency); @@ -405,7 +418,7 @@ function ReportPreview({ {shouldShowSettlementButton && ( {isHoldMenuVisible && iouReport && requestType !== undefined && (