diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 1015d0b5fec6..808ef06828a7 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -7305,8 +7305,8 @@ function isGroupChatAdmin(report: OnyxEntry, accountID: number) { * as a participant of the report. */ function getMoneyRequestOptions(report: OnyxEntry, policy: OnyxEntry, reportParticipants: number[], filterDeprecatedTypes = false): IOUType[] { - // In any thread or task report, we do not allow any new expenses yet - if (isChatThread(report) || isTaskReport(report) || isInvoiceReport(report) || isSystemChat(report) || isArchivedReportWithID(report?.reportID)) { + // In any thread, task report or trip room, we do not allow any new expenses + if (isChatThread(report) || isTaskReport(report) || isInvoiceReport(report) || isSystemChat(report) || isArchivedReportWithID(report?.reportID) || isTripRoom(report)) { return []; } diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index cd4e8ef213f3..eff3a2f8f758 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -674,6 +674,16 @@ describe('ReportUtils', () => { expect(moneyRequestOptions.length).toBe(0); }); + it('its trip room', () => { + const report = { + ...LHNTestUtils.getFakeReport(), + type: CONST.REPORT.TYPE.CHAT, + chatType: CONST.REPORT.CHAT_TYPE.TRIP_ROOM, + }; + const moneyRequestOptions = temporary_getMoneyRequestOptions(report, undefined, [currentUserAccountID]); + expect(moneyRequestOptions.length).toBe(0); + }); + it('its paid Expense report', () => { const report = { ...LHNTestUtils.getFakeReport(),