revert: 🎨 removed random formatting lol

This commit is contained in:
IceToast 2021-12-22 14:50:00 +01:00
parent f10933104c
commit f0852498ed
2 changed files with 662 additions and 710 deletions

View file

@ -1,9 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<title>{{ $invoice->name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css" media="screen">
html {
@ -50,15 +49,13 @@
text-align: inherit;
}
h4,
.h4 {
h4, .h4 {
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h4,
.h4 {
h4, .h4 {
font-size: 1.5rem;
}
@ -108,55 +105,35 @@
.text-uppercase {
text-transform: uppercase !important;
}
* {
font-family: "DejaVu Sans";
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
table,
th,
tr,
td,
p,
div {
body, h1, h2, h3, h4, h5, h6, table, th, tr, td, p, div {
line-height: 1.1;
}
.party-header {
font-size: 1.5rem;
font-weight: 400;
}
.total-amount {
font-size: 12px;
font-weight: 700;
}
.border-0 {
border: none !important;
}
.cool-gray {
color: #6B7280;
}
.cool-green {
color: #308d00;
}
</style>
</head>
</head>
<body>
<body>
{{-- Header --}}
@if ($invoice->logo)
@if($invoice->logo)
<img src="{{ $invoice->getLogo() }}" alt="logo" height="100">
@endif
@ -166,11 +143,11 @@
<tr>
<td class="border-0 pl-0" width="70%">
<h4 class="text-uppercase">
<strong>{{ $invoice->name }} {{ $invoice->getSerialNumber() }}</strong>
<strong>{{ $invoice->name }} {{$invoice->getSerialNumber()}}</strong>
</h4>
</td>
<td class="border-0 pl-0">
@if ($invoice->status)
@if($invoice->status)
<h4 class="text-uppercase cool-green">
<strong>{{ $invoice->status }}</strong>
</h4>
@ -198,37 +175,37 @@
<tbody>
<tr>
<td class="px-0">
@if ($invoice->seller->name)
@if($invoice->seller->name)
<p class="seller-name">
<strong>{{ $invoice->seller->name }}</strong>
</p>
@endif
@if ($invoice->seller->address)
@if($invoice->seller->address)
<p class="seller-address">
{{ __('Address') }}: {{ $invoice->seller->address }}
</p>
@endif
@if ($invoice->seller->code)
@if($invoice->seller->code)
<p class="seller-code">
{{ __('Code') }}: {{ $invoice->seller->code }}
</p>
@endif
@if ($invoice->seller->vat)
@if($invoice->seller->vat)
<p class="seller-vat">
{{ __('VAT Code') }}: {{ $invoice->seller->vat }}
</p>
@endif
@if ($invoice->seller->phone)
@if($invoice->seller->phone)
<p class="seller-phone">
{{ __('Phone') }}: {{ $invoice->seller->phone }}
</p>
@endif
@foreach ($invoice->seller->custom_fields as $key => $value)
@foreach($invoice->seller->custom_fields as $key => $value)
<p class="seller-custom-field">
{{ ucfirst($key) }}: {{ $value }}
</p>
@ -236,37 +213,37 @@
</td>
<td class="border-0"></td>
<td class="px-0">
@if ($invoice->buyer->name)
@if($invoice->buyer->name)
<p class="buyer-name">
<strong>{{ $invoice->buyer->name }}</strong>
</p>
@endif
@if ($invoice->buyer->adress)
@if($invoice->buyer->adress)
<p class="buyer-address">
{{ __('Address') }}: {{ $invoice->buyer->address }}
</p>
@endif
@if ($invoice->buyer->code)
@if($invoice->buyer->code)
<p class="buyer-code">
{{ __('Code') }}: {{ $invoice->buyer->code }}
</p>
@endif
@if ($invoice->buyer->vat)
@if($invoice->buyer->vat)
<p class="buyer-vat">
{{ __('VAT Code') }}: {{ $invoice->buyer->vat }}
</p>
@endif
@if ($invoice->buyer->phone)
@if($invoice->buyer->phone)
<p class="buyer-phone">
{{ __('Phone') }}: {{ $invoice->buyer->phone }}
</p>
@endif
@foreach ($invoice->buyer->custom_fields as $key => $value)
@foreach($invoice->buyer->custom_fields as $key => $value)
<p class="buyer-custom-field">
{{ ucfirst($key) }}: {{ $value }}
</p>
@ -281,15 +258,15 @@
<thead>
<tr>
<th scope="col" class="border-0 pl-0">{{ __('Description') }}</th>
@if ($invoice->hasItemUnits)
@if($invoice->hasItemUnits)
<th scope="col" class="text-center border-0">{{ __('Units') }}</th>
@endif
<th scope="col" class="text-center border-0">{{ __('Quantity') }}</th>
<th scope="col" class="text-right border-0">{{ __('Price') }}</th>
@if ($invoice->hasItemDiscount)
@if($invoice->hasItemDiscount)
<th scope="col" class="text-right border-0">{{ __('Discount') }}</th>
@endif
@if ($invoice->hasItemTax)
@if($invoice->hasItemTax)
<th scope="col" class="text-right border-0">{{ __('Tax') }}</th>
@endif
<th scope="col" class="text-right border-0 pr-0">{{ __('Subtotal') }}</th>
@ -297,28 +274,28 @@
</thead>
<tbody>
{{-- Items --}}
@foreach ($invoice->items as $item)
@foreach($invoice->items as $item)
<tr>
<td class="pl-0">
{{ $item->title }}
@if ($item->description)
@if($item->description)
<p class="cool-gray">{{ $item->description }}</p>
@endif
</td>
@if ($invoice->hasItemUnits)
@if($invoice->hasItemUnits)
<td class="text-center">{{ $item->units }}</td>
@endif
<td class="text-center">{{ $item->quantity }}</td>
<td class="text-right">
{{ $invoice->formatCurrency($item->price_per_unit) }}
</td>
@if ($invoice->hasItemDiscount)
@if($invoice->hasItemDiscount)
<td class="text-right">
{{ $invoice->formatCurrency($item->discount) }}
</td>
@endif
@if ($invoice->hasItemTax)
@if($invoice->hasItemTax)
<td class="text-right">
{{ $invoice->formatCurrency($item->tax) }}
</td>
@ -330,7 +307,7 @@
</tr>
@endforeach
{{-- Summary --}}
@if ($invoice->hasItemOrInvoiceDiscount())
@if($invoice->hasItemOrInvoiceDiscount())
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('Total discount') }}</td>
@ -339,7 +316,7 @@
</td>
</tr>
@endif
@if ($invoice->taxable_amount)
@if($invoice->taxable_amount)
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('Taxable amount') }}</td>
@ -348,7 +325,7 @@
</td>
</tr>
@endif
@if ($invoice->tax_rate)
@if($invoice->tax_rate)
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('Tax rate') }}</td>
@ -357,7 +334,7 @@
</td>
</tr>
@endif
@if ($invoice->hasItemOrInvoiceTax())
@if($invoice->hasItemOrInvoiceTax())
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('Total taxes') }}</td>
@ -366,7 +343,7 @@
</td>
</tr>
@endif
@if ($invoice->shipping_amount)
@if($invoice->shipping_amount)
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('Shipping') }}</td>
@ -385,7 +362,7 @@
</tbody>
</table>
@if ($invoice->notes)
@if($invoice->notes)
<p>
{{ __('Notes') }}: {!! $invoice->notes !!}
</p>
@ -409,6 +386,5 @@
$pdf->page_text($x, $y, $text, $font, $size);
}
</script>
</body>
</body>
</html>

View file

@ -1,9 +1,8 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<title>{{ $invoice->name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css" media="screen">
html {
@ -50,15 +49,13 @@
text-align: inherit;
}
h4,
.h4 {
h4, .h4 {
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h4,
.h4 {
h4, .h4 {
font-size: 1.5rem;
}
@ -108,55 +105,35 @@
.text-uppercase {
text-transform: uppercase !important;
}
* {
font-family: "DejaVu Sans";
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
table,
th,
tr,
td,
p,
div {
body, h1, h2, h3, h4, h5, h6, table, th, tr, td, p, div {
line-height: 1.1;
}
.party-header {
font-size: 1.5rem;
font-weight: 400;
}
.total-amount {
font-size: 12px;
font-weight: 700;
}
.border-0 {
border: none !important;
}
.cool-gray {
color: #6B7280;
}
.cool-green {
color: #308d00;
}
</style>
</head>
</head>
<body>
<body>
{{-- Header --}}
@if ($invoice->logo)
@if($invoice->logo)
<img src="{{ $invoice->getLogo() }}" alt="logo" height="100">
@endif
@ -166,11 +143,11 @@
<tr>
<td class="border-0 pl-0" width="70%">
<h4 class="text-uppercase">
<strong>{{ $invoice->name }} {{ $invoice->getSerialNumber() }}</strong>
<strong>{{ $invoice->name }} {{$invoice->getSerialNumber()}}</strong>
</h4>
</td>
<td class="border-0 pl-0">
@if ($invoice->status)
@if($invoice->status)
<h4 class="text-uppercase cool-green">
<strong>{{ $invoice->status }}</strong>
</h4>
@ -198,37 +175,37 @@
<tbody>
<tr>
<td class="px-0">
@if ($invoice->seller->name)
@if($invoice->seller->name)
<p class="seller-name">
<strong>{{ $invoice->seller->name }}</strong>
</p>
@endif
@if ($invoice->seller->address)
@if($invoice->seller->address)
<p class="seller-address">
{{ __('invoices::invoice.address') }}: {{ $invoice->seller->address }}
</p>
@endif
@if ($invoice->seller->code)
@if($invoice->seller->code)
<p class="seller-code">
{{ __('invoices::invoice.code') }}: {{ $invoice->seller->code }}
</p>
@endif
@if ($invoice->seller->vat)
@if($invoice->seller->vat)
<p class="seller-vat">
{{ __('invoices::invoice.vat') }}: {{ $invoice->seller->vat }}
</p>
@endif
@if ($invoice->seller->phone)
@if($invoice->seller->phone)
<p class="seller-phone">
{{ __('invoices::invoice.phone') }}: {{ $invoice->seller->phone }}
</p>
@endif
@foreach ($invoice->seller->custom_fields as $key => $value)
@foreach($invoice->seller->custom_fields as $key => $value)
<p class="seller-custom-field">
{{ ucfirst($key) }}: {{ $value }}
</p>
@ -236,37 +213,37 @@
</td>
<td class="border-0"></td>
<td class="px-0">
@if ($invoice->buyer->name)
@if($invoice->buyer->name)
<p class="buyer-name">
<strong>{{ $invoice->buyer->name }}</strong>
</p>
@endif
@if ($invoice->buyer->address)
@if($invoice->buyer->address)
<p class="buyer-address">
{{ __('invoices::invoice.address') }}: {{ $invoice->buyer->address }}
</p>
@endif
@if ($invoice->buyer->code)
@if($invoice->buyer->code)
<p class="buyer-code">
{{ __('invoices::invoice.code') }}: {{ $invoice->buyer->code }}
</p>
@endif
@if ($invoice->buyer->vat)
@if($invoice->buyer->vat)
<p class="buyer-vat">
{{ __('invoices::invoice.vat') }}: {{ $invoice->buyer->vat }}
</p>
@endif
@if ($invoice->buyer->phone)
@if($invoice->buyer->phone)
<p class="buyer-phone">
{{ __('invoices::invoice.phone') }}: {{ $invoice->buyer->phone }}
</p>
@endif
@foreach ($invoice->buyer->custom_fields as $key => $value)
@foreach($invoice->buyer->custom_fields as $key => $value)
<p class="buyer-custom-field">
{{ ucfirst($key) }}: {{ $value }}
</p>
@ -281,15 +258,15 @@
<thead>
<tr>
<th scope="col" class="border-0 pl-0">{{ __('invoices::invoice.description') }}</th>
@if ($invoice->hasItemUnits)
@if($invoice->hasItemUnits)
<th scope="col" class="text-center border-0">{{ __('invoices::invoice.units') }}</th>
@endif
<th scope="col" class="text-center border-0">{{ __('invoices::invoice.quantity') }}</th>
<th scope="col" class="text-right border-0">{{ __('invoices::invoice.price') }}</th>
@if ($invoice->hasItemDiscount)
@if($invoice->hasItemDiscount)
<th scope="col" class="text-right border-0">{{ __('invoices::invoice.discount') }}</th>
@endif
@if ($invoice->hasItemTax)
@if($invoice->hasItemTax)
<th scope="col" class="text-right border-0">{{ __('invoices::invoice.tax') }}</th>
@endif
<th scope="col" class="text-right border-0 pr-0">{{ __('invoices::invoice.sub_total') }}</th>
@ -297,28 +274,28 @@
</thead>
<tbody>
{{-- Items --}}
@foreach ($invoice->items as $item)
@foreach($invoice->items as $item)
<tr>
<td class="pl-0">
{{ $item->title }}
@if ($item->description)
@if($item->description)
<p class="cool-gray">{{ $item->description }}</p>
@endif
</td>
@if ($invoice->hasItemUnits)
@if($invoice->hasItemUnits)
<td class="text-center">{{ $item->units }}</td>
@endif
<td class="text-center">{{ $item->quantity }}</td>
<td class="text-right">
{{ $invoice->formatCurrency($item->price_per_unit) }}
</td>
@if ($invoice->hasItemDiscount)
@if($invoice->hasItemDiscount)
<td class="text-right">
{{ $invoice->formatCurrency($item->discount) }}
</td>
@endif
@if ($invoice->hasItemTax)
@if($invoice->hasItemTax)
<td class="text-right">
{{ $invoice->formatCurrency($item->tax) }}
</td>
@ -330,7 +307,7 @@
</tr>
@endforeach
{{-- Summary --}}
@if ($invoice->hasItemOrInvoiceDiscount())
@if($invoice->hasItemOrInvoiceDiscount())
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('invoices::invoice.total_discount') }}</td>
@ -339,7 +316,7 @@
</td>
</tr>
@endif
@if ($invoice->taxable_amount)
@if($invoice->taxable_amount)
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('invoices::invoice.taxable_amount') }}</td>
@ -348,7 +325,7 @@
</td>
</tr>
@endif
@if ($invoice->tax_rate)
@if($invoice->tax_rate)
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('invoices::invoice.tax_rate') }}</td>
@ -357,7 +334,7 @@
</td>
</tr>
@endif
@if ($invoice->hasItemOrInvoiceTax())
@if($invoice->hasItemOrInvoiceTax())
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('invoices::invoice.total_taxes') }}</td>
@ -366,7 +343,7 @@
</td>
</tr>
@endif
@if ($invoice->shipping_amount)
@if($invoice->shipping_amount)
<tr>
<td colspan="{{ $invoice->table_columns - 2 }}" class="border-0"></td>
<td class="text-right pl-0">{{ __('invoices::invoice.shipping') }}</td>
@ -385,7 +362,7 @@
</tbody>
</table>
@if ($invoice->notes)
@if($invoice->notes)
<p>
{{ __('invoices::invoice.notes') }}: {!! $invoice->notes !!}
</p>
@ -409,6 +386,5 @@
$pdf->page_text($x, $y, $text, $font, $size);
}
</script>
</body>
</body>
</html>