Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libs/actions/IOU/Split.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ function updateSplitTransactions({
newReportTotal: reportTotals.get(splitExpense?.reportID ?? String(CONST.DEFAULT_NUMBER_ID)) ?? 0,
newNonReimbursableTotal: (transactionReport?.nonReimbursableTotal ?? 0) - changesInReportTotal,
isSplitExpense: true,
currentReportActionID: !isReverseSplitOperation ? currentReportAction?.reportActionID : undefined,
currentReportActionID: currentReportAction?.reportActionID,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid reusing existing reportActionID in reverse split

When isReverseSplitOperation is true, this now forwards currentReportAction?.reportActionID into getMoneyRequestInformation, which makes the optimistic IOU action reuse an ID that already exists on the original split action. That reused ID is then propagated as splitReportActionID for REVERT_SPLIT_TRANSACTION, so reverse-splitting can hit a duplicate report-action insert (UNIQUE constraint) and fail instead of completing.

Useful? React with 👍 / 👎.

isASAPSubmitBetaEnabled,
currentUserAccountIDParam: currentUserPersonalDetails?.accountID,
currentUserEmailParam: currentUserPersonalDetails?.login ?? '',
Expand Down
Loading