From f8ccfece0941d6cac3cdbd5b4cffd380871b75a2 Mon Sep 17 00:00:00 2001 From: Mohit Panjwani Date: Tue, 5 May 2020 13:12:26 +0530 Subject: [PATCH 1/8] update templates --- .../app/pdf/estimate/estimate1.blade.php | 142 +++++------- .../app/pdf/estimate/estimate2.blade.php | 151 ++++++------- .../app/pdf/estimate/estimate3.blade.php | 208 ++++++++---------- .../app/pdf/estimate/partials/table.blade.php | 38 ++-- .../views/app/pdf/invoice/invoice1.blade.php | 189 +++++----------- .../views/app/pdf/invoice/invoice2.blade.php | 152 ++++++------- .../views/app/pdf/invoice/invoice3.blade.php | 203 ++++++++--------- .../partials/company-address.blade.php | 2 +- .../partials/shipping-address.blade.php | 2 +- .../app/pdf/invoice/partials/table.blade.php | 40 ++-- .../views/app/pdf/payment/payment.blade.php | 57 ++--- 11 files changed, 483 insertions(+), 701 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index c50a5153..00a699b1 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -1,8 +1,9 @@ + Estimate - + +
@@ -398,16 +365,16 @@
@if($logo) - + @else - @if($estimate->user->company) - - @endif + @if($estimate->user->company) + + @endif @endif
- - + + - - + + - - + +
Estimate Number  {{$estimate->estimate_number}}Estimate Number  {{$estimate->estimate_number}}
Estimate Date  {{$estimate->formattedEstimateDate}}Estimate Date  {{$estimate->formattedEstimateDate}}
Expiry Date  {{$estimate->formattedExpiryDate}}Expiry Date  {{$estimate->formattedExpiryDate}}
@@ -418,18 +385,19 @@ @include('app.pdf.estimate.partials.billing-address') @if($estimate->user->billingaddress) -
- @else +
+ @else
- @endif - @include('app.pdf.estimate.partials.shipping-address') + @endif + @include('app.pdf.estimate.partials.shipping-address') +
+
-
+
+ @include('app.pdf.estimate.partials.table') +
+ @include('app.pdf.estimate.partials.notes')
-
- @include('app.pdf.estimate.partials.table') -
- @include('app.pdf.estimate.partials.notes') - - + + \ No newline at end of file diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 8e14fa36..5d2d489f 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -1,8 +1,9 @@ + Estimate - + +
@if($logo) -
- - @else - - @if($estimate->user->company) -

{{$estimate->user->company->name}}

- @endif - @endif +
+ + @else + + @if($estimate->user->company) +

{{$estimate->user->company->name}}

+ @endif + @endif

Estimate

@@ -434,16 +408,17 @@ @include('app.pdf.estimate.partials.shipping-address') @if($estimate->user->shippingaddress) -
- @else +
+ @else
- @endif - @include('app.pdf.estimate.partials.billing-address') + @endif + @include('app.pdf.estimate.partials.billing-address') +
+
-
+ @include('app.pdf.estimate.partials.table') + @include('app.pdf.estimate.partials.notes')
- @include('app.pdf.estimate.partials.table') - @include('app.pdf.estimate.partials.notes') - - + + \ No newline at end of file diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index 2d0da68d..c35f4142 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -1,8 +1,9 @@ + Estimate - + +
@if($logo) -
+ - @else + @else @if($estimate->user->company) - -

{{$estimate->user->company->name}}

+
+

{{$estimate->user->company->name}}

+ @endif @endif - @endif
@include('app.pdf.estimate.partials.company-address') @@ -432,36 +413,37 @@
@include('app.pdf.estimate.partials.billing-address')
- @if($estimate->user->billingaddress) -
- @else + @if($estimate->user->billingaddress) +
+ @else
- @endif - @include('app.pdf.estimate.partials.shipping-address') + @endif + @include('app.pdf.estimate.partials.shipping-address') +
+
+
+ +
+ + + + + + + + + + + + + +
Estimate Number  {{$estimate->estimate_number}}
Estimate Date  {{$estimate->formattedEstimateDate}}
Expiry Date  {{$estimate->formattedExpiryDate}}
- -
- - - - - - - - - - - - - -
Estimate Number  {{$estimate->estimate_number}}
Estimate Date  {{$estimate->formattedEstimateDate}}
Expiry Date  {{$estimate->formattedExpiryDate}}
-
-
+ @include('app.pdf.estimate.partials.table') + @include('app.pdf.estimate.partials.notes') - @include('app.pdf.estimate.partials.table') - @include('app.pdf.estimate.partials.notes') - - + + \ No newline at end of file diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index b5c1dee5..7d5f9ed4 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -1,27 +1,27 @@ - - - - - + + + + + @if($estimate->discount_per_item === 'YES') - + @endif - + @php $index = 1 @endphp @foreach ($estimate->items as $item) - + @if($estimate->discount_per_item === 'YES') - @endif - @@ -68,7 +68,7 @@
#ItemsQuantityPrice
#ItemsQuantityPriceDiscountDiscountAmountAmount
{{$index}} {{ $item->name }}
@@ -32,19 +32,19 @@
{{$item->quantity}} {!! format_money_pdf($item->price, $estimate->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $estimate->user->currency) !!} @endif @@ -53,7 +53,7 @@ @endif + {!! format_money_pdf($item->total, $estimate->user->currency) !!}
- @@ -78,7 +78,7 @@ - @@ -89,7 +89,7 @@ - @@ -106,7 +106,7 @@ Discount ({{$estimate->discount}}%) @endif -
Subtotal{!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}
{{$labels[$i]}} + {!! format_money_pdf($taxes[$i], $estimate->user->currency) !!}
{{$tax->name.' ('.$tax->percent.'%)'}} + {!! format_money_pdf($tax->amount, $estimate->user->currency) !!}
+ @if($estimate->discount_type === 'fixed') {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} @endif @@ -127,7 +127,7 @@ {!! format_money_pdf($estimate->total, $estimate->user->currency)!!} diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index 801ec366..5a811ca6 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -6,6 +6,7 @@ +
@if($logo) -
- - @else - - @if($invoice->user->company) -

{{$invoice->user->company->name}}

- @endif - @endif +
+ + @else + + @if($invoice->user->company) +

{{$invoice->user->company->name}}

+ @endif + @endif

Invoice

@@ -435,16 +408,17 @@ @include('app.pdf.invoice.partials.shipping-address') @if($invoice->user->shippingaddress) -
- @else +
+ @else
- @endif - @include('app.pdf.invoice.partials.billing-address') + @endif + @include('app.pdf.invoice.partials.billing-address') +
+
-
+ @include('app.pdf.invoice.partials.table') + @include('app.pdf.invoice.partials.notes')
- @include('app.pdf.invoice.partials.table') - @include('app.pdf.invoice.partials.notes') - - + + \ No newline at end of file diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index 56eed9cd..1e602bf0 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -1,9 +1,9 @@ + Invoice - {{-- --}} - + +
- @if($logo) - + + + + @endfor + @else + @foreach ($invoice->taxes as $tax) + + + + + @endforeach + @endif + + @if ($invoice->discount_per_item === 'NO') + + + + + @endif + + + + + + + + +
+ + @if($logo) @else - @if($invoice->user->company) - -

{{$invoice->user->company->name}}

- @endif +

{{$invoice->user->company->name}}

@endif
@@ -444,35 +426,36 @@ @include('app.pdf.invoice.partials.billing-address') @if($invoice->user->billingaddress) -
- @else +
+ @else
- @endif - @include('app.pdf.invoice.partials.shipping-address') + @endif + @include('app.pdf.invoice.partials.shipping-address') +
+
+
+ +
+ + + + + + + + + + + + + +
Invoice Number  {{$invoice->invoice_number}}
Invoice Date  {{$invoice->formattedInvoiceDate}}
Due date  {{$invoice->formattedDueDate}}
- -
- - - - - - - - - - - - - -
Invoice Number  {{$invoice->invoice_number}}
Invoice Date  {{$invoice->formattedInvoiceDate}}
Due date  {{$invoice->formattedDueDate}}
-
-
+ @include('app.pdf.invoice.partials.table') + @include('app.pdf.invoice.partials.notes') - @include('app.pdf.invoice.partials.table') - @include('app.pdf.invoice.partials.notes') - - + + \ No newline at end of file diff --git a/resources/views/app/pdf/invoice/partials/company-address.blade.php b/resources/views/app/pdf/invoice/partials/company-address.blade.php index f45249ce..fcf47212 100644 --- a/resources/views/app/pdf/invoice/partials/company-address.blade.php +++ b/resources/views/app/pdf/invoice/partials/company-address.blade.php @@ -3,7 +3,7 @@ @endif @if($company_address) -

+

