Sheet :
@if ($parcel->lastPage() > 1)
@for ($i = 1; $i <= $parcel->lastPage(); $i++)
@foreach ($reject as $rj)
@if ($normal[$i-1]->id == $rj->id)
{{ $i }}
@endif
@endforeach
@endfor
Previous
@if ( $parcel->currentPage() > 15 )
...
@endif
@for ($i = 1; $i <= $parcel->lastPage(); $i++)
@if ( ($i > ($parcel->currentPage() - 15)) && ($i < ($parcel->currentPage() + 15)) )
@foreach ($reject as $rj)
@if ($normal[$i-1]->id == $rj->id)
{{ $i }}
@endif
@endforeach
@foreach ($approve as $ap)
@if ($normal[$i-1]->id == $ap->id)
{{ $i }}
@endif
@endforeach
@foreach ($waiting as $wt)
@if ($normal[$i-1]->id == $wt->id)
{{ $i }}
@endif
@endforeach
@endif
@endfor
@if ( $parcel->currentPage() < ($parcel->lastPage() - 14) )
...
@endif
Next
@endif
@if ($parcel[0]->parcel_type == 1)
{{$parcel[0]->header}}
|
|
|
|
|
วันที่ : |
{{$parcel[0]->date}} |
|
|
|
|
|
เวลา : |
{{$parcel[0]->time}} |
|
|
|
|
|
รับจาก : |
{{$parcel[0]->receive_from}} |
|
|
|
|
|
เลขที่ : |
{{$parcel[0]->number}} |
|
{{$parcel[0]->inform_to}} |
|
|
|
สถานะ : |
@if ($parcel[0]->status == 0)
@lang('custom.parcel.status.0')
@elseif($parcel[0]->status == 1)
@lang('custom.parcel.status.1')
@elseif($parcel[0]->status == 2)
@lang('custom.parcel.status.2')
@endif
|
|
|
{{$parcel[0]->description}} |
|
|
@if ($parcel[0]->status == 2)
เหตุผลที่ Reject :
@endif
|
@if ($parcel[0]->status == 2)
{{$parcel[0]->rejectreason}}
@endif
|
|
|
ได้รับใบอนุญาตเลขที่ : {{$parcel[0]->license}} |
|
|
|
|
|
ชื่องาน : |
{{$parcel[0]->jobname}} |
หน่วยงาน : |
{{$parcel[0]->department}} |
|
รอบบิล : |
{{$parcel[0]->cycle}} |
|
|
Owner : |
{{$parcel[0]->owner}} |
|
|
|
|
|
Cost Center : |
{{$parcel[0]->costcenter}} |
|
รายละเอียดใบนำส่งไปรษณีย์ในเขต กรุงเทพ/ปริมณฑล และต่างจังหวัด |
|
|
|
|
เขต |
ชื่อไฟล์ |
จำนวนชิ้นงาน |
วิธีการจัดส่ง / เลขที่ |
น้ำหนักต่อชิ้น |
ราคาต่อหน่วย |
รวมเป็นเงิน(บาท) |
@php
$sum = 0;
$totalquantity = 0 ;
@endphp
@foreach ($parceldetail as $item)
{{$item->district}} |
{{$item->filename}} |
@convertnodecimal($item->quantity) |
{{$item->shipping_type}} |
@convert($item->weight_per_piece) |
@convert($item->price_per_piece) |
@convert($item->total_price_per_row) |
@php
$sum += $item->total_price_per_row;
$totalquantity += $item->quantity;
@endphp
@endforeach
|
@php
$return = "";
$num = str_replace(",","",$sum);
$number = explode(".",$num);
$txtnum1 = array('','หนึ่ง','สอง','สาม','สี่','ห้า','หก','เจ็ด','แปด','เก้า');
$txtnum2 = array('','สิบ','ร้อย','พัน','หมื่น','แสน','ล้าน');
if(sizeof($number)>2){
return 'รูปแบบข้อมุลไม่ถูกต้อง';
exit;
}
$num_arr = str_split($number[0]);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key => $val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
elseif($count > 1 && $val == 1 && $key ==($count-2))
$return_str .= "สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return .= $return_str."บาท";
if(sizeof($number) >= 2)
{
$stang = intval($number[1]);
$num_arr = str_split($number[1]);
// dd($stang);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key=>$val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return.= $return_str."สตางค์";
}
else{
$return .= "ถ้วน";
}
echo $return;
@endphp
|
|
รวมเงิน : |
@convert($sum) |
หมายเหตุ (กรณีส่งนอกเวลา) : |
|
|
|
|
|
|
เนื่องจาก : |
{{$parcel[0]->note}} |
จำนวนรวมไปรษณียภัณฑ์ทั้งสิ้น : |
@convertnodecimal($totalquantity) |
ฉบับ / ชิ้น |
จำนวนรวมทั้งหมด |
ราคาต่อหน่วย |
ยอดรวมจำนวนชิ้นงาน |
ยอดรวมจำนวนเงิน |
@php
$totalpack = 0;
$totalprice = 0;
@endphp
@foreach ($cal as $item)
{{$item->price_per_piece}} |
@convertnodecimal($item->quantity) |
@convert($item->totalpriceperrow) |
@php
$totalpack += $item->quantity;
$totalprice += $item->totalpriceperrow;
@endphp
@endforeach
Grand Total : |
@convertnodecimal($totalpack) |
@convert($totalprice) |
|
@elseif($parcel[0]->parcel_type == 2)
{{$parcel[0]->header}}
|
{{$parcel[0]->date}} |
{{$parcel[0]->parcel_all_text}} |
{{$parcel[0]->description}} |
ชื่องาน : |
{{$parcel[0]->jobname}} |
|
|
|
|
|
|
ลำดับ |
นามผู้รับ |
จำนวนราย |
รหัสกลุ่ม |
ปลายทางรหัสไปรษณีย์ |
เลขที่ลงทะเบียน
|
น้ำหนัก (g) |
รวมเป็นเงิน(บาท) |
Note |
@php
$sum = 0;
$totalquantity = 0 ;
$totalweight = 0;
@endphp
@foreach ($parceldetail as $item)
{{$loop->iteration}} |
{{$item->receiver_name}} |
@convertnodecimal($item->quantity) |
{{$item->group_code}} |
{{$item->destination_post_code}} |
{{$item->registed_number}} |
@convert($item->weight_per_piece) |
@convert($item->total_price_per_row) |
{{$item->note}} |
@php
$sum += $item->total_price_per_row;
$totalquantity += $item->quantity;
$totalweight += $item->weight_per_piece;
@endphp
@endforeach
|
@php
$return = "";
$num = str_replace(",","",$sum);
$number = explode(".",$num);
$txtnum1 = array('','หนึ่ง','สอง','สาม','สี่','ห้า','หก','เจ็ด','แปด','เก้า');
$txtnum2 = array('','สิบ','ร้อย','พัน','หมื่น','แสน','ล้าน');
if(sizeof($number)>2){
return 'รูปแบบข้อมุลไม่ถูกต้อง';
exit;
}
$num_arr = str_split($number[0]);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key => $val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
elseif($count > 1 && $val == 1 && $key ==($count-2))
$return_str .= "สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return .= $return_str."บาท";
if(sizeof($number) >= 2)
{
$stang = intval($number[1]);
$num_arr = str_split($number[1]);
// dd($stang);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key=>$val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return.= $return_str."สตางค์";
}
else{
$return .= "ถ้วน";
}
echo $return;
@endphp
|
|
รวม : |
@convert($totalweight) |
@convert($sum) |
@elseif($parcel[0]->parcel_type == 3)
{{$parcel[0]->header}}
|
{{$parcel[0]->date}} |
{{$parcel[0]->parcel_all_text}} |
{{$parcel[0]->description}} |
ชื่องาน : |
{{$parcel[0]->jobname}} |
|
|
|
|
|
|
No |
Name |
จำนวน BA |
FBB_Number |
Account_Number |
Zipcode |
Registration number
|
น้ำหนัก (g) |
รวมเป็นเงิน(บาท) |
Note |
@php
$sum = 0;
$totalquantity = 0 ;
$totalweight = 0;
@endphp
@foreach ($parceldetail as $item)
{{$loop->iteration}} |
{{$item->receiver_name}} |
@convertnodecimal($item->quantity) |
{{$item->fbb_number}} |
{{$item->account_number}} |
{{$item->destination_post_code}} |
{{$item->registed_number}} |
@convert($item->weight_per_piece) |
@convert($item->total_price_per_row) |
{{$item->note}} |
@php
$sum += $item->total_price_per_row;
$totalquantity += $item->quantity;
$totalweight += $item->weight_per_piece;
@endphp
@endforeach
|
@php
$return = "";
$num = str_replace(",","",$sum);
$number = explode(".",$num);
$txtnum1 = array('','หนึ่ง','สอง','สาม','สี่','ห้า','หก','เจ็ด','แปด','เก้า');
$txtnum2 = array('','สิบ','ร้อย','พัน','หมื่น','แสน','ล้าน');
if(sizeof($number)>2){
return 'รูปแบบข้อมุลไม่ถูกต้อง';
exit;
}
$num_arr = str_split($number[0]);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key => $val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
elseif($count > 1 && $val == 1 && $key ==($count-2))
$return_str .= "สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return .= $return_str."บาท";
if(sizeof($number) >= 2)
{
$stang = intval($number[1]);
$num_arr = str_split($number[1]);
// dd($stang);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key=>$val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return.= $return_str."สตางค์";
}
else{
$return .= "ถ้วน";
}
echo $return;
@endphp
|
|
|
รวม : |
@convert($totalweight) |
@convert($sum) |
@elseif($parcel[0]->parcel_type == 4)
{{$parcel[0]->header}}
|
{{$parcel[0]->date}} |
{{$parcel[0]->parcel_all_text}} |
{{$parcel[0]->description}} |
ชื่องาน : {{$parcel[0]->jobname}} |
|
|
|
|
|
|
|
No |
นามผู้รับ |
ปลายทาง รหัสไปรษณีย์ |
เลขที่ลงทะเบียน
|
น้ำหนัก (g) |
รวมเป็นเงิน(บาท) |
Note |
@php
$sum = 0;
$totalquantity = 0 ;
$totalweight = 0;
@endphp
@foreach ($parceldetail as $item)
{{$loop->iteration}} |
{{$item->receiver_name}} |
{{$item->destination_post_code}} |
{{$item->registed_number}} |
@convert($item->weight_per_piece) |
@convert($item->total_price_per_row) |
{{$item->note}} |
@php
$sum += $item->total_price_per_row;
$totalquantity += $item->quantity;
$totalweight += $item->weight_per_piece;
@endphp
@endforeach
|
@php
$return = "";
$num = str_replace(",","",$sum);
$number = explode(".",$num);
$txtnum1 = array('','หนึ่ง','สอง','สาม','สี่','ห้า','หก','เจ็ด','แปด','เก้า');
$txtnum2 = array('','สิบ','ร้อย','พัน','หมื่น','แสน','ล้าน');
if(sizeof($number)>2){
return 'รูปแบบข้อมุลไม่ถูกต้อง';
exit;
}
$num_arr = str_split($number[0]);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key => $val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
elseif($count > 1 && $val == 1 && $key ==($count-2))
$return_str .= "สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return .= $return_str."บาท";
if(sizeof($number) >= 2)
{
$stang = intval($number[1]);
$num_arr = str_split($number[1]);
// dd($stang);
$count = count($num_arr);
$return_str = "";
foreach($num_arr as $key=>$val)
{
if($count > 1 && $val == 1 && $key ==($count-1))
$return_str .= "เอ็ด";
elseif($count > 1 && $val == 2 && $key ==($count-2))
$return_str .= "ยี่สิบ";
else
$return_str .= $txtnum1[$val].$txtnum2[$count-$key-1];
}
$return.= $return_str."สตางค์";
}
else{
$return .= "ถ้วน";
}
echo $return;
@endphp
|
รวม : |
@convert($totalweight) |
@convert($sum) |
@endif
Back
@if ($parcel[0]->status == 0)
@can('parcelapprove')
@if ($parcel[0]->reject_at == null )
Approve
@else
Re-Approve
@endif
@endcan
@can('parcelreject')
Reject
@endcan
@endif
@if ($parcel[0]->status == 0 || $parcel[0]->status == 2)
@can('parceldelete')
Delete
@endcan
@endif
@can('addparcel', Model::class)
@if ($parcel[0]->status == 2)
@endif
@endcan