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