From a739a938fce433c395e7b0bfca094ee846ce5c35 Mon Sep 17 00:00:00 2001 From: radhu587 Date: Fri, 8 May 2020 16:52:48 +0530 Subject: [PATCH] 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') Discount @endif - Amount + Amount @php $index = 1 @@ -32,16 +32,18 @@ {{$item->quantity}} {!! format_money_pdf($item->price, $estimate->user->currency) !!} @if($estimate->discount_per_item === 'YES') - + @if($item->discount_type === 'fixed') {!! format_money_pdf($item->discount_val, $estimate->user->currency) !!} @endif @@ -50,7 +52,7 @@ @endif @endif - + {!! format_money_pdf($item->total, $estimate->user->currency) !!} @@ -62,6 +64,7 @@
+
@@ -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 @@
+