@php function formatDate($date) { // Check if the date is valid if (!strtotime($date)) { return ''; } return date('d-m-Y', strtotime($date)); } function printTillSpecificLength($string, $maxLength) { // Check if the length of the string is less than or equal to the maxLength if (strlen($string) <= $maxLength) { echo $string; } else { // If the length exceeds maxLength, print only up to maxLength characters echo substr($string, 0, $maxLength); } } function numberToWords($number) { $no = floor($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] : ''; echo $result . "Rupees "; // echo $result . "Rupees " . $points . " Paise"; } if(isset($_GET['copies'])) $copies = $_GET['copies']; else $copies = 'Original'; // BREAK $copies INTO ARRAY $copies = explode(',', $copies); @endphp BHARAT SOFTWARE PRIVATE LIMITED @foreach($multi_bills as $bill) @foreach($copies as $copy)

Toll Free No

{{ $company->mob1 }}

INVOICE FOR TRANSPORTATION OF GOODS

{{ $company->company_name }}

Regd. Office - {{ $company->address1 }}

Mob.: {{ $company->mob1 }},{{ $company->mob2 }}

Web : {{ $company->website }}

TAX INVOICE
GST Number : {{ $company->gst_number }} PAN NO: {{ $company->pan_number }}
CIN NO: FSSAI LICENCE NO:

M/s. : {{ $bill->acc_party['account_name'] }}


Address : {{ $bill->billing_address }} DELHI


GST Number : {{ $bill->acc_party['party']['gst_number'] }}

Bill No. : {{ $bill->bill_number }}



Date : {{ formatDate($bill->bill_date) }}

 
@foreach($bill->bill_desc as $bill_desc) @endforeach
S.No. G.R.
No.
Date Inv.
No.
Veh. No. Source Destination Vehicle Type Pkg. Chg.
wt.
Freight Total
{{ $serial++; }} {{ $bill_desc['gr_number'] }} {{ formatDate($bill_desc['gr_date']) }} @if(isset($bill_desc['bookGr']['gr_desc'])) @foreach($bill_desc['bookGr']['gr_desc'] as $invoice) {{ $invoice['invoice_number'] }}   @endforeach @endif {{ $bill_desc['vehicle']?$bill_desc['vehicle']['vehicle_number']:'' }} {{$bill_desc['source']['station_name']}} {{$bill_desc['destination']['station_name']}} {{ $bill_desc['vehicle']?$bill_desc['vehicle']['vehicle_type']:'' }} {{ $bill_desc['total_pkg'] }} {{$bill_desc['total_material_weight']}} {{$bill_desc['freight']}} {{$bill_desc['grand_total']}}
TOTAL {{$totpkt}} {{$totweg}} {{$totfrt}} {{$tot}}
 
 
 
 
 
 Rs. ( in Words ) :