mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-02 05:10:59 +00:00
* refactor: stabilize model identities for domain migration * refactor: extract module platform context * refactor: assign models to domain contexts * refactor: extract ai platform context * refactor: extract storage platform context * refactor: extract mail platform context * refactor: extract pdf platform context * refactor: extract operations platform context * refactor: move installation into operations platform * refactor: extract money domain context * refactor: extract taxation domain context * refactor: extract catalog domain context * refactor: extract metadata domain context * refactor: extract reporting domain context * refactor: extract purchases domain context * refactor: extract receivables domain context * refactor: extract accounts domain context * refactor: complete reporting statement boundary * refactor: extract contacts domain context * refactor: extract sales domain context * refactor: remove legacy application layers * fix: migrate legacy bouncer role identities
442 lines
11 KiB
PHP
442 lines
11 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>@lang($invoice->isCreditNote() ? 'pdf_credit_note_label' : 'pdf_invoice_label') - {{ $invoice->invoice_number }}</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
@include("app.pdf.partials.fonts")
|
|
|
|
<style type="text/css">
|
|
/* -- Base -- */
|
|
body {
|
|
margin: 0px;
|
|
}
|
|
|
|
.text-center {
|
|
text-align: center;
|
|
}
|
|
|
|
hr {
|
|
margin: 0 30px 0 30px;
|
|
color: rgba(0, 0, 0, 0.2);
|
|
border: 0.5px solid #EAF1FB;
|
|
}
|
|
|
|
/* -- Header -- */
|
|
|
|
.header-bottom-divider {
|
|
color: rgba(0, 0, 0, 0.2);
|
|
position: absolute;
|
|
top: 90px;
|
|
left: 0px;
|
|
width: 100%;
|
|
margin-left: 0%;
|
|
}
|
|
|
|
.header-container {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 90px;
|
|
left: 0px;
|
|
top: 0px;
|
|
margin-bottom: -40px;
|
|
}
|
|
|
|
.header-logo {
|
|
margin-top: 20px;
|
|
padding-bottom: 20px;
|
|
text-transform: capitalize;
|
|
color: #7675ff;
|
|
}
|
|
|
|
.content-wrapper {
|
|
display: block;
|
|
margin-top: 0px;
|
|
padding-top: 16px;
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
.company-address-container {
|
|
padding-top: 15px;
|
|
padding-left: 30px;
|
|
float: left;
|
|
width: 30%;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.company-address-container h1 {
|
|
font-size: 15px;
|
|
line-height: 22px;
|
|
letter-spacing: 0.05em;
|
|
margin-bottom: 0px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.company-address {
|
|
margin-top: 16px;
|
|
text-align: left;
|
|
font-size: 12px;
|
|
line-height: 15px;
|
|
color: #595959;
|
|
width: 280px;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.invoice-details-container {
|
|
float: right;
|
|
padding: 10px 30px 0 0;
|
|
margin-top: 18px;
|
|
}
|
|
|
|
.attribute-label {
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
padding-right: 40px;
|
|
text-align: left;
|
|
color: #55547A;
|
|
}
|
|
|
|
.attribute-value {
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
text-align: right;
|
|
}
|
|
|
|
/* -- Shipping -- */
|
|
|
|
.shipping-address-container {
|
|
float: right;
|
|
padding-left: 40px;
|
|
width: 160px;
|
|
}
|
|
|
|
.shipping-address {
|
|
font-size: 12px;
|
|
line-height: 15px;
|
|
color: #595959;
|
|
padding: 45px 0px 0px 40px;
|
|
margin: 0px;
|
|
width: 160px;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
/* -- Billing -- */
|
|
|
|
.billing-address-container {
|
|
padding-top: 50px;
|
|
float: left;
|
|
padding-left: 30px;
|
|
}
|
|
|
|
.billing-address-label {
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
padding: 0px;
|
|
margin-top: 27px;
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.billing-address-name {
|
|
max-width: 160px;
|
|
font-size: 15px;
|
|
line-height: 22px;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
}
|
|
|
|
.billing-address {
|
|
font-size: 12px;
|
|
line-height: 15px;
|
|
color: #595959;
|
|
padding: 45px 0px 0px 30px;
|
|
margin: 0px;
|
|
width: 160px;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
/* -- Items Table -- */
|
|
|
|
/* The items table sets border-collapse: collapse, and padding does not
|
|
apply to a table in that mode. dompdf applies it anyway, Chromium
|
|
follows the spec and drops it, which put the two renderers 22.5pt
|
|
apart on each side. All of the table's spacing lives on this wrapper
|
|
instead -- a plain block, honoured identically by both. Padding rather
|
|
than margin so nothing collapses through it either. */
|
|
.items-table-wrapper {
|
|
padding-top: 35px;
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
.items-table-inset {
|
|
padding-left: 30px;
|
|
padding-right: 30px;
|
|
}
|
|
|
|
.items-table {
|
|
page-break-before: avoid;
|
|
page-break-after: auto;
|
|
}
|
|
|
|
.items-table hr {
|
|
height: 0.1px;
|
|
}
|
|
|
|
.item-table-heading {
|
|
font-size: 13.5;
|
|
text-align: center;
|
|
color: rgba(0, 0, 0, 0.85);
|
|
padding: 5px;
|
|
color: #55547A;
|
|
}
|
|
|
|
tr.item-table-heading-row th {
|
|
border-bottom: 0.620315px solid #E8E8E8;
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
}
|
|
|
|
tr.item-row td {
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
}
|
|
|
|
.item-cell {
|
|
font-size: 13;
|
|
text-align: center;
|
|
padding: 5px;
|
|
padding-top: 10px;
|
|
color: #040405;
|
|
}
|
|
|
|
.item-description {
|
|
color: #595959;
|
|
font-size: 9px;
|
|
line-height: 12px;
|
|
display: block;
|
|
}
|
|
|
|
/* -- Total Display Table -- */
|
|
|
|
.total-display-container {
|
|
padding: 0 25px;
|
|
}
|
|
|
|
.total-display-table {
|
|
border-top: none;
|
|
page-break-inside: avoid;
|
|
page-break-before: auto;
|
|
page-break-after: auto;
|
|
margin-top: 20px;
|
|
float: right;
|
|
width: auto;
|
|
}
|
|
|
|
.total-table-attribute-label {
|
|
font-size: 13px;
|
|
color: #55547A;
|
|
text-align: left;
|
|
padding-left: 10px;
|
|
}
|
|
|
|
.total-table-attribute-value {
|
|
font-weight: bold;
|
|
text-align: right;
|
|
font-size: 13px;
|
|
color: #040405;
|
|
padding-right: 10px;
|
|
padding-top: 2px;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
.total-border-left {
|
|
border: 1px solid #E8E8E8 !important;
|
|
border-right: 0px !important;
|
|
padding-top: 0px;
|
|
padding: 8px !important;
|
|
}
|
|
|
|
.total-border-right {
|
|
border: 1px solid #E8E8E8 !important;
|
|
border-left: 0px !important;
|
|
padding-top: 0px;
|
|
padding: 8px !important;
|
|
}
|
|
|
|
/* -- Notes -- */
|
|
|
|
.notes {
|
|
font-size: 12px;
|
|
color: #595959;
|
|
margin-top: 15px;
|
|
margin-left: 30px;
|
|
width: 442px;
|
|
text-align: left;
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
.notes-label {
|
|
font-size: 15px;
|
|
line-height: 22px;
|
|
letter-spacing: 0.05em;
|
|
color: #040405;
|
|
width: 108px;
|
|
white-space: nowrap;
|
|
height: 19.87px;
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
/* -- Helpers -- */
|
|
|
|
.text-primary {
|
|
color: #5851DB;
|
|
}
|
|
|
|
|
|
table .text-left {
|
|
text-align: left;
|
|
}
|
|
|
|
table .text-right {
|
|
text-align: right;
|
|
}
|
|
|
|
.border-0 {
|
|
border: none;
|
|
}
|
|
|
|
.py-2 {
|
|
padding-top: 2px;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
.py-8 {
|
|
padding-top: 8px;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.py-3 {
|
|
padding: 3px 0;
|
|
}
|
|
|
|
.pr-20 {
|
|
padding-right: 20px;
|
|
}
|
|
|
|
.pr-10 {
|
|
padding-right: 10px;
|
|
}
|
|
|
|
.pl-20 {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.pl-10 {
|
|
padding-left: 10px;
|
|
}
|
|
|
|
.pl-0 {
|
|
padding-left: 0;
|
|
}
|
|
|
|
/* The address formats emit <h3>{NAME}</h3> ahead of the <br>-joined
|
|
lines. Left to the user-agent default its margins differ between
|
|
dompdf and Chromium -- the construct where the two renderers drift
|
|
apart vertically -- and the extra top margin also pushes the company
|
|
column out of line with the Bill to / Ship to columns beside it.
|
|
Pinning both margins fixes the alignment and removes the divergence. */
|
|
.company-address h3,
|
|
.customer-address-container h3,
|
|
.billing-address h3,
|
|
.shipping-address h3 {
|
|
margin-top: 0;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="header-container">
|
|
<table width="100%">
|
|
<tr>
|
|
<td class="text-center">
|
|
@if ($logo)
|
|
<img class="header-logo" style="height:50px" src="{{ \App\Platform\Pdf\Rendering\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
|
|
@else
|
|
@if ($invoice->customer->company)
|
|
<h2 class="header-logo"> {{ $invoice->customer->company->name }}</h2>
|
|
@endif
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr class="header-bottom-divider" style="border: 0.620315px solid #E8E8E8;" />
|
|
</div>
|
|
|
|
|
|
<div class="content-wrapper">
|
|
<div style="padding-top: 30px">
|
|
@include('app.pdf.partials.credit-note-banner')
|
|
|
|
<div class="company-address-container company-address">
|
|
{!! $company_address !!}
|
|
</div>
|
|
|
|
<div class="invoice-details-container">
|
|
<table>
|
|
<tr>
|
|
<td class="attribute-label">@lang($invoice->isCreditNote() ? 'pdf_credit_note_number' : 'pdf_invoice_number')</td>
|
|
<td class="attribute-value"> {{ $invoice->invoice_number }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="attribute-label">@lang($invoice->isCreditNote() ? 'pdf_credit_note_date' : 'pdf_invoice_date')</td>
|
|
<td class="attribute-value"> {{ $invoice->formattedInvoiceDate }}</td>
|
|
</tr>
|
|
@unless ($invoice->isCreditNote())
|
|
<tr>
|
|
<td class="attribute-label">@lang('pdf_invoice_due_date')</td>
|
|
<td class="attribute-value"> {{ $invoice->formattedDueDate }}</td>
|
|
</tr>
|
|
@endunless
|
|
</table>
|
|
</div>
|
|
|
|
<div style="clear: both;"></div>
|
|
</div>
|
|
|
|
<div class="billing-address-container billing-address">
|
|
@if ($billing_address)
|
|
<b>@lang('pdf_bill_to')</b> <br>
|
|
|
|
{!! $billing_address !!}
|
|
@endif
|
|
</div>
|
|
|
|
<div class="shipping-address-container shipping-address" @if ($billing_address !== '<br />') style="float:left;" @else style="display:block; float:left: padding-left: 0px;" @endif>
|
|
@if ($shipping_address)
|
|
<b>@lang('pdf_ship_to')</b> <br>
|
|
|
|
{!! $shipping_address !!}
|
|
@endif
|
|
</div>
|
|
|
|
<div class="items-table-wrapper" style="position: relative; clear: both;">
|
|
@include('app.pdf.invoice.partials.table')
|
|
</div>
|
|
|
|
<div class="notes">
|
|
@if ($notes)
|
|
<div class="notes-label">
|
|
@lang('pdf_notes')
|
|
</div>
|
|
|
|
{!! $notes !!}
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|