Skip to content

Commit

Permalink
Merge pull request #29664 from Expensify/youssef_fix_created_missing_…
Browse files Browse the repository at this point in the history
…error

Fix error when keeping default date when splitting

(cherry picked from commit ca4516d)
  • Loading branch information
mountiny authored and OSBotify committed Oct 16, 2023
1 parent 91beb2c commit b7115db
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -1688,15 +1688,23 @@ function completeSplitBill(chatReportID, reportAction, updatedTransaction, sessi
failureData.push(...oneOnOneFailureData);
});

const {
amount: transactionAmount,
currency: transactionCurrency,
created: transactionCreated,
merchant: transactionMerchant,
comment: transactionComment,
} = ReportUtils.getTransactionDetails(updatedTransaction);

API.write(
'CompleteSplitBill',
{
transactionID,
amount: updatedTransaction.modifiedAmount,
currency: updatedTransaction.modifiedCurrency,
created: updatedTransaction.modifiedCreated,
merchant: updatedTransaction.modifiedMerchant,
comment: updatedTransaction.comment.comment,
amount: transactionAmount,
currency: transactionCurrency,
created: transactionCreated,
merchant: transactionMerchant,
comment: transactionComment,
splits: JSON.stringify(splits),
},
{optimisticData, successData, failureData},
Expand Down

0 comments on commit b7115db

Please sign in to comment.