Created
October 17, 2019 16:05
-
-
Save adil62/b23ec0854a50f300e4bc373508dde05e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
.right-total-box { | |
border-spacing: 6px; | |
border-collapse: separate; | |
} | |
.gstbox-left--gst { | |
border: 1px solid #d2caca ; | |
width: 500px ; | |
} | |
.gstbox-left--igst { | |
border: 1px solid #d2caca ; | |
width: 70%; | |
} | |
.gstbox-left--gst td, | |
.gstbox-left--gst th { | |
border: 1px solid #d2caca; | |
padding: 2px 8px; | |
} | |
.gstbox-left--gst td { | |
padding: 8px ; | |
} | |
.gstbox-left--igst td , | |
.gstbox-left--igst th { | |
border: 1px solid #d2caca; | |
padding: 4px 8px; | |
} | |
.gstbox-left--igst th { | |
padding: 8px; | |
} | |
.gstbox-left--igst td:first-child , | |
.gstbox-left--igst th:first-child { | |
border: 1px solid #d2caca; | |
padding: 1px 2px; | |
} | |
.text-right { | |
text-align: right; | |
} | |
.text-center{ | |
text-align: center; | |
} | |
.text-left { | |
text-align: left; | |
} | |
.top-right-branch-details { | |
font-weight: 600; | |
font-size: 0.8em; | |
} | |
.table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td{ | |
border-top: 0; | |
} | |
.top-right-branch-details .main{ | |
font-size: 20px; | |
} | |
.text-center{ | |
text-align: center; | |
} | |
td{ | |
padding-left: 5px; | |
} | |
.itemBox{ | |
border: 1px solid black !important; | |
width: 99%; | |
margin-right: 1.0%; | |
} | |
.itemBox td , | |
.itemBox th { | |
border: 1px solid #d2caca !important; | |
padding: 3px 5px; | |
font-size: 0.9em; | |
} | |
.itemBox th { | |
padding: 8px; | |
} | |
.itemBox td { | |
padding: 4px 8px ; | |
} | |
.itemBox table { | |
table-layout: fixed; | |
} | |
table { | |
border-collapse: collapse; | |
margin-bottom: 20px; | |
} | |
td { | |
padding-top: .2em; | |
padding-bottom: .2em; | |
} | |
html,body{ | |
font-family: sans-serif ; | |
font-size: 0.9em; | |
margin: 0px; | |
} | |
.container { | |
padding: 20px 18px !important; | |
} | |
.w100 { | |
width: 100% ; | |
} | |
.mt-3{ | |
margin-top: 20px; | |
} | |
@page{ | |
margin-left: 0px; | |
margin-right: 0px; | |
margin-top: 0px; | |
margin-bottom: 0px; | |
} | |
.footer--branch-name { | |
font-size: 15px ; | |
} | |
tfoot{ | |
display: table-footer-group; | |
padding: 0px; | |
margin: 0px; | |
width: 100%; | |
} | |
.clearfix { | |
content: ""; | |
clear: both; | |
display: table; | |
} | |
</style> | |
</head> | |
<body onload="window.print()"> | |
@isset( $orders ) | |
@php | |
// dump($orders); | |
@endphp | |
@endisset | |
<div class="container"> | |
<table class="w100"> | |
<thead></thead> | |
<tbody> | |
<tr> | |
<td style="width: 416px;"> | |
<img width="175px" height="100px" | |
src="{{url('/public/uploads/branch_logos/'.$orders[0]->branch_logo )}}" alt=""> | |
</td> | |
<td style="padding-left: 100px;"> | |
<table class="top-right-branch-details"> | |
<tr> <td colspan="3"> <strong class="main"> {{$orders[0]->branch_name}} </strong> </td> </tr> | |
<tr> <td colspan="3"> {{$orders[0]->branch_address}} </td> </tr> | |
<tr> | |
<td style="width: 12px;"> Phone </td> <td> : </td> | |
@if( $orders[0]->branch_mob ) | |
<td> {{ $orders[0]->branch_mob ?? " "}} </td> | |
@endif | |
</tr> | |
@if( $orders[0]->branch_email ) | |
<tr> <td> Email </td> <td> : </td> <td> {{$orders[0]->branch_email ?? " "}} </td> </tr> | |
@endif | |
<tr> <td> GSTIN </td> <td> : </td> <td> {{$orders[0]->branch_gstin ?? " "}} </td> </tr> | |
</table> | |
</td> | |
</tr> | |
<tr> <td colspan="2"> <hr class="hr"> </td> </tr> | |
<tr> | |
<td colspan="2"> | |
<h3 class="text-center mt-3" style="font-size: 19px"> ORDER ESTIMATE </h3> | |
</td> | |
</tr> | |
<tr class="mt-3"> | |
<td> | |
<table class="mt-3"> | |
<tr> | |
<td colspan="3" > customer Name </td> | |
<td > : </td> | |
<td ><strong> {{$orders[0]->o_cust_ret_name}} </strong> </td> | |
</tr> | |
<tr> | |
<td colspan="3"> Address </td> | |
<td> : </td> | |
<td> <strong> {{ $orders[0]->o_cust_ret_address ?? " " }} | |
{{ ','.$orders[0]->o_cust_ret_state }} | |
</strong> | |
</td> | |
</tr> | |
@if( $orders[0]->o_cust_ret_gstin ) | |
<tr> | |
<td colspan="3"> GSTIN </td> | |
<td> : </td> | |
<td> <strong> {{$orders[0]->o_cust_ret_gstin ?? " "}} </strong> </td> | |
</tr> | |
@endif | |
</table> | |
</td> | |
<td style="padding-left: 100px;"> | |
<table> | |
<tr> | |
<td colspan="3"> Order Number </td> | |
<td>:</td> | |
<td><strong> {{$orders[0]->o_number ?? " "}} </strong></td> | |
</tr> | |
<tr> | |
<td colspan="3"> Order Date </td> | |
<td>:</td> | |
<td> <strong> {{ date('d-m-Y', strtotime($orders[0]->o_date)) ?? " "}} </strong></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
<tr> | |
<td colspan="2"> | |
<table class="itemBox"> | |
<thead> | |
<tr> | |
<th style="width: 2%;">#</th> | |
<th style="width: 5%;">SKU</th> | |
<th style="width: 25%;">Particulars</th> | |
<th style="width: 3%;">Qty</th> | |
<th style="width: 5%;">Rate</th> | |
<th style="width: 5%;">Amount</th> | |
<th style="width: 3%;">Disc</th> | |
<th style="width: 5%;">Net</th> | |
<th style="width: 3%;">GST(%)</th> | |
<th style="width: 5%;">GST(Amt)</th> | |
<th style="width: 7%;">Total</th> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach( $orders as $order ) | |
<tr> | |
<td class="text-center">{{ $loop->index + 1 }} </td> | |
<td class="text-center">{{ $order->product_sku_autogen }}</td> | |
<td class="text-left"> {{ $order->o_item_name }}</td> | |
<td class="text-center">{{ number_format($order->o_item_qty,2) }}</td> | |
<td class="text-right"> {{ number_format($order->o_item_rate,2) }}</td> | |
<td class="text-right"> | |
{{ | |
number_format($order->o_item_rate * $order->o_item_qty ,2) | |
}} | |
</td> | |
<td class="text-right"> {{ number_format($order->o_item_discount,2) }} </td> | |
<td class="text-right"> {{ number_format($order->o_item_amount_exc,2) }}</td> | |
<td class="text-center">{{ number_format($order->o_item_gst,2) }} </td> | |
<td class="text-right"> | |
{{ | |
number_format( ($order->o_item_gst * $order->o_item_amount_exc) / 100 , 2 ) | |
}} | |
</td> | |
<td class="text-right">{{ number_format($order->o_item_amount,2) }}</td> | |
</tr> | |
@endforeach | |
</tbody> | |
</table> | |
</td> | |
</tr> | |
<tr> | |
<td> | |
{{-- IF Cgst and Sgst --}} | |
@if ( $orders[0]->branch_state_name == $orders[0]->o_cust_ret_state ) | |
<table class="gstbox-left--gst"> | |
<thead> | |
<tr> | |
<th>GST SLAB</th> | |
<th>Taxable </th> | |
<th>CGST %</th> | |
<th>CGST </th> | |
<th>SGST %</th> | |
<th>SGST </th> | |
<th>GST</th> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach( $gstToTaxable as $gst => $taxable ) | |
<tr> | |
<td class="text-center">{{ number_format($gst, 0) }}%</td> | |
<td class="text-right"> {{ number_format($taxable, 2) }} </td> | |
<td class="text-center">{{ number_format($gst, 0) /2 }} %</td> | |
<td class="text-right"> {{ number_format(($taxable * $gst/100 )/2, 2)}}</td> | |
<td class="text-center">{{ number_format($gst/2, 0) }}%</td> | |
<td class="text-right"> {{ number_format(($taxable * $gst/100 )/2, 2) }}</td> | |
<td class="text-right"> {{ number_format( $taxable * $gst/100 , 2) }}</td> | |
</tr> | |
@endforeach | |
</tbody> | |
</table> | |
@else | |
<table class="gstbox-left--igst"> | |
<thead> | |
<tr> | |
<th>GST SLAB</th> | |
<th>Taxable </th> | |
<th>IGST</th> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach( $gstToTaxable as $gst => $taxable ) | |
<tr> | |
<td class="text-center">{{ number_format($gst,0)."%" }} </td> | |
<td class="text-right"> {{ number_format($taxable,2) }} </td> | |
<td class="text-right"> {{ number_format($taxable * $gst/100, 2) }} </td> | |
</tr> | |
@endforeach | |
</tbody> | |
</table> | |
@endif | |
{{-- if IGST --}} | |
</td> | |
<td style="padding-right: 7px;"> | |
<table class="right-total-box" style="width: 300px ;"> | |
<thead> | |
</thead> | |
<tbody> | |
<tr> | |
<td >Total Amount</td> | |
<td> : </td> | |
<td class="text-right"> {{ number_format($orders[0]->o_qty_by_rate,2) }} INR</td> | |
</tr> | |
<tr> | |
<td >Discount</td> | |
<td> :</td> | |
<td class="text-right"> {{ number_format($orders[0]->o_discount,2) }} INR</td> | |
</tr> | |
<tr> | |
<td >Taxable Amount</td> | |
<td> : </td> | |
<td class="text-right"> {{ number_format($orders[0]->o_taxable,2) }} INR </td> | |
</tr> | |
@if ( $orders[0]->branch_state_name == $orders[0]->o_cust_ret_state ) | |
<tr> | |
<td> CGST </td> | |
<td> : </td> | |
<td class="text-right"> {{ number_format($orders[0]->o_gst/2, 2) }} INR </td> | |
</tr> | |
<tr> | |
<td> SGST </td> | |
<td> : </td> | |
<td class="text-right"> {{ number_format($orders[0]->o_gst/2, 2) }} INR </td> | |
</tr> | |
@else | |
<tr> | |
<td > IGST </td> | |
<td> : </td> | |
<td class="text-right"> {{ number_format($orders[0]->o_gst , 2) }} INR </td> | |
</tr> | |
@endif | |
<tr> | |
<td>Payable Amount</td> | |
<td> : </td> | |
<td class="text-right"> <strong> {{ number_format($orders[0]->o_total , 2) }} INR </strong> </td> | |
</tr> | |
</tbody> | |
</table> | |
</td> | |
</tr> | |
</tbody> | |
<div class="footer" style="position: fixed;bottom: 100px;right: 10px;"> | |
<h3 class="text-right">For {{$orders[0]->branch_name}}</h3> | |
<h4 class="text-right">Authorized signatory</h4> | |
</div> | |
<div class="clearfix"></div> | |
<div style="position: fixed;bottom: 10px;width: 100% ; "> | |
<h5 class="text-center"> Thank you for your purchase.. We expect you here again.. </h5> | |
</div> | |
</table> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment