This commit is contained in:
faiqahzaman
2022-02-20 12:17:41 +08:00
9 changed files with 753 additions and 3 deletions
@@ -125,6 +125,8 @@ class MarhunController extends Controller
}
}
@@ -0,0 +1,80 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;
use App\Models\User;
use PDF;
use App\Models\Cawangan;
use App\Models\Gadai;
use App\Models\GadaiMarhun;
use App\Models\Simulasi;
use App\Models\SimulasiBid;
use App\Models\SimulasiBidMarhun;
use App\Models\SimKarat;
use App\Models\SimKarat_temp;
use App\Models\CawanganSimulasi;
use App\Models\JenisEmas;
use App\Models\JenisKarat;
use App\Models\Lelong;
use App\Models\CawanganLelong;
use App\Models\LelongBid;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
class SerahanController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function pembayaran()
{
$lelong = Lelong::all();
return view('serahan.pembayaran',compact('lelong'));
}
public function penyatabayaran(Request $request)
{
$pdf = PDF::loadView('pdf.penyatabayaran')->setPaper('a4', 'landscape');
return $pdf->download('Penyata Bayaran.pdf');
}
public function resitpembayaran(Request $request)
{
$pdf = PDF::loadView('pdf.resitpembayaran')->setPaper('a4', 'landscape');
return $pdf->download('Resit Bayaran.pdf');
}
public function senaraibid(Request $request)
{
$pdf = PDF::loadView('pdf.senaraibid')->setPaper('a4', 'landscape');
return $pdf->download('Senarai Bidaan.pdf');
}
}
+1 -2
View File
@@ -637,8 +637,7 @@ class SimulasiController extends Controller
'total14K',
'total9K',
'simkarat',
'simulasi_id',
'databid'))->setPaper('a4', 'landscape');
'simulasi_id'))->setPaper('a4', 'landscape');
return $pdf->download('Simulasi Keseluruhan.pdf');
+11 -1
View File
@@ -52,7 +52,17 @@
</li> --}}
@endhasrole
@hasrole('pengurus-cawangan')
<li class="{{ (request()->is('')) ? 'active' : '' }}">
<li class="{{ (request()->is('serahan/*')) ? 'active' : '' }}">
<a href="#serahanSubmenu" data-toggle="collapse" aria-expanded="false" style="">Serahan</a>
<ul class="list-unstyled collapse {{ (request()->is('serahan/*')) ? 'show' : '' }}" id="serahanSubmenu" >
<li class="{{ (request()->is('serahan/pembayaran/*') || request()->is('serahan/pembayaran') ) ? 'active' : '' }}">
<a href="{{url('serahan/pembayaran')}}">Pembayaran</a>
</li>
</ul>
</li>
{{-- <li class="{{ (request()->is('')) ? 'active' : '' }}">
<a href="#analisaSubmenu" data-toggle="collapse" aria-expanded="false" style="">Notis Lelong</a>
<ul class="list-unstyled collapse {{ (request()->is('analisa/*')) ? 'show' : '' }}" id="analisaSubmenu" >
<li class="{{ (request()->is('') || request()->is('') ) ? 'active' : '' }}">
@@ -0,0 +1,188 @@
<style>
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 0px solid;
padding: 1px;
border-bottom: 1px solid #ddd;
}
#customers th {
text-align: left;
table-layout:auto
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
padding: 5px;
border-bottom: 1px solid #ddd;
}
#marhun {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:11px;
border-collapse: collapse;
width: 100%;
}
#marhun td, #marhun th {
border: 0px solid;
padding: 1px;
}
#marhun th {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
</style>
<table width="100%" border="0" id="marhun" >
<tr>
<td width="46%">Ar-Rahn Kota Belud</td>
<td width="54%" align="right">Invois</td>
</tr>
<tr>
<td>Ground Floor, Lot 11, KKMP</td>
<td align="right">No.Invois: :0002588 </td>
</tr>
<tr>
<td>Kota Belud, Sabah.</td>
<td align="right">Tarikh: 30/08/2021</td>
</tr>
<tr>
<td>Tel : 088-979599</td>
<td align="right">&nbsp;</td>
</tr>
<tr>
<td>Faks : 088-255026</td>
<td align="right">Cawangan : Ar-Rahn Kota Belud</td>
</tr>
</table>
<br>
<table width="100%" border="0" id="marhun">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<tr>
<td width="66">Nama </td>
<td width="10">:</td>
<td width="957">MOHD SAID BIN TAIB</td>
</tr>
<tr>
<td>No.K/P</td>
<td>:</td>
<td>830519125399</td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td>KAMPUNG TAMAU KOTA BELUD</td>
</tr>
<tr>
<td>No.Telefon</td>
<td>:</td>
<td>0193749495</td>
</tr>
</table> </div>
<h5><u>PENYATA BAYARAN LELONGAN</u></h5>
<table width="100%" height="168" id="customers">
<thead>
<tr>
<th width="11%">Bil</th>
<th width="21%">No. Rujukan</th>
<th width="16%">Jenis Barang</th>
<th width="15%">Berat(g)</th>
<th width="10%"> Harga Bidaan(RM)</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="1">1.</td>
<td colspan="1">011232200714-0049</td>
<td colspan="1">1- Cincin</td>
<td colspan="1">1.53</td>
<td colspan="1">346.00</td>
</tr>
<tr>
<td colspan="1">2.</td>
<td colspan="1">011232200723-0039</td>
<td colspan="1">1- Cincin</td>
<td colspan="1">2.90</td>
<td colspan="1">647.00</td>
</tr>
<tr>
<td colspan="3"><strong>Jumlah Bayaran</strong></td>
<td colspan="1"><strong>4.43</strong></td>
<td colspan="1"><strong>993.00</strong></td>
</tr>
</table>
</div>
<h5><u>SENARAI BAYARAN MENGIKUT AKAUN</u></h5>
<table width="100%" height="168" id="customers">
<thead>
<tr>
<th width="5%">Bil</th>
<th width="15%">Cawangan</th>
<th width="8%"> Berat(g)</th>
<th width="12%"> Harga Jual(RM)</th>
<th width="15%">Nama Bank</th>
<th width="27%">Pemegang Akaun</th>
<th width="18%">No.Akaun</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="1">1.</td>
<td colspan="1">Ar-Rahn Kota Belud</td>
<td colspan="1">4.43</td>
<td colspan="1">993.00</td>
<td colspan="1">Bank Muamalat Malaysia Berhad</td>
<td colspan="1">Joint Venture MVSB and PKB-Kota Belud</td>
<td colspan="1"> 0301-0006119-71-3</td>
</tr>
<tr>
<td colspan="3"><strong>Jumlah Bayaran</strong></td>
<td colspan="1"><strong>993.00</strong></td>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="7"><div><font size="1"><i>*Sila Buat Pembayaran Mengikut Akaun</i></font></div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
@@ -0,0 +1,192 @@
<style>
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 0px solid;
padding: 1px;
text-align: left;
border-bottom: 1px solid #ddd;
}
#customers th {
text-align: left;
table-layout:auto
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
#marhun {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:11px;
border-collapse: collapse;
width: 100%;
}
#marhun td, #marhun th {
border: 0px solid;
padding: 1px;
}
#marhun th {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
</style>
<table width="100%" border="0" id="marhun" >
<tr>
<td width="46%">Ar-Rahn Kota Belud</td>
<td width="54%" align="right">Slip Serahan</td>
</tr>
<tr>
<td>Ground Floor, Lot 11, KKMP</td>
<td align="right">No.Slip: B031710282</td>
</tr>
<tr>
<td>Kota Belud, Sabah.</td>
<td align="right">Tarikh: 22/04/2022</td>
</tr>
<tr>
<td>Tel : 0134863252</td>
<td align="right">&nbsp;</td>
</tr>
<tr>
<td>Faks : 09255345</td>
<td align="right">Cawangan : Ar rahn kota bharu</td>
</tr>
</table>
<table width="100%" border="0" id="marhun">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td width="66">Nama </td>
<td width="10">:</td>
<td width="957">MOHD SAID BIN TAIB</td>
</tr>
<tr>
<td>No.K/P</td>
<td>:</td>
<td>830519125399</td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td>KAMPUNG TAMAU KOTA BELUD</td>
</tr>
<tr>
<td>No.Telefon</td>
<td>:</td>
<td>0193749495</td>
</tr>
</table></div>
<h5><u>RESIT BAYARAN DAN SERAHAN BARANG GADAIAN YANG BERJAYA DILELONG</u></h5>
<table width="100%" height="100" align="left" id="customers">
<thead>
<tr>
<th width="8%">Bil</th>
<th width="13%" align="left">No. Paket</th>
<th width="21%" align="center">No. Rujukan</th>
<th width="29%" align="center">Jenis Barang</th>
<th width="13%" align="right">Berat(g)</th>
<th width="16%" align="right"> Harga Lelong(RM)</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="1">1.</td>
<td colspan="1">25</td>
<td colspan="1">011232200714-0049</td>
<td colspan="1">1-Cincin</td>
<td colspan="1">1.53</td>
<td colspan="1">346.00</td>
</tr>
<tr>
<td colspan="1">2.</td>
<td colspan="1">38</td>
<td colspan="1">011232200723-0039</td>
<td colspan="1">1-Cincin</td>
<td colspan="1">2.90</td>
<td colspan="1">647.00</td>
</tr>
<tr>
<td colspan="4"><strong>Jumlah</strong></td>
<td colspan="1" align="right" ><strong>4.43</strong></td>
<td colspan="1" align="right" ><strong>993.00</strong></td>
</tr>
<tr>
<td colspan="6"><table id="marhun" >
<thead>
<tr>
<th width="966%" colspan="7"><p style="position:justify"><strong>PERHATIAN: Bahawa PEMBELI hendaklah mengaku bahawa identiti harta yang berjaya dibeli bersama-sama dengan keterangan yang dinyatakan oleh PLAINTIF PEMEGANG GADAIAN adalah seperti yang dicatatkan di dalam keterangan harta tersebut dan
setelah selesai proses pembayaran maka PEMBELI bertanggungjawab dan jika ada apa-apa masalah maka PEMBELI tidak berhak
membuat apa-apa tuntutan lagi.</strong></p>
<p style="position:justify">&nbsp;</p>
<p style="position:justify">&nbsp;</p>
<table width="486" border="0" align="center" id="marhun" >
<tr>
<td align="left">...................................</td>
<td align="left">...................................</td>
</tr>
<tr>
<td align="left">Tandatangan Khazanah</td>
<td align="left" >Tandatangan Pembeli</td>
</tr>
<tr>
<td align="left">Nama:</td>
<td align="left" >Nama: MOHD SAID BIN TAIB</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td align="left" >No.K/P: 830519125399</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td align="left" >Tarikh: </td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td align="left" >Masa:</td>
</tr>
</table>
<p>&nbsp;</p></th>
</tr>
</thead>
<tbody>
</tbody>
</table></td>
</tr>
</tbody>
</table>
+126
View File
@@ -0,0 +1,126 @@
<style>
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 0px solid;
padding: 1px;
border-bottom: 1px solid #ddd;
}
#customers th {
text-align: left;
table-layout:auto
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
padding: 5px;
border-bottom: 1px solid #ddd;
}
#marhun {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:11px;
border-collapse: collapse;
width: 100%;
}
#marhun td, #marhun th {
border: 0px solid;
padding: 1px;
}
#marhun th {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
</style>
<h5><u>SENARAI BARANG LELONGAN DIBIDA OLEH PEMBIDA</u></h5>
<table width="100%" border="0" id="marhun">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<tr>
<td width="66">Tarikh </td>
<td width="10">:</td>
<td width="957"></td>
</tr>
<tr>
<td>Cawangan</td>
<td>:</td>
<td></td>
</tr>
</table> </div>
<table width="100%" height="168" id="customers">
<thead>
<tr>
<th width="5%">Bil</th>
<th width="12%">No. Rujukan</th>
<th width="10%">Harga Asas(RM)
<th width="20%">Nama Pembida</th>
<th width="15%">Harga Bida(RM)</th>
<th width="10%">Masa Bida</th>
<th width="10%">Level Bida</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="1">1.</td>
<td colspan="1">011232200714-0049</td>
<td colspan="1">336.00</td>
<td colspan="1">1. MOHD SAID BIN TAIB</td>
<td colspan="1">346.00</td>
<td colspan="1">10:30:50 AM</td>
<td colspan="1">2</td>
</tr>
<tr>
<td colspan="1">2.</td>
<td colspan="1">011232200723-0039</td>
<td colspan="1">637.00</td>
<td colspan="1">1. MOHD SAID BIN TAIB</td>
<td colspan="1">647.00</td>
<td colspan="1">10:30:50 AM</td>
<td colspan="1">2</td>
</tr>
<tr>
<td colspan="7"><div><font size="1"><b><i> <br>
*Nota: Level Bida 1: Semifinal, Level Bida 2: Final</i></b></font></div></td>
</tr>
</table>
</div>
</tbody>
</table>
@@ -0,0 +1,140 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="lelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
<th>Nama Pembida</th>
<th>No Kp</th>
<th>No Tel</th>
<th>Bil Surat</th>
<th>Jumlah Bidaan(RM)</th>
<th class="text-center">Penyata Bayaran</th>
<th class="text-center">Resit Bayaran</th>
<th class="text-center">Bidaan</th>
</tr>
</thead>
<tbody>
{{-- @foreach ($lelong as $lel) --}}
<tr>
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" ></td>
<td>MOHD SAID BIN TAIB</td>
<td>830519125399</td>
<td>0193749495</td>
<td>2</td>
<td>993.00</td>
<td class="text-center">
{{-- @hasrole('jurulelong')
@if(!$lel->masatamat_lelong)
<a href="{{ route('lelong.refresh',$lel->id) }}"><i class="fas fa-sync-alt"></i></a>
<a class="startlelong" href="{{ route('lelong.start',$lel->id) }}"><i class="fa fa-play"></i></a>
<a class="confirmdel" href="{{ route('lelong.delete',$lel->id) }}"><i class="far fa-trash-alt"></i></a>
@elseif ($lel->sts_lelong == 2)
<a href="{{ route('lelong.show',$lel->id) }}"><i class="fas fa-trophy"></i></a>
@else
<a class="stoplelong" href="{{ route('lelong.stop',$lel->id) }}"><i class="fa fa-stop"></i></a>
@endif
<a href="{{ route('lelong.show',$lel->id) }}"><i class="far fa-edit"></i></a>
@endhasrole --}}
<a href="{{ route('serahan.penyatabayaran') }}"><i class="fas fa-download"></i></a></td>
<td class="text-center"><a href="{{ route('serahan.resitpembayaran') }}"><i class="fas fa-download"></i></a> </td>
<td class="text-center"><a href="{{ route('serahan.senaraibid') }}"><i class="fas fa-download"></i></a> </td>
</tr>
{{-- @endforeach --}}
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
$('a.confirmdel').confirm({
title: 'Confirmation',
content: 'Anda pasti?',
type: 'orange',
typeAnimated: true,
buttons: {
Delete: {
btnClass: 'btn-warning',
action: function () {
location.href = this.$target.attr('href');
}
},
Batal: {
btnClass: 'btn-default',
action: function () {}
}
}
});
var tablesimulasi = $('#simulasi').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 5,
"orderable": false
}
],
order: [[1, 'asc']],
// "ordering": false,
"info": false,
"lengthChange": false,
"pageLength": 15,
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();
}
}
]
});
$('.addsim').tooltip();
$('.export').tooltip();
// $( '.dt-buttons').addClass('btn-group');
$( '.addsim').removeClass('dt-button');
$( '.export').removeClass('dt-button');
function selectall(cb) {
tablesimulasi.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
$(this).prop('checked', cb.checked);
})
}
</script>
@endsection
+13
View File
@@ -129,4 +129,17 @@ Route::group(['middleware' => ['permission:pengesahanpembida'],'prefix'=>'pembid
Route::get('/pembida/{id}',['as'=>'pembida.show','uses'=>'PembidaController@show']);
Route::get('/deletepembida/{id}',['as'=>'pembida.delete','uses'=>'PembidaController@delete']);
Route::get('/sahkanpembida/{id}',['as'=>'pembida.sah','uses'=>'PembidaController@sah']);
});
Route::group(['middleware' => ['permission:serahan'],'prefix'=>'serahan'], function () {
Route::get('/pembayaran',['as'=>'serahan.pembayaran','uses'=>'SerahanController@pembayaran']);
Route::get('/resitpembayaran',['as'=>'serahan.resitpembayaran','uses'=>'SerahanController@resitpembayaran']);
Route::get('/penyatabayaran',['as'=>'serahan.penyatabayaran','uses'=>'SerahanController@penyatabayaran']);
Route::get('/senaraibid',['as'=>'serahan.senaraibid','uses'=>'SerahanController@senaraibid']);
});