@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"; } @endphp

{{ $company->company_name }}

{{ $company->address1 }}

GOODS MANIFEST CUM FREIGHT CHALLAN
No. {{ $challan->challan_number }} Date. {{ formatDate($challan->challan_date) }}
Truck No. {{ $challan->vehicle ? $challan->vehicle['vehicle_number']: '' }}
From {{ $challan['source']['station_name']}} To {{$challan['destination']['station_name'] }} V/A
No. of
Pkg.
{{$challan->lh_total_pkg}} Weight {{$challan->lh_total_wt}} Minimum
Guarantee
Rate per ton Freight Advance Bal Freight Less TDS Other Charges Balance Amount Payable At
{{$challan->lh_rate}} {{$challan->lh_freight}} {{$challan->lh_advance}} {{$challan->lh_balance}} {{$challan->lh_tds}} {{$challan->lh_total_pkg}} {{ $challan->lh_net_freight }}

Signature on
Revenue Stamp

 

Amount in Word ( Advance Freight )

{{numberToWords($challan->lh_advance)}}

Amount in Word ( Balance Freight )

{{numberToWords($challan->lh_balance)}}

Signature of
Branch Manager

 

Description
of Goods
{{$challan->challan_desc[0]['material']}} Chassis No. {{ $challan->vehicle?$challan->vehicle['chasis_number']:''}} Engine No. {{ $challan->vehicle?$challan->vehicle['engine_number']:''}}
Truck Owner's Name Address
Phone & Pan No.
Driver Name Address
Phone & Licence No.
Broker's Name Address& Phone
{{$challan->vehicle?->party['party_name']??''}}
{{$challan->vehicle?->party['address1']??''}},{{$challan->vehicle?->party['address2']??''}}

Mob :{{$challan->vehicle?->party['mob_number']??''}}
Pan No :{{$challan->vehicle?->party['pan_number']??''}}
{{$challan->driver?->emp_name}}
{{$challan->driver?->address}}

Mob :{{$challan->driver?->contact_number}}
Pan No :{{$challan->driver?->pan_number}}
{{$challan->broker['party_name']??''}}
{{$challan->broker['address1']??''}},{{$challan->broker['address2']??''}}

Mob :{{$challan->broker['mob_number']??''}}
Pan No :{{$challan->broker['pan_number']??''}}
@foreach($challan->challan_desc as $desc_item) @endforeach
To Station
Address
Booking
Date
CN No. Pkg. Weight From TO Description
of Goods
Party Name Remarks
{{ $desc_item['gr_date'] }} {{ $desc_item['gr_number'] }} {{ $desc_item['pkg'] }} {{ $desc_item['wt'] }} {{$challan->source?->station_name}} {{ $desc_item['destination'] }} {{ $desc_item['material'] }} {{ $desc_item['consignee'] }}