From a14655d73bb886607f17714397858cb284d0000c Mon Sep 17 00:00:00 2001 From: Harsh Jagad Date: Wed, 12 Jan 2022 11:44:45 +0000 Subject: [PATCH] Update dompdf version --- composer.json | 4 +- composer.lock | 67 ++++++++--------- .../app/pdf/estimate/estimate1.blade.php | 38 +++++----- .../app/pdf/estimate/estimate2.blade.php | 66 ++++++++++------- .../app/pdf/estimate/estimate3.blade.php | 36 +++++----- .../views/app/pdf/invoice/invoice1.blade.php | 44 ++++++------ .../views/app/pdf/invoice/invoice2.blade.php | 49 ++++++------- .../views/app/pdf/invoice/invoice3.blade.php | 10 +-- .../views/app/pdf/payment/payment.blade.php | 71 +++++++++++-------- 9 files changed, 212 insertions(+), 173 deletions(-) diff --git a/composer.json b/composer.json index 57f360241..e38467699 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,8 @@ "require": { "php": "^7.4 || ^8.0", "aws/aws-sdk-php": "^3.142", + "barryvdh/laravel-dompdf": "^0.9.0", "crater-invoice/modules": "^1.0.0", - "barryvdh/laravel-dompdf": "^0.8.7", "doctrine/dbal": "^2.10", "dragonmantank/cron-expression": "^3.1", "fideloper/proxy": "^4.0", @@ -88,4 +88,4 @@ "dont-discover": [] } } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index a47613f0b..f3ce99a94 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b4c1fd7a94025b650a89756e1140b1c0", + "content-hash": "bec0a5c13fb0fdf512aa6fc44ca14273", "packages": [ { "name": "asm89/stack-cors", @@ -114,16 +114,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.209.1", + "version": "3.209.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "3a418a7a9beae4675685efe7bb426ee0ae338a40" + "reference": "77c14dd84704d2db6c5c4d6a8c1226337e4e6783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3a418a7a9beae4675685efe7bb426ee0ae338a40", - "reference": "3a418a7a9beae4675685efe7bb426ee0ae338a40", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/77c14dd84704d2db6c5c4d6a8c1226337e4e6783", + "reference": "77c14dd84704d2db6c5c4d6a8c1226337e4e6783", "shasum": "" }, "require": { @@ -199,33 +199,33 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.209.1" + "source": "https://github.com/aws/aws-sdk-php/tree/3.209.2" }, - "time": "2022-01-07T19:12:55+00:00" + "time": "2022-01-10T19:14:32+00:00" }, { "name": "barryvdh/laravel-dompdf", - "version": "v0.8.7", + "version": "v0.9.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-dompdf.git", - "reference": "30310e0a675462bf2aa9d448c8dcbf57fbcc517d" + "reference": "5b99e1f94157d74e450f4c97e8444fcaffa2144b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/30310e0a675462bf2aa9d448c8dcbf57fbcc517d", - "reference": "30310e0a675462bf2aa9d448c8dcbf57fbcc517d", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/5b99e1f94157d74e450f4c97e8444fcaffa2144b", + "reference": "5b99e1f94157d74e450f4c97e8444fcaffa2144b", "shasum": "" }, "require": { - "dompdf/dompdf": "^0.8", + "dompdf/dompdf": "^1", "illuminate/support": "^5.5|^6|^7|^8", - "php": ">=7" + "php": "^7.1 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.8-dev" + "dev-master": "0.9-dev" }, "laravel": { "providers": [ @@ -259,7 +259,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-dompdf/issues", - "source": "https://github.com/barryvdh/laravel-dompdf/tree/master" + "source": "https://github.com/barryvdh/laravel-dompdf/tree/v0.9.0" }, "funding": [ { @@ -267,7 +267,7 @@ "type": "github" } ], - "time": "2020-09-07T11:50:18+00:00" + "time": "2020-12-27T12:05:53+00:00" }, { "name": "brick/math", @@ -1058,16 +1058,16 @@ }, { "name": "dompdf/dompdf", - "version": "v0.8.6", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "db91d81866c69a42dad1d2926f61515a1e3f42c5" + "reference": "de4aad040737a89fae2129cdeb0f79c45513128d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/db91d81866c69a42dad1d2926f61515a1e3f42c5", - "reference": "db91d81866c69a42dad1d2926f61515a1e3f42c5", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/de4aad040737a89fae2129cdeb0f79c45513128d", + "reference": "de4aad040737a89fae2129cdeb0f79c45513128d", "shasum": "" }, "require": { @@ -1075,11 +1075,11 @@ "ext-mbstring": "*", "phenx/php-font-lib": "^0.5.2", "phenx/php-svg-lib": "^0.3.3", - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "mockery/mockery": "^1.3", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^7.5 || ^8 || ^9", "squizlabs/php_codesniffer": "^3.5" }, "suggest": { @@ -1089,11 +1089,6 @@ "ext-zlib": "Needed for pdf stream compression" }, "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "0.7-dev" - } - }, "autoload": { "psr-4": { "Dompdf\\": "src/" @@ -1124,9 +1119,9 @@ "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/master" + "source": "https://github.com/dompdf/dompdf/tree/v1.1.1" }, - "time": "2020-08-30T22:54:22+00:00" + "time": "2021-11-24T00:45:04+00:00" }, { "name": "dragonmantank/cron-expression", @@ -11432,16 +11427,16 @@ }, { "name": "nunomaduro/collision", - "version": "v5.10.0", + "version": "v5.11.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00" + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/3004cfa49c022183395eabc6d0e5207dfe498d00", - "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", "shasum": "" }, "require": { @@ -11503,7 +11498,7 @@ }, "funding": [ { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "url": "https://www.paypal.com/paypalme/enunomaduro", "type": "custom" }, { @@ -11515,7 +11510,7 @@ "type": "patreon" } ], - "time": "2021-09-20T15:06:32+00:00" + "time": "2022-01-10T16:22:52+00:00" }, { "name": "pestphp/pest", @@ -12412,5 +12407,5 @@ "php": "^7.4 || ^8.0" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index 1751c9458..d142a2a0e 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -2,7 +2,7 @@ - @lang('pdf_estimate_label') - {{$estimate->estimate_number}} + @lang('pdf_estimate_label') - {{ $estimate->estimate_number }} @@ -389,11 +393,11 @@ @@ -412,15 +416,15 @@
- @if($logo) - + @if ($logo) + @else - @if($estimate->customer->company) - + @if ($estimate->customer->company) + @endif @endif
- + - + - +
@lang('pdf_estimate_number')  {{$estimate->estimate_number}}  {{ $estimate->estimate_number }}
@lang('pdf_estimate_date')  {{$estimate->formattedEstimateDate}}  {{ $estimate->formattedEstimateDate }}
@lang('pdf_estimate_expire_date')  {{$estimate->formattedExpiryDate}}  {{ $estimate->formattedExpiryDate }}
@@ -428,9 +432,9 @@
- @if($billing_address !== '
') + @if ($billing_address !== '
')
- @if($billing_address) + @if ($billing_address) @lang('pdf_bill_to')
{!! $billing_address !!} @endif @@ -438,10 +442,10 @@ @endif -
') class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" style="padding-left:30px;" @endif> +
') class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" style="padding-left:30px;" @endif> - @if($shipping_address) - @lang('pdf_ship_to')
+ @if ($shipping_address) + @lang('pdf_ship_to')
{!! $shipping_address !!} @endif
@@ -454,7 +458,7 @@
- @if($notes) + @if ($notes)
@lang('pdf_notes')
diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 63ce19bba..0e14dfd03 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -2,7 +2,7 @@ - @lang('pdf_estimate_label') - {{$estimate->estimate_number}} + @lang('pdf_estimate_label') - {{ $estimate->estimate_number }} @@ -398,21 +414,21 @@
- @if($logo) - + @if ($logo) + @else @endif
- - + + - @if($estimate->customer->company) -

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

- @endif + @if ($estimate->customer->company) +

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

+ @endif

@lang('pdf_estimate_label')

-

{{$estimate->estimate_number}}

-

{{$estimate->formattedEstimateDate}}

+

{{ $estimate->estimate_number }}

+

{{ $estimate->formattedEstimateDate }}

@@ -424,17 +440,17 @@ {!! $company_address !!}
- @if($shipping_address !== '
') -
- @if($shipping_address) - @lang('pdf_ship_to')
- {!! $shipping_address !!} - @endif -
+ @if ($shipping_address !== '
') +
+ @if ($shipping_address) + @lang('pdf_ship_to')
+ {!! $shipping_address !!} + @endif +
@endif -
') style="float:right; margin-right:30px;" @endif> - @if($billing_address) +
') style="float:right; margin-right:30px;" @endif> + @if ($billing_address) @lang('pdf_bill_to')
{!! $billing_address !!} @endif @@ -445,7 +461,7 @@ @include('app.pdf.estimate.partials.table')
- @if($notes) + @if ($notes)
@lang('pdf_notes')
diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index edc65c5cc..e86bbe1a5 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -2,7 +2,7 @@ - @lang('pdf_estimate_label') - {{$estimate->estimate_number}} + @lang('pdf_estimate_label') - {{ $estimate->estimate_number }} @@ -349,10 +353,10 @@
- @if($logo) - + @if ($logo) + @else -

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

+

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

@endif
@@ -368,14 +372,14 @@
- @if($billing_address) + @if ($billing_address) @lang('pdf_bill_to')
{!! $billing_address !!} @endif
-
customer->billingaddress) class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" @endif> - @if($shipping_address) +
customer->billingaddress) class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" @endif> + @if ($shipping_address) @lang('pdf_ship_to')
{!! $shipping_address !!} @endif @@ -388,15 +392,15 @@ - + - + - +
@lang('pdf_estimate_number')  {{$estimate->estimate_number}}  {{ $estimate->estimate_number }}
@lang('pdf_estimate_date')  {{$estimate->formattedEstimateDate}}  {{ $estimate->formattedEstimateDate }}
@lang('pdf_estimate_expire_date')  {{$estimate->formattedExpiryDate}}  {{ $estimate->formattedExpiryDate }}
@@ -405,7 +409,7 @@ @include('app.pdf.estimate.partials.table')
- @if($notes) + @if ($notes)
@lang('pdf_notes')
diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index 858a79710..eb0edcb8e 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -2,7 +2,7 @@ - @lang('pdf_invoice_label') - {{$invoice->invoice_number}} + @lang('pdf_invoice_label') - {{ $invoice->invoice_number }} @@ -339,11 +342,11 @@ @@ -352,6 +355,7 @@
+
@@ -362,15 +366,15 @@
- @if($logo) - + @if ($logo) + @else - @if($invoice->customer->company) - + @if ($invoice->customer->company) + @endif @endif
- + - + - +
@lang('pdf_invoice_number')  {{$invoice->invoice_number}}  {{ $invoice->invoice_number }}
@lang('pdf_invoice_date')  {{$invoice->formattedInvoiceDate}}  {{ $invoice->formattedInvoiceDate }}
@lang('pdf_invoice_due_date')  {{$invoice->formattedDueDate}}  {{ $invoice->formattedDueDate }}
@@ -379,15 +383,15 @@
- @if($billing_address) + @if ($billing_address) @lang('pdf_bill_to')
{!! $billing_address !!} @endif
-
' ) style="float:left;" @else style="display:block; float:left: padding-left: 0px;" @endif> - @if($shipping_address) +
') style="float:left;" @else style="display:block; float:left: padding-left: 0px;" @endif> + @if ($shipping_address) @lang('pdf_ship_to')
{!! $shipping_address !!} @@ -399,7 +403,7 @@
- @if($notes) + @if ($notes)
@lang('pdf_notes')
diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index 1046e3b15..6b2a1553f 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -2,7 +2,7 @@ - @lang('pdf_invoice_label') - {{$invoice->invoice_number}} + @lang('pdf_invoice_label') - {{ $invoice->invoice_number }} @@ -380,22 +383,20 @@
- @if($logo) - - @else - - @endif +
- - - @if($invoice->customer->company) -

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

- @endif -
+ @if ($logo) + + @elseif ($invoice->customer->company) +

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

+ @endif +

@lang('pdf_invoice_label')

-

{{$invoice->invoice_number}}

-

{{$invoice->formattedInvoiceDate}}

+

{{ $invoice->invoice_number }}

+

{{ $invoice->formattedInvoiceDate }}

@@ -409,9 +410,9 @@ {!! $company_address !!}
- @if($shipping_address !== '
') + @if ($shipping_address !== '
')
- @if($shipping_address) + @if ($shipping_address) @lang('pdf_ship_to')
{!! $shipping_address !!} @endif @@ -419,8 +420,8 @@ @endif -
') style="float:right; margin-right:30px;" @endif> - @if($billing_address) +
') style="float:right; margin-right:30px;" @endif> + @if ($billing_address) @lang('pdf_bill_to')
{!! $billing_address !!} @endif @@ -432,7 +433,7 @@ @include('app.pdf.invoice.partials.table')
- @if($notes) + @if ($notes)
@lang('pdf_notes')
diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index c13d04aad..2df51d454 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -36,7 +36,7 @@ } .header-logo { - height: 50px; + text-transform: capitalize; color: #817AE3; padding-top: 0px; @@ -44,8 +44,8 @@ .company-address-container { width: 50%; - padding-left: 80px; margin-bottom: 2px; + padding-right: 60px; } .company-address { @@ -187,11 +187,13 @@ .total-display-table { + border-top: none; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left: 500px; margin-top: 20px; + float: right; + width: auto; } .total-table-attribute-label { @@ -311,7 +313,7 @@
@if($logo) - + @else

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

@endif diff --git a/resources/views/app/pdf/payment/payment.blade.php b/resources/views/app/pdf/payment/payment.blade.php index cc527ee93..693ef5776 100644 --- a/resources/views/app/pdf/payment/payment.blade.php +++ b/resources/views/app/pdf/payment/payment.blade.php @@ -2,7 +2,7 @@ - @lang('pdf_payment_label') - {{$payment->payment_number}} + @lang('pdf_payment_label') - {{ $payment->payment_number }} @@ -278,15 +282,15 @@
- @if($logo) -
- + @if ($logo) + + @else - @if($payment->customer) - -

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

- @endif - @endif + @if ($payment->customer) +
+

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

+ @endif + @endif
{!! $company_address !!} @@ -305,9 +309,9 @@
- @if($billing_address) - @lang('pdf_received_from') - {!! $billing_address !!} + @if ($billing_address) + @lang('pdf_received_from') + {!! $billing_address !!} @endif
@@ -319,21 +323,22 @@ - + - + - + @if ($payment->invoice && $payment->invoice->invoice_number) - - - - + + + + @endif
@lang('pdf_payment_date')  {{$payment->formattedPaymentDate}}  {{ $payment->formattedPaymentDate }}
@lang('pdf_payment_number')  {{$payment->payment_number}}  {{ $payment->payment_number }}
@lang('pdf_payment_mode')  {{$payment->paymentMethod ? $payment->paymentMethod->name : '-'}} +  {{ $payment->paymentMethod ? $payment->paymentMethod->name : '-' }}
@lang('pdf_invoice_label')  {{$payment->invoice->invoice_number}}
@lang('pdf_invoice_label')  {{ $payment->invoice->invoice_number }}
@@ -344,6 +349,14 @@

@lang('pdf_payment_amount_received_label')

{!! format_money_pdf($payment->amount, $payment->customer->currency) !!}
+
+ @if ($notes) +
+ @lang('pdf_notes') +
+ {!! $notes !!} + @endif +