From 8ecf4289e860cf607df5f4aab7a61d39c3bfd3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 26 Jan 2021 14:06:09 +0300 Subject: [PATCH] Document show fixed attachment --- app/Abstracts/View/Components/DocumentShow.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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;