@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 }} @foreach($multi_bills as $bill) @foreach($copies as $copy)

{{ $company->company_name ?? ''}}

{{ $company->address1 ?? ''}} 

Contact: {{ $company->mob1 ?? ''}}, {{ $company->mob2 ?? ''}} 

Email: {{ $company->email ?? ''}} 

Website : {{ $company->website ?? ''}} 

 GSTIN. : {{$bill['branch']->gst_number ?? ''}}

 

 

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

{{ $bill->acc_party['party']->address1 }}, State : {{$bill->acc_party['party']->gst_number}} 

0,0   Email:  

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

Date:

Bill No.:

Branch:

{{ formatDate($bill['bill_date']) ?? '' }}

{{ $bill['bill_number'] ?? '' }}

{{ $bill['branch']->branch_name ?? '' }}

@foreach($bill->bill_desc as $index => $bill_desc) @php $dd_ch_amt = floatval($bill_desc['payment_dynamic_fields']->dd_chg ?? 0); $gr_ch_amt = floatval($bill_desc['gr_chg'] ?? 0); $oth_ch_amt = $dd_ch_amt - $gr_ch_amt; @endphp @endforeach
Sr.No. GR.No Date Customer Name From To Pkg. Wt. Rate Door Dly. Bilty Ch Other Dedu. Freight Amt.
{{ $index+1 }} {{ $bill_desc['gr_number'] ?? '' }} {{ formatDate($bill_desc['gr_date']) ?? '' }} {{ $bill_desc['consignee']->party_name ?? '' }} {{ $bill_desc['source']->station_name ?? '' }} {{ $bill_desc['destination']->station_name ?? '' }} {{ $bill_desc['bookGr']['gr_desc'][0]->pkg ?? '' }} {{ floatval($bill_desc['bookGr']['gr_desc'][0]->material_weight ?? '') }} {{ floatval($bill_desc['bookGr']['gr_desc'][0]->rate ?? '') }} {{ floatval($bill_desc['payment_dynamic_fields']->dd_chg ?? '') }} {{ floatval($bill_desc['gr_chg'] ?? '') }} {{floatval($bill_desc['payment_dynamic_fields']->cartage ?? '')}} {{ $bill_desc['grand_total'] ?? '' }}
 Rs.(in words) : {{numberToWords($bill->grand_total_amount) ?? ''}} only /- G.Total  {{ $bill->grand_total_amount ?? '' }} 

GST will be Paid by Consignee under (RCM)
Tax Payble on Reverse Charges Basis - Yes

 Remarks : {{ $bill->remarks ?? ''}}

Pan No:AAAFG9210C

Staff Signature

Branch Inchage Signature

Customer Signature With

Seal/Stamp

Terms of Payment :

1. Please pay by cheque/draft in favour of {{ $company->company_name ?? '' }}.

2. For NEFT/RTGS/IMPS bank detail are as follow: {{ $company->bank_name ?? '' }}, ACC. No. {{ $company->account_number ?? '' }}, IFSC: {{ $company->ifsc ?? '' }}, BR.: SUN TOWER, BAPU NAGAR, GANDHI NAGAR MODE, OFF TONK ROAD, JPR.

UCO BANK, ACC.No. 02090400002078, IFSC: UCBA0000209, BR.:AGRA ROAD JAIPUR, JAIPUR - 302003

3. Payment should be made with in 7 days of bill date. Late payments are subject to interest chareges @24% per annum.

4. All dispute subject to Jaipur Juridiction.

@endforeach @endforeach