From ba54b85709aca1a5500e0993d53e9f3fb35e7ce6 Mon Sep 17 00:00:00 2001 From: Jay_Makwana Date: Thu, 14 Nov 2019 20:54:53 +0530 Subject: [PATCH] refactor template --- .../app/pdf/estimate/estimate1.blade.php | 2 +- .../app/pdf/estimate/estimate2.blade.php | 2 +- .../app/pdf/estimate/partials/notes.blade.php | 12 ++++++----- .../app/pdf/estimate/partials/table.blade.php | 20 +++++++++++++------ .../views/app/pdf/invoice/invoice1.blade.php | 10 ++++++---- .../views/app/pdf/invoice/invoice2.blade.php | 2 +- .../app/pdf/invoice/partials/notes.blade.php | 12 ++++++----- .../app/pdf/invoice/partials/table.blade.php | 18 ++++++++++++----- 8 files changed, 50 insertions(+), 28 deletions(-) diff --git a/resources/views/app/pdf/estimate/estimate1.blade.php b/resources/views/app/pdf/estimate/estimate1.blade.php index c69b993e..716905dc 100644 --- a/resources/views/app/pdf/estimate/estimate1.blade.php +++ b/resources/views/app/pdf/estimate/estimate1.blade.php @@ -263,7 +263,7 @@ } tr.main-table-header th { - border-bottom: 1px solid #EAF1FB; + border-bottom: 0.620315px solid #E8E8E8; font-style: normal; font-weight: normal; font-size: 12px; diff --git a/resources/views/app/pdf/estimate/estimate2.blade.php b/resources/views/app/pdf/estimate/estimate2.blade.php index 778e1916..e0098e38 100644 --- a/resources/views/app/pdf/estimate/estimate2.blade.php +++ b/resources/views/app/pdf/estimate/estimate2.blade.php @@ -264,7 +264,7 @@ } tr.main-table-header th { - border-bottom: 1px solid #EAF1FB; + border-bottom: 0.620315px solid #E8E8E8; font-style: normal; font-weight: normal; font-size: 12px; diff --git a/resources/views/app/pdf/estimate/partials/notes.blade.php b/resources/views/app/pdf/estimate/partials/notes.blade.php index ccde1ae9..479ee279 100644 --- a/resources/views/app/pdf/estimate/partials/notes.blade.php +++ b/resources/views/app/pdf/estimate/partials/notes.blade.php @@ -1,6 +1,8 @@ -
-
- Notes +@if ($estimate->notes != '' && $estimate->notes != null) +
+
+ Notes +
+ {{$estimate->notes}}
- {{$estimate->notes}} -
+@endif diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index 304d1c38..40092a6d 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -1,27 +1,32 @@ + @if($estimate->discount_per_item === 'NO') @else @endif - + @if($estimate->discount_per_item === 'YES') - + @endif + @php + $index = 1 + @endphp @foreach ($estimate->items as $item) + - + @if($estimate->discount_per_item === 'YES') - @endif - + + @php + $index += 1 + @endphp @endforeach
#ItemsItemsQuantityPricePriceDiscountDiscountAmount
{{$index}} {{ $item->name }}
{{ $item->description }}
{{$item->quantity}}{{$item->price/100}}{{$item->price/100}} + @if($item->discount_type === 'fixed') {{$item->discount_val/100}} @endif @@ -30,12 +35,15 @@ @endif {{$item->total/100}}{{$item->total/100}}
- +
Subtotal
+
-
diff --git a/resources/views/app/pdf/invoice/invoice2.blade.php b/resources/views/app/pdf/invoice/invoice2.blade.php index 342c4960..f7784c61 100644 --- a/resources/views/app/pdf/invoice/invoice2.blade.php +++ b/resources/views/app/pdf/invoice/invoice2.blade.php @@ -264,7 +264,7 @@ } tr.main-table-header th { - border-bottom: 1px solid #EAF1FB; + border-bottom: 0.620315px solid #E8E8E8; font-style: normal; font-weight: normal; font-size: 12px; diff --git a/resources/views/app/pdf/invoice/partials/notes.blade.php b/resources/views/app/pdf/invoice/partials/notes.blade.php index cb1c8062..50c690dd 100644 --- a/resources/views/app/pdf/invoice/partials/notes.blade.php +++ b/resources/views/app/pdf/invoice/partials/notes.blade.php @@ -1,6 +1,8 @@ -
-
- Notes +@if ($invoice->notes != '' && $invoice->notes != null) +
+
+ Notes +
+ {{$invoice->notes}}
- {{$invoice->notes}} -
+@endif diff --git a/resources/views/app/pdf/invoice/partials/table.blade.php b/resources/views/app/pdf/invoice/partials/table.blade.php index 9e42552b..aa4e6758 100644 --- a/resources/views/app/pdf/invoice/partials/table.blade.php +++ b/resources/views/app/pdf/invoice/partials/table.blade.php @@ -1,27 +1,32 @@ + @if($invoice->discount_per_item === 'NO') @else @endif - + @if($invoice->discount_per_item === 'YES') - + @endif + @php + $index = 1 + @endphp @foreach ($invoice->items as $item) + - + @if($invoice->discount_per_item === 'YES') - @endif - + + @php + $index += 1 + @endphp @endforeach
#ItemsItemsQuantityPricePriceDiscountDiscountAmount
{{$index}} {{ $item->name }}
{{ $item->description }}
{{$item->quantity}}{{$item->price/100}}{{$item->price/100}} + @if($item->discount_type === 'fixed') {{$item->discount_val/100}} @endif @@ -30,8 +35,11 @@ @endif {{$item->total/100}}{{$item->total/100}}