Merge branch 'amir_dev' into 'main'

fix kemaskini marhun

See merge request online-sistem1/lelong!203
This commit is contained in:
Nur Izzati Zulkifli
2022-09-25 01:53:56 +00:00
13 changed files with 316 additions and 187 deletions
+107 -69
View File
@@ -19,10 +19,9 @@ use App\Models\LelongBid;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
use App\Models\LelKarat_temp;
use App\Models\Pengesahan;
use App\Models\GadaiMarhun;
use App\Models\ScanMarhun;
use App\Models\ScanSemak;
use App\Models\TangguhLelong;
use Carbon\Carbon;
@@ -360,24 +359,43 @@ class MarhunController extends Controller
$lelongbid = LelongBid::where('id','=',$lelongBidMarhun->lelongbid_id)->first();
$lelong = Lelong::where('id','=',$lelongbid->lelong_id)->first();
$perluPengesahan = false;
$parameterBezaBerat = 0.3;
// $perluPengesahan = false;
$parameterBezaBerat = 0.3; //parameterBezaBerat = (berat sebelum) - (berat selepas)
$bezaBerat = $lelongBidMarhun->berat - $request->berat_emas;
if ($bezaBerat > $parameterBezaBerat) {
$perluPengesahan = true;
$lelongBidMarhun->berat = $request->berat_emas;
$lelongBidMarhun->update();
$pengesahan = new Pengesahan;
$pengesahan->lelong_id = $lelong->id;
$pengesahan->lelongbid_id = $lelongbid->id;
$pengesahan->lelongbidmarhun_id = $lelongBidMarhun->id;
$pengesahan->norujukan = $lelongbid->norujukan;
$pengesahan->diminta_oleh = $user->id;
$pengesahan->diminta_pada = $currentdate;
$pengesahan->status_ubah = 4;
$pengesahan->request_data = $request->berat_emas;
$pengesahan->save();
}
else if ($lelongBidMarhun->karat > $request->karat) {
$perluPengesahan = true;
$lelongBidMarhun->karat = $request->karat;
$lelongBidMarhun->update();
} else {
$lelongBidMarhun->id;
$pengesahan = new Pengesahan;
$pengesahan->lelong_id = $lelong->id;
$pengesahan->lelongbid_id = $lelongbid->id;
$pengesahan->lelongbidmarhun_id = $lelongBidMarhun->id;
$pengesahan->norujukan = $lelongbid->norujukan;
$pengesahan->diminta_oleh = $user->id;
$pengesahan->diminta_pada = $currentdate;
$pengesahan->status_ubah = 1;
$pengesahan->request_data = $request->karat;
$pengesahan->save();
}
else {
// $lelongBidMarhun->id;
$lelongBidMarhun->marhun = $request->marhun;
$lelongBidMarhun->old_berat = $lelongBidMarhun->berat;
$lelongBidMarhun->old_karat = $lelongBidMarhun->karat;
$lelongBidMarhun->old_nmarhun = $lelongBidMarhun->n_marhun;
$lelongBidMarhun->berat = $request->berat_emas;
$lelongBidMarhun->karat = $request->karat;
$lelongBidMarhun->n_marhun = $request->berat_emas * $lelongBidMarhun->harga;
$lelongBidMarhun->update();
// $existingPengesahan = Pengesahan::where('lelongbidmarhun_id', '=', $request->idmarhun)
@@ -385,34 +403,37 @@ class MarhunController extends Controller
// ->delete();
}
if ($perluPengesahan == true) {
$pengesahan = Pengesahan::where('lelongbidmarhun_id', $request->idmarhun)
->where('lelongbid_id', $lelongBidMarhun->lelongbid_id)
->first();
// if ($perluPengesahan == true) {
// $pengesahan = Pengesahan::where('lelongbidmarhun_id', $request->idmarhun)
// ->where('lelongbid_id', $lelongBidMarhun->lelongbid_id)
// ->first();
if(!$pengesahan)
{
$pengesahan = new Pengesahan;
$pengesahan->lelong_id = $lelong->id;
$pengesahan->lelongbid_id = $lelongbid->id;
$pengesahan->lelongbidmarhun_id = $lelongBidMarhun->id;
$pengesahan->norujukan = $lelongbid->norujukan;
$pengesahan->diminta_oleh = $user->id;
$pengesahan->diminta_pada = $currentdate;
$pengesahan->status_ubah = 1;
$pengesahan->save();
} else {
$pengesahan->id;
$pengesahan->lelong_id = $lelong->id;
$pengesahan->lelongbid_id = $lelongbid->id;
$pengesahan->lelongbidmarhun_id = $lelongBidMarhun->id;
$pengesahan->norujukan = $lelongbid->norujukan;
$pengesahan->diminta_oleh = $user->id;
$pengesahan->diminta_pada = $currentdate;
$pengesahan->status_ubah = 1;
$pengesahan->update();
}
}
// if(!$pengesahan)
// {
// $pengesahan = new Pengesahan;
// $pengesahan->lelong_id = $lelong->id;
// $pengesahan->lelongbid_id = $lelongbid->id;
// $pengesahan->lelongbidmarhun_id = $lelongBidMarhun->id;
// $pengesahan->norujukan = $lelongbid->norujukan;
// $pengesahan->diminta_oleh = $user->id;
// $pengesahan->diminta_pada = $currentdate;
// $pengesahan->status_ubah = 1;
// $pengesahan->save();
// } else {
// $pengesahan->id;
// $pengesahan->lelong_id = $lelong->id;
// $pengesahan->lelongbid_id = $lelongbid->id;
// $pengesahan->lelongbidmarhun_id = $lelongBidMarhun->id;
// $pengesahan->norujukan = $lelongbid->norujukan;
// $pengesahan->diminta_oleh = $user->id;
// $pengesahan->diminta_pada = $currentdate;
// $pengesahan->status_ubah = 1;
// $pengesahan->update();
// }
// }
// dd($lelongBidMarhun);
// $totallelbid = LelongBid::where('id', $lelongBidMarhun->lelongbid_id)->first();
// dd($totallelbid);
@@ -472,6 +493,15 @@ class MarhunController extends Controller
}
public function senaraiLelongTerimaSerah()
{
$lelong = Lelong::orderBy('id', 'desc')->get();
return view('marhun.senarailelongterimaserah', compact('lelong'));
}
public function senarailelongscan(Request $request){
$user = Auth::user();
@@ -1176,25 +1206,35 @@ class MarhunController extends Controller
}
public function terimaserahmarhun()
public function terimaserahmarhun($lelong_id)
{
$user = Auth::user();
$caw = Cawangan::where('caw_code', '=', $user->kodcaw)->first();
$senaraiScanKeluar = ScanMarhun::where('kodcaw', '=', $caw->caw_code)
->whereNull('masa_terima')
$senaraiScanKeluar = ScanSemak::where('kodcaw', '=', $caw->caw_code)
->where('lelong_id', $lelong_id)
->whereNull('terima_marhun')
->orderBy('id', 'desc')
->get();
$sedangDinilai = ScanMarhun::whereNull('masa_serah')
->orderBy('id', 'desc')
->get();
$sedangDinilai = ScanSemak::where('kodcaw', '=', $caw->caw_code)
->whereNotNull('terima_marhun')
->whereNull('serah_marhun')
->where('lelong_id', $lelong_id)
->orderBy('id', 'desc')
->get();
$sudahSerah = ScanMarhun::whereNotNull('masa_serah')
->orderBy('id', 'desc')
->get();
$sudahSerah = ScanSemak::where('kodcaw', '=', $caw->caw_code)
->whereNotNull('serah_marhun')
->where('lelong_id', $lelong_id)
->orderBy('id', 'desc')
->get();
return view('marhun.terimaserahmarhun', compact('senaraiScanKeluar', 'sedangDinilai', 'sudahSerah'));
if ($senaraiScanKeluar || $sedangDinilai || $sudahSerah) {
return view('marhun.terimaserahmarhun', compact('senaraiScanKeluar', 'sedangDinilai', 'sudahSerah'));
} else {
return redirect()->route('marhun.senarailelongterimaserah')->with('failed', 'Tiada Surat Untuk Dilelong Pada Tarikh Ini.');
}
}
public function terimaMarhun(Request $request)
@@ -1203,12 +1243,12 @@ class MarhunController extends Controller
$current = Carbon::now();
foreach ($request->scanKeluar_id as $index) {
$terimaMarhun = ScanMarhun::where('id', '=', $index)->first();
$terimaMarhun = ScanSemak::where('id', '=', $index)->first();
$terimaMarhun->penilai_id = $user->id;
$terimaMarhun->masa_terima = $current->toTimeString();
$terimaMarhun->terima_marhun = $current->toDateTimeString();
$terimaMarhun->update();
}
return redirect()->route('marhun.terimaserahmarhun')->with('success', 'Terima Marhun Berjaya Direkodkan');
return redirect()->route('marhun.terimaserahmarhun', $terimaMarhun->lelong_id)->with('success', 'Terima Marhun Berjaya Direkodkan');
}
public function serahMarhun(Request $request)
@@ -1217,11 +1257,11 @@ class MarhunController extends Controller
$current = Carbon::now();
foreach ($request->sedangDinilai_id as $index) {
$serahMarhun = ScanMarhun::where('id', '=', $index)->first();
$serahMarhun->masa_serah = $current->toTimeString();
$serahMarhun = ScanSemak::where('id', '=', $index)->first();
$serahMarhun->serah_marhun = $current->toDateTimeString();
$serahMarhun->update();
}
return redirect()->route('marhun.terimaserahmarhun')->with('success', 'Serah Marhun Berjaya Direkodkan');
return redirect()->route('marhun.terimaserahmarhun', $serahMarhun->lelong_id)->with('success', 'Serah Marhun Berjaya Direkodkan');
}
public function listScanBarcode($lelong_id)
@@ -1234,15 +1274,15 @@ class MarhunController extends Controller
->where('caw_id', '=', $caw->id)
->get();
$senaraiScanKeluar = ScanMarhun::where('lelong_id', '=', $lelong_id)
$senaraiScanKeluar = ScanSemak::where('lelong_id', '=', $lelong_id)
->where('kodcaw', '=', $caw->caw_code)
->whereNull('masa_scanmasuk')
->whereNull('scan_masuk')
->orderBy('id', 'desc')
->get();
$senaraiScanMasuk = ScanMarhun::where('lelong_id', '=', $lelong_id)
$senaraiScanMasuk = ScanSemak::where('lelong_id', '=', $lelong_id)
->where('kodcaw', '=', $caw->caw_code)
->whereNotNull('masa_scanmasuk')
->whereNotNull('scan_masuk')
->orderBy('id', 'desc')
->get();
@@ -1255,21 +1295,20 @@ class MarhunController extends Controller
$user = Auth::user();
$current = Carbon::now();
$checkExisting = ScanMarhun::where('norujukan', '=', $request->norujukan_barcode)
->whereNull('masa_scanmasuk')
$checkExisting = ScanSemak::where('norujukan', '=', $request->norujukan_barcode)
->whereNull('scan_masuk')
->get();
if ($checkExisting->isEmpty()) {
$lelongbidItem = LelongBid::where('norujukan', '=', $request->norujukan_barcode)->first();
$scanKeluar = new ScanMarhun;
$scanKeluar = new ScanSemak();
$scanKeluar->kodcaw = $lelongbidItem['kodcaw'];
$scanKeluar->lelong_id = $lelongbidItem['lelong_id'];
$scanKeluar->lelongbid_id = $lelongbidItem['id'];
$scanKeluar->norujukan = $lelongbidItem['norujukan'];
$scanKeluar->khazanah_id = $user['id'];
$scanKeluar->tarikh_scankeluar = $current->toDateString();
$scanKeluar->masa_scankeluar = $current->toTimeString();
$scanKeluar->scan_keluar = $current->toDateTimeString();
$scanKeluar->save();
return redirect()->route('marhun.scanbarcode', $request->lelong_id)
@@ -1285,19 +1324,18 @@ class MarhunController extends Controller
$user = Auth::user();
$current = Carbon::now();
$scanMasuk = ScanMarhun::where('norujukan', '=', $request->norujukan_barcode)
->whereNull('masa_scanmasuk')
$scanMasuk = ScanSemak::where('norujukan', '=', $request->norujukan_barcode)
->whereNotNull('serah_marhun')
->first();
if ($scanMasuk) {
$scanMasuk->tarikh_scanmasuk = $current->toDateString();
$scanMasuk->masa_scanmasuk = $current->toTimeString();
$scanMasuk->scan_masuk = $current->toDateTimeString();
$scanMasuk->update();
return redirect()->route('marhun.scanbarcode', $request->lelong_id)
->with('success', 'Marhun Berjaya Di Scan Masuk Ke Peti Besi.');
} else {
return redirect()->route('marhun.scanbarcode', $request->lelong_id)
->with('failed', 'Marhun Gagal Di Scan Masuk Ke Peti Besi.');
->with('failed', 'Gagal Scan, Marhun Belum Diserah Oleh Penilai.');
}
}
@@ -1014,7 +1014,7 @@ class LelongMobileController extends Controller
$lelong[$index]['status'] = $status;
}
if (empty($lelong)) {
if (!empty($lelong)) {
return response()->json([
'success' => true,
'lelong' => $lelong,
+7 -1
View File
@@ -26,7 +26,13 @@ class CawanganLelong extends Model
'lokasi'
];
public function lelongBid(){
public function lelongBid()
{
return $this->hasMany(LelongBid::class, 'caw_id', 'caw_id');
}
public function cawangan()
{
return $this->hasOne(Cawangan::class, 'id');
}
}
+5
View File
@@ -20,4 +20,9 @@ class Lelong extends Model
'cajlelong',
'sts_lelong'
];
public function cawanganLelong()
{
return $this->hasMany(CawanganLelong::class, 'lelong_id');
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ScanSemak extends Model
{
use HasFactory;
protected $table = 'scan_semak';
protected $fillable = [
'kodcaw',
'lelong_id',
'lelongbid_id',
'norujukan',
'khazanah_id',
'penilai_id',
'scan_keluar',
'terima_marhun',
'serah_marhun',
'scan_masuk',
];
}
@@ -26,36 +26,26 @@ class CreatePengesahanTable extends Migration
$table->integer('status')->default(0); //1 = terima, 2 = tangguh lelong
$table->integer('status_ubah')->default(0); //1 = ubah mutu, 2 = tambah marhun, 3 = hapus marhun, 4 = ubah berat, 5 = ubah mutu & berat, 6 = tangguh lelong pc
$table->timestamps();
// $table->foreign('lelong_id')
// ->references('id')->on('lelong')
// ->onDelete('cascade');
// $table->foreign('lelongbid_id')
// ->references('id')->on('lelongbid')
// ->onDelete('cascade');
// $table->foreign('lelongbidmarhun_id')
// ->references('id')->on('lelongbidmarhun')
// ->onDelete('cascade');
});
Schema::create('scanmarhun', function (Blueprint $table) {
Schema::create('scan_semak', function (Blueprint $table) {
$table->id();
$table->string('kodcaw');
$table->unsignedBigInteger('lelong_id')->unsigned();
$table->integer('lelongbid_id');
$table->string('norujukan');
$table->string('khazanah_id', '100');
$table->date('tarikh_scankeluar');
$table->time('masa_scankeluar');
$table->string('penilai_id', '100')->nullable();
$table->time('masa_terima')->nullable();
$table->time('masa_serah')->nullable();
$table->date('tarikh_scanmasuk')->nullable();
$table->time('masa_scanmasuk')->nullable();
$table->datetime('scan_keluar');
$table->datetime('terima_marhun')->nullable();
$table->datetime('serah_marhun')->nullable();
$table->datetime('scan_masuk')->nullable();
$table->timestamps();
});
Schema::create('scan_jual', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
@@ -69,5 +59,7 @@ class CreatePengesahanTable extends Migration
public function down()
{
Schema::dropIfExists('pengesahan');
Schema::dropIfExists('scan_semak');
Schema::dropIfExists('scan_jual');
}
}
+2 -2
View File
@@ -65,8 +65,8 @@
</li>
@endhasrole
@hasrole('penilai')
<li class="{{ (request()->is('marhun/terimaserahmarhun') || request()->is('marhun/terimaserahmarhun/*')) ? 'active' : '' }}">
<a href="{{url('marhun/terimaserahmarhun')}}">Terima/Serah Marhun</a>
<li class="{{ (request()->is('marhun/senarailelongterimaserah') || request()->is('marhun/senarailelongterimaserah/*')) ? 'active' : '' }}">
<a href="{{url('marhun/senarailelongterimaserah')}}">Terima/Serah Marhun</a>
</li>
<li class="{{ (request()->is('marhun/senarailelongmarhun') || request()->is('marhun/senarailelongmarhun/*')) ? 'active' : '' }}">
<a href="{{url('marhun/senarailelongmarhun')}}">Semakan Marhun</a>
+16 -5
View File
@@ -126,11 +126,6 @@
</table>
<div class="modal-footer" style="margin-top:2%;">
@if($lelongbid->status_semak == 0)
@else
<a href="{{ route('marhun.senaraimarhun', $lelong_id) }}" style="width:7%;" class="btn btn-primary">Kembali</a>
@endif
@if($lelongbid->status_semak == 0)
<button style="width:7%;" class="btn btn-success" onclick="confirm()">Semak</button>
@elseif($lelongbid->status_semak == 1)
<button class="btn btn-success btn-sm hovernone-success" disabled>SUDAH DISEMAK</button>
@@ -250,8 +245,12 @@
</form>
</div>
<div class="modal-footer">
@if($lelongbid->status_semak == 0)
<button type="button" class="btn btn-secondary" style="width:15%;" data-dismiss="modal">Kembali</button>
<button type="button" class="btn btn-primary" style="width:15%;" onclick="tambahanmarhun()">Simpan</button>
@elseif($lelongbid->status_semak == 1)
<p class="text-danger font-italic">Marhun telah disemak. Tidak dibenarkan untuk tambah.</p>
@endif
</div>
</div>
@@ -286,8 +285,12 @@
@endif
</div>
<div class="modal-footer">
@if($lelongbid->status_semak == 0)
<button type="button" class="btn btn-secondary" style="width:15%;" onclick="clearData()" data-dismiss="modal">Kembali</button>
<button type="submit" class="btn btn-primary" style="width:15%;">Simpan</button>
@elseif($lelongbid->status_semak == 1)
<p class="text-danger font-italic">Marhun telah disemak. Tidak dibenarkan untuk kemaskini.</p>
@endif
</div>
</form>
@@ -319,8 +322,12 @@
</div>
</div>
<div class="modal-footer">
@if($lelongbid->status_semak == 0)
<button type="button" class="btn btn-secondary" onclick="clearData()" tyle="width:15%;" data-dismiss="modal">Kembali</button>
<button type="submit" class="btn btn-primary" style="width:15%;">Simpan</button>
@elseif($lelongbid->status_semak == 1)
<p class="text-danger font-italic">Marhun telah disemak. Tidak dibenarkan untuk kemaskini.</p>
@endif
</div>
</form>
@@ -349,8 +356,12 @@
</div>
</div>
<div class="modal-footer">
@if($lelongbid->status_semak == 0)
<button type="button" class="btn btn-secondary" onclick="clearData()" tyle="width:15%;" data-dismiss="modal">Kembali</button>
<button type="submit" class="btn btn-primary" style="width:15%;">Simpan</button>
@elseif($lelongbid->status_semak == 1)
<p class="text-danger font-italic">Marhun telah disemak. Tidak dibenarkan untuk kemaskini.</p>
@endif
</div>
</form>
+68 -76
View File
@@ -38,30 +38,28 @@
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="senarai" role="tabpanel" aria-labelledby="senarai-tab">
<div style="overflow-x: auto;">
<table class='table table-bordered table-hover' id='table-senarai'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Marhun</th>
<th>N. Marhun</th>
<th>Berat</th>
</tr>
</thead>
<tbody>
@foreach($lelongbid as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->marhun}}</td>
<td>{{ number_format($index->nilaimarhun, 2, '.', ',')}}</td>
<td>{{$index->berat}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<table class='table table-bordered table-hover' id='table-senarai'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Marhun</th>
<th>N. Marhun</th>
<th>Berat</th>
</tr>
</thead>
<tbody>
@foreach($lelongbid as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->marhun}}</td>
<td>{{ number_format($index->nilaimarhun, 2, '.', ',')}}</td>
<td>{{$index->berat}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="tab-pane fade" id="scan-keluar" role="tabpanel" aria-labelledby="scan-keluar-tab">
<div class="row justify-content-center mb-4">
@@ -74,30 +72,26 @@
</form>
</div>
</div>
<div style="overflow-x: auto;">
<table class='table table-bordered table-hover' id='table-scan-keluar'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Status</th>
<th>Tarikh Scan Keluar</th>
<th>Masa Scan Keluar</th>
</tr>
</thead>
<tbody>
@foreach ($senaraiScanKeluar as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td><span class="badge badge-pill badge-danger">Berada Di Luar Peti Besi</span></td>
<td>{{$index->tarikh_scankeluar}}</td>
<td>{{$index->masa_scankeluar}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<table class='table table-bordered table-hover' id='table-scan-keluar'>
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach ($senaraiScanKeluar as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td><span class="badge badge-pill badge-danger">Berada Di Luar Peti Besi</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="tab-pane fade" id="scan-masuk" role="tabpanel" aria-labelledby="scan-masuk-tab">
<div class="row justify-content-center mb-4">
@@ -110,34 +104,32 @@
</form>
</div>
</div>
<div style="overflow-x: auto;">
<table class="table table-bordered table-hover" id="table-scan-masuk" style="width: 100%;">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Status</th>
<th>Tarikh Scan Keluar</th>
<th>Masa Scan Keluar</th>
<th>Tarikh Scan Masuk</th>
<th>Masa Scan Masuk</th>
</tr>
</thead>
<tbody>
@foreach ($senaraiScanMasuk as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td><span class="badge badge-pill badge-success">Berada Di Dalam Peti Besi</span></td>
<td>{{$index->tarikh_scankeluar}}</td>
<td>{{$index->masa_scankeluar}}</td>
<td>{{$index->tarikh_scanmasuk}}</td>
<td>{{$index->masa_scanmasuk}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<table class="table table-bordered table-hover" id="table-scan-masuk" style="width: 100%;">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Status</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Tarikh/Masa Terima Marhun</th>
<th>Tarikh/Masa Serah Marhun</th>
<th>Tarikh/Masa Scan Masuk</th>
</tr>
</thead>
<tbody>
@foreach ($senaraiScanMasuk as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->scan_keluar}}</td>
<td>{{$index->terima_marhun}}</td>
<td>{{$index->serah_marhun}}</td>
<td>{{$index->scan_masuk}}</td>
<td><span class="badge badge-pill badge-success">Berada Di Dalam Peti Besi</span></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@@ -0,0 +1,56 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-11 mx-auto p-4">
<div class="card">
<div class="card-body">
<h4> Terima Serah Marhun </h4>
@if ($message = Session::get('success'))
<div class="alert mt-2 alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert mt-2 alert-danger">
<p>{{ $message }}</p>
</div>
@endif
<table class="table table-striped text-center" id="table-lelong">
<thead class="bg-primary text-white">
<th>Bil</th>
<th>Batch Lelong</th>
<th>Tarikh Lelong</th>
<th>Status Lelong</th>
<th>Tindakan</th>
</thead>
<tbody>
@foreach ($lelong as $index)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->id}}</td>
<td>{{$index->tarikh_lelong}}</td>
@if($index->sts_lelong == 0)
<td>
<button class="btn btn-warning btn-sm" disabled>LELONG BELUM BERMULA</button>
</td>
@endif
<td>
<a href="{{route('marhun.terimaserahmarhun', ['lelong_id'=>$index->id])}}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Marhun"><i class="far fa-edit"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script>
var tableLelong = $('#table-lelong').DataTable({});
</script>
@endsection
@@ -17,6 +17,7 @@
<p>{{ $message }}</p>
</div>
@endif
<a href="{{route('marhun.senarailelongterimaserah')}}" class="btn mb-2 btn-secondary">Kembali</a>
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="belum-diterima-tab" data-toggle="tab" href="#belum-diterima" role="tab" aria-controls="belum-diterima" aria-selected="true">Belum Diterima</a>
@@ -37,8 +38,7 @@
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Tarikh Scan Keluar</th>
<th>Masa Scan Keluar</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Status</th>
</tr>
</thead>
@@ -48,8 +48,7 @@
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->tarikh_scankeluar}}</td>
<td>{{$index->masa_scankeluar}}</td>
<td>{{$index->scan_keluar}}</td>
<td><span class="badge badge-pill badge-danger">Belum Terima</span></td>
</tr>
@endforeach
@@ -70,7 +69,8 @@
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Masa Terima</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Tarikh/Masa Terima Marhun</th>
<th>Status</th>
</tr>
</thead>
@@ -80,7 +80,8 @@
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->masa_terima}}</td>
<td>{{$index->scan_keluar}}</td>
<td>{{$index->terima_marhun}}</td>
<td><span class="badge badge-pill badge-success">Sedang Dinilai</span></td>
</tr>
@endforeach
@@ -98,8 +99,9 @@
<tr>
<th>Bil</th>
<th>No Rujukan</th>
<th>Masa Terima</th>
<th>Masa Serah</th>
<th>Tarikh/Masa Scan Keluar</th>
<th>Tarikh/Masa Terima Marhun</th>
<th>Tarikh/Masa Serah Marhun</th>
<th>Status</th>
</tr>
</thead>
@@ -108,8 +110,9 @@
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$index->norujukan}}</td>
<td>{{$index->masa_terima}}</td>
<td>{{$index->masa_serah}}</td>
<td>{{$index->scan_keluar}}</td>
<td>{{$index->terima_marhun}}</td>
<td>{{$index->serah_marhun}}</td>
<td><span class="badge badge-pill badge-success">Sudah Serah</span></td>
</tr>
@endforeach
@@ -116,8 +116,7 @@
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('pengesahan.perubahanmutumarhun', $id) }}" class="btn btn-primary">Kembali</a>
<button type="button" class="btn btn-warning">Batal Permohonan</button>
<button type="button" class="btn btn-danger" onclick="functerima(this)" data-idmarhun="{{ $lelongbid->id }}" data-norujukan="{{ $lelongbid->norujukan }}" data-kodcaw="{{ $lelongbid->kodcaw }}" id="tangguhlelong" >Tangguh Lelong</button>
<button type="button" class="btn btn-danger">Batal Permohonan</button>
<button type="button" class="btn btn-success" onclick="functerima(this)" id="terima" >Sahkan</button>
</div>
</form>
+2 -1
View File
@@ -224,7 +224,8 @@ Route::group(['prefix'=>'lelong'], function () {
//Khazanah
Route::group(['middleware' => ['permission:semakanmarhun','permission:kemaskinimarhun'],'prefix'=>'marhun'], function () {
Route::get('/terimaserahmarhun',['as'=>'marhun.terimaserahmarhun','uses'=>'MarhunController@terimaserahmarhun']);
Route::get('/senarailelongterimaserah',['as'=>'marhun.senarailelongterimaserah','uses'=>'MarhunController@senaraiLelongTerimaSerah']);
Route::get('/terimaserahmarhun/{lelong_id}',['as'=>'marhun.terimaserahmarhun','uses'=>'MarhunController@terimaserahmarhun']);
Route::get('/senarailelongmarhun',['as'=>'marhun.senarailelongmarhun','uses'=>'MarhunController@senarailelongmarhun']);
Route::get('/senarailelongscan',['as'=>'marhun.senarailelongscan','uses'=>'MarhunController@senarailelongscan']);
Route::get('/scanbarcode/{lelong_id}',['as'=>'marhun.scanbarcode','uses'=>'MarhunController@listScanBarcode']);