This commit is contained in:
Amirah22
2022-06-18 20:45:22 +08:00
parent 7c5231702c
commit 7bdda806c3
11 changed files with 176 additions and 59 deletions
@@ -62,7 +62,11 @@ class ReportCawanganController extends Controller
->where('cawangan.caw_code','=',$user->kodcaw)
->get();
return view('lelong.laporancawindex',compact('lelongid'));
$cawname = Cawangan::where('caw_code','=',$user->kodcaw)
->get();
return view('lelong.laporancawindex',compact('lelongid','cawname'));
}
public function laporanbrglelcaw($lelong_id){
@@ -92,7 +96,7 @@ class ReportCawanganController extends Controller
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->where('cawangan.caw_code','=',$user['kodcaw'])
->select('lelong_id','tarikh_lelong','caw_name')
->select('lelong_id','tarikh_lelong','caw_name','fasa')
->groupBy('lelong_id','caw_name')
->get()->toArray();
@@ -114,7 +118,10 @@ class ReportCawanganController extends Controller
->where('cawangan.caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexbrgleldetailscaw',compact('lelongid'));
$cawname = Cawangan::where('caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexbrgleldetailscaw',compact('lelongid','cawname'));
}
public function laporanbrgleldetailscaw($lelong_id){
@@ -141,6 +148,25 @@ class ReportCawanganController extends Controller
$total_hargaasas = 0;
$hargaasas = 0;
$arrayinfo = [];
$lelongid = Lelong::join('cawangan_lelong','lelong.id','=','cawangan_lelong.lelong_id')
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->select('lelong_id','tarikh_lelong','fasa')
->groupBy('lelong_id')
->get()->toArray();
foreach($lelongid as $laporan)
{
$details = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('lelong_id',$laporan['lelong_id'])
->where('cawangan.caw_code','=',$user['kodcaw'])
->get()
->toArray();
array_push($arrayinfo,['laporan' => $laporan,'details' => $details]);
}
foreach($lelongs as $index1=>$lelong){
$marhun= LelongBidMarhun::where('lelongbid_id','=',$lelong['id'])
@@ -167,7 +193,7 @@ class ReportCawanganController extends Controller
$pdf = PDF::loadView('pdf.laporanbrgleldetailscaw',compact('lelongs','arraycaw','total_nmarhun','total_berat','total_harga','total_hargaasas'
$pdf = PDF::loadView('pdf.laporanbrgleldetailscaw',compact('lelongs','arraycaw','total_nmarhun','total_berat','total_harga','total_hargaasas','arrayinfo'
))->setPaper('a4', 'potrait');
return $pdf->download('Senarai Lelong Details.pdf');
@@ -184,7 +210,10 @@ class ReportCawanganController extends Controller
->where('cawangan.caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexnamapembidacaw',compact('lelongid'));
$cawname = Cawangan::where('caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexnamapembidacaw',compact('lelongid','cawname'));
}
@@ -203,7 +232,7 @@ class ReportCawanganController extends Controller
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->where('cawangan.caw_code','=',$user['kodcaw'])
->select('lelong_id','tarikh_lelong')
->select('lelong_id','tarikh_lelong','fasa')
->groupBy('lelong_id')
->get();
@@ -254,7 +283,10 @@ class ReportCawanganController extends Controller
->where('cawangan.caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexlelfullcaw',compact('lelongid'));
$cawname = Cawangan::where('caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexlelfullcaw',compact('lelongid','cawname'));
}
@@ -277,7 +309,7 @@ class ReportCawanganController extends Controller
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan.caw_code','=',$user['kodcaw'])
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->select('lelong_id','tarikh_lelong')
->select('lelong_id','tarikh_lelong','fasa')
->groupBy('lelong_id')
->get();
@@ -331,7 +363,10 @@ class ReportCawanganController extends Controller
->where('cawangan.caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexbrglelpembidacaw',compact('lelongid'));
$cawname = Cawangan::where('caw_code','=',$user->kodcaw)
->get();
return view('lelong.indexbrglelpembidacaw',compact('lelongid','cawname'));
}
@@ -351,7 +386,7 @@ class ReportCawanganController extends Controller
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->where('cawangan_lelong.lelong_id','=',$lelong_id)
->where('cawangan.caw_code','=',$user['kodcaw'])
->select('lelong_id','tarikh_lelong')
->select('lelong_id','tarikh_lelong','fasa')
->groupBy('lelong_id')
->get();
@@ -4,13 +4,13 @@
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@foreach ($lelongid as $bid)
<h4 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong Details: {{$bid->caw_name}} </h4>
@foreach($cawname as $cawname)
<h4 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong Details: {{$cawname->caw_name}} </h4>
@endforeach
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
@@ -20,15 +20,22 @@
<th>Bil</th>
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th class="text-center">Muat Turun</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $bid->fasa }}</td>
<td class="text-center">
<a href="{{ route('reportcaw.laporanbrgleldetailscaw',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Laporan Barang Lelong Details" ><i class="fas fa-download"></i></a>
</td>
@@ -4,13 +4,13 @@
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@foreach ($lelongid as $bid)
<h4 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong Pembida: {{$bid->caw_name}} </h4>
@foreach($cawname as $cawname)
<h4 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong Pembida: {{$cawname->caw_name}} </h4>
@endforeach
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
@@ -20,15 +20,22 @@
<th>Bil</th>
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th class="text-center">Muat Turun</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $bid->fasa }}</td>
<td class="text-center">
<a href="{{ route('reportcaw.laporanbrglelpembidacaw',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Nama Pembida" ><i class="fas fa-download"></i></a>
</td>
@@ -4,13 +4,13 @@
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@foreach ($lelongid as $bid)
<h4 class="pt-3" style="margin-left:1%;">Laporan Lelong Keseluruhan: {{$bid->caw_name}} </h4>
@foreach($cawname as $cawname)
<h4 class="pt-3" style="margin-left:1%;">Laporan Lelong Keseluruhan: {{$cawname->caw_name}} </h4>
@endforeach
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
@@ -20,15 +20,22 @@
<th>Bil</th>
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th class="text-center">Muat Turun</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $bid->fasa }}</td>
<td class="text-center">
<a href="{{ route('reportcaw.laporanlelfullcaw',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Nama Pembida" ><i class="fas fa-download"></i></a>
</td>
@@ -4,11 +4,11 @@
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@foreach ($lelongid as $bid)
<h4 class="pt-3" style="margin-left:1%;">Laporan Nama Pembida: {{$bid->caw_name}} </h4>
@foreach($cawname as $cawname)
<h4 class="pt-3" style="margin-left:1%;">Laporan Nama Pembida: {{$cawname->caw_name}} </h4>
@endforeach
@if ($message = Session::get('success'))
<div class="alert alert-success">
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
@@ -20,15 +20,22 @@
<th>Bil</th>
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th class="text-center">Muat Turun</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $bid->fasa }}</td>
<td class="text-center">
<a href="{{ route('reportcaw.laporannamapembidacaw',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Nama Pembida" ><i class="fas fa-download"></i></a>
</td>
@@ -4,13 +4,13 @@
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@foreach ($lelongid as $bid)
<h4 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong: {{$bid->caw_name}} </h4>
@foreach($cawname as $cawname)
<h4 class="pt-3" style="margin-left:1%;">Laporan Barang Lelong: {{$cawname['caw_name']}} </h4>
@endforeach
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
@@ -20,15 +20,22 @@
<th>Bil</th>
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th class="text-center">Muat Turun</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td>{{$loop->iteration}}
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid->tarikh_lelong );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{ $bid->fasa }}</td>
<td class="text-center">
<a href="{{ route('reportcaw.laporanbrglelcaw',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Nama Pembida" ><i class="fas fa-download"></i></a>
</td>
+6 -1
View File
@@ -92,7 +92,12 @@ tr:nth-child(even) {
<tr>
@foreach ($info as $info)
<td>Lelong ID : {{$info['lelong_id']}}</td>
<td>Tarikh Lelong : {{$info['tarikh_lelong']}}
<td>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $info['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>Fasa: {{$info['fasa']}}
<td>Nama Cawangan : {{$info['caw_name']}}
@endforeach
</tr>
@@ -56,30 +56,59 @@ table {
border: 0px solid #ddd;
}
th, td {
td {
text-align: left;
padding: 16px;
}
th{
text-align: left;
padding: 16px;
background-color:gainsboro;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<body>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<tr>
<td colspan="2"><u><b>LAPORAN SIMULASI SEMUA CAWANGAN</b></u></td>
</tr>
</table>
<tr>
<td colspan="2"><u><b>LAPORAN BARANG LELONG DETAILS </b></u></td>
<br><br>
</tr>
</table>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
@foreach ($arrayinfo as $laporan)
<td>Lelong ID : {{$laporan['laporan']['lelong_id']}}</td>
<td>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $laporan['laporan']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>Fasa : {{$laporan['laporan']['fasa']}}</td>
@foreach ($laporan['details'] as $details)
<td>Cawangan : {{$details['caw_name']}}
@endforeach
@endforeach
</tr>
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
@@ -93,8 +93,12 @@ tr:nth-child(even) {
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($info as $info)
<td>Tarikh Lelong:{{ $info->tarikh_lelong}}</td>
<td>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $info['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>Fasa: {{$info['fasa']}}
@endforeach
@foreach ($arrayinfocaw as $laporancaw)
@foreach ($laporancaw['cawangan'] as $details)
@@ -93,8 +93,12 @@ tr:nth-child(even) {
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($info as $info)
<td>Tarikh Lelong:{{ $info->tarikh_lelong}}</td>
<td>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $info['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>Fasa: {{$info['fasa']}}
@endforeach
@foreach ($arrayinfocaw as $laporancaw)
@foreach ($laporancaw['cawangan'] as $details)
@@ -92,7 +92,12 @@ tr:nth-child(even) {
<tr>
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($lelongid as $info)
<td>Tarikh Lelong:{{ $info->tarikh_lelong}}</td>
<td>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $info['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>Fasa: {{$info['fasa']}}
@endforeach
@foreach ($arrayinfocaw as $laporancaw)
@foreach ($laporancaw['cawangan'] as $details)