diff --git a/app/Http/Livewire/PdfSlot.php b/app/Http/Livewire/PdfSlot.php
index 9be66121824a..1baee4a081df 100644
--- a/app/Http/Livewire/PdfSlot.php
+++ b/app/Http/Livewire/PdfSlot.php
@@ -52,7 +52,7 @@ class PdfSlot extends Component
public function getPdf()
{
- // $this->pdf = $this->entity->fullscreenPdfViewer($this->invitation);
+ $this->pdf = $this->entity->fullscreenPdfViewer($this->invitation);
}
public function render()
@@ -125,20 +125,20 @@ class PdfSlot extends Component
if($this->entity_type == 'invoice' || $this->entity_type == 'recurring_invoice') {
foreach($this->settings->pdf_variables->invoice_details as $variable)
- $entity_details .= "
{$variable}_label
{$variable}
";
+ $entity_details .= "{$variable}_label
{$variable}
";
}
elseif($this->entity_type == 'quote'){
foreach($this->settings->pdf_variables->quote_details as $variable)
- $entity_details .= "{$variable}_label
{$variable}
";
+ $entity_details .= "{$variable}_label
{$variable}
";
}
elseif($this->entity_type == 'credit') {
foreach($this->settings->pdf_variables->credit_details as $variable)
- $entity_details .= "{$variable}_label
{$variable}
";
+ $entity_details .= "{$variable}_label
{$variable}
";
}
elseif($this->entity_type == 'purchase_order'){
foreach($this->settings->pdf_variables->purchase_order_details as $variable)
- $entity_details .= "{$variable}_label
{$variable}
";
+ $entity_details .= "{$variable}_label
{$variable}
";
}
return $this->convertVariables($entity_details);
@@ -147,10 +147,13 @@ class PdfSlot extends Component
private function getUserName()
{
- if($this->entity_type == 'purchase_order') {
+ $name = ctrans('texts.details');
+
+ if($this->entity_type == 'purchase_order' && isset($this->settings->pdf_variables->vendor_details[0])) {
$name = $this->settings->pdf_variables->vendor_details[0];
- } else {
+ } elseif(isset($this->settings->pdf_variables->client_details[0])) {
+
$name = $this->settings->pdf_variables->client_details[0];
}
diff --git a/resources/views/portal/ninja2020/components/html-viewer.blade.php b/resources/views/portal/ninja2020/components/html-viewer.blade.php
index 58fbdc575226..1f08f1d535e5 100644
--- a/resources/views/portal/ninja2020/components/html-viewer.blade.php
+++ b/resources/views/portal/ninja2020/components/html-viewer.blade.php
@@ -34,10 +34,6 @@ span {
{!! $company_details !!}
-
-
@@ -47,7 +43,7 @@ span {
-
+
@@ -80,8 +76,8 @@ span {
|
@@ -93,10 +89,10 @@ span {
@endif
@if($services->count() > 0)
-
+
-
Service |
Amount |
@@ -107,8 +103,8 @@ span {
- {{ $service['quantity'] }} × {{ $service['cost'] }}
- {{ $service['notes'] }}
+ {{ $service['quantity'] }} × {{ $service['cost'] }}
+ {{ $service['notes'] }}
|
@@ -119,7 +115,7 @@ span {
@endif
-
+
@@ -132,7 +128,7 @@ span {
- {{ $amount }} |
+ {{ $amount }} |
@@ -142,7 +138,7 @@ span {
|
- {{ $balance }} |
+ {{ $balance }} |
diff --git a/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php b/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php
index 629979df06ea..080ac4a2352f 100644
--- a/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php
+++ b/resources/views/portal/ninja2020/components/livewire/pdf-slot.blade.php
@@ -1,44 +1,51 @@
-
- @if($pdf)
-
- @else
-
-
-
-
- @endif
+
+
+
+ @if($pdf)
+
+ @else
+
+
+
+
+ @endif
+
- @include('portal.ninja2020.components.html-viewer')
+
+
+@include('portal.ninja2020.components.html-viewer')
+
+
\ No newline at end of file