diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index b9f73d80d..cf9f87688 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -512,7 +512,13 @@ abstract class DocumentShow extends Base $this->hideNote = $hideNote; $this->hideAttachment = $hideAttachment; - $this->attachment = !empty($attachment) ? $attachment : !empty($document) ? $document->attachment : ''; + $this->attachment = ''; + + if (!empty($attachment)) { + $this->attachment = $attachment; + } else if (!empty($document)) { + $this->attachment = $document->attachment; + } $this->textItems = $textItems; $this->textQuantity = $textQuantity;