diff --git a/app/Http/Controllers/Sales/Invoices.php b/app/Http/Controllers/Sales/Invoices.php index fdeab8d09..0cca29ea6 100644 --- a/app/Http/Controllers/Sales/Invoices.php +++ b/app/Http/Controllers/Sales/Invoices.php @@ -297,11 +297,13 @@ class Invoices extends Controller $html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8'); - $file_name = $this->getDocumentFileName($invoice); - $pdf = app('dompdf.wrapper'); $pdf->loadHTML($html); + //$pdf->setPaper('A4', 'portrait'); + + $file_name = $this->getDocumentFileName($invoice); + return $pdf->download($file_name); } diff --git a/resources/views/components/documents/template/classic.blade.php b/resources/views/components/documents/template/classic.blade.php index 2de33f7cb..5222f162c 100644 --- a/resources/views/components/documents/template/classic.blade.php +++ b/resources/views/components/documents/template/classic.blade.php @@ -310,47 +310,3 @@ @endif @endif - - - - -@if (app()->getLocale() == "zh-CN" ) - -@endif - -@if (app()->getLocale() == "ja-JP" ) - -@endif - -@if (app()->getLocale() == "zh-TW" ) - -@endif - - -@if ($currency_style) - @push('stylesheet') - - @endpush -@endif diff --git a/resources/views/components/documents/template/default.blade.php b/resources/views/components/documents/template/default.blade.php index a7b1626f4..198e122a0 100644 --- a/resources/views/components/documents/template/default.blade.php +++ b/resources/views/components/documents/template/default.blade.php @@ -293,48 +293,3 @@ @endif @endif - - - - -@if (app()->getLocale() == "zh-CN" ) - -@endif - -@if (app()->getLocale() == "ja-JP" ) - -@endif - -@if (app()->getLocale() == "zh-TW" ) - -@endif - - -@if ($currency_style) - @push('stylesheet') - - @endpush -@endif - diff --git a/resources/views/components/documents/template/line-item.blade.php b/resources/views/components/documents/template/line-item.blade.php index 6e5d3a267..8f401b63a 100644 --- a/resources/views/components/documents/template/line-item.blade.php +++ b/resources/views/components/documents/template/line-item.blade.php @@ -48,47 +48,3 @@ @endif @stack('total_td_end') - - - - -@if (app()->getLocale() == "zh-CN" ) - -@endif - -@if (app()->getLocale() == "ja-JP" ) - -@endif - -@if (app()->getLocale() == "zh-TW" ) - -@endif - - -@if ($currency_style) - @push('stylesheet') - - @endpush -@endif diff --git a/resources/views/components/documents/template/modern.blade.php b/resources/views/components/documents/template/modern.blade.php index 93af047ed..ae7be9ce2 100644 --- a/resources/views/components/documents/template/modern.blade.php +++ b/resources/views/components/documents/template/modern.blade.php @@ -276,46 +276,3 @@ @endif @endif - - - -@if (app()->getLocale() == "zh-CN" ) - -@endif - -@if (app()->getLocale() == "ja-JP" ) - -@endif - -@if (app()->getLocale() == "zh-TW" ) - -@endif - - -@if ($currency_style) - @push('stylesheet') - - @endpush -@endif diff --git a/resources/views/partials/print/head.blade.php b/resources/views/partials/print/head.blade.php index 0567d3756..65c88ef4e 100644 --- a/resources/views/partials/print/head.blade.php +++ b/resources/views/partials/print/head.blade.php @@ -16,11 +16,25 @@ + @if (isset($currency_style) && $currency_style && in_array(app()->getLocale(), ['zh-CN', 'ja-JP', 'zh-TW'])) + @else + + @endif @stack('css')