update page pc senarai lelongan
This commit is contained in:
@@ -4292,32 +4292,47 @@ class LelongController extends Controller
|
||||
}
|
||||
public function senarailelongpc()
|
||||
{
|
||||
$arraydetails0 = [];
|
||||
$arraydetails1 = [];
|
||||
$arraydetails2 = [];
|
||||
$arraydetails3 = [];
|
||||
|
||||
$arraydetails = [];
|
||||
// $arraydetails = [];
|
||||
$user = Auth::user();
|
||||
$caw = Cawangan::where('caw_code','=',$user->kodcaw)->first();
|
||||
$kodcaw = $user->kodcaw;
|
||||
// dd($caw->id);
|
||||
$lelong = CawanganLelong::join('lelong', 'cawangan_lelong.lelong_id', '=', 'lelong.id')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa','lelong.masatamat_lelong','harga_emas_asas','jbg','cajlelong','sts_lelong')
|
||||
->groupBy('lelong_id')
|
||||
->where('cawangan_lelong.caw_id', $caw->id)
|
||||
->get()->toArray();
|
||||
$lelongAll = Lelong::with(['cawangan' => function ($query) use($kodcaw) {
|
||||
$query->where('caw_code','=',$kodcaw);
|
||||
|
||||
}])->get();
|
||||
// dd($lelong);
|
||||
|
||||
foreach($lelong as $laporan)
|
||||
foreach($lelongAll as $laporan)
|
||||
{
|
||||
$details = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('lelong_id',$laporan['lelong_id'])
|
||||
->where('cawangan_lelong.caw_id', $caw->id)
|
||||
->get()
|
||||
->toArray();
|
||||
array_push($arraydetails,['laporan' => $laporan,'details' => $details]);
|
||||
// dd($laporan['tarikh_lelong']);
|
||||
$tarikh = DateTime::createFromFormat('Y-m-d', $laporan['tarikh_lelong']);
|
||||
$tarikh_lelong = $tarikh->format('d-m-Y');
|
||||
|
||||
if ($laporan->sts_lelong == 0) {
|
||||
array_push($arraydetails0, $laporan);
|
||||
} elseif ($laporan->sts_lelong == 1) {
|
||||
array_push($arraydetails1, $laporan);
|
||||
} elseif ($laporan->sts_lelong == 2) {
|
||||
array_push($arraydetails2, $laporan);
|
||||
} elseif ($laporan->sts_lelong == 3) {
|
||||
array_push($arraydetails3, $laporan);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dd($arraydetails);
|
||||
return view('lelong.senarailelongpc',compact('lelong', 'arraydetails'));
|
||||
return view('lelong.senarailelongpc',compact('lelongAll','arraydetails0',
|
||||
'arraydetails1',
|
||||
'arraydetails2',
|
||||
'arraydetails3'));
|
||||
}
|
||||
|
||||
public function showlelongkhas(Request $request, $id)
|
||||
@@ -5985,16 +6000,16 @@ class LelongController extends Controller
|
||||
$cawid = $caw->id;
|
||||
$kodcaw = $user->kodcaw;
|
||||
$lelong = Lelong::where('id','=',$id)->first();
|
||||
$cawanganlel = CawanganLelong::with(['cawangan', 'lelongBid' => function ($query1) use($kodcaw) {
|
||||
$cawanganlel = CawanganLelong::with(['cawangan', 'lelongBid' => function ($query1) use($kodcaw,$lelong_id) {
|
||||
$query1->where('status_jual', '=', 1)
|
||||
->where('kodcaw','=',$kodcaw);
|
||||
|
||||
}])
|
||||
->where('lelong_id', '=', $id)
|
||||
->where('lelong_id', '=', $lelong_id)
|
||||
->where('kodcaw','=',$kodcaw); }])
|
||||
|
||||
->where('caw_id', '=', $cawid)
|
||||
->groupBy('caw_id')
|
||||
->get();
|
||||
// dd($cawanganlel);
|
||||
$lelkarat = LelKarat::where('lelong_id','=',$id)->get();
|
||||
$lelkarat = LelKarat::where('lelong_id','=',$lelong_id)->get();
|
||||
$jeniskarat = JenisKarat::all();
|
||||
|
||||
$arraydata = [];
|
||||
@@ -6045,7 +6060,7 @@ class LelongController extends Controller
|
||||
|
||||
|
||||
|
||||
$databid = LelongBid::where('caw_id','=',$cawlel->caw_id)->where('lelong_id','=',$id)->where('status_jual','=',1)->get();
|
||||
$databid = LelongBid::where('caw_id','=',$cawlel->caw_id)->where('lelong_id','=',$lelong_id)->where('status_jual','=',1)->get();
|
||||
// dd($databid);
|
||||
foreach ($databid as $lel_bid) {
|
||||
|
||||
@@ -6141,7 +6156,7 @@ class LelongController extends Controller
|
||||
$data = Lelong::where('lelong.id','=',$lelong_id)
|
||||
->get();
|
||||
|
||||
$tarikhkemaskini = LelKarat::where('lelong_id','=',$id)
|
||||
$tarikhkemaskini = LelKarat::where('lelong_id','=',$lelong_id)
|
||||
->where('karat','=',"22.0K")->first();
|
||||
// dd($tarikhkemaskini);
|
||||
}
|
||||
@@ -6266,11 +6281,23 @@ class LelongController extends Controller
|
||||
$lelong_id = $request->lelongid;
|
||||
$user = Auth::user();
|
||||
$caw = Cawangan::where('caw_code','=',$user->kodcaw)->first();
|
||||
$cawid = $caw->id;
|
||||
$kodcaw = $user->kodcaw;
|
||||
$lelong = Lelong::where('id','=',$lelong_id)->first();
|
||||
$cawanganlel = CawanganLelong::where('lelong_id','=',$lelong_id)
|
||||
->where('caw_id','=',$caw->id)->get();
|
||||
$cawanganlel = CawanganLelong::with(['cawangan', 'lelongBid' => function ($query1) use($kodcaw,$lelong_id) {
|
||||
$query1->where('status_jual', '=', 1)
|
||||
->where('lelong_id', '=', $lelong_id)
|
||||
->where('kodcaw','=',$kodcaw);
|
||||
}])
|
||||
|
||||
->where('caw_id', '=', $cawid)
|
||||
->groupBy('caw_id')
|
||||
->get();
|
||||
// dd($cawanganlel);
|
||||
$lelkarat = LelKarat::where('lelong_id','=',$lelong_id)->get();
|
||||
$jeniskarat = JenisKarat::all();
|
||||
$tarikhkemaskini = LelKarat::where('lelong_id','=',$lelong_id)
|
||||
->where('karat','=',"22.0K")->first();
|
||||
|
||||
$arraydata = [];
|
||||
$arraycaw = [];
|
||||
@@ -6304,106 +6331,77 @@ class LelongController extends Controller
|
||||
|
||||
foreach($cawanganlel as $cawlel)
|
||||
{
|
||||
$cawangan = Cawangan::where('id','=',$cawlel->caw_id)->first();
|
||||
$databid = LelongBid::select('lelongbid.jbg','lelongbid.id','lelongbid.berat','lelongbid.marhun','lelongbid.cajlelong','lelongbid.baki','lelongbid.nilaimarhun',
|
||||
'lelongbid.pinjaman','lelongbid.hargaasas','lelongbid.hargajual','lelongbid.cajlelong','lelongbid.bakiupah')
|
||||
->where('caw_id','=',$cawlel->caw_id)
|
||||
->where('status_jual','=',1)
|
||||
->where('caw_id','=',$cawlel->caw_id)
|
||||
->get();
|
||||
|
||||
// dd($databid->toArray());
|
||||
$packet = 0;
|
||||
$berat = 0;
|
||||
$pinjaman =0;
|
||||
$nilai_marhun = 0;
|
||||
$pinjaman = 0;
|
||||
$bakiupah = 0;
|
||||
$hargaasas = 0;
|
||||
$hargajual = 0;
|
||||
$cajlelong = 0;
|
||||
$rugilelong = 0;
|
||||
$bakilelong = 0;
|
||||
$hargajual = 0;
|
||||
$totalbaki = 0;
|
||||
|
||||
foreach($databid as $index1=>$bid)
|
||||
|
||||
|
||||
$databid = LelongBid::where('caw_id','=',$cawlel->caw_id)->where('lelong_id','=',$lelong_id)->where('status_jual','=',1)->get();
|
||||
// dd($databid);
|
||||
|
||||
|
||||
foreach($databid as $lel_bid)
|
||||
{
|
||||
$marhun = LelongBidMarhun::where('lelongbid_id','=',$bid['id'])->get();
|
||||
$berat = $berat + $bid['berat'];
|
||||
$nilai_marhun = $nilai_marhun + $bid['nilaimarhun'];
|
||||
$pinjaman =$pinjaman + $bid['pinjaman'];
|
||||
$bakiupah = $bakiupah + $bid['bakiupah'];
|
||||
$hargaasas = $hargaasas + $bid['hargaasas'];
|
||||
$cajlelong = $cajlelong + $bid['cajlelong'];
|
||||
$hargajual = $hargajual + $bid['hargajual'];
|
||||
$totalbaki = $bid['baki'];
|
||||
$nilai_marhun += $lel_bid->nilaimarhun;
|
||||
$pinjaman += $lel_bid->pinjaman;
|
||||
$bakiupah += $lel_bid->bakiupah;
|
||||
$berat += $lel_bid->berat;
|
||||
$hargaasas += $lel_bid->hargaasas;
|
||||
$hargajual += $lel_bid->hargajual;
|
||||
$cajlelong += $lel_bid->cajlelong;
|
||||
|
||||
// $lelongsim = Lelong::where('id', $lelong_id )->get();
|
||||
// $sumcajlelong = $bid['hargaasas'] * ($lelongsim[0]['cajlelong']/100);
|
||||
// $lelongcaj = Lelong::where('id',$id)->get();
|
||||
// $sumcajlelong = $lel_bid['hargaasas'] * ($lelongcaj[0]['cajlelong']/100);
|
||||
// $cajlelong = $cajlelong + bcdiv($sumcajlelong,1,1);
|
||||
// $totalbaki = $bid['hargaasas'] - $bid['pinjaman'] - $bid['bakiupah'] - bcdiv($sumcajlelong,1,1);
|
||||
$totalbaki = $lel_bid['baki'];
|
||||
|
||||
if($totalbaki > 0)
|
||||
{
|
||||
$bakilelong = $bakilelong + $totalbaki;
|
||||
$bakilelong += $totalbaki;
|
||||
}
|
||||
else
|
||||
{
|
||||
$rugilelong = $rugilelong - $totalbaki;
|
||||
$rugilelong -= $totalbaki;
|
||||
}
|
||||
// dd($totalbaki);
|
||||
|
||||
|
||||
$total24Kgb += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','24.0Kgb')
|
||||
->sum('berat');
|
||||
|
||||
$total24K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','24.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total23k += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','23.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total22K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','22.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total21K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','21.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total20K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','20.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total18Kp += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','18.0Kp')
|
||||
->sum('berat');
|
||||
|
||||
$total18K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','18.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total14Kp += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','14.0Kp')
|
||||
->sum('berat');
|
||||
|
||||
$total14K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','14.0K')
|
||||
->sum('berat');
|
||||
|
||||
$total9K += LelongBidMarhun::where('lelongbid_id','=',$bid['id'])
|
||||
->where('karat','=','9.0K')
|
||||
->sum('berat');
|
||||
|
||||
|
||||
|
||||
foreach ($lel_bid->lelongBidMarhun as $lel_bid_marhun) {
|
||||
if ($lel_bid_marhun->karat == "24.0Kgb") {
|
||||
$total24Kgb += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "24.0K") {
|
||||
$total24K += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "23.0K") {
|
||||
$total23k += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "22.0K") {
|
||||
$total22K += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "21.0K") {
|
||||
$total21K += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "20.0Kp") {
|
||||
$total20K += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "18.0Kp") {
|
||||
$total18Kp += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "18.0K") {
|
||||
$total18K += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "14.0Kp") {
|
||||
$total14Kp += $lel_bid_marhun->berat;
|
||||
} else if ($lel_bid_marhun->karat == "14.0K") {
|
||||
$total14K += $lel_bid_marhun->berat;
|
||||
}
|
||||
}
|
||||
}
|
||||
array_push($arraycaw,[
|
||||
'id_cawangan'=> $cawangan['id'],
|
||||
'cawangan'=>$cawangan['caw_name'],
|
||||
'id_cawangan'=> $cawlel['caw_id'],
|
||||
'cawangan' => $cawlel->cawangan->caw_name,
|
||||
't_lelong'=>$lelong['tarikh_lelong'],
|
||||
'bil_marhun'=>sizeof($databid),
|
||||
'bil_marhun'=>sizeof($cawlel->lelongBid),
|
||||
'berat'=>$berat,
|
||||
'n_marhun'=>$nilai_marhun,
|
||||
'pinjaman'=>$pinjaman,
|
||||
@@ -6416,55 +6414,56 @@ class LelongController extends Controller
|
||||
'bakilelong'=>$bakilelong,
|
||||
]);
|
||||
|
||||
$total_marhun = $total_marhun + sizeof($databid);
|
||||
$total_berat = $total_berat + $berat;
|
||||
$total_pinjaman = $total_pinjaman + $pinjaman;
|
||||
$total_hargaasas = $total_hargaasas + $hargaasas;
|
||||
$total_hargajual = $total_hargajual + $hargajual;
|
||||
$total_cazlelong = $total_cazlelong + $cajlelong;
|
||||
$total_rugilelong = $total_rugilelong + $rugilelong;
|
||||
$total_bakilelong = $total_bakilelong + $bakilelong;
|
||||
$total_nilaimarhun = $total_nilaimarhun + $nilai_marhun;
|
||||
$total_bakiupah = $total_bakiupah + $bakiupah;
|
||||
$total_marhun += sizeof($cawlel->lelongBid);
|
||||
$total_nilaimarhun += $nilai_marhun;
|
||||
$total_pinjaman += $pinjaman;
|
||||
$total_bakiupah += $bakiupah;
|
||||
$total_rugilelong += $rugilelong;
|
||||
$total_bakilelong += $bakilelong;
|
||||
$total_cazlelong += $cajlelong;
|
||||
$total_berat += $berat;
|
||||
$total_hargaasas += $hargaasas;
|
||||
$total_hargajual += $hargajual;
|
||||
|
||||
|
||||
$data = Lelong::where('lelong.id','=',$lelong_id)
|
||||
->first();
|
||||
// $data = Lelong::with('cawangan')
|
||||
// ->where('lelong.id','=',$lelong_id)
|
||||
// ->get();
|
||||
// // dd($data);
|
||||
}
|
||||
$datacaw = Cawangan::where('id','=',$caw->id)
|
||||
->get();
|
||||
// $datacaw = Cawangan::where('id','=',$caw->id)
|
||||
// ->get();
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.lelreportpcdone',compact('datacaw','arraycaw',
|
||||
'total_marhun',
|
||||
'total_berat',
|
||||
'total_nmarhun',
|
||||
'total_pinjaman',
|
||||
'total_upah',
|
||||
'total_hargaasas',
|
||||
'total_hargajual',
|
||||
'total_cazlelong',
|
||||
'total_rugilelong',
|
||||
'total_bakilelong',
|
||||
'total24Kgb',
|
||||
'total24K',
|
||||
'total23k',
|
||||
'total22K',
|
||||
'total21K',
|
||||
'total20K',
|
||||
'total18Kp',
|
||||
'total18K',
|
||||
'total14Kp',
|
||||
'total14K',
|
||||
'total9K',
|
||||
'lelkarat',
|
||||
'lelong_id',
|
||||
'jeniskarat',
|
||||
'data',
|
||||
'total_bakiupah',
|
||||
'total_nilaimarhun'
|
||||
))->setPaper('a4', 'potrait');
|
||||
return $pdf->download('Laporan Lelong Cawangan.pdf');
|
||||
$pdf = PDF::loadView('pdf.lelreportpcdone',compact('arraycaw',
|
||||
'total_marhun',
|
||||
'total_berat',
|
||||
'total_nmarhun',
|
||||
'total_pinjaman',
|
||||
'total_upah',
|
||||
'total_hargaasas',
|
||||
'total_cazlelong',
|
||||
'total_rugilelong',
|
||||
'total_bakilelong',
|
||||
'total_hargajual',
|
||||
'total24Kgb',
|
||||
'total24K',
|
||||
'total23k',
|
||||
'total22K',
|
||||
'total21K',
|
||||
'total20K',
|
||||
'total18Kp',
|
||||
'total18K',
|
||||
'total14Kp',
|
||||
'total14K',
|
||||
'total9K',
|
||||
'lelkarat',
|
||||
'lelong_id',
|
||||
'jeniskarat',
|
||||
'data',
|
||||
'total_bakiupah',
|
||||
'total_nilaimarhun','tarikhkemaskini'
|
||||
))->setPaper('a4', 'landscape');
|
||||
return $pdf->download('Laporan Lelong Cawangan.pdf');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -13,174 +13,316 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<div class="alert mt-2 alert-success">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@elseif ($message = Session::get('failed'))
|
||||
<div class="alert mt-2 alert-danger">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@endif
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-bordered text-center" id="senarailelongtaklaku" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Fasa</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Masa Tamat Lelong</th>
|
||||
<th>Harga Emas Asas (RM)</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Caj Lelong (%)</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arraydetails as $data)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>{{ $data['laporan']['lelong_id'] }}</td>
|
||||
<td>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['laporan']['tarikh_lelong'] );
|
||||
$t_lelong = $myDateTime->format('d-m-Y');
|
||||
echo($t_lelong);
|
||||
@endphp</td>
|
||||
<td>{{$data['laporan']['fasa']}}</td>
|
||||
<td align = 'left'>
|
||||
@foreach($data['details'] as $details)
|
||||
<span class="m-2">{{$details['caw_name']}}</span><br>
|
||||
@endforeach
|
||||
</td>
|
||||
<td> @if($data['laporan']['masatamat_lelong'] == 0)
|
||||
{{$data['laporan']['masatamat_lelong']}}
|
||||
@else
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('H:i:s', $data['laporan']['masatamat_lelong'] );
|
||||
$masa_lelong = $myDateTime->format('h:i: a');
|
||||
echo($masa_lelong);
|
||||
|
||||
@endphp
|
||||
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>{{$data['laporan']['harga_emas_asas']}}</td>
|
||||
<td>{{$data['laporan']['jbg']}}</td>
|
||||
<td>{{$data['laporan']['cajlelong']}}</td>
|
||||
|
||||
<td class="text-center">
|
||||
@hasrole('pengurus-cawangan')
|
||||
<div class="row justify-content-center">
|
||||
@if($data['laporan']['sts_lelong'] == 0)
|
||||
<button class="btn btn-info btn-sm" disabled>LELONGAN BELUM MULA</button>
|
||||
@elseif($data['laporan']['sts_lelong'] == 1)
|
||||
<button class="btn btn-warning btn-sm" disabled>LELONGAN SEDANG DIJALANKAN</button>
|
||||
@elseif($data['laporan']['sts_lelong'] == 2)
|
||||
<button class="btn btn-primary btn-sm" disabled>JANA PEMENANG</button>
|
||||
@elseif($data['laporan']['sts_lelong'] == 3)
|
||||
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
|
||||
{{-- <a href="{{ route('lelong.exportDataByCawangan', $data['laporan']['lelong_id']) }}" class="btn btn-primary btn-sm">EXPORT <i class="fas fa-file-export"></i></a> --}}
|
||||
@endif
|
||||
|
||||
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="scan-keluar-tab" data-toggle="tab" href="#scan-keluar" role="tab" aria-controls="scan-keluar" aria-selected="false">
|
||||
Lelong Belum Mula ( {{sizeof($arraydetails0)}}/{{sizeof($lelongAll)}} )
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="sedang-lelong-tab" data-toggle="tab" href="#sedang-lelong" role="tab" aria-controls="sedang-lelong" aria-selected="false">
|
||||
Sedang Lelong ( {{sizeof($arraydetails1)}}/{{sizeof($lelongAll)}} )
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="jana-pemenang-tab" data-toggle="tab" href="#jana-pemenang" role="tab" aria-controls="jana-pemenang" aria-selected="false">
|
||||
Lelong Jana Pemenang ( {{sizeof($arraydetails2)}}/{{sizeof($lelongAll)}} )
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="scan-masuk-tab" data-toggle="tab" href="#scan-masuk" role="tab" aria-controls="scan-masuk" aria-selected="false">
|
||||
Lelong Selesai ( {{sizeof($arraydetails3)}}/{{sizeof($lelongAll)}} )
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="tab-content" style="overflow-x: auto;" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="scan-keluar" role="tabpanel" aria-labelledby="scan-keluar-tab">
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table table-bordered text-center" id="lelong-belum">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Fasa</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Harga Emas Asas</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Status</th>
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arraydetails0 as $lelong)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>{{$lelong->id}}</td>
|
||||
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
|
||||
<td>{{$lelong->fasa}}</td>
|
||||
<td>
|
||||
@foreach($lelong->cawangan as $cawangan)
|
||||
<div class="row m-1 justify-content-center">
|
||||
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>{{$lelong->harga_emas_asas}}</td>
|
||||
<td>{{$lelong->jbg}}</td>
|
||||
<td>{{$lelong->cajlelong}}</td>
|
||||
<td><span class="badge badge-pill badge-info">LELONG BELUM MULA</span></td>
|
||||
<td style="white-space: nowrap;">
|
||||
{{-- <a class="btn m-1 btn-warning confirmrefresh" href="{{ route('lelong.kemaskinidata',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Lelong"><i class="fas fa-sync-alt"></i></a> --}}
|
||||
<a class="btn m-1 btn-primary" href="{{ route('jananotis.showlelongpc',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Lelong"><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endhasrole
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@hasrole('pengurus-cawangan')
|
||||
<div class="row justify-content-center">
|
||||
@if($data['laporan']['sts_lelong'] == 0)
|
||||
{{-- <a class="btn m-1 btn-warning confirmrefresh" href="{{ route('jananotis.kemaskinidatapc',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Lelong"><i class="fas fa-sync-alt"></i></a> --}}
|
||||
{{-- <a href="{{ route('lelonghargajual.kemaskinidata',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Data" style="margin-right:40px"><i class="fas fa-sync-alt"></i></a> --}}
|
||||
<a class="btn m-1 btn-primary" href="{{ route('jananotis.showlelongpc',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong" style="margin-right:40px" ><i class="far fa-edit"></i></a>
|
||||
@elseif($data['laporan']['sts_lelong'] == 3)
|
||||
{{-- <a href="{{ route('lelonghargajual.kemaskinidata',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Data" style="margin-right:40px"><i class="fas fa-sync-alt"></i></a> --}}
|
||||
<a class="btn m-1 btn-success" href="{{ route('jananotis.showlelongpcdone',$data['laporan']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong" style="margin-right:40px" ><i class="far fa-calendar"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="tab-pane fade" id="sedang-lelong" role="tabpanel" aria-labelledby="sedang-keluar-tab">
|
||||
<div style="overflow-x: auto;">
|
||||
|
||||
<table class="table table-bordered text-center" id="lelong-sedang">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Fasa</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Masa Mula Lelong</th>
|
||||
<th>Masa Tamat Lelong</th>
|
||||
<th>Harga Emas Asas</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arraydetails1 as $lelong)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>{{$lelong->id}}</td>
|
||||
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
|
||||
<td>{{$lelong->fasa}}</td>
|
||||
<td>
|
||||
@foreach($lelong->cawangan as $cawangan)
|
||||
<div class="row m-1 justify-content-center">
|
||||
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>{{$lelong->masamula_lelong}}</td>
|
||||
<td>{{$lelong->masatamat_lelong}}</td>
|
||||
<td>{{$lelong->harga_emas_asas}}</td>
|
||||
<td>{{$lelong->jbg}}</td>
|
||||
<td>{{$lelong->cajlelong}}</td>
|
||||
<td><span class="badge badge-pill badge-warning">LELONG SEDANG DIJANLANKAN</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endhasrole
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="jana-pemenang" role="tabpanel" aria-labelledby="jana-pemenang-tab">
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table table-bordered text-center" id="lelong-selesai">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Fasa</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Masa Tamat Lelong</th>
|
||||
<th>Harga Emas Asas</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arraydetails2 as $data)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>{{$lelong->id}}</td>
|
||||
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
|
||||
<td>{{$lelong->fasa}}</td>
|
||||
<td>
|
||||
@foreach($lelong->cawangan as $cawangan)
|
||||
<div class="row m-1 justify-content-center">
|
||||
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>{{$lelong->masatamat_lelong}}</td>
|
||||
<td>{{$lelong->harga_emas_asas}}</td>
|
||||
<td>{{$lelong->jbg}}</td>
|
||||
<td>{{$lelong->cajlelong}}</td>
|
||||
<td><span class="badge badge-pill badge-dark">LELONG JANA PEMENANGAN</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="scan-masuk" role="tabpanel" aria-labelledby="scan-masuk-tab">
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table table-bordered text-center" id="lelong-jana-pemenang">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Fasa</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Masa Mula Lelong</th>
|
||||
<th>Masa Tamat Lelong</th>
|
||||
<th>Harga Emas Asas</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Status</th>
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($arraydetails3 as $lelong)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>{{$lelong->id}}</td>
|
||||
<td style="white-space: nowrap;">{{$lelong->tarikh_lelong}}</td>
|
||||
<td>{{$lelong->fasa}}</td>
|
||||
<td>
|
||||
@foreach($lelong->cawangan as $cawangan)
|
||||
<div class="row m-1 justify-content-center">
|
||||
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$cawangan->caw_name}}</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>{{$lelong->masamula_lelong}}</td>
|
||||
<td>{{$lelong->masatamat_lelong}}</td>
|
||||
<td>{{$lelong->harga_emas_asas}}</td>
|
||||
<td>{{$lelong->jbg}}</td>
|
||||
<td>{{$lelong->cajlelong}}</td>
|
||||
<td><span class="badge badge-pill badge-success">LELONG SELESAI</span></td>
|
||||
<td style="white-space: nowrap;">
|
||||
{{-- <a class="btn m-1 btn-info" href="{{ route('lelong.showsimulasi',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Lihat Simulasi"><i class="far fa-edit"></i></a> --}}
|
||||
<a class="btn m-1 btn-warning" href="{{ route('jananotis.showlelongpcdone',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong Selesai"><i class="far fa-calendar"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Confirmation',
|
||||
content: 'Anda pasti?',
|
||||
type: 'orange',
|
||||
title: 'Padam Simulasi',
|
||||
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
||||
icon: 'fa fa-exclamation-triangle',
|
||||
type: 'red',
|
||||
boxWidth: '500px',
|
||||
useBootstrap: false,
|
||||
typeAnimated: true,
|
||||
buttons: {
|
||||
Delete: {
|
||||
btnClass: 'btn-warning',
|
||||
action: function () {
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function () {}
|
||||
}
|
||||
action: function() {}
|
||||
},
|
||||
Padam: {
|
||||
btnClass: 'btn-red',
|
||||
action: function() {
|
||||
location.href = this.$target.attr('href');
|
||||
$.dialog({
|
||||
icon: 'fa fa-spinner fa-spin',
|
||||
title: 'Dalam Proses !',
|
||||
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
||||
closeIcon: false,
|
||||
boxWidth: '500px',
|
||||
useBootstrap: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$('a.confirmrefresh').confirm({
|
||||
title: 'Kemaskini Simulasi',
|
||||
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
||||
icon: 'fa fa-exclamation-triangle',
|
||||
type: 'orange',
|
||||
boxWidth: '500px',
|
||||
useBootstrap: false,
|
||||
typeAnimated: true,
|
||||
buttons: {
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function() {}
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 7,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 99999999,
|
||||
dom: 'Bfrtip',
|
||||
// buttons: [
|
||||
// // 'copy', 'excel', 'pdf'
|
||||
// // { text: 'copy', className: 'btn btn-primary' },
|
||||
// // {
|
||||
// // className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
||||
// // text: '<i class="fas fa-plus" id="test"></i>',
|
||||
// // titleAttr: 'Tambah Simulasi',
|
||||
// // action: function ( e, dt, node, config ) {
|
||||
// // alert( 'Button activated' );
|
||||
// // }
|
||||
// // },
|
||||
// {
|
||||
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
// titleAttr: 'Export to CSV',
|
||||
// text: '<i class="fas fa-download"></i>',
|
||||
// action: function ( e, dt, node, config ) {
|
||||
// $("#exportform").submit();
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
Kemaskini: {
|
||||
btnClass: 'btn-orange',
|
||||
action: function() {
|
||||
location.href = this.$target.attr('href');
|
||||
$.dialog({
|
||||
icon: 'fa fa-spinner fa-spin',
|
||||
title: 'Dalam Proses !',
|
||||
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
||||
closeIcon: false,
|
||||
boxWidth: '500px',
|
||||
useBootstrap: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$('.addsim').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.addsim').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
$('.addsim').removeClass('dt-button');
|
||||
$('.export').removeClass('dt-button');
|
||||
|
||||
function selectall(cb) {
|
||||
tablelelong.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
var tableLelongSemasa = $('#lelong-semasa').DataTable({
|
||||
"pageLength": 100,
|
||||
});
|
||||
var tableLelongSedang = $('#lelong-sedang').DataTable({
|
||||
"pageLength": 100,
|
||||
});
|
||||
var tableLelongBelum = $('#lelong-belum').DataTable({
|
||||
"pageLength": 100,
|
||||
});
|
||||
var tableLelongJanaPemenang = $('#lelong-jana-pemenang').DataTable({
|
||||
"pageLength": 100,
|
||||
});
|
||||
var tableLelongSelesai = $('#lelong-selesai').DataTable({
|
||||
"pageLength": 100,
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
<div class="card-header header-style">
|
||||
<a href="{{ route('jananotis.senarailelongpcdone') }}" class="header-style-icon">
|
||||
<a href="{{ route('jananotis.senarailelongpc') }}" class="header-style-icon">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
@@ -157,7 +157,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">RM</div>
|
||||
</div>
|
||||
<input type="text" readonly class="form-control bg-light" value="(RM{{ number_format($total_rugilelong, 2, '.', ',') }})">
|
||||
<input type="text" readonly class="form-control bg-light" value="({{ number_format($total_rugilelong, 2, '.', ',') }})">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -78,18 +78,18 @@
|
||||
<body>
|
||||
|
||||
<header>
|
||||
@foreach($datacaw as $data1)
|
||||
<u><b><h5>LAPORAN LELONGAN CAWANGAN: {{$data1['caw_name']}}</h5></b></u>
|
||||
@endforeach
|
||||
@foreach ($arraycaw as $cawangan)
|
||||
<u><b><h5>LAPORAN LELONGAN CAWANGAN: {{$cawangan['cawangan']}}</h5></b></u>
|
||||
|
||||
</header>
|
||||
|
||||
<div class = 'row'>Tarikh Lelong :@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $data['tarikh_lelong'] );
|
||||
$datez = $myDateTime->format('d-m-Y');
|
||||
$myDateTime1 = DateTime::createFromFormat('Y-m-d', $cawangan['t_lelong'] );
|
||||
$datez = $myDateTime1->format('d-m-Y');
|
||||
echo($datez);
|
||||
@endphp</div>
|
||||
<div class = 'row'>Tempoh: {{ $data['jbg']}}</div>
|
||||
|
||||
<div class = 'row'>Harga Emas Lelong: RM {{ $tarikhkemaskini->harga2}} /gram</div>
|
||||
@endforeach
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user