@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 {{$company->company_name}}
INVOICE FOR TRANSPORTATION OF GOODS

{{$company->company_name}}

{{ $company->address1 }}

STATE:- {{ $company->state }} (CODE:-{{ substr($company->gst_number,0,2) }} )

MOBILE NO.:- {{ $company->mob1, $company->mob2 }}

BRANCH OFFICE:- {{ $bill->branch['address1'],$bill->branch['address2'],$bill->branch['pincode'] }}
AUTHORISED TRANSPORTER OF ULTRATECH CEMENT LTD. {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['consignor']['party_name'] : "" }}

TRANSPORTATION FREIGHT BILL (BASIC): FOR cement HSN OF SERVICE:- 25232930

VENDOR CODE NO.:- 2901952 HSN/CODE :- 996791
PAN NO.:- {{ $company->pan_number }}
Whether Tax Payble under Forword Charges : "Yes" GSTIN:- {{ $company->gst_number }}
Person Laible to Pay GST STATUS:- PROPRIETORSHIP

{{ $bill->acc_party['party']['party_name'] }}

{{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['consignor']['party_name'] : "" }}

Vill.- {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['consignor']['address1'] : "" }}

Distt.- {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['consignor']['state'] : "" }} {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['consignor']['pincode'] : "" }}

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

Name of Consignor:- {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['consignor']['party_name'] : "" }}

Place of Origin:- {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['source']['station_name'] : "" }}

Place of Supply & state:- {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['destination']['station_name'] : "" }} {{ isset($bill->bill_desc[0]) ? $bill->bill_desc[0]['destination']['state'] : "" }}

Sir,
We hereby submit freight Tax invoice alongwith the details of billing is mentioned below:
Monitored/Not Monitored N/A
EPOD/FLAG STATUS:- N
@foreach($bill->bill_desc as $bill_desc) @endforeach
SL. NO. Bill No. Bill Date Qty (MT) Freight Value GST @ 12% Total Freight
1 {{ $bill->bill_number }} {{ formatDate($bill->bill_date) }}{{$total_qty}} {{ $bill->total_without_gst }} {{ $bill->total_cgst_amount + $bill->total_igst_amount + $bill->total_sgst_amount }} {{ $bill->grand_total_amount }}
Total (Rs.) {{$total_qty}} {{ $bill->total_cgst_amount + $bill->total_igst_amount + $bill->total_sgst_amount }} {{ $bill->grand_total_amount }} {{ $bill->grand_total_amount }}
Rs. in words : -