improved print layout

This commit is contained in:
denisdulici 2019-12-13 11:04:17 +03:00
parent 27f0511417
commit 11219e4aa4
11 changed files with 21 additions and 99 deletions

View File

@ -300,7 +300,9 @@ class Bills extends Controller
{
$bill = $this->prepareBill($bill);
return view($bill->template_path, compact('bill'));
$view = view($bill->template_path, compact('bill'));
return mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
}
/**
@ -317,7 +319,7 @@ class Bills extends Controller
$currency_style = true;
$view = view($bill->template_path, compact('bill', 'currency_style'))->render();
$html = mb_convert_encoding($view, 'HTML-ENTITIES');
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
$pdf = app('dompdf.wrapper');
$pdf->loadHTML($html);

View File

@ -342,7 +342,9 @@ class Invoices extends Controller
{
$invoice = $this->prepareInvoice($invoice);
return view($invoice->template_path, compact('invoice'));
$view = view($invoice->template_path, compact('invoice'));
return mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
}
/**
@ -359,7 +361,7 @@ class Invoices extends Controller
$currency_style = true;
$view = view($invoice->template_path, compact('invoice', 'currency_style'))->render();
$html = mb_convert_encoding($view, 'HTML-ENTITIES');
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
$pdf = app('dompdf.wrapper');
$pdf->loadHTML($html);

View File

@ -11,8 +11,6 @@
font-style: normal;
}
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
/*--------General Button Hover--------*/
.btn:hover
{

View File

@ -1,4 +1,4 @@
@extends('layouts.bill')
@extends('layouts.print')
@section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number)

View File

@ -1,4 +1,4 @@
@extends('layouts.invoice')
@extends('layouts.print')
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
@ -261,6 +261,7 @@
</div>
</div>
@if ($invoice->footer)
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
@ -268,9 +269,7 @@
<tbody>
<tr>
<th>
@if ($invoice->footer)
{!! $invoice->footer !!}
@endif
{!! $invoice->footer !!}
</th>
</tr>
</tbody>
@ -278,5 +277,6 @@
</div>
</div>
</div>
@endif
</div>
@endsection

View File

@ -1,15 +0,0 @@
<html lang="{{ app()->getLocale() }}">
@include('partials.bill.head')
<body onload="window.print();">
@stack('body_start')
@yield('content')
@stack('body_end')
</body>
</html>

View File

@ -1,15 +0,0 @@
<html lang="{{ app()->getLocale() }}">
@include('partials.invoice.head')
<body onload="window.print();">
@stack('body_start')
@yield('content')
@stack('body_end')
</body>
</html>

View File

@ -2,6 +2,12 @@
@include('partials.admin.head')
<style type="text/css">
* {
font-family: DejaVu Sans, sans-serif !important;
}
</style>
<body onload="window.print();">
@stack('body_start')

View File

@ -1,7 +1,9 @@
<head>
@stack('head_start')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; charset=ISO-8859-1" />
<title>@yield('title') - @setting('company.name')</title>
@ -18,12 +20,8 @@
<link rel="stylesheet" href="{{ asset('public/vendor/@fortawesome/fontawesome-free/css/all.min.css') }}" type="text/css">
<!-- Css -->
<!-- Argon -->
<link rel="stylesheet" href="{{ asset('public/css/argon.css?v=1.1.0') }}" type="text/css">
<!-- Color -->
<link rel="stylesheet" href="{{ asset('public/css/akaunting-color.css?v=' . version('short')) }}">
<!-- Custom -->
<link rel="stylesheet" href="{{ asset('public/css/custom.css?v=' . version('short')) }}">
@stack('css')

View File

@ -1,27 +0,0 @@
<head>
@stack('head_start')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; charset=ISO-8859-1"/>
<title>@yield('title') - @setting('company.name')</title>
<!-- Css -->
<!-- Argon -->
<link rel="stylesheet" href="{{ asset('public/css/argon.css?v=1.1.0') }}" type="text/css">
<!-- Color -->
<link rel="stylesheet" href="{{ asset('public/css/akaunting-color.css?v=' . version('short')) }}">
<!-- Custom -->
<link rel="stylesheet" href="{{ asset('public/css/custom.css?v=' . version('short')) }}">
@stack('css')
@stack('stylesheet')
@stack('js')
@stack('scripts')
@stack('head_end')
</head>

View File

@ -1,27 +0,0 @@
<head>
@stack('head_start')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; charset=ISO-8859-1"/>
<title>@yield('title') - @setting('company.name')</title>
<!-- Css -->
<!-- Argon -->
<link rel="stylesheet" href="{{ asset('public/css/argon.css?v=1.1.0') }}" type="text/css">
<!-- Color -->
<link rel="stylesheet" href="{{ asset('public/css/akaunting-color.css?v=' . version('short')) }}">
<!-- Custom -->
<link rel="stylesheet" href="{{ asset('public/css/custom.css?v=' . version('short')) }}">
@stack('css')
@stack('stylesheet')
@stack('js')
@stack('scripts')
@stack('head_end')
</head>