@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";
}
$copies = 'Original';
// BREAK $copies INTO ARRAY
$copies = explode(',', $copies);
@endphp
{{ $bill->bill_number }}
@foreach($copies as $copy)
{{ $company->company_name }}
ADDRESS: {{ $company->address1 }}
MOB:- {{ $company->mob1 }} / {{ $company->mob2 }}
TAX INVOICE
|
|
TO :- {{ $bill->acc_party['account_name'] }}
Distt:- {{ $bill->billing_address }}
GSTIN :- {{ $bill->acc_party['party']['gst_number'] }}
PAN No. :- {{ $bill->acc_party['party']['pan_number'] }}
Work Order No:-
POS :-
{{ substr($bill->acc_party['party']['gst_number'],0,2) }} - {{ $bill->acc_party['party']['state'] }}
SAC :-
@if($bill->acc_party['account_name']=='DP WORLD RAIL LOGISTICS PRIVATE LIMITED')
996511
@else
996791
@endif
Products :- IRON & STEEL
|
|
PAN NO : {{ $company->pan_number }}
GST NO : {{ $company->gst_number }}
BILL NO : {{ $bill->bill_number }}
BILL DATE : {{ formatDate($bill->bill_date) }}
VENDOR CODE : 19422
|
@foreach( json_decode($bill->supplementary_headers) as $supplementary_header)
{{ $supplementary_header }} |
@endforeach
LOADED WEIGHT |
CHARGED WEIGHT |
RATE |
FREIGHT |
@foreach($bill->bill_desc as $bill_desc)
{{ $supplementary_desc->other1 }} |
{{ $supplementary_desc->other2 }} |
{{ $supplementary_desc->other3 }} |
{{ $supplementary_desc->other4 }} |
{{ $supplementary_desc->other5 }} |
{{ $supplementary_desc->other6 }} |
{{ $supplementary_desc->other7 }} |
{{ $supplementary_desc->other8 }} |
{{ $supplementary_desc->material_weight }} |
{{ $supplementary_desc->chg_qty }} |
{{ $supplementary_desc->rate }} |
{{ $bill_desc['total_without_gst'] }} |
@endforeach
|
|
|
|
|
|
|
Total |
{{ number_format($total_material_weight, 3) }} |
{{ number_format($total_chg_qty, 3) }} |
|
|
TOTAL OF ABOVE |
|
|
|
{{ $bill->total_without_gst + $bill->other_plus - $bill->other_minus }} |
|
SGST @ 0 % |
{{ $bill->total_sgst_amount }} |
|
CGST @ 0 % |
{{ $bill->total_cgst_amount }} |
|
IGST @ 0 % |
{{ $bill->total_igst_amount }} |
Rupee in words :- |