From c1ddc5ae730b8a12ec893ebd9f42bfa61ce0e8e5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 25 Jul 2023 18:16:57 +1000 Subject: [PATCH] Fixes for mobile view: --- app/Http/Livewire/PdfSlot.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Livewire/PdfSlot.php b/app/Http/Livewire/PdfSlot.php index dccaf802c03d..63b4c4f89915 100644 --- a/app/Http/Livewire/PdfSlot.php +++ b/app/Http/Livewire/PdfSlot.php @@ -235,10 +235,13 @@ class PdfSlot extends Component $product_items = collect($this->entity->line_items)->filter(function ($item) { return $item->type_id == 1 || $item->type_id == 6 || $item->type_id == 5; })->map(function ($item){ + + $notes = strlen($item->notes) > 4 ? $item->notes : $item->product_key; + return [ 'quantity' => $item->quantity, 'cost' => Number::formatMoney($item->cost, $this->entity->client ?: $this->entity->vendor), - 'notes' => $this->invitation->company->markdown_enabled ? DesignHelpers::parseMarkdownToHtml($item->notes) : $item->notes, + 'notes' => $this->invitation->company->markdown_enabled ? DesignHelpers::parseMarkdownToHtml($notes) : $notes, 'line_total' => Number::formatMoney($item->line_total, $this->entity->client ?: $this->entity->vendor), ]; });