From 8e22cff9ae1341add9ea3cd8ce14e27e471ec9d2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 25 Jul 2023 18:24:37 +1000 Subject: [PATCH] Fixes for mobile view --- app/Http/Livewire/PdfSlot.php | 5 +++-- .../views/portal/ninja2020/components/html-viewer.blade.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/PdfSlot.php b/app/Http/Livewire/PdfSlot.php index 63b4c4f89915..7e2945fc0681 100644 --- a/app/Http/Livewire/PdfSlot.php +++ b/app/Http/Livewire/PdfSlot.php @@ -53,6 +53,8 @@ class PdfSlot extends Component public $route_entity = 'client'; + public $is_quote = false; + public function mount() { MultiDB::setDb($this->db); @@ -230,8 +232,6 @@ class PdfSlot extends Component private function getProducts() { - - $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){ @@ -271,6 +271,7 @@ class PdfSlot extends Component if ($this->invitation instanceof InvoiceInvitation) { return 'invoice'; } elseif ($this->invitation instanceof QuoteInvitation) { + $this->is_quote = true; return 'quote'; } elseif ($this->invitation instanceof CreditInvitation) { return 'credit'; diff --git a/resources/views/portal/ninja2020/components/html-viewer.blade.php b/resources/views/portal/ninja2020/components/html-viewer.blade.php index 0b1ccdafed00..2841d3a17487 100644 --- a/resources/views/portal/ninja2020/components/html-viewer.blade.php +++ b/resources/views/portal/ninja2020/components/html-viewer.blade.php @@ -136,10 +136,12 @@ span { {{ ctrans('texts.total') }} {{ $amount }} + @if(!$is_quote) {{ ctrans('texts.balance') }} {{ $balance }} + @endif