diff --git a/src/components/Attachments/AttachmentView/index.tsx b/src/components/Attachments/AttachmentView/index.tsx index 48d2476f0101..256fa046ca20 100644 --- a/src/components/Attachments/AttachmentView/index.tsx +++ b/src/components/Attachments/AttachmentView/index.tsx @@ -245,8 +245,12 @@ function AttachmentView({ ); } - if (isDistanceRequest(transaction) && !isManualDistanceRequest(transaction) && !hasReceiptSource(transaction) && transaction) { - return ; + if (isDistanceRequest(transaction) && !isManualDistanceRequest(transaction) && transaction) { + // Distance eReceipts are now generated as a PDF, but to keep it backwards compatible we still show the old eReceipt view for image receipts + const isImageReceiptSource = checkIsFileImage(source, file?.name); + if (!hasReceiptSource(transaction) || isImageReceiptSource) { + return ; + } } // For this check we use both source and file.name since temporary file source is a blob