@if($company_address->addresses[0]['address_street_1']) {!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_1'])) !!}
@endif diff --git a/resources/views/app/pdf/invoice/partials/shipping-address.blade.php b/resources/views/app/pdf/invoice/partials/shipping-address.blade.php index 7a80dc80..3cd2abb6 100644 --- a/resources/views/app/pdf/invoice/partials/shipping-address.blade.php +++ b/resources/views/app/pdf/invoice/partials/shipping-address.blade.php @@ -30,7 +30,7 @@ {{$invoice->user->shippingaddress->country->name}}
@endif - @if($invoice->user->phone) + @if($invoice->user->shippingaddress->phone)

Phone :{{$invoice->user->shippingaddress->phone}}

diff --git a/resources/views/app/pdf/invoice/partials/table.blade.php b/resources/views/app/pdf/invoice/partials/table.blade.php index 95874846..a2a74ebe 100644 --- a/resources/views/app/pdf/invoice/partials/table.blade.php +++ b/resources/views/app/pdf/invoice/partials/table.blade.php @@ -1,46 +1,46 @@ - - - - - + + + + + @if($invoice->discount_per_item === 'YES') - + @endif - + @php $index = 1 @endphp @foreach ($invoice->items as $item) - + @if($invoice->discount_per_item === 'YES') - @endif
#ItemsQuantityPrice
#ItemsQuantityPriceDiscountDiscountAmountAmount
{{$index}} {{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!}
{{$item->quantity}} {!! format_money_pdf($item->price, $invoice->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $invoice->user->currency) !!} @endif @@ -50,7 +50,7 @@ {!! format_money_pdf($item->total, $invoice->user->currency) !!} @@ -62,12 +62,12 @@ @endforeach
-
+
- @@ -77,7 +77,7 @@ - @@ -88,7 +88,7 @@ - @@ -105,7 +105,7 @@ Discount ({{$invoice->discount}}%) @endif - @if($invoice->discount_per_item === 'YES') - + @endif @@ -22,22 +22,28 @@ @if($invoice->discount_per_item === 'YES') - @@ -60,70 +67,72 @@
-
Subtotal{!! format_money_pdf($invoice->sub_total, $invoice->user->currency) !!}
{{$labels[$i]}} + {!! format_money_pdf($taxes[$i], $invoice->user->currency) !!}
{{$tax->name.' ('.$tax->percent.'%)'}} + {!! format_money_pdf($tax->amount, $invoice->user->currency) !!}
+ @if($invoice->discount_type === 'fixed') {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} @endif @@ -126,7 +126,7 @@ {!! format_money_pdf($invoice->total, $invoice->user->currency)!!} diff --git a/resources/views/app/pdf/payment/payment.blade.php b/resources/views/app/pdf/payment/payment.blade.php index f7854884..b3140e70 100644 --- a/resources/views/app/pdf/payment/payment.blade.php +++ b/resources/views/app/pdf/payment/payment.blade.php @@ -2,7 +2,6 @@ Invoice - {{-- --}} -
+
-
+ @if($logo) @else @@ -355,43 +333,43 @@
-
+
-
-
+
+
@include('app.pdf.estimate.partials.company-address')
-
- +
+
- + - + - +
Estimate NumberEstimate Number  {{$estimate->estimate_number}}
Estimate Date Estimate Date  {{$estimate->formattedEstimateDate}}
Expiry DateExpiry Date  {{$estimate->formattedExpiryDate}}
-
-
+
+
@include('app.pdf.estimate.partials.billing-address')
@if($estimate->user->billingaddress) -
- @else -
- @endif - @include('app.pdf.estimate.partials.shipping-address') -
-
+
+ @else +
+ @endif + @include('app.pdf.estimate.partials.shipping-address') +
+
@include('app.pdf.estimate.partials.table') @@ -400,4 +378,4 @@
- \ No newline at end of file + diff --git a/resources/views/app/pdf/estimate/partials/billing-address.blade.php b/resources/views/app/pdf/estimate/partials/billing-address.blade.php index 2818a8b0..d25cced0 100644 --- a/resources/views/app/pdf/estimate/partials/billing-address.blade.php +++ b/resources/views/app/pdf/estimate/partials/billing-address.blade.php @@ -1,11 +1,11 @@ @if($estimate->user->billingaddress) -

Bill To,

+

Bill To,

@if($estimate->user->billingaddress->name) -

+

{{$estimate->user->billingaddress->name}}

@endif -

+

@if($estimate->user->billingaddress->address_street_1) {!! nl2br(htmlspecialchars($estimate->user->billingaddress->address_street_1)) !!}
@endif @@ -31,7 +31,7 @@ @endif @if($estimate->user->billingaddress->phone) -

+

Phone :{{$estimate->user->billingaddress->phone}}

@endif diff --git a/resources/views/app/pdf/estimate/partials/company-address.blade.php b/resources/views/app/pdf/estimate/partials/company-address.blade.php index f6cdb5c6..cdbcd466 100644 --- a/resources/views/app/pdf/estimate/partials/company-address.blade.php +++ b/resources/views/app/pdf/estimate/partials/company-address.blade.php @@ -1,9 +1,9 @@ @if($estimate->user->company) -

{{$estimate->user->company->name}}

+

{{$estimate->user->company->name}}

@endif @if($company_address) -

+

@if($company_address->addresses[0]['address_street_1']) {!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_1'])) !!}
@endif diff --git a/resources/views/app/pdf/estimate/partials/shipping-address.blade.php b/resources/views/app/pdf/estimate/partials/shipping-address.blade.php index 90d34531..8dd437aa 100644 --- a/resources/views/app/pdf/estimate/partials/shipping-address.blade.php +++ b/resources/views/app/pdf/estimate/partials/shipping-address.blade.php @@ -1,11 +1,11 @@ @if($estimate->user->shippingaddress) -

Ship To,

+

Ship To,

@if($estimate->user->shippingaddress->name) -

+

{{$estimate->user->shippingaddress->name}}

@endif -

+

@if($estimate->user->shippingaddress->address_street_1) {!! nl2br(htmlspecialchars($estimate->user->shippingaddress->address_street_1)) !!}
@endif @@ -31,7 +31,7 @@ @endif @if($estimate->user->phone) -

+

Phone :{{$estimate->user->shippingaddress->phone}}

@endif diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index 7d5f9ed4..cd472b33 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -1,13 +1,13 @@ - +
- - - - + + + + @if($estimate->discount_per_item === 'YES') - + @endif - + @php $index = 1 @@ -15,36 +15,37 @@ @foreach ($estimate->items as $item) @if($estimate->discount_per_item === 'YES') - @endif - @@ -65,9 +66,9 @@
-
#ItemsQuantityPrice#ItemsQuantityPriceDiscountDiscountAmountAmount
{{$index}} {{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!}
{{$item->quantity}} {!! format_money_pdf($item->price, $estimate->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $estimate->user->currency) !!} @endif @@ -53,7 +54,7 @@ @endif + {!! format_money_pdf($item->total, $estimate->user->currency) !!}
+
- + @@ -75,10 +76,10 @@ @if ($estimate->tax_per_item === 'YES') @for ($i = 0; $i < count($labels); $i++) - - @@ -86,10 +87,10 @@ @else @foreach ($estimate->taxes as $tax) - - From 30f76e2088a57eaf42de619ab7f1401acc1ad28a Mon Sep 17 00:00:00 2001 From: radhu587 Date: Wed, 6 May 2020 18:02:27 +0530 Subject: [PATCH 3/8] Refactor Estimate templates --- .../app/pdf/estimate/estimate1.blade.php | 97 ++++- .../app/pdf/estimate/estimate2.blade.php | 345 ++++++++-------- .../app/pdf/estimate/estimate3.blade.php | 382 +++++++++--------- .../app/pdf/estimate/partials/table.blade.php | 62 ++- 4 files changed, 472 insertions(+), 414 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index 5bd08298..13348e10 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -64,13 +64,13 @@ padding-bottom: 20px; } + /* -------------------------- */ + /* company details style */ + .company-details-container { padding-top: 30px; } - /* -------------------------- */ - /* company address style */ - .company-address-container { float: left; padding-left: 30px; @@ -100,10 +100,6 @@ padding: 10px 30px 0 0; } - .amount-due { - background-color: #f2f2f2; - } - .attribute-label { font-size: 12px; line-height: 18px; @@ -118,7 +114,6 @@ text-align: right; } - /* -------------------------- */ /* customer address style */ @@ -198,14 +193,17 @@ width: 160px; } - .item-table { + /* -------------------------- */ + /* items style */ + + .items-table { margin-top: 35px; padding: 0px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; } - .item-table hr { + .items-table hr { height: 0.1px; } @@ -241,15 +239,15 @@ border-color: #d9d9d9; } - .padd8 { - padding-top: 8px; - padding-bottom: 8px; + .item-description { + color: #595959; + font-size: 9px; + font-weight:300; + line-height: 12px; } - .padd2 { - padding-top: 2px; - padding-bottom: 2px; - } + /* -------------------------- */ + /* total display table style */ .total-display-table { border-top: none; @@ -262,6 +260,23 @@ margin-top: 10px } + .total-table-attribute-label { + font-size: 12px; + color: #55547A; + text-align: left; + padding-left: 10px; + } + + .total-table-attribute-value { + font-weight: 500; + text-align: right; + font-size: 12px; + color: #040405; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + } + .total-border-left { border: 1px solid #E8E8E8 !important; border-right: 0px !important; @@ -276,9 +291,8 @@ padding: 8px !important; } - .inv-item { - border-color: red; - } + /* -------------------------- */ + /* notes style */ .notes { font-size: 12px; @@ -300,6 +314,13 @@ padding-bottom: 10px; } + /* -------------------------- */ + /* helpers style */ + + .text-primary { + color: #5851DB; + } + .text-center { text-align: center } @@ -312,9 +333,43 @@ text-align: right; } - .no-border { + .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; + } diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 5d2d489f..6e0ee7ab 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -12,25 +12,23 @@ html { margin: 0px; padding: 0px; + margin-top: 50px; } table { border-collapse: collapse; } - .header-left { - padding-top: 45px; - padding-bottom: 45px; - padding-left: 30px; - display: inline-block; - width: 30%; + hr { + margin: 0 30px 0 30px; + color: rgba(0, 0, 0, 0.2); + border: 0.5px solid #EAF1FB; } - @page { - margin-top: 60px !important; - } + /* -------------------------- */ + /* header style */ - .header-table { + .header-container { background: #817AE3; position: absolute; width: 100%; @@ -39,6 +37,14 @@ top: -60px; } + .header-section-left { + padding-top: 45px; + padding-bottom: 45px; + padding-left: 30px; + display: inline-block; + width: 30%; + } + .header-logo { position: absolute; height: 50px; @@ -46,14 +52,13 @@ color: #fff; } - .header-right { + .header-section-right { display: inline-block; width: 35%; float: right; padding: 20px 30px 20px 0px; text-align: right; color: white; - } .header { @@ -61,36 +66,65 @@ color: rgba(0, 0, 0, 0.7); } + /* -------------------------- */ + /* estimate details container */ + + .estimate-details-container { + text-align: center; + width: 40%; + } + + .estimate-details-container h1 { + margin: 0; + font-weight: 500; + font-size: 24px; + line-height: 36px; + text-align: right; + } + + .estimate-details-container h4 { + margin: 0; + font-size: 10px; + line-height: 15px; + text-align: right; + } + + .estimate-details-container h3 { + margin-bottom: 1px; + margin-top: 0; + } + + /* -------------------------- */ + /* address-container */ + .wrapper { display: block; margin-top: 60px; padding-bottom: 20px; } - .address { + .address-container { display: block; padding-top: 20px; } - .company { + .company-address-container { padding: 0 0 0 30px; display: inline; float: left; width: 30%; } - .company h1 { - font-style: normal; + .company-address-heading { font-weight: bold; font-size: 15px; line-height: 22px; letter-spacing: 0.05em; margin-bottom: 0; + margin-top: 12px; } - .company-address{ - font-style: normal; - font-weight: normal; + .company-address-text { font-size: 10px; line-height: 15px; color: #595959; @@ -99,25 +133,23 @@ /* -------------------------- */ /* billing style */ - .bill-address-container { + + .billing-address-container { display: block; /* position: absolute; */ float: right; padding: 0 40px 0 0; } - .bill-to { - font-style: normal; - font-weight: normal; + .billing-address-label { font-size: 12px; line-height: 18px; padding: 0px; margin-bottom: 0px; } - .bill-user-name { - max-width: 250px font-style: normal; - font-weight: normal; + .billing-address-name { + max-width: 250px; font-size: 15px; line-height: 22px; padding: 0px; @@ -125,9 +157,7 @@ margin-bottom: 0px; } - .bill-user-address { - font-style: normal; - font-weight: normal; + .billing-address-text { font-size: 10px; line-height: 15px; color: #595959; @@ -136,36 +166,24 @@ width: 170px; } - .bill-user-phone { - font-style: normal; - font-weight: normal; - font-size: 10px; - line-height: 15px; - color: #595959; - padding: 0px; - margin: 0px; - } - /* -------------------------- */ /* shipping style */ - .ship-address-container { + + .shipping-address-container { display: block; float: right; padding: 0 30px 0 0; } - .ship-to { - font-style: normal; - font-weight: normal; + .shipping-address-label { font-size: 12px; line-height: 18px; padding: 0px; margin-bottom: 0px; } - .ship-user-name { - max-width: 250px font-style: normal; - font-weight: normal; + .shipping-address-name { + max-width: 250px; font-size: 15px; line-height: 22px; padding: 0px; @@ -173,9 +191,7 @@ margin-bottom: 0px; } - .ship-user-address { - font-style: normal; - font-weight: normal; + .shipping-address-text { font-size: 10px; line-height: 15px; color: #595959; @@ -184,26 +200,6 @@ width: 170px; } - .ship-user-phone { - font-style: normal; - font-weight: normal; - font-size: 10px; - line-height: 15px; - color: #595959; - padding: 0px; - margin: 0px; - } - - .job-add { - display: inline; - float: right; - width: 40%; - } - - .amount-due { - background-color: #f2f2f2; - } - .attribute-label { font-size: 12; font-weight: bold; @@ -217,29 +213,17 @@ color: rgba(0, 0, 0, 0.7); } - .item-table-heading-row td { - padding: 5px; - padding-bottom: 10px; - } + /* -------------------------- */ + /* items style */ - .item-table-heading-row { - border-bottom: 1px solid red; - } - - .table2 { + .items-table { margin-top: 30px; padding: 0px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; } - hr { - margin: 0 30px 0 30px; - color: rgba(0, 0, 0, 0.2); - border: 0.5px solid #EAF1FB; - } - - .table2 hr { + .items-table hr { height: 0.1px; } @@ -250,17 +234,22 @@ padding: 5px; } + .item-table-heading-row td { + padding: 5px; + padding-bottom: 10px; + } + + .item-table-heading-row { + border-bottom: 1px solid red; + } + tr.item-table-heading-row th { border-bottom: 0.620315px solid #E8E8E8; - font-style: normal; - font-weight: normal; font-size: 12px; line-height: 18px; } tr.item-row td { - font-style: normal; - font-weight: normal; font-size: 12px; line-height: 18px; } @@ -273,85 +262,63 @@ padding-top: 10px; } - .note-header { - font-size: 13; - color: rgba(0, 0, 0, 0.6); + .item-description { + color: #595959; + font-size: 9px; + font-weight:300; + line-height: 12px; } - .note-text { - font-size: 10; - color: rgba(0, 0, 0, 0.6); - } + /* -------------------------- */ + /* total display table style */ - .padd8 { - padding-top: 8px; - padding-bottom: 8px; - } - - .padd2 { - padding-top: 2px; - padding-bottom: 2px; - } - - .table3 { - border: 1px solid #EAF1FB; + .total-display-table { border-top: none; box-sizing: border-box; width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - } - - .text-per-item-table3 { + margin-left:420px; + margin-top: 10px; border: 1px solid #EAF1FB; - border-top: none; - padding-right: 30px; - box-sizing: border-box; - width: 260px; - /* height: 100px; */ - position: absolute; - right: -25; } - .inv-item { - border-color: #d9d9d9; + .total-table-attribute-label { + font-size: 12px; + color: #55547A; + text-align: left; + padding-left: 10px; } - .no-border { - border: none; - } - - .company-details { - text-align: center; - width: 40%; - } - - .company-details h1 { - margin: 0; - font-style: normal; + .total-table-attribute-value { font-weight: 500; - font-size: 24px; - line-height: 36px; text-align: right; + font-size: 12px; + color: #040405; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; } - .company-details h4 { - margin: 0; - font-style: normal; - font-weight: normal; - font-size: 10px; - line-height: 15px; - text-align: right; + .total-border-left { + border: 1px solid #E8E8E8 !important; + border-right: 0px !important; + padding-top: 0px; + padding: 8px !important; } - .company-details h3 { - margin-bottom: 1px; - margin-top: 0; + .total-border-right { + border: 1px solid #E8E8E8 !important; + border-left: 0px !important; + padding-top: 0px; + padding: 8px !important; } + /* -------------------------- */ + /* notes style */ + .notes { - font-style: normal; font-weight: 300; font-size: 12px; color: #595959; @@ -363,8 +330,6 @@ } .notes-label { - font-style: normal; - font-weight: normal; font-size: 15px; line-height: 22px; letter-spacing: 0.05em; @@ -373,24 +338,81 @@ height: 19.87px; padding-bottom: 10px; } + + /* -------------------------- */ + /* helpers style */ + + .text-primary { + color: #5851DB; + } + + .text-center { + text-align: center + } + + 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; + } -
+
SubtotalSubtotal {!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}
+ {{$labels[$i]}} + {!! format_money_pdf($taxes[$i], $estimate->user->currency) !!}
+ {{$tax->name.' ('.$tax->percent.'%)'}} + {!! format_money_pdf($tax->amount, $estimate->user->currency) !!}
@if($logo) - -
+ @else - + @if($estimate->user->company)

{{$estimate->user->company->name}}

@endif @endif
+

Estimate

{{$estimate->estimate_number}}

{{$estimate->formattedEstimateDate}}

@@ -400,25 +422,24 @@
-
-
+
+
@include('app.pdf.estimate.partials.company-address')
-
+
@include('app.pdf.estimate.partials.shipping-address')
@if($estimate->user->shippingaddress) -
- @else -
- @endif - @include('app.pdf.estimate.partials.billing-address') -
-
+
+ @else +
+ @endif + @include('app.pdf.estimate.partials.billing-address')
+
@include('app.pdf.estimate.partials.table') @include('app.pdf.estimate.partials.notes')
- \ No newline at end of file + diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index c35f4142..378e7872 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -13,31 +13,31 @@ html { margin: 0px; padding: 0px; + margin-top: 50px; } table { border-collapse: collapse; } - .header-line { - color: rgba(0, 0, 0, 0.2); - position: absolute; - top: 80px; - left: 0px; - right: -70px; - width: 100%; - } - hr { color: rgba(0, 0, 0, 0.2); border: 0.5px solid #EAF1FB; - } - - .items-table-hr { margin: 0 30px 0 30px; } - .header-left { + /* -------------------------- */ + /* header style */ + + .header-container { + position: absolute; + width: 100%; + height: 150px; + left: 0px; + top: -60px; + } + + .header-section-left { padding-top: 45px; padding-bottom: 45px; padding-left: 30px; @@ -45,12 +45,12 @@ width: 30%; } - .header-table { + .header-bottom-divider { + color: rgba(0, 0, 0, 0.2); position: absolute; - width: 100%; - height: 150px; + top: 100px; left: 0px; - top: -60px; + width: 100%; } .header-logo { @@ -60,7 +60,7 @@ color: #817AE3; } - .header-right { + .header-section-right { display: inline-block; position: absolute; right: 0; @@ -68,78 +68,83 @@ float: right; } - .header { font-size: 20px; color: rgba(0, 0, 0, 0.7); } + /* -------------------------- */ + /* company address container */ + + .company-address-container { + width: 30%; + text-transform: capitalize; + margin-bottom: 2px; + } + + .company-address-heading { + font-size: 15px; + line-height: 22px; + letter-spacing: 0.05em; + margin-bottom: 0px; + margin-top: 10px; + } + + .company-address-text { + margin-top: 2px; + text-align: left; + font-size: 12px; + line-height: 15px; + color: #595959; + } + + /* -------------------------- */ + /* main content style */ + .wrapper { display: block; padding-top: 50px; padding-bottom: 20px; } - .address { + .main-content { display: inline-block; padding-top: 100px } - .bill-add { + .customer-address-container { display: inline; float: left; width: 40%; padding: 0 0 0 30px; } - .company { - padding-left: 30px; - display: inline; - float: left; - width: 30%; - } - - .company h1 { - font-style: normal; - font-weight: bold; - font-size: 18px; - line-height: 22px; - letter-spacing: 0.05em; - } - - .company-address{ - text-align: left; - font-style: normal; - font-weight: normal; - font-size: 10px; - line-height: 15px; - color: #595959; - margin: 0px; - } - /* -------------------------- */ /* shipping style */ - .ship-to { + + .shipping-address-container { + float: right; + } + + .shipping-address-container--left { + float: left; + } + + .shipping-address-label { padding-top: 5px; - font-style: normal; - font-weight: normal; font-size: 12px; line-height: 18px; margin-bottom: 0px; } - .ship-user-name { + .shipping-address-name { padding: 0px; - font-style: normal; - font-weight: normal; font-size: 15px; line-height: 22px; margin: 0px; } - .ship-user-address { - font-style: normal; - font-weight: normal; + .shipping-address-text { font-size: 10px; line-height: 15px; color: #595959; @@ -147,38 +152,28 @@ width: 160px; } - .ship-user-phone { - font-style: normal; - font-weight: normal; - font-size: 10px; - line-height: 15px; - color: #595959; - margin: 0px; - } - /* -------------------------- */ /* billing style */ - .bill-to { + + .billing-address-container { + float: left; + } + + .billing-address-label { padding-top: 5px; - font-style: normal; - font-weight: normal; font-size: 12px; line-height: 18px; margin-bottom: 0px; } - .bill-user-name { + .billing-address-name { padding: 0px; - font-style: normal; - font-weight: normal; font-size: 15px; line-height: 22px; margin: 0px; } - .bill-user-address { - font-style: normal; - font-weight: normal; + .billing-address-text { font-size: 10px; line-height: 15px; color: #595959; @@ -186,71 +181,40 @@ width: 160px; } - .bill-user-phone { - font-style: normal; - font-weight: normal; - font-size: 10px; - line-height: 15px; - color: #595959; - margin: 0px; - } + /* -------------------------- */ + /* estimate details container */ - - .job-add { + .estimate-details-container { display: block; float: right; padding: 20px 30px 0 0; } - .amount-due { - background-color: #f2f2f2; - } - .attribute-label { - font-style: normal; - font-weight: normal; font-size: 12px; line-height: 18px; + text-align: left; + color: #55547A } .attribute-value { - font-style: normal; - font-weight: normal; font-size: 12px; line-height: 18px; text-align: right; } - .item-table-heading-row td { - padding: 10px; - } + /* -------------------------- */ + /* items style */ - .item-table-heading-row { - border-bottom: 1px solid red; - } - - tr.item-table-heading-row th { - font-style: normal; - font-weight: 600; - font-size: 12px; - line-height: 18px; - } - - tr.item-row td { - font-style: normal; - font-weight: normal; - font-size: 12px; - line-height: 18px; - } - - .table2 { + .items-table { padding: 0px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; } - .table2 hr { + .items-table hr { height: 0.1px; + margin: 0 30px 0 30px; } .item-table-heading { @@ -267,100 +231,75 @@ padding: 5px; } - .note-header { - font-size: 13; - color: rgba(0, 0, 0, 0.6); + .item-table-heading-row td { + padding: 10px; } - .note-text { - font-size: 10; - color: rgba(0, 0, 0, 0.6); + .item-table-heading-row { + border-bottom: 1px solid red; } - .padd8 { - padding-top: 8px; - padding-bottom: 8px; + tr.item-table-heading-row th { + + font-weight: 600; + font-size: 12px; + line-height: 18px; } - .padd2 { - padding-top: 2px; - padding-bottom: 2px; + tr.item-row td { + font-size: 12px; + line-height: 18px; } - .table3 { + /* -------------------------- */ + /* total display table style */ + + .total-display-table { border: 1px solid #EAF1FB; - border-top: none; box-sizing: border-box; width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; + margin-left:420px; + margin-top: 10px } - td.estimate-total1 { - text-align: left; - padding: 15px 0 15px 10px; + .total-table-attribute-label { font-size: 12px; - line-height: 18px; color: #55547A; - border-bottom: 1px solid #E8E8E8; - border-top: 1px solid #E8E8E8; - border-left: 1px solid #E8E8E8; + text-align: left; + padding-left: 10px; } - td.estimate-total2 { + .total-table-attribute-value { font-weight: 500; text-align: right; font-size: 12px; - line-height: 18px; - padding: 15px 10px 15px 0; - color: #5851DB; - border-bottom: 1px solid #E8E8E8; - border-top: 1px solid #E8E8E8; - border-right: 1px solid #E8E8E8; + color: #040405; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; } - .inv-item { - border-color: #d9d9d9; + .total-border-left { + border: 1px solid #E8E8E8 !important; + border-right: 0px !important; + padding-top: 0px; + padding: 8px !important; } - .no-border { - border: none; + .total-border-right { + border: 1px solid #E8E8E8 !important; + border-left: 0px !important; + padding-top: 0px; + padding: 8px !important; } - .company-details h1 { - margin: 0; - font-style: normal; - font-weight: bold; - font-size: 15px; - line-height: 22px; - letter-spacing: 0.05em; - text-align: left; - max-width: 220px; - } - - .company-details h4 { - margin: 0; - font-style: normal; - font-weight: 100; - font-size: 18px; - line-height: 25px; - text-align: right; - } - - .company-details h3 { - margin-bottom: 1px; - margin-top: 0; - } - - tr.total td { - border-bottom: 1px solid #E8E8E8; - border-top: 1px solid #E8E8E8; - } + /* -------------------------- */ + /* notes style */ .notes { - font-style: normal; - font-weight: 300; font-size: 12px; color: #595959; margin-top: 15px; @@ -371,8 +310,6 @@ } .notes-label { - font-style: normal; - font-weight: normal; font-size: 15px; line-height: 22px; letter-spacing: 0.05em; @@ -381,60 +318,117 @@ height: 19.87px; padding-bottom: 10px; } + + /* -------------------------- */ + /* helpers style */ + + .text-primary { + color: #5851DB; + } + + .text-center { + text-align: center + } + + 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; + } -
+
@if($logo) - -
+ @else @if($estimate->user->company) - +

{{$estimate->user->company->name}}

@endif @endif
+ @include('app.pdf.estimate.partials.company-address')
-
+
-
-
-
+
+
+
@include('app.pdf.estimate.partials.billing-address')
@if($estimate->user->billingaddress) -
+
@else -
+
@endif @include('app.pdf.estimate.partials.shipping-address')
-
+
- + - + - +
Estimate NumberEstimate Number  {{$estimate->estimate_number}}
Estimate Date Estimate Date  {{$estimate->formattedEstimateDate}}
Expiry DateExpiry Date  {{$estimate->formattedExpiryDate}}
@@ -446,4 +440,4 @@
- \ No newline at end of file + diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index cd472b33..5cf55b56 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -1,11 +1,11 @@ - +
- - - - + + + + @if($estimate->discount_per_item === 'YES') - + @endif @@ -15,37 +15,33 @@ @foreach ($estimate->items as $item) @if($estimate->discount_per_item === 'YES') -
#ItemsQuantityPrice#ItemsQuantityPriceDiscountDiscountAmount
{{$index}} {{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!}
{{$item->quantity}} {!! format_money_pdf($item->price, $estimate->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $estimate->user->currency) !!} @endif @@ -68,18 +64,17 @@ - - + + @if ($estimate->tax_per_item === 'YES') @for ($i = 0; $i < count($labels); $i++) - - @@ -87,10 +82,10 @@ @else @foreach ($estimate->taxes as $tax) - - @@ -99,7 +94,7 @@ @if ($estimate->discount_per_item === 'NO') - - @endif - - + + - - + From 6046113cb1c24c78cc4d2b30e418a45eab1e8f6f Mon Sep 17 00:00:00 2001 From: radhu587 Date: Thu, 7 May 2020 16:42:04 +0530 Subject: [PATCH 4/8] Refactor Invoice and Payment templates --- .../app/pdf/estimate/estimate1.blade.php | 65 +-- .../app/pdf/estimate/estimate2.blade.php | 63 ++- .../app/pdf/estimate/estimate3.blade.php | 48 +- .../partials/billing-address.blade.php | 4 +- .../partials/company-address.blade.php | 4 +- .../partials/shipping-address.blade.php | 4 +- .../views/app/pdf/invoice/invoice1.blade.php | 184 ++++--- .../views/app/pdf/invoice/invoice2.blade.php | 344 ++++++------- .../views/app/pdf/invoice/invoice3.blade.php | 407 +++++++-------- .../partials/billing-address.blade.php | 8 +- .../partials/shipping-address.blade.php | 8 +- .../app/pdf/invoice/partials/table.blade.php | 68 ++- .../partials/billing-address.blade.php | 8 +- .../partials/company-address.blade.php | 2 +- .../partials/shipping-address.blade.php | 8 +- .../views/app/pdf/payment/payment.blade.php | 482 ++++++------------ 16 files changed, 758 insertions(+), 949 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index 13348e10..ea16355d 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -6,6 +6,7 @@ @@ -328,18 +364,18 @@
@include('app.pdf.invoice.partials.company-address')
-
+
Subtotal{!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}Subtotal{!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}
+ {{$labels[$i]}} + {!! format_money_pdf($taxes[$i], $estimate->user->currency) !!}
+ {{$tax->name.' ('.$tax->percent.'%)'}} + {!! format_money_pdf($tax->amount, $estimate->user->currency) !!}
+ @if($estimate->discount_type === 'fixed') Discount @endif @@ -107,7 +102,7 @@ Discount ({{$estimate->discount}}%) @endif + @if($estimate->discount_type === 'fixed') {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} @endif @@ -118,19 +113,12 @@
- - + Total {!! format_money_pdf($estimate->total, $estimate->user->currency)!!}
- + - + - +
Invoice NumberInvoice Number  {{$invoice->invoice_number}}
Invoice Date Invoice Date  {{$invoice->formattedInvoiceDate}}
Due dateDue date  {{$invoice->formattedDueDate}}
@@ -347,11 +383,11 @@
-
+
@include('app.pdf.invoice.partials.billing-address')
- -
user->billingaddress) style="float:left;" @endif> + +
user->billingaddress) style="float:left;" @endif> @include('app.pdf.invoice.partials.shipping-address')
@@ -361,4 +397,4 @@ @include('app.pdf.invoice.partials.notes') - \ No newline at end of file + diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index 5467ae26..a1d72527 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -5,6 +5,7 @@ Invoice -
+
@if($logo) - -
+ @else - + @if($invoice->user->company)

{{$invoice->user->company->name}}

@endif @endif
+

Invoice

{{$invoice->invoice_number}}

{{$invoice->formattedInvoiceDate}}

@@ -399,18 +393,18 @@

-
-
-
+
+
+
@include('app.pdf.invoice.partials.company-address')
-
+
@include('app.pdf.invoice.partials.shipping-address')
@if($invoice->user->shippingaddress) -
+
@else -
+
@endif @include('app.pdf.invoice.partials.billing-address')
@@ -421,4 +415,4 @@
- \ No newline at end of file + diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index 1e602bf0..e544345f 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -6,6 +6,8 @@ -
+
- -
+ @if($logo) @else

{{$invoice->user->company->name}}

@endif
+ @include('app.pdf.invoice.partials.company-address')
-
+
-
-
-
-
+
+
+
+
@include('app.pdf.invoice.partials.billing-address')
@if($invoice->user->billingaddress) -
+
@else -
+
@endif @include('app.pdf.invoice.partials.shipping-address')
-
+
- + - + - +
Invoice NumberInvoice Number  {{$invoice->invoice_number}}
Invoice Date Invoice Date  {{$invoice->formattedInvoiceDate}}
Due dateDue date  {{$invoice->formattedDueDate}}
@@ -458,4 +413,4 @@
- \ No newline at end of file + diff --git a/resources/views/app/pdf/invoice/partials/billing-address.blade.php b/resources/views/app/pdf/invoice/partials/billing-address.blade.php index d5292672..d35b17b8 100644 --- a/resources/views/app/pdf/invoice/partials/billing-address.blade.php +++ b/resources/views/app/pdf/invoice/partials/billing-address.blade.php @@ -1,11 +1,11 @@ @if($invoice->user->billingaddress) -

Bill To,

+

Bill To,

@if($invoice->user->billingaddress->name) -

+

{{$invoice->user->billingaddress->name}}

@endif -

+

@if($invoice->user->billingaddress->address_street_1) {!! nl2br(htmlspecialchars($invoice->user->billingaddress->address_street_1)) !!}
@endif @@ -25,7 +25,7 @@ {{$invoice->user->billingaddress->country->name}}
@endif @if($invoice->user->billingaddress->phone) -

+

Phone :{{$invoice->user->billingaddress->phone}}

@endif diff --git a/resources/views/app/pdf/invoice/partials/shipping-address.blade.php b/resources/views/app/pdf/invoice/partials/shipping-address.blade.php index 3cd2abb6..a2452457 100644 --- a/resources/views/app/pdf/invoice/partials/shipping-address.blade.php +++ b/resources/views/app/pdf/invoice/partials/shipping-address.blade.php @@ -1,11 +1,11 @@ @if($invoice->user->shippingaddress) -

Ship To,

+

Ship To,

@if($invoice->user->shippingaddress->name) -

+

{{$invoice->user->shippingaddress->name}}

@endif -

+

@if($invoice->user->shippingaddress->address_street_1) {!! nl2br(htmlspecialchars($invoice->user->shippingaddress->address_street_1)) !!}
@endif @@ -31,7 +31,7 @@ @endif @if($invoice->user->shippingaddress->phone) -

+

Phone :{{$invoice->user->shippingaddress->phone}}

@endif diff --git a/resources/views/app/pdf/invoice/partials/table.blade.php b/resources/views/app/pdf/invoice/partials/table.blade.php index a2a74ebe..40b4abb4 100644 --- a/resources/views/app/pdf/invoice/partials/table.blade.php +++ b/resources/views/app/pdf/invoice/partials/table.blade.php @@ -1,13 +1,13 @@ - +
- - - - + + + + @if($invoice->discount_per_item === 'YES') - + @endif - + @php $index = 1 @@ -15,32 +15,29 @@ @foreach ($invoice->items as $item) @if($invoice->discount_per_item === 'YES') - @endif @@ -64,20 +60,21 @@
-
#ItemsQuantityPrice#ItemsQuantityPriceDiscountDiscountAmountAmount
{{$index}} {{ $item->name }}
- {!! nl2br(htmlspecialchars($item->description)) !!} + {!! nl2br(htmlspecialchars($item->description)) !!}
{{$item->quantity}} {!! format_money_pdf($item->price, $invoice->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $invoice->user->currency) !!} @endif @@ -50,8 +47,7 @@ {!! format_money_pdf($item->total, $invoice->user->currency) !!}
+
- - + + @if ($invoice->tax_per_item === 'YES') @for ($i = 0; $i < count($labels); $i++) - - @@ -85,10 +82,10 @@ @else @foreach ($invoice->taxes as $tax) - - @@ -97,7 +94,7 @@ @if ($invoice->discount_per_item === 'NO') - - @endif - - + + - diff --git a/resources/views/app/pdf/payment/partials/billing-address.blade.php b/resources/views/app/pdf/payment/partials/billing-address.blade.php index 01b29348..7dc0a23b 100644 --- a/resources/views/app/pdf/payment/partials/billing-address.blade.php +++ b/resources/views/app/pdf/payment/partials/billing-address.blade.php @@ -1,11 +1,11 @@ @if($payment->user->billingaddress) -

Received From:

+

Received From:

@if($payment->user->billingaddress->name) -

+

{{$payment->user->billingaddress->name}}

@endif -

+

@if($payment->user->billingaddress->address_street_1) {!! nl2br(htmlspecialchars($payment->user->billingaddress->address_street_1)) !!}
@endif @@ -25,7 +25,7 @@ {{$payment->user->billingaddress->country->name}}
@endif @if($payment->user->billingaddress->phone) -

+

Phone :{{$payment->user->billingaddress->phone}}

@endif diff --git a/resources/views/app/pdf/payment/partials/company-address.blade.php b/resources/views/app/pdf/payment/partials/company-address.blade.php index 5f82d059..ef2b850a 100644 --- a/resources/views/app/pdf/payment/partials/company-address.blade.php +++ b/resources/views/app/pdf/payment/partials/company-address.blade.php @@ -3,7 +3,7 @@ @endif @if($company_address) -

+

@if($company_address->addresses[0]['address_street_1']) {!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_1'])) !!}
@endif diff --git a/resources/views/app/pdf/payment/partials/shipping-address.blade.php b/resources/views/app/pdf/payment/partials/shipping-address.blade.php index 95203320..8e8bca7f 100644 --- a/resources/views/app/pdf/payment/partials/shipping-address.blade.php +++ b/resources/views/app/pdf/payment/partials/shipping-address.blade.php @@ -1,11 +1,11 @@ @if($payment->user->shippingaddress) -

Ship To,

+

Ship To,

@if($payment->user->shippingaddress->name) -

+

{{$payment->user->shippingaddress->name}}

@endif -

+

@if($payment->user->shippingaddress->address_street_1) {!! nl2br(htmlspecialchars($payment->user->shippingaddress->address_street_1)) !!}
@endif @@ -31,7 +31,7 @@ @endif @if($payment->user->phone) -

+

Phone :{{$payment->user->shippingaddress->phone}}

@endif diff --git a/resources/views/app/pdf/payment/payment.blade.php b/resources/views/app/pdf/payment/payment.blade.php index b3140e70..5413fc8a 100644 --- a/resources/views/app/pdf/payment/payment.blade.php +++ b/resources/views/app/pdf/payment/payment.blade.php @@ -5,6 +5,7 @@ -
+
Subtotal{!! format_money_pdf($invoice->sub_total, $invoice->user->currency) !!}Subtotal + {!! format_money_pdf($invoice->sub_total, $invoice->user->currency) !!} +
+ {{$labels[$i]}} + {!! format_money_pdf($taxes[$i], $invoice->user->currency) !!}
+ {{$tax->name.' ('.$tax->percent.'%)'}} + {!! format_money_pdf($tax->amount, $invoice->user->currency) !!}
+ @if($invoice->discount_type === 'fixed') Discount @endif @@ -105,7 +102,7 @@ Discount ({{$invoice->discount}}%) @endif + @if($invoice->discount_type === 'fixed') {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} @endif @@ -116,18 +113,15 @@
- + + Total {!! format_money_pdf($invoice->total, $invoice->user->currency)!!}
@if($logo) - -
+ @else @if($payment->user->company) - +

{{$payment->user->company->name}}

@endif @endif
+ @include('app.pdf.payment.partials.company-address')
+
-

+ +

PAYMENT RECEIPT

-
-
-
-
+ +
+
+
+
@include('app.pdf.payment.partials.billing-address')
-
+
-
+
- + - + - + @if ($payment->invoice && $payment->invoice->invoice_number) - + @endif @@ -495,8 +319,8 @@
-
-

Amount Received

+
+

Amount Received

{!! format_money_pdf($payment->amount, $payment->user->currency) !!}
From a739a938fce433c395e7b0bfca094ee846ce5c35 Mon Sep 17 00:00:00 2001 From: radhu587 Date: Fri, 8 May 2020 16:52:48 +0530 Subject: [PATCH 5/8] Fix estimate template issues --- .../app/pdf/estimate/estimate1.blade.php | 21 +++--- .../app/pdf/estimate/estimate2.blade.php | 22 +++---- .../app/pdf/estimate/estimate3.blade.php | 64 +++++++++++-------- .../partials/shipping-address.blade.php | 2 +- .../app/pdf/estimate/partials/table.blade.php | 12 ++-- 5 files changed, 65 insertions(+), 56 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index ea16355d..731c483b 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -80,7 +80,6 @@ .company-address-container { padding-left: 30px; - float: left; width: 30%; text-transform: capitalize; @@ -88,8 +87,6 @@ } .company-address-container h1 { - - font-size: 15px; line-height: 22px; letter-spacing: 0.05em; @@ -100,8 +97,6 @@ .company-address { margin-top: 2px; text-align: left; - - font-size: 12px; line-height: 15px; color: #595959; @@ -154,7 +149,7 @@ } .shipping-address-name { - max-width: 250px; + max-width: 160px; font-size: 15px; line-height: 22px; padding: 0px; @@ -186,7 +181,7 @@ } .billing-address-name { - max-width: 250px; + max-width: 160px; font-size: 15px; line-height: 22px; padding: 0px; @@ -250,21 +245,23 @@ .item-description { color: #595959; font-size: 9px; - font-weight:300; line-height: 12px; } /* -- Total Display Table -- */ + .total-display-container { + padding: 0 25px; + } + .total-display-table { border-top: none; box-sizing: border-box; - width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left:420px; - margin-top: 10px + margin-left: 500px; + margin-top: 20px; } .total-table-attribute-label { @@ -275,7 +272,7 @@ } .total-table-attribute-value { - font-weight: 500; + font-weight: bold; text-align: right; font-size: 12px; color: #040405; diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 57afcf9d..33275627 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -117,7 +117,6 @@ .company-address-container { padding-left: 30px; - float: left; width: 30%; text-transform: capitalize; @@ -125,8 +124,6 @@ } .company-address-container h1 { - - font-size: 15px; line-height: 22px; letter-spacing: 0.05em; @@ -227,8 +224,7 @@ /* -- Items Table -- */ .items-table { - margin-top: 30px; - padding: 0px 30px 10px 30px; + padding: 30px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; } @@ -275,22 +271,25 @@ .item-description { color: #595959; font-size: 9px; - font-weight:300; line-height: 12px; + page-break-inside: avoid; } /* -- Total Display Table -- */ + .total-display-container { + padding: 0 25px; + } + .total-display-table { - border-top: none; box-sizing: border-box; - width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left:420px; - margin-top: 10px; + margin-left: 500px; + margin-top: 20px; border: 1px solid #EAF1FB; + border-top: none; } .total-table-attribute-label { @@ -301,7 +300,7 @@ } .total-table-attribute-value { - font-weight: 500; + font-weight: bold; text-align: right; font-size: 12px; color: #040405; @@ -327,7 +326,6 @@ /* -- Notes -- */ .notes { - font-weight: 300; font-size: 12px; color: #595959; margin-top: 15px; diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index 522b9992..6001ebf7 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -105,13 +105,11 @@ .wrapper { display: block; - padding-top: 50px; + padding-top: 100px; padding-bottom: 20px; } .main-content { - display: inline-block; - padding-top: 100px } .customer-address-container { @@ -125,6 +123,7 @@ .shipping-address-container { float: right; + display: block; } .shipping-address-container--left { @@ -143,6 +142,7 @@ font-size: 15px; line-height: 22px; margin: 0px; + max-width: 160px; } .shipping-address { @@ -171,6 +171,7 @@ font-size: 15px; line-height: 22px; margin: 0px; + max-width: 160px; } .billing-address { @@ -203,15 +204,15 @@ } /* -- Items Table -- */ + .items-table { - padding: 0px 30px 10px 30px; + padding: 30px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; } .items-table hr { height: 0.1px; - margin: 0 30px 0 30px; } .item-table-heading { @@ -219,46 +220,54 @@ text-align: center; color: rgba(0, 0, 0, 0.85); padding: 5px; - } - - .item-cell { - font-size: 13; - color: #040405; - text-align: center; - padding: 5px; - } - - .item-table-heading-row td { - padding: 10px; - } - - .item-table-heading-row { - border-bottom: 1px solid red; + padding-bottom: 10px; } tr.item-table-heading-row th { - - font-weight: 600; + border-bottom: 0.620315px solid #E8E8E8; font-size: 12px; line-height: 18px; } + .item-table-heading-row { + margin-bottom: 10px; + } + tr.item-row td { font-size: 12px; line-height: 18px; } + .item-cell { + font-size: 13; + color: #040405; + text-align: center; + padding: 5px; + padding-top: 10px; + border-color: #d9d9d9; + } + + .item-description { + color: #595959; + font-size: 9px; + line-height: 12px; + } + /* -- Total Display Table -- */ + .total-display-container { + padding: 0 25px; + } + .total-display-table { - border: 1px solid #EAF1FB; box-sizing: border-box; - width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left:420px; - margin-top: 10px + margin-left: 500px; + margin-top: 20px; + border: 1px solid #EAF1FB; + border-top: none; } .total-table-attribute-label { @@ -269,7 +278,7 @@ } .total-table-attribute-value { - font-weight: 500; + font-weight: bold; text-align: right; font-size: 12px; color: #040405; @@ -432,6 +441,7 @@ @include('app.pdf.estimate.partials.table') @include('app.pdf.estimate.partials.notes')
+ diff --git a/resources/views/app/pdf/estimate/partials/shipping-address.blade.php b/resources/views/app/pdf/estimate/partials/shipping-address.blade.php index eb00d270..a7ccd6a3 100644 --- a/resources/views/app/pdf/estimate/partials/shipping-address.blade.php +++ b/resources/views/app/pdf/estimate/partials/shipping-address.blade.php @@ -30,7 +30,7 @@ {{$estimate->user->shippingaddress->country->name}}
@endif - @if($estimate->user->phone) + @if($estimate->user->shippingAddress->phone)

Phone :{{$estimate->user->shippingaddress->phone}}

diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index 5cf55b56..f43b8667 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -7,7 +7,7 @@ @if($estimate->discount_per_item === 'YES') @endif - + @php $index = 1 @@ -32,16 +32,18 @@ @if($estimate->discount_per_item === 'YES') - @endif - @@ -62,6 +64,7 @@
+
Payment DatePayment Date  {{$payment->formattedPaymentDate}}
Payment NumberPayment Number  {{$payment->payment_number}}
Payment ModePayment Mode  {{$payment->paymentMethod ? $payment->paymentMethod->name : '-'}}
InvoiceInvoice  {{$payment->invoice->invoice_number}}
DiscountAmountAmount
{{$item->quantity}} {!! format_money_pdf($item->price, $estimate->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $estimate->user->currency) !!} @endif @@ -50,7 +52,7 @@ @endif + {!! format_money_pdf($item->total, $estimate->user->currency) !!}
@@ -102,7 +105,7 @@ Discount ({{$estimate->discount}}%) @endif -
Subtotal + @if($estimate->discount_type === 'fixed') {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} @endif @@ -123,3 +126,4 @@
+
From 325f90bba5014df9f6b8b55c33469711dfe92172 Mon Sep 17 00:00:00 2001 From: radhu587 Date: Fri, 8 May 2020 18:49:02 +0530 Subject: [PATCH 6/8] Fix issues on invoice template --- .../app/pdf/estimate/estimate1.blade.php | 2 +- .../app/pdf/estimate/estimate2.blade.php | 29 ++-- .../app/pdf/estimate/estimate3.blade.php | 9 +- .../app/pdf/estimate/partials/table.blade.php | 118 +++++++-------- .../views/app/pdf/invoice/invoice1.blade.php | 16 +- .../views/app/pdf/invoice/invoice2.blade.php | 37 ++--- .../views/app/pdf/invoice/invoice3.blade.php | 84 +++++++---- .../app/pdf/invoice/partials/table.blade.php | 141 ++++++++++-------- .../views/app/pdf/payment/payment.blade.php | 3 +- 9 files changed, 235 insertions(+), 204 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index 731c483b..80067d64 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -137,7 +137,7 @@ .shipping-address-container--left { float: left; - padding-left: 30px; + padding-left: 0px; } .shipping-address-label { diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 33275627..e7e9a96e 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -21,7 +21,6 @@ } hr { - margin: 0 30px 0 30px; color: rgba(0, 0, 0, 0.2); border: 0.5px solid #EAF1FB; } @@ -75,10 +74,10 @@ .estimate-details-container h1 { margin: 0; - font-weight: 500; font-size: 24px; line-height: 36px; text-align: right; + font-family: "DejaVu Sans"; } .estimate-details-container h4 { @@ -158,7 +157,7 @@ } .billing-address-name { - max-width: 250px; + max-width: 160px; font-size: 15px; line-height: 22px; padding: 0px; @@ -191,7 +190,7 @@ } .shipping-address-name { - max-width: 250px; + max-width: 160px; font-size: 15px; line-height: 22px; padding: 0px; @@ -231,6 +230,7 @@ .items-table hr { height: 0.1px; + margin: 0 30px; } .item-table-heading { @@ -281,13 +281,16 @@ padding: 0 25px; } + .item-cell-table-hr { + margin: 0 25px 0 30px; + } + .total-display-table { box-sizing: border-box; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; margin-left: 500px; - margin-top: 20px; border: 1px solid #EAF1FB; border-top: none; } @@ -309,20 +312,6 @@ 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 { @@ -437,7 +426,7 @@ @if($estimate->user->shippingaddress)
@else -
+
@endif @include('app.pdf.estimate.partials.billing-address')
diff --git a/resources/views/app/pdf/estimate/estimate3.blade.php b/resources/views/app/pdf/estimate/estimate3.blade.php index 6001ebf7..fbba4bc5 100644 --- a/resources/views/app/pdf/estimate/estimate3.blade.php +++ b/resources/views/app/pdf/estimate/estimate3.blade.php @@ -24,7 +24,6 @@ hr { color: rgba(0, 0, 0, 0.2); border: 0.5px solid #EAF1FB; - margin: 0 30px 0 30px; } /* -- Header -- */ @@ -128,6 +127,7 @@ .shipping-address-container--left { float: left; + padding-left: 0; } .shipping-address-label { @@ -213,6 +213,7 @@ .items-table hr { height: 0.1px; + margin: 0 30px; } .item-table-heading { @@ -253,6 +254,10 @@ line-height: 12px; } + .item-cell-table-hr { + margin: 0 30px 0 30px; + } + /* -- Total Display Table -- */ .total-display-container { @@ -266,8 +271,6 @@ page-break-after: auto; margin-left: 500px; margin-top: 20px; - border: 1px solid #EAF1FB; - border-top: none; } .total-table-attribute-label { diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index f43b8667..3e8934a6 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -62,68 +62,68 @@ @endforeach
-
+
- - - - - - - @if ($estimate->tax_per_item === 'YES') - @for ($i = 0; $i < count($labels); $i++) - - - - - @endfor - @else - @foreach ($estimate->taxes as $tax) - - - - - @endforeach - @endif - - @if ($estimate->discount_per_item === 'NO') +
Subtotal{!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}
- {{$labels[$i]}} - - {!! format_money_pdf($taxes[$i], $estimate->user->currency) !!} -
- {{$tax->name.' ('.$tax->percent.'%)'}} - - {!! format_money_pdf($tax->amount, $estimate->user->currency) !!} -
- - + + + + @if ($estimate->tax_per_item === 'YES') + @for ($i = 0; $i < count($labels); $i++) + + + + + @endfor + @else + @foreach ($estimate->taxes as $tax) + + + + + @endforeach + @endif + + @if ($estimate->discount_per_item === 'NO') + + + + + @endif + + + + + + + - @endif - - - - - - - - -
- @if($estimate->discount_type === 'fixed') - Discount - @endif - @if($estimate->discount_type === 'percentage') - Discount ({{$estimate->discount}}%) - @endif - - @if($estimate->discount_type === 'fixed') - {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} - @endif - @if($estimate->discount_type === 'percentage') - {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} - @endif + Subtotal{!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}
+ {{$labels[$i]}} + + {!! format_money_pdf($taxes[$i], $estimate->user->currency) !!} +
+ {{$tax->name.' ('.$tax->percent.'%)'}} + + {!! format_money_pdf($tax->amount, $estimate->user->currency) !!} +
+ @if($estimate->discount_type === 'fixed') + Discount + @endif + @if($estimate->discount_type === 'percentage') + Discount ({{$estimate->discount}}%) + @endif + + @if($estimate->discount_type === 'fixed') + {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} + @endif + @if($estimate->discount_type === 'percentage') + {!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!} + @endif +
Total + {!! format_money_pdf($estimate->total, $estimate->user->currency)!!}
Total - {!! format_money_pdf($estimate->total, $estimate->user->currency)!!} -
+
diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index 7835ed1f..e2626ba9 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -123,7 +123,7 @@ } .shipping-address-name { - max-width: 250px; + max-width: 160px; font-size: 15px; line-height: 22px; padding: 0px; @@ -155,7 +155,7 @@ } .billing-address-name { - max-width: 250px; + max-width: 160px; font-size: 15px; line-height: 22px; padding: 0px; @@ -214,21 +214,23 @@ .item-description { color: #595959; font-size: 9px; - font-weight:300; line-height: 12px; } /* -- Total Display Table -- */ + .total-display-container { + padding: 0 25px; + } + .total-display-table { border-top: none; box-sizing: border-box; - width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left: 420px; - margin-top: 10px; + margin-left: 500px; + margin-top: 20px; } .total-table-attribute-label { @@ -239,7 +241,7 @@ } .total-table-attribute-value { - font-weight: 500; + font-weight: bold; text-align: right; font-size: 13px; color: #040405; diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index a1d72527..17f44db3 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -75,7 +75,6 @@ .invoice-details-container h1 { margin: 0; - font-weight: 500; font-size: 24px; line-height: 36px; text-align: right; @@ -200,7 +199,7 @@ /* -- Items Table -- */ .items-table { - margin-top: 30px; + margin-top: 35px; padding: 0px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; @@ -210,20 +209,12 @@ height: 0.1px; } - .item-table-heading-row td { - padding: 5px; - padding-bottom: 10px; - } - - .item-table-heading-row { - border-bottom: 1px solid red; - } - .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 { @@ -239,24 +230,36 @@ .item-cell { font-size: 13; - color: #040405; text-align: center; padding: 5px; padding-top: 10px; + color: #040405; + } + + .item-description { + color: #595959; + font-size: 9px; + line-height: 12px; } /* -- Total Display Table -- */ + .total-display-container { + padding: 0 25px; + } + + .item-cell-table-hr { + margin: 0 25px 0 30px; + } + .total-display-table { - border: 1px solid #EAF1FB; - border-top: none; box-sizing: border-box; - width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left:420px; - margin-top: 10px + margin-left: 500px; + border: 1px solid #EAF1FB; + border-top: none; } .total-table-attribute-label { diff --git a/resources/views/app/pdf/invoice/invoice3.blade.php b/resources/views/app/pdf/invoice/invoice3.blade.php index e544345f..f75a8804 100644 --- a/resources/views/app/pdf/invoice/invoice3.blade.php +++ b/resources/views/app/pdf/invoice/invoice3.blade.php @@ -100,13 +100,12 @@ .content-wrapper { display: block; - padding-top: 50px; + padding-top: 100px; padding-bottom: 20px; } .main-content { - display: inline-block; - padding-top: 100px; + } .customer-address-container { @@ -119,10 +118,13 @@ /* -- Shipping -- */ .shipping-address-container { float:right; + display: block; } .shipping-address-container--left { float:left; + display: block; + padding-left: 0; } .shipping-address-label { @@ -137,6 +139,7 @@ font-size: 15px; line-height: 22px; margin: 0px; + max-width: 160px; } .shipping-address { @@ -150,13 +153,12 @@ /* -- Billing -- */ .billing-address-container { + display: block; float: left; } .billing-address-label { padding-top: 5px; - - font-size: 12px; line-height: 18px; margin-bottom: 0px; @@ -167,6 +169,7 @@ font-size: 15px; line-height: 22px; margin: 0px; + max-width: 160px; } .billing-address { @@ -201,6 +204,7 @@ /* -- Items Table -- */ .items-table { + margin-top: 35px; padding: 0px 30px 10px 30px; page-break-before: avoid; page-break-after: auto; @@ -208,19 +212,18 @@ .items-table hr { height: 0.1px; - margin: 0 30px 0 30px; } - .item-table-heading-row td { - padding: 10px; - } - - .item-table-heading-row { - border-bottom: 1px solid red; + .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 { - font-weight: 600; + border-bottom: 0.620315px solid #E8E8E8; font-size: 12px; line-height: 18px; } @@ -230,32 +233,38 @@ line-height: 18px; } - .item-table-heading { - font-size: 13.5; - text-align: center; - color: rgba(0, 0, 0, 0.85); - padding: 5px; - } - .item-cell { font-size: 13; - color: #040405; text-align: center; padding: 5px; + padding-top: 10px; + color: #040405; + } + + .item-description { + color: #595959; + font-size: 9px; + line-height: 12px; + } + + .item-cell-table-hr { + margin: 0 30px 0 30px; } /* -- Total Display Table -- */ + .total-display-container { + padding: 0 25px; + } + + .total-display-table { - border: 1px solid #EAF1FB; - border-top: none; box-sizing: border-box; - width: 630px; page-break-inside: avoid; page-break-before: auto; page-break-after: auto; - margin-left:420px; - margin-top: 10px + margin-left: 500px; + margin-top: 20px; } .total-table-attribute-label { @@ -266,7 +275,7 @@ } .total-table-attribute-value { - font-weight: 500; + font-weight: bold; text-align: right; font-size: 12px; color: #040405; @@ -275,6 +284,20 @@ 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; @@ -382,9 +405,9 @@
@if($invoice->user->billingaddress)
- @else -
- @endif + @else +
+ @endif @include('app.pdf.invoice.partials.shipping-address')
@@ -411,6 +434,7 @@ @include('app.pdf.invoice.partials.table') @include('app.pdf.invoice.partials.notes')
+
diff --git a/resources/views/app/pdf/invoice/partials/table.blade.php b/resources/views/app/pdf/invoice/partials/table.blade.php index 40b4abb4..31766374 100644 --- a/resources/views/app/pdf/invoice/partials/table.blade.php +++ b/resources/views/app/pdf/invoice/partials/table.blade.php @@ -5,7 +5,7 @@
Quantity PriceDiscountDiscountAmount
{{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!}
{{$item->quantity}} {!! format_money_pdf($item->price, $invoice->user->currency) !!} + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $invoice->user->currency) !!} @endif @@ -48,6 +54,7 @@ @endif {!! format_money_pdf($item->total, $invoice->user->currency) !!}
- - - - - - @if ($invoice->tax_per_item === 'YES') - @for ($i = 0; $i < count($labels); $i++) - - - - - @endfor - @else - @foreach ($invoice->taxes as $tax) - - - - - @endforeach - @endif - - @if ($invoice->discount_per_item === 'NO') +
+
Subtotal - {!! format_money_pdf($invoice->sub_total, $invoice->user->currency) !!} -
- {{$labels[$i]}} - - {!! format_money_pdf($taxes[$i], $invoice->user->currency) !!} -
- {{$tax->name.' ('.$tax->percent.'%)'}} - - {!! format_money_pdf($tax->amount, $invoice->user->currency) !!} -
- - + - @endif - - - - - - - - -
- @if($invoice->discount_type === 'fixed') - Discount - @endif - @if($invoice->discount_type === 'percentage') - Discount ({{$invoice->discount}}%) - @endif - - @if($invoice->discount_type === 'fixed') - {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} - @endif - @if($invoice->discount_type === 'percentage') - {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} - @endif + Subtotal + {!! format_money_pdf($invoice->sub_total, $invoice->user->currency) !!}
- Total - - {!! format_money_pdf($invoice->total, $invoice->user->currency)!!} -
+ + @if ($invoice->tax_per_item === 'YES') + @for ($i = 0; $i < count($labels); $i++) +
+ {{$labels[$i]}} + + {!! format_money_pdf($taxes[$i], $invoice->user->currency) !!} +
+ {{$tax->name.' ('.$tax->percent.'%)'}} + + {!! format_money_pdf($tax->amount, $invoice->user->currency) !!} +
+ @if($invoice->discount_type === 'fixed') + Discount + @endif + @if($invoice->discount_type === 'percentage') + Discount ({{$invoice->discount}}%) + @endif + + @if($invoice->discount_type === 'fixed') + {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} + @endif + @if($invoice->discount_type === 'percentage') + {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} + @endif +
+ Total + + {!! format_money_pdf($invoice->total, $invoice->user->currency)!!} +
+
diff --git a/resources/views/app/pdf/payment/payment.blade.php b/resources/views/app/pdf/payment/payment.blade.php index 5413fc8a..148dd342 100644 --- a/resources/views/app/pdf/payment/payment.blade.php +++ b/resources/views/app/pdf/payment/payment.blade.php @@ -219,9 +219,10 @@ } .content-heading span { - font-weight: 500; + font-weight: bold; font-size: 14px; line-height: 25px; + padding-bottom: 5px; border-bottom: 1px solid #B9C1D1; } From 0f3e8fce3b9d8d2a1fb93de48936aeffb1f98b34 Mon Sep 17 00:00:00 2001 From: Jay Makwana Date: Fri, 8 May 2020 20:55:00 +0530 Subject: [PATCH 7/8] refactor heading text in payment --- resources/views/app/pdf/payment/payment.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/app/pdf/payment/payment.blade.php b/resources/views/app/pdf/payment/payment.blade.php index 148dd342..aebca103 100644 --- a/resources/views/app/pdf/payment/payment.blade.php +++ b/resources/views/app/pdf/payment/payment.blade.php @@ -219,7 +219,7 @@ } .content-heading span { - font-weight: bold; + font-weight: 400; font-size: 14px; line-height: 25px; padding-bottom: 5px; From 11db99da7380795b65daaff825255f6c1e8a002b Mon Sep 17 00:00:00 2001 From: Jay Makwana Date: Sat, 9 May 2020 18:50:58 +0530 Subject: [PATCH 8/8] refactor invoice 1 style --- resources/views/app/pdf/invoice/invoice1.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/app/pdf/invoice/invoice1.blade.php b/resources/views/app/pdf/invoice/invoice1.blade.php index e2626ba9..e41ce6fc 100644 --- a/resources/views/app/pdf/invoice/invoice1.blade.php +++ b/resources/views/app/pdf/invoice/invoice1.blade.php @@ -389,9 +389,9 @@ @include('app.pdf.invoice.partials.billing-address') -
user->billingaddress) style="float:left;" @endif> +
user->billingaddress) style="float:left;" @else style="float:left: padding-left: 0px;" @endif> @include('app.pdf.invoice.partials.shipping-address') -
+ @if($invoice->user->billingaddress)
@endif
@include('app.pdf.invoice.partials.table')