Skip to content

Revert "feat: Allow admins to mark report with non-reimbursable expenses as paid (#83329)"#87115

Closed
jasperhuangg wants to merge 1 commit intomainfrom
revert-83329-nonReimbursableMarkAsPaid
Closed

Revert "feat: Allow admins to mark report with non-reimbursable expenses as paid (#83329)"#87115
jasperhuangg wants to merge 1 commit intomainfrom
revert-83329-nonReimbursableMarkAsPaid

Conversation

@jasperhuangg
Copy link
Copy Markdown
Contributor

@jasperhuangg jasperhuangg commented Apr 3, 2026

Explanation of Change

This reverts PR #83329 which allowed admins to mark reports with non-reimbursable expenses as paid and showed a decision modal when attempting to pay via ACH. The revert removes the useNonReimbursablePaymentModal hook, the hasOnlyNonReimbursableTransactions logic in payment flows, the decision modal, and all related i18n strings across 31 files.

Additionally fixes PayPrimaryAction.tsx (added by a later PR) which depended on the useNonReimbursablePaymentModal hook from #83329.

Fixed Issues

$ #87112

Tests

  • Verify that no errors appear in the JS console
  • Verify that reports with only non-reimbursable expenses no longer show a Pay button
  • Verify that the "Cannot pay via Expensify" decision modal no longer appears
  • Verify that normal reimbursable expense payment flows work correctly (submit, approve, pay)

Offline tests

N/A - reverting a feature, no new offline behavior.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Made with Cursor

