Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: V9.2.37-6
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1439/folder/13176791/41237172/969659997
Email or phone of affected tester (no customers): Slottwo1 fgg55@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13 phone
App Component: Money Requests
Action Performed:
- Go to https://staging.new.expensify.com/home
- Open workspace chat
- Create a manual expense for (-8)
- Open the expense details of transaction
- Tap more - split expense
- Remove the second split
- Add a split
- Change amount to 0.01
- Remove negative sign from first split by keeping cursor on first split
10.Note the text above save button mentioning total is less than original amount - Tap save
Expected Result:
Step 10 : The text above the save button is incorrect. It should say 'Total amount is 4.01 greater than the original expense,' and the user should not be able to split the expense.
Actual Result:
Step 10 : The text above the save button is displayed as 'Total amount is 3.99 less than the original expense' . Even though the correct total amount is 4.01, which is actually greater than the original expense.
Error displayed after click save button in Step 11 :
- The sum of split amounts exceeds the original amount
- Unexpected error submitting this expense. Please try again later.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Bug6982894_1761276314558.Screenrecorder-2025-10-24-08-53-54-721.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021981750828087713524
- Upwork Job ID: 1981750828087713524
- Last Price Increase: 2025-10-24
- Automatic offers:
- aimane-chnaif | Reviewer | 109284062
- mkzie2 | Contributor | 109284063
Issue Owner
Current Issue Owner: @saklugerMetadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Oct 24, 2025
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.dmkt9 commentedon Oct 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Step 10 : The text above the save button is displayed as 'Total amount is 3.99 less than the original expense' . Even though the correct total amount is 4.01, which is actually greater than the original expense.
What is the root cause of that problem?
We’ve always taken the absolute value of
transactionDetailsAmount, which causes the warning message to show a smaller amount than the actual value.App/src/pages/iou/SplitExpensePage.tsx
Lines 299 to 302 in 302280e
What changes do you think we should make in order to solve the problem?
Remove
Math.absfromtransactionDetailsAmount.Add a
warningMessagefor thetotalAmountGreaterThanOriginalcase.When
totalAmountGreaterThanOriginalis true, we should disable the Save button.App/src/pages/iou/SplitExpensePage.tsx
Lines 299 to 302 in 302280e
App/src/pages/iou/SplitExpensePage.tsx
Line 316 in 302280e
If we don’t disable the Save button, we can remove Math.abs here to show the error message upon submission:
App/src/pages/iou/SplitExpensePage.tsx
Lines 142 to 146 in 302280e
What alternative solutions did you explore? (Optional)
[-]Expense-Total amount of the split expenses is displayed incorrectly and an error occurs later[/-][+][$250] Expense-Total amount of the split expenses is displayed incorrectly and an error occurs later[/+]melvin-bot commentedon Oct 24, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021981750828087713524
melvin-bot commentedon Oct 24, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)mkzie2 commentedon Oct 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Step 10 : The text above the save button is displayed as 'Total amount is 3.99 less than the original expense' . Even though the correct total amount is 4.01, which is actually greater than the original expense.
What is the root cause of that problem?
sumOfSplitExpensesisn't calculated correctly. We're calculating the total of the absolute amount valueApp/src/pages/iou/SplitExpensePage.tsx
Line 87 in 56763a0
App/src/pages/iou/SplitExpensePage.tsx
Line 142 in 56763a0
App/src/pages/iou/SplitExpensePage.tsx
Line 299 in 56763a0
What changes do you think we should make in order to solve the problem?
Math.abswhen calculating thesumOfSplitExpenseshereApp/src/pages/iou/SplitExpensePage.tsx
Line 87 in 56763a0
Math.absusages onSplitExpensePagewhen comparing/calculating the difference on SplitExpensePageWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
aimane-chnaif commentedon Oct 26, 2025
@mkzie2's proposal looks good.
Split amount input currently doesn't support negative value input. I think we should fix this as well.
🎀 👀 🎀 C+ reviewed
16 remaining items
[-][$250] Expense-Total amount of the split expenses is displayed incorrectly and an error occurs later[/-][+][Due for payment 2025-11-18] [$250] Expense-Total amount of the split expenses is displayed incorrectly and an error occurs later[/+]melvin-bot commentedon Nov 11, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 11, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.48-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-11-18. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 11, 2025
@aimane-chnaif @sakluger The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
sakluger commentedon Nov 19, 2025
Payment Summary
Contributor: @mkzie2 $250 via Upwork: Paid
Contributor+: @aimane-chnaif $250 via Upwork
aimane-chnaif commentedon Nov 19, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No regression but missing case which was not considered while implementing split negative expense
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
sakluger commentedon Nov 19, 2025
Thanks! I updated the payment summary.
aimane-chnaif commentedon Nov 19, 2025
@sakluger I haven't got payment yet.
sakluger commentedon Nov 21, 2025
Sorry @aimane-chnaif, that was my bad. All paid now. Thank you for the bump!