@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
{{ $lorry_hire_bill->lhb_number }}
@foreach($copies as $copy)
M/S :- {{ $company->company_name }} |
Ref No : {{ $lorry_hire_bill->invoice_number }} |
{{ $company->address1 }} |
Bill No : {{ $lorry_hire_bill->invoice_number }} |
{{ $company->address2 }} |
Bill Date : {{ formatDate($lorry_hire_bill->lhb_date) }} |
Phone : {{ $company->mob1 }}, Fax : , E-mail : {{ $company->email }} |
|
Being The Amount Of Freight Charged For the Transportation Of Your Consignment
S.No |
LR NO. |
DATE |
VEHICLE |
CONSIGHNOR |
FROM |
CONSIGHNEE |
TO |
LOAD WT |
UNLOAD WT |
RATE |
FREIGHT |
ADV AMT |
ADV DIESEL |
SHORTAGE QTY (M.T) |
SHORTAGE AMT |
CHARGES |
NET AMT |
@foreach($lorry_hire_bill->lhb_desc as $lhb_desc)
{{ $serial++; }} |
{{ $lhb_desc['gr_number'] }} |
{{ formatDate($lhb_desc['gr_date']) }} |
{{ $lhb_desc['vehicle_number'] }} |
{{ $lhb_desc['consignor'] }} |
{{ $lhb_desc['source'] }} |
{{ $lhb_desc['consignee'] }} |
{{ $lhb_desc['destination'] }} |
{{ $lhb_desc['load_wt'] }} |
{{ $lhb_desc['unload_wt'] }} |
{{ $lhb_desc['hire_rate'] }} |
{{ $lhb_desc['lh_freight'] }} |
{{ $lhb_desc['lh_advance']+$adv }}
|
{{ $lhb_desc['challan']?$lhb_desc['challan']['diesel_amt1']+$lhb_desc['challan']['diesel_amt2']+$lhb_desc['challan']['diesel_amt3']:0 }}
|
{{ $lhb_desc['shortage_qty'] }}
|
{{ $lhb_desc['shortage_amt'] }} |
0.00 |
{{ $lhb_desc['balance'] }} |
@endforeach
@for($j=1; $j<=$total_rows-$lorry_hire_bill->lhb_desc->count(); $j++)
{{ $serial++ }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@endfor
|
TOTAL |
{{ $total_load_wt }} |
{{ $total_unload_wt }} |
|
{{ $total_freight }} |
{{ $total_advance }} |
{{ $total_diesel }} |
{{ $total_shortage_qty }} |
{{ $total_shortage_amt }} |
0.00 |
{{ $total_net_amt }} |
|
|
Total Amount |
{{ $total_net_amt }} |
Transporter Bank Detail |
|
TDS |
{{ $lorry_hire_bill->tds_percent }} % |
{{ $lorry_hire_bill->tds_amount }} |
Name :- {{ $lorry_hire_bill->lorry_hire_from['party']['holder_name'] }} |
|
Net Amount |
{{ $total_net_amt+$lorry_hire_bill->tds_amount }} |
Account No. :- {{ $lorry_hire_bill->lorry_hire_from['party']['account_number'] }} |
|
IFSC Code:- {{ $lorry_hire_bill->lorry_hire_from['party']['ifsc'] }} |
|
For {{ $lorry_hire_bill->lorry_hire_from['party']['party_name'] }} |
Bank Name : - {{ $lorry_hire_bill->lorry_hire_from['party']['bank_name'] }} |
|
|
|
|
Prepared By |
Checked By |
AUTHORISED SIGNATORY |
@endforeach