diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 36fd0c06eed2..0920017eec00 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1132,6 +1132,19 @@ function openReport(reportID) { }); } +/** + * Gets the IOUReport and the associated report actions. + * + * @param {Number} chatReportID + * @param {Number} iouReportID + */ +function openPaymentDetailsPage(chatReportID, iouReportID) { + API.read('OpenPaymentDetailsPage', { + reportID: chatReportID, + iouReportID, + }); +} + /** * Marks the new report actions as read * @@ -1649,4 +1662,5 @@ export { markCommentAsUnread, readNewestAction, openReport, + openPaymentDetailsPage, }; diff --git a/src/pages/iou/IOUDetailsModal.js b/src/pages/iou/IOUDetailsModal.js index 0835558d4423..84ca46ed8321 100644 --- a/src/pages/iou/IOUDetailsModal.js +++ b/src/pages/iou/IOUDetailsModal.js @@ -92,7 +92,7 @@ class IOUDetailsModal extends Component { } fetchData() { - Report.fetchIOUReportByID(this.props.route.params.iouReportID, this.props.route.params.chatReportID, true); + Report.openPaymentDetailsPage(this.props.route.params.chatReportID, this.props.route.params.iouReportID); } /**