@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 {{ $bill->bill_number }}
TAX INVOICE

{{$company->company_name}}

HEAD OFFICE:- {{$company->address1}} MOB:- {{$company->mob1}}
TRANSPORTATION FREIGHT BILL (Basic) : CEMENT - BARA, PRAYAGRAJ
SAP Code :220000137 Bill No. :- {{ $bill->bill_number }}
Date :- {{ formatDate($bill->bill_date) }}
{{ $bill->acc_party['party']['party_name'] }} PAN No. :- {{ $bill->acc_party['party']['pan_number'] }}
GSTIN No. :- {{ $bill->acc_party['party']['gst_number'] }}
Village- {{ $bill->acc_party['party']['address1'] }}, Tehsil- {{ $bill->acc_party['party']['address2'] }} Status :- Proprietor
GSTIN No. :{{$company->gst_number}}
SAC Code : 996511 GTA Services
@foreach($bill->bill_desc as $bill_desc) @endforeach @for($j=1; $j<=$total_rows-$bill->bill_desc->count(); $j++) @endfor @if($bill->total_cgst_amount>0) @else @endif
SrNo Consignee DISTRICT DESCRIPTION City Invoice no GNR NO. Vehicle no LR No Disp. Date Disp. Bags Unload Bags Qty/MT Rate/MT Freight (A) Freight (B) Total Freight Bags
SH
{{ $serial++; }} {{ $bill_desc['consignee'] ['party_name'] }} {{ $bill_desc['destination'] ['district'] }} {{ $bill_desc['destination'] ['station_name'] }} @if(isset($bill_desc['bookGr']['gr_desc'])) @foreach($bill_desc['bookGr']['gr_desc'] as $invoice) {{ $invoice['invoice_number'] }}   @endforeach @endif {{ $bill_desc['do_number'] }} {{ $bill_desc['vehicle']?$bill_desc['vehicle']['vehicle_number']:'' }} {{ $bill_desc['gr_number'] }} {{ formatDate($bill_desc['challan_date']) }} {{$bill_desc['gr_desc']? (isset($bill_desc['gr_desc'][0])?$bill_desc['gr_desc'][0]->pkg:'' ):''}} {{$bill_desc['gr_desc']? (isset($bill_desc['gr_desc'][0])?$bill_desc['gr_desc'][0]->pkg:'' ):''}} {{ $bill_desc['bookGr']['total_chg_qty'] }} {{ $bill_desc['gr_desc']? (isset($bill_desc['gr_desc'][0])?$bill_desc['gr_desc'][0]->rate:'' ):'' }} {{ $bill_desc['freight']}} {{ $bill_desc['unload_amt']+$bill_desc['toll_amt']+$bill_desc['diversion_amt'] }} {{ $bill_desc['total_without_gst']}}
{{ $serial++ }}
Total->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> {{ number_format($total_chg_qty, 3) }} {{ $total_freight }} {{ $total_freight2 }} {{ $bill->total_without_gst }}
CGST 0% {{ $bill->total_cgst_amount }}
Declaration:- GST of Freight as Applicable Will be Charged and Paid by SHIV SHAKTI ROAD LINES SGST 0% {{ $bill->total_sgst_amount }}
IGST 0% {{ $bill->total_igst_amount }}
Declaration:- GST of Freight as Applicable Will be Charged and Paid by SHIV SHAKTI ROAD LINES
GRAND TOTAL-->> {{ $bill->grand_total_amount }}
RUPEES(In Words):-