Repository navigation
[Payment due @nkdengineer] [No QA] Support vendors in the rule modification message - #107590
Conversation
🦜 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 diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 9abdd839..c1eb7baa 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -12329,6 +12329,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
nonDefaultReimbursable: 'Nicht standardmäßige erstattungsfähige Einstellung',
nonDefaultTag: 'Nicht-Standard-Tag',
nonDefaultTax: 'Nicht-Standardsteuer',
+ nonDefaultVendor: 'Nicht-Standardlieferant',
},
ruleViolation: {
fallback: 'Verstößt gegen Spesenrichtlinie',
@@ -12372,6 +12373,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
nonDefaultReimbursable: 'Erstattungsfähig weicht von der Standardarbeitsbereichseinstellung ab',
nonDefaultTag: 'Tag weicht von der Arbeitsbereichs-Standardeinstellung ab',
nonDefaultTax: 'Steuer unterscheidet sich von der Arbeitsbereichs-Standardeinstellung',
+ nonDefaultVendor: 'Anbieter unterscheidet sich von der Arbeitsbereichs-Vorgabe',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} ist erforderlich`,
diff --git a/src/languages/el.ts b/src/languages/el.ts
index eaf43f2c..cf2c798e 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -12538,6 +12538,7 @@ ${reportName}`,
nonDefaultReimbursable: 'Μη προεπιλεγμένη ρυθμίση επιστρεφόμενων εξόδων',
nonDefaultTag: 'Μη προεπιλεγμένη ετικέτα',
nonDefaultTax: 'Μη προεπιλεγμένος φόρος',
+ nonDefaultVendor: 'Προμηθευτής εκτός προεπιλογής',
},
ruleViolation: {
fallback: 'Παραβιάζει την πολιτική εξόδων',
@@ -12581,6 +12582,7 @@ ${reportName}`,
nonDefaultReimbursable: 'Η δυνατότητα αποζημίωσης διαφέρει από την προεπιλογή του χώρου εργασίας',
nonDefaultTag: 'Η ετικέτα διαφέρει από την προεπιλογή του χώρου εργασίας',
nonDefaultTax: 'Ο φόρος διαφέρει από την προεπιλογή του χώρου εργασίας',
+ nonDefaultVendor: 'Ο προμηθευτής διαφέρει από την προεπιλογή του χώρου εργασίας',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `Απαιτείται το πεδίο ${fieldName}`,
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 0b8ed195..c36bdc93 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -12593,6 +12593,7 @@ ${reportName}`,
nonDefaultReimbursable: 'Configuración reembolsable no predeterminada',
nonDefaultTag: 'Etiqueta no predeterminada',
nonDefaultTax: 'Impuesto no predeterminado',
+ nonDefaultVendor: 'Proveedor no predeterminado',
},
ruleViolation: {
fallback: 'Infringe la política de gastos',
@@ -12636,6 +12637,7 @@ ${reportName}`,
nonDefaultReimbursable: 'Reembolsable difiere del valor predeterminado del espacio de trabajo',
nonDefaultTag: 'La etiqueta difiere del valor predeterminado del espacio de trabajo',
nonDefaultTax: 'El impuesto difiere del valor predeterminado del espacio de trabajo',
+ nonDefaultVendor: 'El proveedor es distinto del proveedor predeterminado del espacio de trabajo',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName) => `${fieldName} es obligatorio`,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index b6215f26..98640ae0 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -12358,6 +12358,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
nonDefaultReimbursable: 'Paramètre de remboursement non par défaut',
nonDefaultTag: 'Tag non par défaut',
nonDefaultTax: 'Taxe non par défaut',
+ nonDefaultVendor: 'Fournisseur non par défaut',
},
ruleViolation: {
fallback: 'Viole la politique de dépenses',
@@ -12401,6 +12402,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
nonDefaultReimbursable: 'Différente du paramètre par défaut de l’espace de travail pour les remboursements',
nonDefaultTag: 'Le tag diffère du paramètre par défaut de l’espace de travail',
nonDefaultTax: 'Taxe différente de celle de l’espace de travail par défaut',
+ nonDefaultVendor: 'Le fournisseur diffère de celui de l’espace de travail par défaut',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} est obligatoire`,
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 36d54722..6231ff60 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -12275,6 +12275,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
nonDefaultReimbursable: 'Impostazione rimborsabile non predefinita',
nonDefaultTag: 'Tag non predefinito',
nonDefaultTax: 'Imposta non predefinita',
+ nonDefaultVendor: 'Fornitore non predefinito',
},
ruleViolation: {
fallback: 'Viola la politica spese',
@@ -12318,6 +12319,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
nonDefaultReimbursable: 'Rimborsabile diverso dall’impostazione predefinita dello spazio di lavoro',
nonDefaultTag: "L'etichetta è diversa da quella predefinita dello spazio di lavoro",
nonDefaultTax: 'Imposta diversa da quella predefinita dello spazio di lavoro',
+ nonDefaultVendor: 'Il fornitore è diverso da quello predefinito dello spazio di lavoro',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} è obbligatorio`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index e80f018a..27145a39 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -12076,6 +12076,7 @@ ${reportName}`,
nonDefaultReimbursable: 'デフォルト以外の立替精算設定',
nonDefaultTag: 'デフォルト以外のタグ',
nonDefaultTax: '既定以外の税金',
+ nonDefaultVendor: '非デフォルトの仕入先',
},
ruleViolation: {
fallback: '経費ポリシー違反',
@@ -12119,6 +12120,7 @@ ${reportName}`,
nonDefaultReimbursable: '精算可がワークスペースのデフォルトと異なります',
nonDefaultTag: 'タグがワークスペースのデフォルトと異なります',
nonDefaultTax: '税がワークスペースのデフォルトと異なります',
+ nonDefaultVendor: 'ベンダーがワークスペースのデフォルトと異なります',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} は必須です`,
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index ca921e8c..b3ca3a13 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -12245,6 +12245,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
nonDefaultReimbursable: 'Niet-standaard terugbetaalbare instelling',
nonDefaultTag: 'Tag buiten de standaard',
nonDefaultTax: 'Niet-standaardbelasting',
+ nonDefaultVendor: 'Niet-standaard leverancier',
},
ruleViolation: {
fallback: 'Schendt onkostenbeleid',
@@ -12288,6 +12289,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
nonDefaultReimbursable: 'Vergoedbaar wijkt af van de standaardinstelling van de workspace',
nonDefaultTag: 'Label wijkt af van werkruimte-standaard',
nonDefaultTax: 'Belasting wijkt af van werkruimte-standaard',
+ nonDefaultVendor: 'Leverancier wijkt af van standaardinstelling van de workspace',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} is verplicht`,
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 593e9ffd..f7338b40 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -12287,6 +12287,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
nonDefaultReimbursable: 'Niedomyslne ustawienie zwrotu kosztów',
nonDefaultTag: 'Tag inny niż domyślny',
nonDefaultTax: 'Podatek niestandardowy',
+ nonDefaultVendor: 'Dostawca inny niż domyślny',
},
ruleViolation: {
fallback: 'Narusza politykę wydatków',
@@ -12330,6 +12331,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
nonDefaultReimbursable: 'Do zwrotu, różni się od domyślnego ustawienia w przestrzeni roboczej',
nonDefaultTag: 'Tag różni się od domyślnego ustawienia przestrzeni roboczej',
nonDefaultTax: 'Podatek różni się od domyślnego ustawienia w przestrzeni roboczej',
+ nonDefaultVendor: 'Dostawca różni się od domyślnego w przestrzeni roboczej',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `Pole ${fieldName} jest wymagane`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 6b6bef0c..9c29d5f6 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -12247,6 +12247,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
nonDefaultReimbursable: 'Configuração reembolsável não padrão',
nonDefaultTag: 'Tag não padrão',
nonDefaultTax: 'Imposto não padrão',
+ nonDefaultVendor: 'Fornecedor não padrão',
},
ruleViolation: {
fallback: 'Viola a política de despesas',
@@ -12290,6 +12291,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
nonDefaultReimbursable: 'Reembolsável difere do padrão do espaço de trabalho',
nonDefaultTag: 'A tag é diferente da padrão do espaço de trabalho',
nonDefaultTax: 'Imposto diferente do padrão do espaço de trabalho',
+ nonDefaultVendor: 'Fornecedor diferente do padrão do workspace',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} é obrigatório`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 2f6b42d7..b820c11d 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -11770,6 +11770,7 @@ ${reportName}`,
nonDefaultReimbursable: '非默认报销设置',
nonDefaultTag: '非默认标签',
nonDefaultTax: '非默认税率',
+ nonDefaultVendor: '非默认供应商',
},
ruleViolation: {
fallback: '违反报销政策',
@@ -11813,6 +11814,7 @@ ${reportName}`,
nonDefaultReimbursable: '报销设置不同于工作区默认值',
nonDefaultTag: '标签与工作区默认值不同',
nonDefaultTax: '税率与工作区默认值不同',
+ nonDefaultVendor: '供应商与工作区默认设置不一致',
},
reportViolations: {
[CONST.REPORT_VIOLATIONS.FIELD_REQUIRED]: (fieldName: string) => `${fieldName} 为必填项`,
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
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.
|
|
@DylanDylann 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] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@Beamanator if you wouldn't mind reviewing this, this is the first PR of three to ensure that vendor defaults follow the same patterns as the rest of the defaults in the rules engine |
|
Code is looking good, but i have a few questions about the manual test expectations:
|
|
|
ok nice those are pretty interesting!! I'm going OOO most of next week (I'll be on here and there, maaaaaybe 2 hours per day max) so I hope @heyjennahay can take a look at this just to understand the plan and confirm we're all good and on the same page 😬 🙏 |
|
Take over based on here |
|
@JS00001 Code change looks good. Is the backend change deployed for testing, or can I only approve the code changes without testing? |
|
The BE is not deployed yet, so there is not much else to test. We need to merge e/app, then thebackend |
|
🎯 @nkdengineer, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
…-transaction-vendors
|
🚧 luacmartins 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/luacmartins in version: 9.5.57-0 🚀
|
|
No help site update needed — this PR adds vendor-specific rule messages and violation display without introducing a new workflow, removing a beta gate, or making an existing article factually incorrect. |
Explanation of Change
Adds support for vendor rules when an expense is updated. Also supports vendor setting being a part of the same message that we send for all rules in the rules engine
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/706677
Tests
Internal:
Checkout https://github.com/Expensify/Auth/pull/26954
Checkout https://github.com/Expensify/Web-Expensify/pull/58810
setup QBO so that we use vendors
Create a rule matching
merchant: Jackand that sets the vendor to 'Uber'Create an expense with the matching merchant
Ensure the vendor gets set to
Uberand the message mentionsset the vendor to Uber via workspace rules, rather than having a one-off messageUpdate the vendor to something random
Ensure that the field gets a violation 'vendor differs from workspace default'
Change the merchant to 'Jeff'
Ensure the violation goes away
Change the merchant back to 'jack'
Ensure the merchant gets set back to 'uber' with no violation
Verify that no errors appear in the JS console
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).Avatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)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
Screen.Recording.2026-11-20.at.10.05.45.AM.mov