Skip to content

Commit

Permalink
Merge pull request #44508 from etCoderDysto/fixHold
Browse files Browse the repository at this point in the history
fix: Hold option appears for invoice
(cherry picked from commit 6ea15ed)
  • Loading branch information
carlosmiceli authored and OSBotify committed Jun 27, 2024
1 parent d6c5cc5 commit 75d4ce9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,15 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const isHoldCreator = ReportUtils.isHoldCreator(transaction, moneyRequestReport?.reportID) && isRequestIOU;
const isTrackExpenseReport = ReportUtils.isTrackExpenseReport(moneyRequestReport);
const canModifyStatus = !isTrackExpenseReport && (isPolicyAdmin || isActionOwner || isApprover);
if (isOnHold && (isHoldCreator || (!isRequestIOU && canModifyStatus))) {
const isInvoiceReport = ReportUtils.isInvoiceReport(moneyRequestReport);
if (isOnHold && (isHoldCreator || (!isRequestIOU && canModifyStatus)) && !isInvoiceReport) {
threeDotsMenuItems.push({
icon: Expensicons.Stopwatch,
text: translate('iou.unholdExpense'),
onSelected: () => changeMoneyRequestStatus(),
});
}
if (!isOnHold && (isRequestIOU || canModifyStatus) && !isScanning) {
if (!isOnHold && (isRequestIOU || canModifyStatus) && !isScanning && !isInvoiceReport) {
threeDotsMenuItems.push({
icon: Expensicons.Stopwatch,
text: translate('iou.hold'),
Expand Down

0 comments on commit 75d4ce9

Please sign in to comment.