App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-12-08] Bulk pay: show a modal explaining why non-reimbursable reports got excluded from bank payment

Open mollfpr opened this issue 1 month ago • 51 comments

Problem

The minimal fix shipped in PR #102347 hides the bank-pay option for the WHOLE selection whenever one of the selected reports is entirely non-reimbursable (whether its total is $0 or not). This stops the original bug (bank option wrongly showing for a $0 report), but it over-corrects: a genuinely payable report loses its bank-pay option too just because it’s selected alongside a non-payable one, with no explanation shown to the user

Solution

Bring the bank-pay option back for mixed selections. When the user picks “Pay with [bank account]” on a selection that includes non-reimbursable-only reports alongside payable ones, show a confirmation modal first: list which reports are excluded and why, then let the user proceed paying the eligible reports via bank while leaving the excluded ones for manual mark-as-paid.

Suggested copy:

**Pay with x1234**
These reports weren’t paid with the bank account because all expenses on them are non-reimbursable. You can manually mark them as paid if preferred.
• report name
• report name
[Got it]

Discussed here: https://expensify.slack.com/archives/C07NMDKEFMH/p1791383666369379?thread_ts=1791201941.840769&cid=C07NMDKEFMH Originally reported by @apeyada: Expensify/App#102347 (comment)

Issue OwnerCurrent Issue Owner: @huult

mollfpr avatar Oct 13 '26 12:10 mollfpr

Triggered auto assignment to @shawnborton (Design), see these Stack Overflow questions for more details.

melvin-bot[bot] avatar Oct 13 '26 12:10 melvin-bot[bot]

It was intentional to hide bank payment option for non-reimbursable reports - https://github.com/Expensify/App/pull/87552 Now the decision is changed?

Or this issue is specifically for the mixed selections with both reimbursable and non-reimbursable reports?

apeyada avatar Oct 13 '26 13:10 apeyada

Is anything needed from Design here?

shawnborton avatar Oct 13 '26 13:10 shawnborton

I don't think so, Shawn. Pretty standard centered alert modal pattern. 👍

trjExpensify avatar Oct 15 '26 13:10 trjExpensify

Or this issue is specifically for the mixed selections with both reimbursable and non-reimbursable reports?

Yep, the intention of this modal proposed was for the mixed report selection case. So it's made clear to them which reports were not paid with the bank account after taking the action.

Pay with x1234 These reports weren’t paid with the bank account because all expenses on them are non-reimbursable. You can manually mark them as paid if preferred. • report name • report name [Got it]

I could see an argument that we should show the bank account as an option on "only non-reimbursable" reports selected, but trying to use it would throw a different message in the modal.

Pay with x1234 All expenses on the reports selected are non-reimbursable. You can manually mark these reports as paid if preferred.

[Got it]

CC: @joekaufmanexpensify what do you think?

trjExpensify avatar Oct 15 '26 14:10 trjExpensify

I agree with this. Showing the bank option for the "all non-reimbursable" case with its own modal message makes it clear why nothing was paid.

mollfpr avatar Oct 15 '26 15:10 mollfpr

I can implement this based on latest discussion

apeyada avatar Oct 15 '26 16:10 apeyada

CC: @joekaufmanexpensify what do you think?

Agreed. This feels like better UX, so the user gets feedback on why they weren't able to take the action, versus not showing it at all.

joekaufmanexpensify avatar Oct 16 '26 13:10 joekaufmanexpensify

Dope. 👍 @apeyada can you outline your plan for this for Luthfi to review and then we can get going with the PR?

trjExpensify avatar Oct 16 '26 13:10 trjExpensify

Some questions:

  1. When does the modal show? The issue body says to confirm before paying, but the copy ("These reports weren't paid…", one [Got it] button) reads as an alert after paying. I plan to pay the eligible reports first and then show the alert. Does that work?
  2. Reports that net to $0 or less. A reimbursable report whose expenses cancel out to $0, or go negative, also hides the bank option for the whole selection today. Should it get the same treatment (bank option shown, report skipped, listed in the modal with its own reason)? Or should it stay Mark as paid only for now?
  3. Single report outside Search. This change is for Search bulk pay only. Opening one non-reimbursable report still hides the bank option there Hide ACH if report is non reimbursable. Should the "show the option, explain in a modal" approach apply there too, or stay limited to bulk pay?
  4. "Select all matching". (when more than 50 reports) That selection is paid on the server, and the app can't tell which reports are non-reimbursable, so I plan to keep it Mark as paid only. OK?

apeyada avatar Oct 16 '26 13:10 apeyada

Great questions!

When does the modal show? The issue body says to confirm before paying, but the copy ("These reports weren't paid…", one [Got it] button) reads as an alert after paying. I plan to pay the eligible reports first and then show the alert. Does that work?