…ses as paid (#83329)"

This reverts commit 1617cbc.

Also removes non-reimbursable payment dependencies from
PayPrimaryAction.tsx which was added by a later PR but depended on
the useNonReimbursablePaymentModal hook introduced by #83329.

Made-with: Cursor
@jasperhuangg jasperhuangg requested review from a team as code owners April 3, 2026 18:08
@melvin-bot melvin-bot bot requested review from joekaufmanexpensify and stitesExpensify and removed request for a team April 3, 2026 18:08
@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Apr 3, 2026

@stitesExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented Apr 3, 2026

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index c537bb5e..0461a568 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -885,7 +885,7 @@ const translations: TranslationDeepObject<typeof en> = {
         beginningOfChatHistory: (users: string) => `Cette discussion est avec ${users}.`,
         beginningOfChatHistoryPolicyExpenseChat: (workspaceName: string, submitterDisplayName: string) =>
             `C’est ici que <strong>${submitterDisplayName}</strong> soumettra des dépenses à <strong>${workspaceName}</strong>. Utilisez simplement le bouton +.`,
-        beginningOfChatHistoryPolicyExpenseChatTrack: 'C\u2019est ici que vous suivrez vos dépenses',
+        beginningOfChatHistoryPolicyExpenseChatTrack: 'C’est ici que vous suivrez vos dépenses',
         beginningOfChatHistorySelfDM: 'Ceci est votre espace personnel. Utilisez-le pour vos notes, tâches, brouillons et rappels.',
         beginningOfChatHistorySystemDM: 'Bienvenue ! Procédons à la configuration.',
         chatWithAccountManager: 'Discutez avec votre gestionnaire de compte ici',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 5b4d26f7..a29bff37 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -1099,15 +1099,12 @@ const translations: TranslationDeepObject<typeof en> = {
             if (!added && !updated) {
                 return 'Nessuna categoria è stata aggiunta o aggiornata.';
             }
-
             if (added && updated) {
                 return `${added} ${added === 1 ? 'categoria aggiunta' : 'categorie aggiunte'}, ${updated} ${updated === 1 ? 'categoria aggiornata' : 'categorie aggiornate'}.`;
             }
-
             if (added) {
                 return added === 1 ? 'È stata aggiunta 1 categoria.' : `Sono state aggiunte ${added} categorie.`;
             }
-
             return updated === 1 ? 'È stata aggiornata 1 categoria.' : `Sono state aggiornate ${updated} categorie.`;
         },
         importCompanyCardTransactionsSuccessfulDescription: ({transactions}: {transactions: number}) =>
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 50e5b3d8..6cd483c4 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -1082,15 +1082,12 @@ const translations: TranslationDeepObject<typeof en> = {
             if (!added && !updated) {
                 return 'カテゴリーは追加も更新もされていません。';
             }
-
             if (added && updated) {
                 return `${added}件のカテゴリーを追加し、${updated}件のカテゴリーを更新しました。`;
             }
-
             if (added) {
                 return added === 1 ? 'カテゴリーを1件追加しました。' : `${added}件のカテゴリーを追加しました。`;
             }
-
             return updated === 1 ? 'カテゴリーを1件更新しました。' : `${updated}件のカテゴリーを更新しました。`;
         },
         importCompanyCardTransactionsSuccessfulDescription: ({transactions}: {transactions: number}) =>
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index d99a6044..501dbdfa 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -1098,15 +1098,12 @@ const translations: TranslationDeepObject<typeof en> = {
             if (!added && !updated) {
                 return 'Er zijn geen categorieën toegevoegd of bijgewerkt.';
             }
-
             if (added && updated) {
                 return `${added} ${added === 1 ? 'categorie' : 'categorieën'} toegevoegd, ${updated} ${updated === 1 ? 'categorie' : 'categorieën'} bijgewerkt.`;
             }
-
             if (added) {
                 return added === 1 ? '1 categorie is toegevoegd.' : `${added} categorieën zijn toegevoegd.`;
             }
-
             return updated === 1 ? '1 categorie is bijgewerkt.' : `${updated} categorieën zijn bijgewerkt.`;
         },
         importCompanyCardTransactionsSuccessfulDescription: ({transactions}: {transactions: number}) =>
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 54215bbe..875c81a2 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -1099,15 +1099,12 @@ const translations: TranslationDeepObject<typeof en> = {
             if (!added && !updated) {
                 return 'Nie dodano ani nie zaktualizowano żadnych kategorii.';
             }
-
             if (added && updated) {
                 return `Dodano ${added} ${added === 1 ? 'kategorię' : 'kategorie'}, zaktualizowano ${updated} ${updated === 1 ? 'kategorię' : 'kategorie'}.`;
             }
-
             if (added) {
                 return added === 1 ? 'Dodano 1 kategorię.' : `Dodano ${added} kategorie.`;
             }
-
             return updated === 1 ? 'Zaktualizowano 1 kategorię.' : `Zaktualizowano ${updated} kategorie.`;
         },
         importCompanyCardTransactionsSuccessfulDescription: ({transactions}: {transactions: number}) => (transactions > 1 ? `Dodano ${transactions} transakcji.` : 'Dodano 1 transakcję.'),
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index ec0da050..2a267435 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -1097,15 +1097,12 @@ const translations: TranslationDeepObject<typeof en> = {
             if (!added && !updated) {
                 return 'Nenhuma categoria foi adicionada ou atualizada.';
             }
-
             if (added && updated) {
                 return `${added} ${added === 1 ? 'categoria' : 'categorias'} adicionada${added === 1 ? '' : 's'}, ${updated} ${updated === 1 ? 'categoria' : 'categorias'} atualizada${updated === 1 ? '' : 's'}.`;
             }
-
             if (added) {
                 return added === 1 ? '1 categoria foi adicionada.' : `${added} categorias foram adicionadas.`;
             }
-
             return updated === 1 ? '1 categoria foi atualizada.' : `${updated} categorias foram atualizadas.`;
         },
         importCompanyCardTransactionsSuccessfulDescription: ({transactions}: {transactions: number}) =>

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/components/ProcessMoneyReportHoldMenu.tsx 0.00% <ø> (ø)
...ReportPreview/MoneyRequestReportPreviewContent.tsx 61.29% <ø> (-0.16%) ⬇️
...RequestReportPreview/ReportPreviewActionButton.tsx 100.00% <ø> (ø)
src/components/Search/SearchBulkActionsButton.tsx 2.94% <ø> (+0.30%) ⬆️
src/libs/MoneyRequestReportUtils.ts 76.92% <100.00%> (-1.02%) ⬇️
src/libs/ReportPreviewActionUtils.ts 92.66% <100.00%> (ø)
src/libs/ReportPrimaryActionUtils.ts 91.85% <100.00%> (ø)
src/libs/ReportSecondaryActionUtils.ts 92.91% <100.00%> (ø)
src/libs/ReportUtils.ts 79.70% <100.00%> (-0.07%) ⬇️
src/libs/SearchUIUtils.ts 66.02% <100.00%> (-0.04%) ⬇️
... and 7 more
... and 13 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants