Skip to content

Commit

Permalink
coding style..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Sep 7, 2021
1 parent 0bc9fa8 commit 2a7bc48
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 179 deletions.
6 changes: 4 additions & 2 deletions app/Http/Controllers/Sales/Invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@ public function pdfInvoice(Document $invoice)

$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);
}

Expand Down
44 changes: 0 additions & 44 deletions resources/views/components/documents/template/classic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,47 +310,3 @@
</div>
@endif
@endif


<?php $currency_style = false; ?>

@if (app()->getLocale() == "zh-CN" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "ja-JP" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "zh-TW" )
<?php $currency_style = true; ?>
@endif


@if ($currency_style)
@push('stylesheet')
<style type="text/css">
@font-face {
font-family: 'Firefly Sung';
font-weight: 'normal';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'bold';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'italic';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
body {
font-family: 'Firefly Sung', sans-serif !important;
}
</style>
@endpush
@endif
45 changes: 0 additions & 45 deletions resources/views/components/documents/template/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,48 +293,3 @@
</div>
@endif
@endif


<?php $currency_style = false; ?>

@if (app()->getLocale() == "zh-CN" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "ja-JP" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "zh-TW" )
<?php $currency_style = true; ?>
@endif


@if ($currency_style)
@push('stylesheet')
<style type="text/css">
@font-face {
font-family: 'Firefly Sung';
font-weight: 'normal';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'bold';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'italic';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
body {
font-family: 'Firefly Sung', sans-serif !important;
}
</style>
@endpush
@endif

44 changes: 0 additions & 44 deletions resources/views/components/documents/template/line-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,47 +48,3 @@
@endif
@stack('total_td_end')
</tr>


<?php $currency_style = false; ?>

@if (app()->getLocale() == "zh-CN" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "ja-JP" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "zh-TW" )
<?php $currency_style = true; ?>
@endif


@if ($currency_style)
@push('stylesheet')
<style type="text/css">
@font-face {
font-family: 'Firefly Sung';
font-weight: 'normal';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'bold';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'italic';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
body {
font-family: 'Firefly Sung', sans-serif !important;
}
</style>
@endpush
@endif
43 changes: 0 additions & 43 deletions resources/views/components/documents/template/modern.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,46 +276,3 @@
</div>
@endif
@endif

<?php $currency_style = false; ?>

@if (app()->getLocale() == "zh-CN" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "ja-JP" )
<?php $currency_style = true; ?>
@endif

@if (app()->getLocale() == "zh-TW" )
<?php $currency_style = true; ?>
@endif


@if ($currency_style)
@push('stylesheet')
<style type="text/css">
@font-face {
font-family: 'Firefly Sung';
font-weight: 'normal';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'bold';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
@font-face {
font-family: 'Firefly Sung';
font-weight: 'italic';
src: url("/public/css/fonts/firefly_sung_normal.ttf") format("truetype");
}
body {
font-family: 'Firefly Sung', sans-serif !important;
}
</style>
@endpush
@endif
16 changes: 15 additions & 1 deletion resources/views/partials/print/head.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,25 @@
<!-- Css -->
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">

@if (isset($currency_style) && $currency_style && in_array(app()->getLocale(), ['zh-CN', 'ja-JP', 'zh-TW']))
<style type="text/css">
@font-face {
font-family: 'Firefly Sung';
font-weight: 'normal';
src: url('{{ asset("/public/css/fonts/firefly_sung_normal.ttf") }}') format("truetype");
}
* {
font-family: 'Firefly Sung', sans-serif !important;
}
</style>
@else
<style type="text/css">
* {
font-family: DejaVu Sans, sans-serif;
font-family: DejaVu Sans, sans-serif !important;
}
</style>
@endif

@stack('css')

Expand Down

0 comments on commit 2a7bc48

Please sign in to comment.