You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expense - No error shows up when 0.00 amount when bulk editing invoice expenses #84665
Version Number: 9.3.34-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82948 Email or phone of affected tester (no customers):jdofinjdoinjidfojdo@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable Invoices.
Go to staging.new.expensify.com
Open FAB > Send invoice.
Send an invoice to any user.
Send another invoice to the same user.
Go to Reports > Expenses.
Click Type > Invoice > Apply.
Bulk select both expenses.
Click dropdown button > Edit multiple.
Click Amount.
Enter 0 and save it.
Click Save.
Expected Result:
Error will show up when saving 0.00 amount when bulk editing invoice expenses because 0.00 amount is not allowed when sending/editing invoice.
Actual Result:
No error shows up when 0.00 amount when bulk editing invoice expenses.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence) Related Issues: #75617
Recommendation: ROLL FORWARD
The fix is straightforward and localized - the bulk edit amount page needs to pass the iouType prop to the MoneyRequestAmountForm component. The existing validation logic already handles invoice zero-amount validation correctly; it just needs the proper iouType to be passed through.
A revert would remove the entire bulk edit feature (which includes 25+ test scenarios), whereas the fix is a single prop addition. Rolling forward is more appropriate here.
Labels: Keeping DeployBlockerCash (App PR caused the issue). Removing DeployBlocker (this is a frontend bug, not a backend issue).
📋 Detailed Analysis
Evidence
The issue reports that bulk editing invoice expenses allows setting amount to 0.00, when it should show an error (as it does for IOU expenses in Test 16 of the PR).
PR #82948 introduced the bulk edit feature, including SearchEditMultipleAmountPage.tsx which handles amount editing for multiple expenses.
Since CONST.IOU.TYPE.SUBMIT is NOT in this set, the validation that prevents 0.00 amounts for invoices never triggers.
Root Cause
The bulk edit amount page calculates the correct iouType for invoice detection but fails to pass it as a prop to the MoneyRequestAmountForm component. This causes the form to use the default SUBMIT type, bypassing the zero-amount validation that should apply to invoices.
Fix: Add iouType prop to MoneyRequestAmountForm in SearchEditMultipleAmountPage.tsx (similar to how isP2P is already passed on line 129).
Please re-state the problem that we are trying to solve in this issue.
When bulk editing invoice expenses via Search > Expenses > Edit multiple > Amount, entering 0.00 does not show an error. However, editing an individual invoice expense amount to 0.00 correctly shows "Please enter a valid amount before continuing." Invoice expenses should never allow zero amounts, regardless of whether edited individually or in bulk.
What is the root cause of that problem?
SearchEditMultipleAmountPage.tsx renders MoneyRequestAmountFormwithout passing the iouType prop (line 125-139). Because of this, MoneyRequestAmountForm defaults iouType to CONST.IOU.TYPE.SUBMIT (line 90 of MoneyRequestAmountForm.tsx).
The zero-amount validation in MoneyRequestAmountForm.tsx (lines 61-76) only rejects amounts < 0.01 for types in the nonZeroExpenses set (PAY, INVOICE, SPLIT). Since SUBMIT is not in that set, the check on line 71 never triggers, and zero amounts pass validation for invoice expenses in bulk edit.
In contrast, the individual edit flow (MoneyRequestView.tsx → IOURequestStepAmount.tsx) correctly passes iouType=INVOICE through route params, so the same validation catches zero amounts.
Notably, SearchEditMultipleAmountPage.tsx already computes the correct iouType per transaction at line 77 (isInvoiceReport(iouReport) ? CONST.IOU.TYPE.INVOICE : CONST.IOU.TYPE.SUBMIT) — but only uses it for the allowNegative calculation, not for the form's amount validation.
What changes do you think we should make in order to solve the problem?
In SearchEditMultipleAmountPage.tsx, compute the most restrictive iouType across all selected transactions (if any selected transaction is an invoice, use CONST.IOU.TYPE.INVOICE) and pass it as the iouType prop to MoneyRequestAmountForm. The existing useMemo that computes allowNegative and isP2P already iterates over selected transactions and checks isInvoiceReport — this same loop should also derive the appropriate iouType to pass to the form component.
What alternative solutions did you explore? (Optional)
An alternative would be adding validation in the saveAmount callback or in SearchEditMultiplePage.tsx's save() function. However, this would mean duplicating the validation logic that already exists in MoneyRequestAmountForm. The cleaner approach is to pass the correct iouType so the existing validation applies naturally — matching how individual edit works.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 10, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82948
melvin-bot commentedon Mar 10, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Mar 10, 2026
Triggered auto assignment to @laurenreidexpensify (
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.github-actions commentedon Mar 10, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Mar 10, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence)
Related Issues: #75617
Recommendation: ROLL FORWARD
The fix is straightforward and localized - the bulk edit amount page needs to pass the
iouTypeprop to theMoneyRequestAmountFormcomponent. The existing validation logic already handles invoice zero-amount validation correctly; it just needs the properiouTypeto be passed through.A revert would remove the entire bulk edit feature (which includes 25+ test scenarios), whereas the fix is a single prop addition. Rolling forward is more appropriate here.
Labels: Keeping
DeployBlockerCash(App PR caused the issue). RemovingDeployBlocker(this is a frontend bug, not a backend issue).📋 Detailed Analysis
Evidence
The issue reports that bulk editing invoice expenses allows setting amount to 0.00, when it should show an error (as it does for IOU expenses in Test 16 of the PR).
PR #82948 introduced the bulk edit feature, including
SearchEditMultipleAmountPage.tsxwhich handles amount editing for multiple expenses.Verification
File affected:
/home/runner/_work/App/App/src/pages/Search/SearchEditMultiple/SearchEditMultipleAmountPage.tsxConfirmed the PR modifies this file: ✅ This file was newly added in PR #82948
Code analysis:
Line 77 in
SearchEditMultipleAmountPage.tsxcorrectly determines theiouType:However, this
iouTypeis only used locally (line 78) and is never passed to theMoneyRequestAmountFormcomponent (lines 125-140).In
MoneyRequestAmountForm.tsx(line 90), wheniouTypeis not provided, it defaults toCONST.IOU.TYPE.SUBMIT.The validation logic (lines 61-76 in
MoneyRequestAmountForm.tsx) checks ifiouTypeis innonZeroExpensesset:Since
CONST.IOU.TYPE.SUBMITis NOT in this set, the validation that prevents 0.00 amounts for invoices never triggers.Root Cause
The bulk edit amount page calculates the correct
iouTypefor invoice detection but fails to pass it as a prop to theMoneyRequestAmountFormcomponent. This causes the form to use the defaultSUBMITtype, bypassing the zero-amount validation that should apply to invoices.Fix: Add
iouTypeprop toMoneyRequestAmountForminSearchEditMultipleAmountPage.tsx(similar to howisP2Pis already passed on line 129).MelvinBot commentedon Mar 10, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When bulk editing invoice expenses via Search > Expenses > Edit multiple > Amount, entering 0.00 does not show an error. However, editing an individual invoice expense amount to 0.00 correctly shows "Please enter a valid amount before continuing." Invoice expenses should never allow zero amounts, regardless of whether edited individually or in bulk.
What is the root cause of that problem?
SearchEditMultipleAmountPage.tsxrendersMoneyRequestAmountFormwithout passing theiouTypeprop (line 125-139). Because of this,MoneyRequestAmountFormdefaultsiouTypetoCONST.IOU.TYPE.SUBMIT(line 90 ofMoneyRequestAmountForm.tsx).The zero-amount validation in
MoneyRequestAmountForm.tsx(lines 61-76) only rejects amounts < 0.01 for types in thenonZeroExpensesset (PAY,INVOICE,SPLIT). SinceSUBMITis not in that set, the check on line 71 never triggers, and zero amounts pass validation for invoice expenses in bulk edit.In contrast, the individual edit flow (
MoneyRequestView.tsx→IOURequestStepAmount.tsx) correctly passesiouType=INVOICEthrough route params, so the same validation catches zero amounts.Notably,
SearchEditMultipleAmountPage.tsxalready computes the correctiouTypeper transaction at line 77 (isInvoiceReport(iouReport) ? CONST.IOU.TYPE.INVOICE : CONST.IOU.TYPE.SUBMIT) — but only uses it for theallowNegativecalculation, not for the form's amount validation.What changes do you think we should make in order to solve the problem?
In
SearchEditMultipleAmountPage.tsx, compute the most restrictiveiouTypeacross all selected transactions (if any selected transaction is an invoice, useCONST.IOU.TYPE.INVOICE) and pass it as theiouTypeprop toMoneyRequestAmountForm. The existinguseMemothat computesallowNegativeandisP2Palready iterates over selected transactions and checksisInvoiceReport— this same loop should also derive the appropriateiouTypeto pass to the form component.What alternative solutions did you explore? (Optional)
An alternative would be adding validation in the
saveAmountcallback or inSearchEditMultiplePage.tsx'ssave()function. However, this would mean duplicating the validation logic that already exists inMoneyRequestAmountForm. The cleaner approach is to pass the correctiouTypeso the existing validation applies naturally — matching how individual edit works.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.IuliiaHerets commentedon Mar 10, 2026
Chrome / 9.3.34-1
No Edit multiple option
Screen.Recording.2026-03-10.at.19.46.18.mp4
marcaaron commentedon Apr 3, 2026
Fixed in #84756