Merge branch 'atie' into 'main'
add cetak harga emas lelong See merge request online-sistem1/lelong!313
This commit is contained in:
@@ -5991,6 +5991,26 @@ class LelongController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function exporthargaemas($lelong_id){
|
||||
|
||||
$lelong = Lelong::with(['lelKarat'])->find($lelong_id);
|
||||
// dd($lelong);
|
||||
$lelkarat = $lelong->lelKarat;
|
||||
$tarikhkemaskini = $lelong->lelKarat[0];
|
||||
$jeniskarat = JenisKarat::all();
|
||||
$today = date('d-m-Y');
|
||||
|
||||
$pdf1 = PDF::loadView('pdf.exporthargaemas', compact('lelong_id','lelkarat','jeniskarat','tarikhkemaskini'))
|
||||
->setPaper('a4', 'potrait');
|
||||
|
||||
return $pdf1->download('Harga Emas Lelong '.$today.'.pdf');
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -265,10 +265,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-hargaasas" role="tabpanel" aria-labelledby="nav-hargaasas-tab">
|
||||
<br>
|
||||
{{-- <form id="exporthargaemas" action="{{route('lelong.exporthargaemas')}}" method="POST"> --}}
|
||||
{{-- @csrf
|
||||
<input type="hidden" name="type" value="User">
|
||||
<input type="hidden" name="lelongid" value="{{ $lelong_id }}"> --}}
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-10 mx-auto ">
|
||||
<button type="button" class="btn mb-5 btn-outline-success" ><a href="{{ route('lelong.exporthargaemas', $lelong_id)}}"><h3><i class="fas fa-print"></i></h3></a></button>
|
||||
<button class="btn btn-primary float-right " onclick="kemaskini()" id="btnkemaskini" >Ubah</button>
|
||||
|
||||
<div id="hideform">
|
||||
@@ -280,6 +287,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-10 mx-auto">
|
||||
|
||||
@@ -307,7 +316,7 @@
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
{{-- </form> --}}
|
||||
</div>
|
||||
</div>
|
||||
{{-- <a class="btn btn-primary" href="{{ route('lelong.kemaskinihargaasas',$lelong_id) }}">Kemaskini</a> --}}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<style>
|
||||
#customers {
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size:13px;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#customers td, #customers th {
|
||||
border: 1px solid black;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
|
||||
#customers th {
|
||||
/* text-align: left; */
|
||||
table-layout:auto
|
||||
color: black;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#customers1 {
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size:13px;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#customers1 td, #customers1 th {
|
||||
border: 0px solid black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#customers1 th {
|
||||
text-align: left;
|
||||
table-layout:auto
|
||||
color: black;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<table width="100%" border="0" id="customers1">
|
||||
<tr>
|
||||
<td width="50%" style="font-size:14px"><u>HARGA PASARAN EMAS LELONGAN</u></td>
|
||||
<td width="50%" align="right"><span style="font-size:14px">PERMODALAN KELANTAN BERHAD</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tarikh : @php
|
||||
$today = date('d/m/Y');
|
||||
@endphp
|
||||
{{$today}}</td>
|
||||
<td align="right">Bahagian Operasi</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table cellspacing="0" cellpadding="5" style="float:right;" width="100%" height="80" id="customers">
|
||||
<thead>
|
||||
<tr >
|
||||
<th>Karat</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Harga/gm(RM)</th>
|
||||
{{-- <th>Harga</th> --}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($lelkarat as $index=>$karat)
|
||||
<tr>
|
||||
<td align="center">{{$karat->karat}}</td>
|
||||
<td align="center">{{$karat->keterangan}}</td>
|
||||
<td class="input" align="center">{{$karat->harga2}}</td>
|
||||
{{-- <td class="input">{{$karat->harga}}</td> --}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<div style="font:Trebuchet MS, Arial, Helvetica, sans-serif; font-size:14px">*Dikeluarkan Oleh Bahagian Operasi</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
@@ -175,6 +175,8 @@ Route::group(['prefix'=>'lelong'], function () {
|
||||
Route::post('/export',['as'=>'lelong.export','uses'=>'LelongController@export']);
|
||||
Route::post('/exportkali',['as'=>'lelong.exportkali','uses'=>'LelongController@exportkali']);
|
||||
|
||||
Route::get('/exporthargaemas/{lelong_id}',['as'=>'lelong.exporthargaemas','uses'=>'LelongController@exporthargaemas']);
|
||||
|
||||
});
|
||||
Route::get('/showsimulasi/{id}',['as'=>'lelong.showsimulasi','uses'=>'LelongController@showsimulasi']);
|
||||
Route::get('/senaraimarhunsimulasi/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhunsimulasi','uses'=>'LelongController@senaraimarhunsimulasi']);
|
||||
|
||||
Reference in New Issue
Block a user