add laporan keluar masuk marhun scan
This commit is contained in:
@@ -854,8 +854,6 @@ class MarhunController extends Controller
|
||||
)
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
$arraygadai = $lelbidmarhuns->pluck('norujukan')->toArray();
|
||||
$datagadai = $lelbidmarhuns;
|
||||
|
||||
@@ -885,7 +883,7 @@ class MarhunController extends Controller
|
||||
// ->where('id', $lelbidmarhun->lelongbidmarhun_id)
|
||||
->get();
|
||||
|
||||
$totalhargaasas = $marhunsdet->sum('n_marhun');
|
||||
$totalhargaasas = $marhunsdet->sum('hargaasas');
|
||||
$tothargaasas = bcdiv($totalhargaasas,1);
|
||||
// dd($totalhargaasas);
|
||||
// dd($totalhargaasas);
|
||||
@@ -918,6 +916,7 @@ class MarhunController extends Controller
|
||||
// ->first();
|
||||
|
||||
$lelong = Lelong::where('id',$id)->get();
|
||||
|
||||
$sumcajlelong = $totalhargaasas * ($lelong[0]['cajlelong']/100);
|
||||
//$cajlelong = $cajlelong + bcdiv($sumcajlelong,1,1);
|
||||
$totalbaki = $totalhargaasas - $lelongbid->pinjaman - $lelongbid->bakiupah - bcdiv($sumcajlelong,1,1);
|
||||
@@ -939,6 +938,7 @@ class MarhunController extends Controller
|
||||
$marhuns[$index1]['bakiupah'] = $lelongbid->bakiupah;
|
||||
$marhuns[$index1]['baki_lelong'] = $bakilelong;
|
||||
$marhuns[$index1]['rugi_lelong'] = $rugilelong;
|
||||
$marhuns[$index1]['cajlelong'] = bcdiv($sumcajlelong,1,1);
|
||||
}
|
||||
|
||||
array_push($arraylelbidmarhun,$marhuns);
|
||||
@@ -1427,5 +1427,73 @@ class MarhunController extends Controller
|
||||
return redirect()->route('marhun.show', [$request->lelongbid_id, $request->lelong_id])
|
||||
->with('success', 'Gambar Berjaya Di Tukar.');
|
||||
}
|
||||
|
||||
public function cetakkeluarscanbarcode($lelong_id)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$user = Auth::user();
|
||||
$caw = Cawangan::where('caw_code', '=', $user->kodcaw)->first();
|
||||
|
||||
$lelongDetail = Lelong::where('id', '=', $lelong_id)->first();
|
||||
$lelongbid = LelongBid::where('lelong_id', '=', $lelong_id)
|
||||
->where('caw_id', '=', $caw->id)
|
||||
->get();
|
||||
|
||||
$senaraiScanKeluar = ScanSemak::where('lelong_id', '=', $lelong_id)
|
||||
->where('kodcaw', '=', $caw->caw_code)
|
||||
->whereNull('scan_masuk')
|
||||
->orderBy('id', 'desc')
|
||||
->get();
|
||||
|
||||
$senaraiScanMasuk = ScanSemak::where('lelong_id', '=', $lelong_id)
|
||||
->where('kodcaw', '=', $caw->caw_code)
|
||||
->whereNotNull('scan_masuk')
|
||||
->orderBy('id', 'desc')
|
||||
->get();
|
||||
|
||||
// return view('pdf.cetakkeluarscanbarcode', compact('lelong_id', 'lelongDetail', 'lelongbid', 'senaraiScanKeluar', 'senaraiScanMasuk','caw'));
|
||||
$pdf = PDF::loadView('pdf.cetakkeluarscanbarcode',compact('caw','lelong_id', 'lelongDetail', 'lelongbid', 'senaraiScanKeluar', 'senaraiScanMasuk'
|
||||
))->setPaper('a4', 'potrait');
|
||||
|
||||
return $pdf->download('Senarai Keluar Peti Besi.pdf');
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function cetakmasukscanbarcode($lelong_id)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$user = Auth::user();
|
||||
$caw = Cawangan::where('caw_code', '=', $user->kodcaw)->first();
|
||||
|
||||
$lelongDetail = Lelong::where('id', '=', $lelong_id)->first();
|
||||
$lelongbid = LelongBid::where('lelong_id', '=', $lelong_id)
|
||||
->where('caw_id', '=', $caw->id)
|
||||
->get();
|
||||
|
||||
$senaraiScanKeluar = ScanSemak::where('lelong_id', '=', $lelong_id)
|
||||
->where('kodcaw', '=', $caw->caw_code)
|
||||
->whereNull('scan_masuk')
|
||||
->orderBy('id', 'desc')
|
||||
->get();
|
||||
|
||||
$senaraiScanMasuk = ScanSemak::where('lelong_id', '=', $lelong_id)
|
||||
->where('kodcaw', '=', $caw->caw_code)
|
||||
->whereNotNull('scan_masuk')
|
||||
->orderBy('id', 'desc')
|
||||
->get();
|
||||
|
||||
// return view('pdf.cetakmasukscanbarcode', compact('lelong_id', 'lelongDetail', 'lelongbid', 'senaraiScanKeluar', 'senaraiScanMasuk','caw'));
|
||||
$pdf = PDF::loadView('pdf.cetakmasukscanbarcode',compact('caw','lelong_id', 'lelongDetail', 'lelongbid', 'senaraiScanKeluar', 'senaraiScanMasuk'
|
||||
))->setPaper('a4', 'potrait');
|
||||
|
||||
return $pdf->download('Senarai Masuk Peti Besi.pdf');
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
</div>
|
||||
@endif
|
||||
<a class="btn btn-secondary mb-1" href="{{route('marhun.senarailelongscan')}}">Kembali</a>
|
||||
|
||||
<p>Tarikh Lelong:
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $lelongDetail['tarikh_lelong'] );
|
||||
@@ -66,12 +67,14 @@
|
||||
<div class="col-5">
|
||||
<form action="{{ route('marhun.scankeluarmarhun') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
<div style="text-align: center;">Scan Barcode Marhun Yang Dibawa Keluar Dari Peti Besi</div>
|
||||
<input type="text" style="text-align: center;" class="form-control" name="norujukan_barcode" autocomplete="off" id="norujukan_barcode" placeholder="SILA SCAN BARCODE PADA SAG" />
|
||||
<input type="hidden" name="lelong_id" value="{{$lelong_id}}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: left;"> <a href="{{ route('marhun.cetakkeluarscanbarcode', $lelong_id) }}" class="btn btn-info">Laporan Keluar Peti Besi semasa</a><br></div>
|
||||
<table class='table table-bordered table-hover' id='table-scan-keluar'>
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
@@ -104,6 +107,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: left;"> <a href="{{ route('marhun.cetakmasukscanbarcode', $lelong_id) }}" class="btn btn-info">Laporan Masuk Peti Besi semasa</a><br></div>
|
||||
<table class="table table-bordered table-hover" id="table-scan-masuk" style="width: 100%;">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
@@ -129,7 +133,9 @@
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<style>
|
||||
#sim {
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size:10px;
|
||||
/* border-collapse: collapse; */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
|
||||
border: 0px solid;
|
||||
padding: 1px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#sim tr:nth-child(even){}
|
||||
|
||||
#sim tr:hover {}
|
||||
|
||||
#sim th {
|
||||
text-align: left;
|
||||
border: 0px solid;
|
||||
table-layout:auto;
|
||||
color: black;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-left:-5px;
|
||||
margin-right:-5px;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Clearfix (clear floats) */
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 200%;
|
||||
/* border: 0px solid #ddd; */
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
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>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><u><b>LAPORAN MARHUN KELUAR PETI BESI</b></u></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>Cawangan: {{$caw['caw_name']}}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>ID Lelong: {{$lelong_id}}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
|
||||
<thead>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
@@ -0,0 +1,119 @@
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<style>
|
||||
#sim {
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size:10px;
|
||||
/* border-collapse: collapse; */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
|
||||
border: 0px solid;
|
||||
padding: 1px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#sim tr:nth-child(even){}
|
||||
|
||||
#sim tr:hover {}
|
||||
|
||||
#sim th {
|
||||
text-align: left;
|
||||
border: 0px solid;
|
||||
table-layout:auto;
|
||||
color: black;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-left:-5px;
|
||||
margin-right:-5px;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Clearfix (clear floats) */
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 200%;
|
||||
/* border: 0px solid #ddd; */
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
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>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><u><b>LAPORAN MARHUN MASUK PETI BESI</b></u></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>Cawangan: {{$caw['caw_name']}}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>ID Lelong: {{$lelong_id}}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
|
||||
<thead>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
@@ -28,6 +28,7 @@
|
||||
<div class="col-6 col-sm-4">
|
||||
<p> <b>Pembiayaan(RM) : </b> {{ number_format($marhuns[0]['pembiayaan'], 2, '.', ',') }}</p>
|
||||
<p> <b>Keuntungan(RM) : </b> {{ number_format($marhuns[0]['bakiupah'], 2, '.', ',') }}</p>
|
||||
<p> <b>Caj Lelong(RM) : </b> {{ number_format($marhuns[0]['cajlelong'], 2, '.', ',') }}</p>
|
||||
<p> <b>Baki Lelong(RM) : </b>{{ number_format($marhuns[0]['baki_lelong'], 2, '.', ',') }}</p>
|
||||
<p> <b>Rugi Lelong(RM) : </b>{{ number_format($marhuns[0]['rugi_lelong'], 2, '.', ',') }}</p>
|
||||
</div>
|
||||
@@ -98,15 +99,15 @@
|
||||
{{ number_format($detail[0]['hargaasas'], 2, '.', ',') }}
|
||||
</td>
|
||||
<td>
|
||||
@if($detail[0]['status_ubah'] == 1)
|
||||
@if($detail[0]['status_ubah'] == '1')
|
||||
<button class="btn btn-warning btn-sm hovernone-warning" disabled>PERUBAHAN MUTU</button>
|
||||
@elseif($detail[0]['status_ubah'] == 2)
|
||||
@elseif($detail[0]['status_ubah'] == '2')
|
||||
<button class="btn btn-warning btn-sm hovernone-warning" disabled>PENAMBAHAN MARHUN</button>
|
||||
@elseif($detail[0]['status_ubah'] == 3)
|
||||
@elseif($detail[0]['status_ubah'] == '3')
|
||||
<button class="btn btn-warning btn-sm hovernone-warning" disabled>PENGHAPUSAN MARHUN</button>
|
||||
@elseif($detail[0]['status_ubah'] == 4)
|
||||
@elseif($detail[0]['status_ubah'] == '4')
|
||||
<button class="btn btn-warning btn-sm hovernone-warning" disabled>PENGURANGAN BERAT</button>
|
||||
@elseif($detail[0]['status_ubah'] == 5)
|
||||
@elseif($detail[0]['status_ubah'] == '5')
|
||||
<button class="btn btn-warning btn-sm hovernone-warning" disabled>PENGURANGAN MUTU & BERAT</button>
|
||||
@else
|
||||
|
||||
|
||||
@@ -264,6 +264,10 @@ Route::group(['middleware' => ['permission:semakanmarhun','permission:kemaskinim
|
||||
Route::post('/addphotomarhun',['as'=>'marhun.addphotomarhun','uses'=>'MarhunController@addPhotoMarhun']);
|
||||
Route::post('/deletephotomarhun',['as'=>'marhun.deletephotomarhun','uses'=>'MarhunController@deletePhotoMarhun']);
|
||||
Route::post('/updatephotomarhun',['as'=>'marhun.updatephotomarhun','uses'=>'MarhunController@updatePhotoMarhun']);
|
||||
|
||||
//khazanah
|
||||
Route::get('/cetakkeluarscanbarcode/{lelong_id}',['as'=>'marhun.cetakkeluarscanbarcode','uses'=>'MarhunController@cetakkeluarscanbarcode']);
|
||||
Route::get('/cetakmasukscanbarcode/{lelong_id}',['as'=>'marhun.cetakmasukscanbarcode','uses'=>'MarhunController@cetakmasukscanbarcode']);
|
||||
});
|
||||
//Khazanah
|
||||
|
||||
|
||||
Reference in New Issue
Block a user