Repository navigation
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
4e598fe to
2ed5c78
Compare
|
Hey! I created a draft PR for this issue, but there are a few questions we need to answer before proceeding :)
@grgia @joekaufmanexpensify Feel free to run an adhoc build and test it! Any feedback helps me catch issues early :) |
|
🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
How are we handling this in the other non-reimbursable case? My understanding is that we are going to pay the eligible reports, skip the ones that are not eligible, and then show the results afterward, explaining what was skipped. Can we take a similar approach for this case here?
Let's handle this the same way we handle the cases in #104574 (comment). If all the selected reports require GR, we can just open the right-hand pane that prompts the user to set up global reimbursements. Perhaps changing the subheader to clarify that all the reports require it versus the singular copy now
No preference here. If you are farther along, can you just create the pattern and vice versa with the other issue? |
|
Thanks for testing! You're right, the October 28 report should be paid. The app decides whether a report needs global reimbursements before paying, but it only looks at the company bank account (USD, global reimbursements not enabled). It has no data about the employee's bank account, so every report paid from that account gets skipped. Paying a single report from the report view has the same issue, since it uses the same check. So both cases need backend data:
cc @grgia, could you take a look at the missing backend data I mentioned above? :) |
|
Yes @WojtekBoman @joekaufmanexpensify seems the BE doesnt support this- I created an issue. Can you confirm, this wasnt supported already for corpay? |
Correct. The UX we're implementing here is not currently supported with Corpay. Here is how it works today if you try and bulk pay a mix of payments, some of which require Corpay and some do not, when the bank account is not enabled for Corpay:
So you get a setup prompt, without a clear explanation of the bulk-payment results. The feedback we're adding here will make for a much better UX. |
| @@ -1951,6 +1976,36 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) { | |||
| playSound(SOUNDS.SUCCESS); | |||
| clearSelectedTransactions(); | |||
There was a problem hiding this comment.
NAB
an admin who bulk pays a mixed selection and clicks Not now on the Pay with x1234 modal finds the unpaid report no longer selected.
test 1 step 7 says the unpaid report stays selected, but clearSelectedTransactions() runs whenever paidReportCount > 0. which one is intended?
There was a problem hiding this comment.
Good catch! Clearing the selection is intended, same as after any bulk pay that pays at least one report. The test step was wrong, I updated the PR description.
|
Heads up: the backend moved. Read |
… pay Read nextStep.requiresGlobalReimbursement from the report row instead of judging by the paying bank account alone, so reports paid to domestic accounts go through.
…ing to report attributes
# Conflicts: # src/hooks/useSearchBulkActions.ts
|
Thanks for retesting @joekaufmanexpensify! First account: @grgia maybe it'd be worth checking the logs for the failed Reports disappearing: the app marks reports as paid before the server answers, and brings them back when they're rejected. I'll change it so they stay in place with a loader until the server answers 🫡 Single report: the app can only open the setup right away when it pays from the workspace's reimbursement account. In your tests the paying account was a different one, so the app has to ask the server first. With the change above, the report will just show a loader until the setup opens :) |
…ct for global reimbursements
|
🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@joekaufmanexpensify @WojtekBoman
|
| playSound(SOUNDS.SUCCESS); | ||
| // Offline the payment is queued and has to show as paid right away, and a partial payment creates the report for the held expenses optimistically | ||
| const shouldHoldOptimisticPayment = | ||
| full && !getIsOffline() && !!iouReport?.reportID && canGlobalReimbursementsRejectPayment({paymentType, policy, methodID, bankAccountList, isWiseReimbursementsBetaEnabled}); |
There was a problem hiding this comment.
NAB
an admin in the Wise beta who pays a US employee from a USD account without global reimbursements waits on a loader on every Pay button, and never gets the paid animation or sound.
@WojtekBoman canGlobalReimbursementsRejectPayment holds every payment from that account. WDYT about this case?
Im also find to merge and tackle as follow up
There was a problem hiding this comment.
Good catch, updated! Payments from the workspace account now show as paid right away unless the report is flagged. The loader stays only when paying from a different account :)
…backend does not flag them for global reimbursements
|
Closing the loop, I retested with the account (`jkaufman+gr9@expensifail.com) where I was having issues yesterday (because I was trying to pay from and into the same bank account). I changed the deposit bank account and confirmed the modal is working for me as expected now. The loader also looks way better. 2026-11-19_13-09-43.mp4I retested the paying single report case, and the loader looks way better there as well. I do think it could be worth further exploration in the future whether we can change the single paying experience to not even require the loader, but that is NAB, since it only impacts a case where you're not using the workspace bank account. 2026-11-19_13-10-57.mp4 |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good from my perspective. Great work, everyone!
|
🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.5.43-0 🚀
|
|
No help site update needed — the new bulk-payment feedback is behind the |
|
Hi @WojtekBoman. How can we set isGlobalReimbursementEnabled to false? |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.5.47-0 🚀
|
|
@WojtekBoman, another question: we’re a bit confused about the second bank account. Shouldn’t it also be hidden when Global Reimbursement is disabled? 105238A.mp4 |
@IuliiaHerets I'm not totally following the question or the video. Could you clarify the steps that you're taking and what you think isn't working correctly in a bit more detail so I can confirm? |
|
@joekaufmanexpensify Hi! To clarify our steps and questions:
|
|
@IuliiaHerets I talked with @grgia and for now it should be [NoQA], sorry for the confusion 🙇 |
|
🚀 Deployed to staging by https://github.com/grgia in version: 9.5.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.51-1 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Behind the
wiseReimbursementsbeta, Search bulk pay now skips reports whose bank account needs global reimbursements, pays the rest, and shows one modal listing the reports that weren't paid.Get startedopens the global reimbursements intro for that account,Not nowcloses it. "Select all" is out of scope.The client can't predict every rejection:
nextStep.requiresGlobalReimbursementis only sent when the workspace has a reimbursement account, and only describes paying from that account. So the backend can still reject a payment withjsonCode666. Those rejections are now handled the same way:GlobalReimbursementPayErrordrops the generic error that Search pay adds to the report infailureData, for bulk pay and for a single row. The Search row had no way to dismiss it.How it works:
useSearchBulkActionshands each click over toGlobalReimbursementsBulkPay, which keeps the pending payments in memory.GlobalReimbursementPayErrorreports each payment response to it and holds the backend signal back for bulk pay requests. After the last response it setsenableGlobalReimbursementsModal, andEnableGlobalReimbursementsPayModal(mounted inAuthScreens) shows the list or opens the intro.Known limitations:
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/694432
PROPOSAL:
Tests
Setup: an admin account with the
wiseReimbursementsbeta, a workspace whose reimbursement account is a USD business bank account (OPEN) withisGlobalReimbursementEnabled: false, and at least two approved expense reports in that workspace. A second workspace whose bank account does not need global reimbursements, with one approved report.Mixed selection
Get startedandNot nowbuttonsNot nowAll selected reports need global reimbursements
Selecting expenses and beta off
wiseReimbursementsbeta and repeat bulk payReports the backend rejects
Setup: add a second USD business bank account (OPEN,
isGlobalReimbursementEnabled: false) that is not the reimbursement account of the first workspace. In that workspace, have one approved report from a member with a USD deposit account and one from a member with a deposit account in another currency.Get startedand verify that the intro opens for the second bank accountLeaving Search before the responses arrive
Only rejected reports
Single report
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari