Skip to content

Commit 39080f9

Browse files
committed
fix: use new system messages
1 parent 9703faa commit 39080f9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5140,15 +5140,18 @@ function getReportNameInternal({
51405140

51415141
if (isMoneyRequestAction(parentReportAction)) {
51425142
const originalMessage = getOriginalMessage(parentReportAction);
5143+
const reportPolicy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`];
5144+
const last4Digits = reportPolicy?.achAccount?.accountNumber.slice(-4) ?? '';
5145+
51435146
if (originalMessage?.type === CONST.IOU.REPORT_ACTION_TYPE.PAY) {
51445147
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.ELSEWHERE) {
51455148
return translateLocal('iou.paidElsewhere');
51465149
}
51475150
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.VBBA) {
51485151
if (originalMessage.automaticAction) {
5149-
return translateLocal('iou.automaticallyPaidWithBusinessBankAccount', {});
5152+
return translateLocal('iou.automaticallyPaidWithBusinessBankAccount', {last4Digits});
51505153
}
5151-
return translateLocal('iou.businessBankAccount', {});
5154+
return translateLocal('iou.businessBankAccount', {last4Digits});
51525155
}
51535156
if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
51545157
if (originalMessage.automaticAction) {

0 commit comments

Comments
 (0)