Merge branch 'atie' into 'main'
update pengesahan oleh pc See merge request online-sistem1/lelong!281
This commit is contained in:
@@ -620,6 +620,7 @@ class LelongController extends Controller
|
||||
$lelongbidmarhun->bil = $simbidmarhun->bil;
|
||||
$lelongbidmarhun->marhun = $simbidmarhun->marhun;
|
||||
$lelongbidmarhun->nota = $simbidmarhun->nota;
|
||||
$lelongbidmarhun->old_marhun = $simbidmarhun->marhun;
|
||||
$lelongbidmarhun->old_karat = $simbidmarhun->karat;
|
||||
$lelongbidmarhun->old_berat = $simbidmarhun->berat;
|
||||
$lelongbidmarhun->old_harga = $simbidmarhun->harga;
|
||||
|
||||
@@ -1730,10 +1730,11 @@ class MarhunController extends Controller
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
$cawangan = Pengesahan::join('users', 'pengesahan.diminta_oleh', 'users.id')
|
||||
->where('pengesahan.lelong_id', $id)
|
||||
$cawangan = Pengesahan::where('pengesahan.lelong_id', $id)
|
||||
->where('pengesahan.status', 1)
|
||||
->whereNotNull('pengesahan.disahkan_oleh')
|
||||
->select('pengesahan.diminta_oleh','pengesahan.disahkan_oleh', 'pengesahan.disahkan_pada', 'pengesahan.norujukan', 'pengesahan.lelong_id', 'users.id as user_id', 'users.name', 'users.username', 'users.kodcaw')
|
||||
->select('pengesahan.lelongbid_id','pengesahan.diminta_oleh','pengesahan.disahkan_oleh', 'pengesahan.disahkan_pada', 'pengesahan.norujukan', 'pengesahan.lelong_id')
|
||||
->orderBy('pengesahan.lelongbid_id')
|
||||
->distinct()
|
||||
->get();
|
||||
// dd($cawangan);
|
||||
@@ -1741,6 +1742,7 @@ class MarhunController extends Controller
|
||||
foreach($cawangan as $index1=>$caw)
|
||||
{
|
||||
// dd($caw);
|
||||
|
||||
$getpengesahan = Cawangan::where('caw_code', $caw['kodcaw'])->first();
|
||||
// dd($getpengesahan);
|
||||
|
||||
@@ -1748,9 +1750,22 @@ class MarhunController extends Controller
|
||||
$getdimintaoleh = User::where('id', $caw['diminta_oleh'])->first();
|
||||
// dd($getdisahkanoleh);
|
||||
|
||||
$cawangan[$index1]['namacaw'] = $getpengesahan['caw_name'];
|
||||
// dd(/$caw['lelongbid_id']);
|
||||
$status = Pengesahan::where('lelongbid_id', $caw['lelongbid_id'])
|
||||
->select('id as sahid','status_ubah', 'request_karat', 'request_berat', 'request_marhun')
|
||||
->get();
|
||||
// dump($status);
|
||||
|
||||
// $marhun= LelongBidMarhun::where('lelongbid_id','=',$caw['lelongbid_id'])
|
||||
// ->get();
|
||||
$marhuns = LelongBidMarhun::where('lelongbid_id', $caw['lelongbid_id'])
|
||||
->get()->toArray();
|
||||
// dd($marhuns);
|
||||
// $cawangan[$index1]['namacaw'] = $getpengesahan['caw_name'];
|
||||
$cawangan[$index1]['disahkan_oleh'] = $getdisahkanoleh['name'];
|
||||
$cawangan[$index1]['diminta_oleh'] = $getdimintaoleh['name'];
|
||||
$cawangan[$index1]['detailmarhun']=$status;
|
||||
$cawangan[$index1]['detail']=$marhuns;
|
||||
}
|
||||
|
||||
return view('pengesahan.listperubahanmutumarhun', compact('cawangan', 'id'));
|
||||
@@ -2386,5 +2401,7 @@ class MarhunController extends Controller
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -123,7 +123,8 @@ class CreateLelongsTable extends Migration
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('lelongbid_id')->unsigned();
|
||||
$table->decimal('bil', $precision = 3, $scale = 0);
|
||||
$table->string('marhun');
|
||||
$table->string('old_marhun');
|
||||
$table->string('marhun');
|
||||
$table->string('nota')->nullable();
|
||||
$table->string('old_karat');
|
||||
$table->string('karat');
|
||||
|
||||
@@ -169,11 +169,11 @@
|
||||
@elseif($status['status'] == 1)
|
||||
<button style="width:7%;" class="btn btn-info" >Telah Sah</button>
|
||||
@else
|
||||
<button style="width:7%;" class="btn btn-success" onclick="confirm()">Semak1</button>
|
||||
<button style="width:7%;" class="btn btn-success" onclick="confirm()">Semak1/button>
|
||||
@endif
|
||||
|
||||
@else
|
||||
<button style="width:7%;" class="btn btn-success" onclick="confirm()">Semak2</button>
|
||||
<button style="width:7%;" class="btn btn-success" onclick="confirm()">Semak</button>
|
||||
@endif
|
||||
{{-- <button style="width:7%;" class="btn btn-warning">Dalam Proses Pengesahan</button> --}}
|
||||
@elseif($lelongbid->status_semak == 1)
|
||||
|
||||
@@ -13,40 +13,104 @@
|
||||
Senarai SAG: Pengesahan Oleh PC
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
|
||||
<table class='table text-center table-bordered table-hover' id="tablelelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>ID Lelong</th>
|
||||
<th>Cawangan</th>
|
||||
{{-- <th>ID Lelong</th> --}}
|
||||
{{-- <th>Cawangan</th> --}}
|
||||
<th>No Rujukan</th>
|
||||
<th>Perubahan</th>
|
||||
<th>Marhun Asal</th>
|
||||
<th>Marhun Baru</th>
|
||||
<th>Mutu Asal</th>
|
||||
<th>Mutu Baru</th>
|
||||
<th>Berat Asal (gm)</th>
|
||||
<th>Berat Baru (gm)</th>
|
||||
<th>Status</th>
|
||||
<th>Diminta Oleh</th>
|
||||
<th>Disahkan Oleh</th>
|
||||
{{-- <th>Diminta Oleh</th>
|
||||
<th>Disahkan Oleh</th> --}}
|
||||
<!-- <th class="text-center">Action</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($cawangan as $marhun)
|
||||
{{-- @foreach($cawangan as $marhun) --}}
|
||||
@forelse($cawangan as $marhun)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $marhun['lelong_id'] }}</td>
|
||||
<td align = 'left'>{{ $marhun['namacaw'] }}</td>
|
||||
{{-- <td>{{ $marhun['lelong_id'] }}</td> --}}
|
||||
{{-- <td align = 'left'>{{ $marhun['namacaw'] }}</td> --}}
|
||||
<td>{{ $marhun['norujukan'] }}</td>
|
||||
<td>
|
||||
<button class="btn btn-success btn-sm hovernone-success" disabled>BERJAYA DISAHKAN</button>
|
||||
<td>{{ $marhun['diminta_oleh'] }}</td>
|
||||
<td>{{ $marhun['disahkan_oleh'] }}</td>
|
||||
{{-- {{dd($marhun['detailmarhun'])}} --}}
|
||||
<td>@foreach ($marhun['detailmarhun'] as $item)
|
||||
@if($item['status_ubah'] == 1)
|
||||
Mutu
|
||||
@elseif($item['status_ubah'] == 2)
|
||||
Pertambahan Marhun
|
||||
@elseif($item['status_ubah'] == 3)
|
||||
Hapus Marhun
|
||||
@elseif($item['status_ubah'] == 4)
|
||||
Berat
|
||||
@elseif($item['status_ubah'] == 5)
|
||||
Mutu & Berat
|
||||
@elseif($item['status_ubah'] == 7)
|
||||
Marhun
|
||||
@elseif($item['status_ubah'] == 8)
|
||||
Mutu, Berat & Marhun
|
||||
@elseif($item['status_ubah'] == 9)
|
||||
Mutu & Marhun
|
||||
@elseif($item['status_ubah'] == 10)
|
||||
Berat & Marhun
|
||||
@endif
|
||||
<br>
|
||||
@endforeach</td>
|
||||
<td>@foreach ($marhun['detail'] as $item)
|
||||
{{$item['old_marhun']}}<br>
|
||||
@endforeach</td>
|
||||
<td>@foreach ($marhun['detailmarhun'] as $item)
|
||||
@if($item['request_marhun'] == null)
|
||||
@else
|
||||
<i class="btn fa fa-arrow-right" aria-hidden="true" style="font-size: 10px"></i>
|
||||
@endif {{$item['request_marhun']}}<br>
|
||||
@endforeach</td>
|
||||
<td>@foreach ($marhun['detail'] as $item)
|
||||
{{$item['old_karat']}}<br>
|
||||
@endforeach</td>
|
||||
<td>@foreach ($marhun['detailmarhun'] as $item)
|
||||
@if($item['request_karat'] == null)
|
||||
@else
|
||||
<i class="btn fa fa-arrow-right" aria-hidden="true" style="font-size: 10px"></i>
|
||||
@endif{{$item['request_karat']}}<br>
|
||||
@endforeach</td>
|
||||
<td>@foreach ($marhun['detail'] as $item)
|
||||
{{$item['old_berat']}}<br>
|
||||
@endforeach</td>
|
||||
<td>@foreach ($marhun['detailmarhun'] as $item)
|
||||
@if($item['request_berat'] == null)
|
||||
@else
|
||||
<i class="btn fa fa-arrow-right" aria-hidden="true" style="font-size: 10px"></i>
|
||||
@endif{{$item['request_berat']}}<br>
|
||||
@endforeach</td>
|
||||
|
||||
<td><button class="btn btn-success btn-sm hovernone-success" disabled>BERJAYA DISAHKAN</button></td>
|
||||
{{-- <td>{{ $marhun['diminta_oleh'] }}</td> --}}
|
||||
{{-- <td>{{ $marhun['disahkan_oleh'] }}</td> --}}
|
||||
<!-- <td>
|
||||
<a href=" {{ route('pengesahan.detailmutumarhun', ['norujukan'=>$marhun['norujukan'], $id]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Mutu Marhun"><i class="far fa-edit"></i></a>
|
||||
</td> -->
|
||||
</tr>
|
||||
@endforeach
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7">No Data</td>
|
||||
</tr>
|
||||
|
||||
@endforelse
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user