Skip to content

Commit 9703faa

Browse files
committed
fix: use new system messages
1 parent 0e43893 commit 9703faa

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/languages/params.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ type WorkspacesListRouteParams = {
142142
};
143143

144144
type BusinessBankAccountParams = {
145-
amount: string;
146-
last4Digits: string;
145+
amount?: string;
146+
last4Digits?: string;
147147
};
148148

149149
type WorkspaceRouteParams = {

src/libs/ReportUtils.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5144,7 +5144,13 @@ function getReportNameInternal({
51445144
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.ELSEWHERE) {
51455145
return translateLocal('iou.paidElsewhere');
51465146
}
5147-
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.VBBA || originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
5147+
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.VBBA) {
5148+
if (originalMessage.automaticAction) {
5149+
return translateLocal('iou.automaticallyPaidWithBusinessBankAccount', {});
5150+
}
5151+
return translateLocal('iou.businessBankAccount', {});
5152+
}
5153+
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
51485154
if (originalMessage.automaticAction) {
51495155
return translateLocal('iou.automaticallyPaidWithExpensify');
51505156
}
@@ -9223,8 +9229,10 @@ function getIOUReportActionDisplayMessage(reportAction: OnyxEntry<ReportAction>,
92239229
return translateLocal(payAsBusiness ? 'iou.settleInvoiceBusiness' : 'iou.settleInvoicePersonal', {amount: '', last4Digits});
92249230
}
92259231
translationKey = 'iou.businessBankAccount';
9226-
if (automaticAction) {
9232+
if (automaticAction && originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
92279233
translationKey = 'iou.automaticallyPaidWithExpensify';
9234+
} else {
9235+
translationKey = 'iou.automaticallyPaidWithBusinessBankAccount';
92289236
}
92299237
break;
92309238
default:

0 commit comments

Comments
 (0)