From 325f90bba5014df9f6b8b55c33469711dfe92172 Mon Sep 17 00:00:00 2001 From: radhu587 Date: Fri, 8 May 2020 18:49:02 +0530 Subject: [PATCH] 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 Price @if($invoice->discount_per_item === 'YES') - Discount + Discount @endif Amount @@ -22,22 +22,28 @@ {{ $item->name }}
{!! nl2br(htmlspecialchars($item->description)) !!} {{$item->quantity}} {!! format_money_pdf($item->price, $invoice->user->currency) !!} @if($invoice->discount_per_item === 'YES') - + @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) !!} @@ -60,70 +67,72 @@
- - - - - - - @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) !!} + + + @endfor + @else + @foreach ($invoice->taxes as $tax) + + + {{$tax->name.' ('.$tax->percent.'%)'}} + + + {!! format_money_pdf($tax->amount, $invoice->user->currency) !!} + + + @endforeach + @endif + + @if ($invoice->discount_per_item === 'NO') + + + @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 + + + @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; }