refactor template

This commit is contained in:
Jay_Makwana
2019-11-14 20:54:53 +05:30
parent 441b6bb370
commit ba54b85709
8 changed files with 50 additions and 28 deletions

View File

@ -263,7 +263,7 @@
} }
tr.main-table-header th { tr.main-table-header th {
border-bottom: 1px solid #EAF1FB; border-bottom: 0.620315px solid #E8E8E8;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;

View File

@ -264,7 +264,7 @@
} }
tr.main-table-header th { tr.main-table-header th {
border-bottom: 1px solid #EAF1FB; border-bottom: 0.620315px solid #E8E8E8;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;

View File

@ -1,6 +1,8 @@
<div class="notes"> @if ($estimate->notes != '' && $estimate->notes != null)
<div class="notes-label"> <div class="notes">
Notes <div class="notes-label">
Notes
</div>
{{$estimate->notes}}
</div> </div>
{{$estimate->notes}} @endif
</div>

View File

@ -1,27 +1,32 @@
<table width="100%" class="table2" cellspacing="0" border="0"> <table width="100%" class="table2" cellspacing="0" border="0">
<tr class="main-table-header"> <tr class="main-table-header">
<th class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">#</th>
@if($estimate->discount_per_item === 'NO') @if($estimate->discount_per_item === 'NO')
<th width="80%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th> <th width="80%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
@else @else
<th width="40%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th> <th width="40%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
@endif @endif
<th width="17%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">Quantity</th> <th width="17%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">Quantity</th>
<th width="18%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 40px">Price</th> <th width="18%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 40px">Price</th>
@if($estimate->discount_per_item === 'YES') @if($estimate->discount_per_item === 'YES')
<th width="10%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 10px">Discount</th> <th width="10%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-left: 10px">Discount</th>
@endif @endif
<th width="15%" class="ItemTableHeader" style="text-align: right; color: #55547A;">Amount</th> <th width="15%" class="ItemTableHeader" style="text-align: right; color: #55547A;">Amount</th>
</tr> </tr>
@php
$index = 1
@endphp
@foreach ($estimate->items as $item) @foreach ($estimate->items as $item)
<tr class="item-details"> <tr class="item-details">
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px; vertical-align: top;">{{$index}}</td>
<td class="inv-item items" style="text-align: left; color: #040405;padding-left: 0px"> <td class="inv-item items" style="text-align: left; color: #040405;padding-left: 0px">
<span>{{ $item->name }}</span><br> <span>{{ $item->name }}</span><br>
<span style="text-align: left; color: #595959; font-size: 9px; font-weight:300; line-height: 12px;">{{ $item->description }}</span> <span style="text-align: left; color: #595959; font-size: 9px; font-weight:300; line-height: 12px;">{{ $item->description }}</span>
</td> </td>
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px">{{$item->quantity}}</td> <td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px">{{$item->quantity}}</td>
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 40px">{{$item->price/100}}</td> <td class="inv-item items" style="text-align: right; color: #040405; padding-right: 40px">{{$item->price/100}}</td>
@if($estimate->discount_per_item === 'YES') @if($estimate->discount_per_item === 'YES')
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 10px"> <td class="inv-item items" style="text-align: right; color: #040405; padding-left: 10px">
@if($item->discount_type === 'fixed') @if($item->discount_type === 'fixed')
{{$item->discount_val/100}} {{$item->discount_val/100}}
@endif @endif
@ -30,12 +35,15 @@
@endif @endif
</td> </td>
@endif @endif
<td class="inv-item items" style="text-align: right; color: #040405">{{$item->total/100}}</td> <td class="inv-item items" style="text-align: right; color: #040405;">{{$item->total/100}}</td>
</tr> </tr>
@php
$index += 1
@endphp
@endforeach @endforeach
</table> </table>
<table width="100%" style="margin-left:420px" cellspacing="0px" border="0" class="table3"> <table width="100%" cellspacing="0px" style="margin-left:420px" border="0" class="table3 @if(count($estimate->items) > 12) page-break @endif">
<tr> <tr>
<td class="no-borde" style="color: #55547A; padding-left:10px; font-size:12px;">Subtotal</td> <td class="no-borde" style="color: #55547A; padding-left:10px; font-size:12px;">Subtotal</td>
<td class="no-border items" <td class="no-border items"

View File

@ -11,6 +11,7 @@
html { html {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
margin-top: 50px;
} }
table { table {
@ -35,7 +36,7 @@
width: 100%; width: 100%;
height: 90px; height: 90px;
left: 0px; left: 0px;
top: 0px; top: -50px;
} }
.header-logo { .header-logo {
@ -71,7 +72,7 @@
.wrapper { .wrapper {
display: block; display: block;
padding-top: 60px; padding-top: 16px;
padding-bottom: 60px; padding-bottom: 60px;
} }
@ -251,6 +252,7 @@
page-break-after: auto; page-break-after: auto;
} }
.table2 hr { .table2 hr {
height:0.1px; height:0.1px;
} }
@ -263,7 +265,7 @@
} }
tr.main-table-header th { tr.main-table-header th {
border-bottom: 1px solid #EAF1FB; border-bottom: 0.620315px solid #E8E8E8;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;
@ -380,8 +382,8 @@
</td> </td>
</tr> </tr>
</table> </table>
<hr class="header-line" style="border: 0.620315px solid #E8E8E8;"/>
</div> </div>
<hr class="header-line" />
<div class="wrapper"> <div class="wrapper">
<div class="address"> <div class="address">
<div class="company"> <div class="company">

View File

@ -264,7 +264,7 @@
} }
tr.main-table-header th { tr.main-table-header th {
border-bottom: 1px solid #EAF1FB; border-bottom: 0.620315px solid #E8E8E8;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;

View File

@ -1,6 +1,8 @@
<div class="notes"> @if ($invoice->notes != '' && $invoice->notes != null)
<div class="notes-label"> <div class="notes">
Notes <div class="notes-label">
Notes
</div>
{{$invoice->notes}}
</div> </div>
{{$invoice->notes}} @endif
</div>

View File

@ -1,27 +1,32 @@
<table width="100%" class="table2" cellspacing="0" border="0"> <table width="100%" class="table2" cellspacing="0" border="0">
<tr class="main-table-header"> <tr class="main-table-header">
<th class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">#</th>
@if($invoice->discount_per_item === 'NO') @if($invoice->discount_per_item === 'NO')
<th width="80%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th> <th width="80%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
@else @else
<th width="40%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th> <th width="40%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 0px">Items</th>
@endif @endif
<th width="17%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">Quantity</th> <th width="17%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 20px">Quantity</th>
<th width="18%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 40px">Price</th> <th width="18%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-right: 40px">Price</th>
@if($invoice->discount_per_item === 'YES') @if($invoice->discount_per_item === 'YES')
<th width="10%" class="ItemTableHeader" style="text-align: left; color: #55547A; padding-left: 10px">Discount</th> <th width="10%" class="ItemTableHeader" style="text-align: right; color: #55547A; padding-left: 10px">Discount</th>
@endif @endif
<th width="15%" class="ItemTableHeader" style="text-align: right; color: #55547A;">Amount</th> <th width="15%" class="ItemTableHeader" style="text-align: right; color: #55547A;">Amount</th>
</tr> </tr>
@php
$index = 1
@endphp
@foreach ($invoice->items as $item) @foreach ($invoice->items as $item)
<tr class="item-details"> <tr class="item-details">
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px; vertical-align: top;">{{$index}}</td>
<td class="inv-item items" style="text-align: left; color: #040405;padding-left: 0px"> <td class="inv-item items" style="text-align: left; color: #040405;padding-left: 0px">
<span>{{ $item->name }}</span><br> <span>{{ $item->name }}</span><br>
<span style="text-align: left; color: #595959; font-size: 9px; font-weight:300; line-height: 12px;">{{ $item->description }}</span> <span style="text-align: left; color: #595959; font-size: 9px; font-weight:300; line-height: 12px;">{{ $item->description }}</span>
</td> </td>
<td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px">{{$item->quantity}}</td> <td class="inv-item items" style="text-align: right; color: #040405; padding-right: 20px">{{$item->quantity}}</td>
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 40px">{{$item->price/100}}</td> <td class="inv-item items" style="text-align: right; color: #040405; padding-right: 40px">{{$item->price/100}}</td>
@if($invoice->discount_per_item === 'YES') @if($invoice->discount_per_item === 'YES')
<td class="inv-item items" style="text-align: left; color: #040405; padding-left: 10px"> <td class="inv-item items" style="text-align: right; color: #040405; padding-left: 10px">
@if($item->discount_type === 'fixed') @if($item->discount_type === 'fixed')
{{$item->discount_val/100}} {{$item->discount_val/100}}
@endif @endif
@ -30,8 +35,11 @@
@endif @endif
</td> </td>
@endif @endif
<td class="inv-item items" style="text-align: right; color: #040405">{{$item->total/100}}</td> <td class="inv-item items" style="text-align: right; color: #040405;">{{$item->total/100}}</td>
</tr> </tr>
@php
$index += 1
@endphp
@endforeach @endforeach
</table> </table>