From c799149d2dd08b94cb063c99494bf8b48e9612d6 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Sun, 4 Aug 2024 16:08:22 +0200 Subject: [PATCH] Improved logo display in Invoice/Estimate PDFs --- app/Space/ImageUtils.php | 18 ++++++++++++++++++ .../views/app/pdf/estimate/estimate1.blade.php | 2 +- .../views/app/pdf/estimate/estimate2.blade.php | 2 +- .../views/app/pdf/estimate/estimate3.blade.php | 2 +- .../views/app/pdf/invoice/invoice1.blade.php | 5 +---- .../views/app/pdf/invoice/invoice2.blade.php | 2 +- .../views/app/pdf/invoice/invoice3.blade.php | 2 +- 7 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 app/Space/ImageUtils.php diff --git a/app/Space/ImageUtils.php b/app/Space/ImageUtils.php new file mode 100644 index 00000000..eecfb9ee --- /dev/null +++ b/app/Space/ImageUtils.php @@ -0,0 +1,18 @@ + @if ($logo) - + @else @if ($estimate->customer->company) diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 3a70259d..d4f9e976 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -420,7 +420,7 @@ @if ($logo) - + @else diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index ac5163e4..1cb18b08 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -358,7 +358,7 @@ @if ($logo) - + @else

{{ $estimate->customer->company->name }}

@endif diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index a19598d7..05ea846c 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -328,9 +328,6 @@ - @if (App::isLocale('th')) - @include('app.pdf.locale.th') - @endif @@ -339,7 +336,7 @@ @if ($logo) - + @else @if ($invoice->customer->company) diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index 6643ab64..ff3e488c 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -389,7 +389,7 @@ @if ($logo) - + @elseif ($invoice->customer->company)

{{ $invoice->customer->company->name }} diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index f044f2b9..5e62f609 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -318,7 +318,7 @@ @if ($logo) - + @else

{{ $invoice->customer->company->name }}

@endif