From fca48f74f3739406102a255a960fa7494d45922b Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 7 Nov 2023 00:12:00 +0700 Subject: [PATCH 1/2] reset hasOutstandingChildRequest --- src/libs/actions/IOU.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 19ac03228753..3c274c3b4c0a 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -2449,6 +2449,7 @@ function getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentMetho lastReadTime: DateUtils.getDBTime(), lastVisibleActionCreated: optimisticIOUReportAction.created, hasOutstandingIOU: false, + hasOutstandingChildRequest: false, iouReportID: null, lastMessageText: optimisticIOUReportAction.message[0].text, lastMessageHtml: optimisticIOUReportAction.message[0].html, @@ -2472,6 +2473,7 @@ function getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentMetho lastMessageText: optimisticIOUReportAction.message[0].text, lastMessageHtml: optimisticIOUReportAction.message[0].html, hasOutstandingIOU: false, + hasOutstandingChildRequest: false, statusNum: CONST.REPORT.STATUS.REIMBURSED, }, }, From 1dc45939d71a3888b7091cd1aad8e94563996021 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 7 Nov 2023 02:26:18 +0700 Subject: [PATCH 2/2] fix deleted case --- src/libs/actions/IOU.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 3c274c3b4c0a..acdbc200842b 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -2103,6 +2103,7 @@ function deleteMoneyRequest(transactionID, reportAction, isSingleTransactionView key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`, value: { hasOutstandingIOU: false, + hasOutstandingChildRequest: false, iouReportID: null, lastMessageText: ReportActionsUtils.getLastVisibleMessage(iouReport.chatReportID, {[reportPreviewAction.reportActionID]: null}).lastMessageText, lastVisibleActionCreated: lodashGet(ReportActionsUtils.getLastVisibleAction(iouReport.chatReportID, {[reportPreviewAction.reportActionID]: null}), 'created'),