Correct for the mixed case. 👍 The other modal for all non-reimbursable reports where nothing gets paid would naturally throw before paying as they all can't be.


Reports that net to $0 or less. A reimbursable report whose expenses cancel out to $0, or go negative, also hides the bank option for the whole selection today. Should it get the same treatment (bank option shown, report skipped, listed in the modal with its own reason)? Or should it stay Mark as paid only for now?

I think we should deploy the same pattern. With that, @joekaufmanexpensify maybe we update the copy to account for either case being applicable?

Mixed case

Pay with x1234 These reports weren’t paid through the bank account because they are either non-reimbursable or have a total amount of zero or less. You can manually mark them as paid if you’d prefer. • report name • report name [Got it]

All selected non-reimbursable or <=$0

Pay with x1234 The reports selected are non-reimbursable or have a total amount of zero or less. You can manually mark these reports as paid if preferred.

[Got it]


Single report outside Search. This change is for Search bulk pay only. Opening one non-reimbursable report still hides the bank option there https://github.com/Expensify/App/pull/87552. Should the "show the option, explain in a modal" approach apply there too, or stay limited to bulk pay?

I think we try to keep things consistent, so I think we should show it and then this error:

Pay with x1234 This report is non-reimbursable or has a total amount of zero or less. You can manually mark it as paid if preferred.

[Got it]


"Select all matching". (when more than 50 reports) That selection is paid on the server, and the app can't tell which reports are non-reimbursable, so I plan to keep it Mark as paid only. OK?

Mhm, I feel like this needs to work consistently across all selections. @mollfpr @JS00001 any ideas?

trjExpensify avatar Oct 16 '26 15:10 trjExpensify

Agree with everything Tom outlined above. Let's make this work consistently in all cases.

joekaufmanexpensify avatar Oct 19 '26 12:10 joekaufmanexpensify

That selection is paid on the server, and the app can't tell which reports are non-reimbursable,

Why is this ? I think we should be able to mention the action that we're going to take

JS00001 avatar Oct 19 '26 12:10 JS00001

@shawnborton, @mollfpr Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Oct 20 '26 21:10 melvin-bot[bot]

@apeyada bump on @JS00001 question above.

trjExpensify avatar Oct 21 '26 20:10 trjExpensify

@trjExpensify — to hire @apeyada on Upwork, add the External label so a job is created and the offer is sent automatically.

melvin-bot[bot] avatar Oct 21 '26 20:10 melvin-bot[bot]

That selection is paid on the server, and the app can't tell which reports are non-reimbursable,

Why is this ? I think we should be able to mention the action that we're going to take

The real blocker isn't detecting the reports. Bank pay isn't supported for "Select all matching" yet:

  • With "Select all", the app only has the pages loaded so far, so it sends the search query instead of a list of reports (queueBulkPayReports, call site).
  • QueueBulkPayReports takes only jsonQuery. It has no payment type or bank account (params), so today it can only mark as paid. The app hides the bank option for "Select all" no matter what's selected (here).

Agreed we can say what we're going to do before queueing. Proposal for "Select all":

  1. Backend: QueueBulkPayReports accepts paymentType and bankAccountID, pays every eligible report through the bank account, and skips reports that are non-reimbursable or total $0 or less.
  2. Frontend: show the bank option for "Select all". When it's picked, show a confirmation before queueing, since we can't list report names here:

Pay with x1234 Reports that are non-reimbursable or have a total amount of zero or less won't be paid through the bank account. You can manually mark them as paid if you'd prefer. [Pay] [Cancel]

Optionally, after the queued payment runs, the backend could send back the skipped reports so we can show the usual list of report names.


Based on above, can "Select all" case be handled as a separate issue?

apeyada avatar Oct 21 '26 20:10 apeyada

@shawnborton this is relevant to global reimbursements to - see https://github.com/Expensify/App/pull/104574#issuecomment-6325323233

grgia avatar Oct 22 '26 09:10 grgia

@grgia what is needed from me here? A mockup, or something else? Happy to help, just unsure what is needed!

shawnborton avatar Oct 22 '26 10:10 shawnborton

I feel like we can probably just go ahead with the modal that I suggested in the other issue without a mockup. It's an analogous case to this one, where someone tries to pay multiple reports, some of them requiring global reimbursements, some not, when a bank account is not set up for global reimbursements.

We're going to pay the reports that don't require global reimbursements. List out the ones that weren't paid on the modal and prompt the user to enable global reimbursements before they can pay them.

Let me know if anyone disagrees with that, though. 👍

joekaufmanexpensify avatar Oct 22 '26 12:10 joekaufmanexpensify