Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7532,7 +7532,8 @@ Fordern Sie Spesendetails wie Belege und Beschreibungen an, legen Sie Limits und
markedReimbursed: (amount: string, currency: string) => `hat ${currency}${amount} anderweitig bezahlt`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `${currency}${amount} über Integration bezahlt`,
outdatedBankAccount: `Konnte die Zahlung aufgrund eines Problems mit dem Bankkonto des Zahlenden nicht verarbeiten`,
reimbursementACHBounce: `Zahlung konnte aufgrund eines Problems mit dem Bankkonto nicht verarbeitet werden`,
reimbursementACHBounceDefault: `Zahlung konnte wegen einer falschen Bankleitzahl/Kontonummer oder eines geschlossenen Kontos nicht verarbeitet werden`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `Die Zahlung konnte nicht verarbeitet werden: ${returnReason}`,
reimbursementACHCancelled: `hat die Zahlung storniert`,
reimbursementAccountChanged: `Die Zahlung konnte nicht verarbeitet werden, da der Zahlungspflichtige das Bankkonto gewechselt hat`,
reimbursementDelayed: `hat die Zahlung verarbeitet, aber sie verzögert sich um weitere 1–2 Werktage`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7499,7 +7499,8 @@ const translations = {
markedReimbursed: (amount: string, currency: string) => `paid ${currency}${amount} elsewhere`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `paid ${currency}${amount} via integration`,
outdatedBankAccount: `couldn’t process the payment due to a problem with the payer’s bank account`,
reimbursementACHBounce: `couldn't process the payment due to a bank account issue`,
reimbursementACHBounceDefault: `couldn't process the payment due to an incorrect routing/account number or closed account`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `couldn't process the payment: ${returnReason}`,
reimbursementACHCancelled: `canceled the payment`,
reimbursementAccountChanged: `couldn’t process the payment, as the payer changed bank accounts`,
reimbursementDelayed: `processed the payment but it’s delayed by 1-2 more business days`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7355,7 +7355,8 @@ ${amount} para ${merchant} - ${date}`,
markedReimbursed: (amount, currency) => `pagó ${currency}${amount} en otro lugar`,
markedReimbursedFromIntegration: ({amount, currency}) => `pagó ${currency}${amount} mediante integración`,
outdatedBankAccount: `no se pudo procesar el pago debido a un problema con la cuenta bancaria del pagador`,
reimbursementACHBounce: `no se pudo procesar el pago debido a un problema con la cuenta bancaria`,
reimbursementACHBounceDefault: `no se pudo procesar el pago debido a un número de ruta/cuenta incorrecto o una cuenta cerrada`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `no se pudo procesar el pago: ${returnReason}`,
reimbursementACHCancelled: `canceled the payment`,
reimbursementAccountChanged: `no se pudo procesar el pago porque el pagador cambió de cuenta bancaria`,
reimbursementDelayed: `procesó el pago pero se retrasó entre 1 y 2 días hábiles más`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7554,7 +7554,8 @@ Rendez obligatoires des informations de dépense comme les reçus et les descrip
markedReimbursed: (amount: string, currency: string) => `payé ${amount} ${currency} ailleurs`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `a payé ${currency}${amount} via intégration`,
outdatedBankAccount: `n’a pas pu traiter le paiement en raison d’un problème avec le compte bancaire du payeur`,
reimbursementACHBounce: `impossible de traiter le paiement en raison d’un problème de compte bancaire`,
reimbursementACHBounceDefault: `impossible de traiter le paiement en raison d’un numéro de routage/de compte incorrect ou d’un compte clôturé`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `impossible de traiter le paiement : ${returnReason}`,
reimbursementACHCancelled: `a annulé le paiement`,
reimbursementAccountChanged: `impossible de traiter le paiement, car le payeur a changé de compte bancaire`,
reimbursementDelayed: `a traité le paiement, mais il est retardé de 1 à 2 jours ouvrables supplémentaires`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7518,7 +7518,8 @@ Richiedi dettagli sulle spese come ricevute e descrizioni, imposta limiti e valo
markedReimbursed: (amount: string, currency: string) => `pagato ${currency}${amount} altrove`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `pagato ${currency}${amount} tramite integrazione`,
outdatedBankAccount: `impossibile elaborare il pagamento a causa di un problema con il conto bancario del pagatore`,
reimbursementACHBounce: `impossibile elaborare il pagamento a causa di un problema con il conto bancario`,
reimbursementACHBounceDefault: `impossibile elaborare il pagamento a causa di un numero di instradamento/conto errato o di un conto chiuso`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `impossibile elaborare il pagamento: ${returnReason}`,
reimbursementACHCancelled: `ha annullato il pagamento`,
reimbursementAccountChanged: `impossibile elaborare il pagamento, poiché il pagatore ha cambiato conto bancario`,
reimbursementDelayed: `ha elaborato il pagamento ma è in ritardo di 1-2 giorni lavorativi in più`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7432,7 +7432,8 @@ ${reportName}
markedReimbursed: (amount: string, currency: string) => `他の場所で${currency}${amount}を支払いました`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `連携経由で${currency}${amount}を支払いました`,
outdatedBankAccount: `支払元の銀行口座に問題があるため、支払いを処理できませんでした`,
reimbursementACHBounce: `銀行口座の問題により支払いを処理できませんでした`,
reimbursementACHBounceDefault: `ルーティング番号または口座番号の誤り、もしくは口座が閉鎖されているため、支払いを処理できませんでした`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `支払いを処理できませんでした:${returnReason}`,
reimbursementACHCancelled: `支払いをキャンセルしました`,
reimbursementAccountChanged: `支払元が銀行口座を変更したため、支払いを処理できませんでした`,
reimbursementDelayed: `支払いは処理されましたが、あと1~2営業日遅れています`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7497,7 +7497,8 @@ Vereis onkostendetails zoals bonnen en beschrijvingen, stel limieten en standaar
markedReimbursed: (amount: string, currency: string) => `elders ${currency}${amount} betaald`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `heeft ${currency}${amount} betaald via integratie`,
outdatedBankAccount: `kon de betaling niet verwerken vanwege een probleem met de bankrekening van de betaler`,
reimbursementACHBounce: `kon de betaling niet verwerken vanwege een probleem met de bankrekening`,
reimbursementACHBounceDefault: `kon de betaling niet verwerken vanwege een verkeerd bank-/rekeningnummer of een gesloten rekening`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `kon de betaling niet verwerken: ${returnReason}`,
reimbursementACHCancelled: `heeft de betaling geannuleerd`,
reimbursementAccountChanged: `kon de betaling niet verwerken omdat de betaler van bankrekening is veranderd`,
reimbursementDelayed: `heeft de betaling verwerkt, maar deze is nog 1-2 extra werkdagen vertraagd`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7485,7 +7485,8 @@ Wymagaj szczegółów wydatków, takich jak paragony i opisy, ustawiaj limity i
markedReimbursed: (amount: string, currency: string) => `zapłacono ${currency}${amount} gdzie indziej`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `zapłacono ${currency}${amount} przez integrację`,
outdatedBankAccount: `nie można było przetworzyć płatności z powodu problemu z kontem bankowym płatnika`,
reimbursementACHBounce: `nie udało się przetworzyć płatności z powodu problemu z kontem bankowym`,
reimbursementACHBounceDefault: `nie udało się przetworzyć płatności z powodu nieprawidłowego numeru rozliczeniowego/konta lub zamkniętego konta`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `nie udało się przetworzyć płatności: ${returnReason}`,
reimbursementACHCancelled: `anulowano płatność`,
reimbursementAccountChanged: `nie można było przetworzyć płatności, ponieważ płatnik zmienił konto bankowe`,
reimbursementDelayed: `przetworzono płatność, ale jest opóźniona o kolejne 1–2 dni robocze`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7489,7 +7489,8 @@ Exija dados de despesas como recibos e descrições, defina limites e padrões e
markedReimbursed: (amount: string, currency: string) => `pagou ${currency}${amount} em outro lugar`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `pagou ${currency}${amount} via integração`,
outdatedBankAccount: `não foi possível processar o pagamento devido a um problema com a conta bancária do pagador`,
reimbursementACHBounce: `não foi possível processar o pagamento devido a um problema com a conta bancária`,
reimbursementACHBounceDefault: `não foi possível processar o pagamento devido a um número de roteamento/conta incorreto ou conta encerrada`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `não foi possível processar o pagamento: ${returnReason}`,
reimbursementACHCancelled: `cancelou o pagamento`,
reimbursementAccountChanged: `não foi possível processar o pagamento, pois o pagador alterou a conta bancária`,
reimbursementDelayed: `processou o pagamento, mas ele será atrasado em mais 1–2 dias úteis`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7314,7 +7314,8 @@ ${reportName}
markedReimbursed: (amount: string, currency: string) => `在其他地方已支付${currency}${amount}`,
markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `通过集成支付了 ${currency}${amount}`,
outdatedBankAccount: `由于付款方的银行账户出现问题,无法处理该付款`,
reimbursementACHBounce: `由于银行账户问题,无法处理付款`,
reimbursementACHBounceDefault: `由于路由号/账户号不正确或账户已关闭,无法处理付款`,
reimbursementACHBounceWithReason: ({returnReason}: {returnReason: string}) => `无法处理付款:${returnReason}`,
reimbursementACHCancelled: `已取消付款`,
reimbursementAccountChanged: `由于付款人更换了银行账户,无法处理该付款`,
reimbursementDelayed: `已处理付款,但将再延迟 1–2 个工作日`,
Expand Down
4 changes: 3 additions & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

let allReportActions: OnyxCollection<ReportActions>;
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,

Check warning on line 92 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
waitForCollectionCallback: true,
callback: (actions) => {
if (!actions) {
Expand All @@ -101,7 +101,7 @@

let allReports: OnyxCollection<Report>;
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT,

Check warning on line 104 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
waitForCollectionCallback: true,
callback: (value) => {
allReports = value;
Expand All @@ -110,13 +110,13 @@

let isNetworkOffline = false;
Onyx.connect({
key: ONYXKEYS.NETWORK,

Check warning on line 113 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
callback: (val) => (isNetworkOffline = val?.isOffline ?? false),
});

let deprecatedCurrentUserAccountID: number | undefined;
Onyx.connect({
key: ONYXKEYS.SESSION,

Check warning on line 119 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
callback: (value) => {
// When signed out, value is undefined
if (!value) {
Expand Down Expand Up @@ -2103,7 +2103,9 @@
case CONST.REPORT.ACTIONS.TYPE.OUTDATED_BANK_ACCOUNT:
return translate('report.actions.type.outdatedBankAccount');
case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_BOUNCE:
return translate('report.actions.type.reimbursementACHBounce');
return originalMessage?.returnReason
? translate('report.actions.type.reimbursementACHBounceWithReason', {returnReason: originalMessage.returnReason})
: translate('report.actions.type.reimbursementACHBounceDefault');
Comment thread
abbasifaizan70 marked this conversation as resolved.
case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_CANCELED:
return translate('report.actions.type.reimbursementACHCancelled');
case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACCOUNT_CHANGED:
Expand Down
12 changes: 11 additions & 1 deletion src/types/onyx/OldDotAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ type OriginalMessageOutdatedBankAccount = {
originalMessage: Record<string, unknown>;
};

/**
*
*/
type ReimbursementACHBounceOriginalMessage = {
/**
*
*/
returnReason?: string;
};

/**
*
*/
Expand All @@ -149,7 +159,7 @@ type OriginalMessageReimbursementACHBounce = {
/**
*
*/
originalMessage: Record<string, unknown>;
originalMessage: Record<string, unknown> & ReimbursementACHBounceOriginalMessage;
};

/**
Expand Down
29 changes: 29 additions & 0 deletions tests/unit/ReportActionsUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,35 @@ describe('ReportActionsUtils', () => {
});
});

describe('getMessageOfOldDotReportAction', () => {
it('should return the ACH bounce message with return reason when provided', () => {
const returnReason = 'R03 - No Account/Unable to Locate Account';
const action: Parameters<typeof ReportActionsUtils.getMessageOfOldDotReportAction>[1] = {
reportActionID: '1',
created: '2024-01-01 00:00:00.000',
actionName: CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_BOUNCE,
originalMessage: {returnReason},
};

const message = ReportActionsUtils.getMessageOfOldDotReportAction(translateLocal, action);

expect(message).toBe(translateLocal('report.actions.type.reimbursementACHBounceWithReason', {returnReason}));
});

it('should return the default ACH bounce message when return reason is missing', () => {
const action: Parameters<typeof ReportActionsUtils.getMessageOfOldDotReportAction>[1] = {
reportActionID: '1',
created: '2024-01-01 00:00:00.000',
actionName: CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_BOUNCE,
originalMessage: {},
};

const message = ReportActionsUtils.getMessageOfOldDotReportAction(translateLocal, action);

expect(message).toBe(translateLocal('report.actions.type.reimbursementACHBounceDefault'));
});
});

describe('getSendMoneyFlowAction', () => {
const mockChatReportID = `${ONYXKEYS.COLLECTION.REPORT}REPORT` as const;
const mockDMChatReportID = `${ONYXKEYS.COLLECTION.REPORT}REPORT_DM` as const;
Expand Down
Loading