Merge branch 'amirah' into azfar_dev

This commit is contained in:
Azfar Arsyad
2022-02-21 14:29:57 +08:00
5 changed files with 218 additions and 187 deletions
+37 -5
View File
@@ -27,6 +27,8 @@ use App\Models\LelongBid;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
use App\Models\Payment;
class SerahanController extends Controller
{
/**
@@ -44,19 +46,49 @@ class SerahanController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function pembayaran()
public function pembayaran()
{
$lelong = Lelong::all();
return view('serahan.pembayaran',compact('lelong'));
$payment= Payment::join('lelongbidder','payment.user_id','=','lelongbidder.user_id')
->join('users','payment.user_id','=','users.id')
->join('lelongbid','payment.lelongbid_id','=','lelongbid.id')
->get();
// dd($payment);
return view('serahan.pembayaran',compact('payment'));
}
public function penyatabayaran(Request $request)
public function penyatabayaran($user_id)
{
$pdf = PDF::loadView('pdf.penyatabayaran')->setPaper('a4', 'landscape');
// dd($norujukan);
// $payment_id = $request->paymentid;
$pembida= User::where('id','=',$user_id)
->first();
$payment= Payment::join('lelongbidder','payment.user_id','=','lelongbidder.user_id')
->join('users','payment.user_id','=','users.id')
->join('lelongbid','payment.lelongbid_id','=','lelongbid.id')
->where('lelongbidder.user_id','=',$user_id)
->where('lelongbidder.status_bidder','=','1')
->get();
// dd($payment);
$pdf = PDF::loadView('pdf.penyatabayaran',compact('payment','pembida'))
->setPaper('a4', 'landscape');
return $pdf->download('Penyata Bayaran.pdf');
}
public function resitpembayaran(Request $request)
{
$pdf = PDF::loadView('pdf.resitpembayaran')->setPaper('a4', 'landscape');
@@ -33,10 +33,60 @@ class CreateCawangansTable extends Migration
$table->timestamps();
});
Schema::create('customer', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('ahli')->nullable();
$table->string('kodcaw')->nullable();
$table->integer('nosiri')->nullable();
$table->date('tarikhdaftar')->nullable();
$table->string('nopelanggan');
$table->string('kplama')->nullable();
$table->string('kpbaru')->nullable();
$table->string('nama')->nullable();
$table->date('t_lahir')->nullable();
$table->string('jantina')->nullable();
$table->string('alamat1')->nullable();
$table->string('alamat2')->nullable();
$table->string('alamat3')->nullable();
$table->string('alamat4')->nullable();
$table->string('poskod')->nullable();
$table->integer('koddaerah')->nullable();
$table->string('kodnegeri')->nullable();
$table->string('telefon')->nullable();
$table->decimal('jumpinjaman', $precision = 9, $scale = 2)->nullable();
$table->date('t_gadai')->nullable();
$table->decimal('pinjamhari', $precision = 9, $scale = 2)->nullable();
$table->string('bumiputra')->nullable();
$table->string('warganegara')->nullable();
$table->string('bangsa')->nullable();
$table->string('kodkerja')->nullable();
$table->string('kodugama')->nullable();
$table->string('kodstatus')->nullable();
$table->string('kodbank')->nullable();
$table->string('noakaun')->nullable();
$table->string('nota')->nullable();
$table->string('teller')->nullable();
$table->string('pelulus')->nullable();
$table->date('t_ubah')->nullable();
$table->time('m_ubah')->nullable();
$table->string('aktif')->nullable();
$table->decimal('yuranahli', $precision = 5, $scale = 2)->nullable();
$table->string('nopelangganlama')->nullable();
$table->string('tujuangadai')->nullable();
$table->string('kodkerjabaru')->nullable();
$table->string('tagperingatan')->nullable();
$table->string('namateller')->nullable();
$table->integer('kumpulan')->nullable();
$table->string('telefon2')->nullable();
$table->string('tagpelanggan')->nullable();
});
Schema::create('gadai', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('kodcaw');
$table->string('norujukan');
$table->string('nokp');
$table->decimal('jbg', $precision = 7, $scale = 2);
$table->decimal('kadarupah', $precision = 5, $scale = 2)->nullable();
$table->decimal('upahsimpan', $precision = 11, $scale = 2)->nullable();
+119 -171
View File
@@ -1,188 +1,136 @@
<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 {
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;
}
#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 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>
#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>
<body>
<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>
<h5><u>PENYATA BAYARAN LELONGAN</u></h5>
<table width="100%" height="168" id="customers">
<thead>
<table width="100%" border="0" id="marhun">
<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>
<td colspan="3"></td>
</tr>
<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>
<td colspan="3">&nbsp;</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>
<td width="66">Nama </td>
<td width="10">:</td>
<td width="957">{{ $pembida['name'] }}</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>
<td>No.K/P</td>
<td>:</td>
<td>{{$pembida['nokp']}}</td>
</tr>
</table>
<tr>
<td>Alamat</td>
<td>:</td>
<td>{{$pembida['alamat']}}</td>
</tr>
<tr>
<td>No.Telefon</td>
<td>:</td>
<td>{{$pembida['notelbimbit']}}</td>
</tr>
</table> </div>
</div>
<h5><u>SENARAI BAYARAN MENGIKUT AKAUN</u></h5>
<h5><u>PENYATA BAYARAN LELONGAN</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>
<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>
@foreach ($payment as $index=>$info)
<tr>
<td>{{$index+1}}</td>
<td>{{$info['norujukan']}}</td>
<td>{{$info['marhun']}}</td>
<td>{{ number_format($info['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($info['hargajual'], 2, '.', ',') }}</td>
</tr>
@endforeach
</tbody>
+10 -9
View File
@@ -13,6 +13,7 @@
<form id="exportform" action="" method="POST">
@csrf
<input type="hidden" name="type" value="User">
<input type="hidden" name="paymentid" value="{{ $payment }}">
<table class="table table-striped table-xl" id="lelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
@@ -29,14 +30,14 @@
</thead>
<tbody>
{{-- @foreach ($lelong as $lel) --}}
@foreach ($payment as $pay)
<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><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $pay->id }}" ></td>
<td>{{ $pay->nama_bidder }}</td>
<td>{{ $pay->nokp }}</td>
<td>{{ $pay->notelbimbit }}</td>
<td>{{ $pay->lelongbid_id }}</td>
<td>{{ $pay->hargajual }}</td>
<td class="text-center">
{{-- @hasrole('jurulelong')
@@ -51,11 +52,11 @@
@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>
<a href="{{ route('serahan.penyatabayaran',['user_id'=>$pay->user_id]) }}"><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 --}}
@endforeach
</tbody>
</table>
+2 -2
View File
@@ -137,8 +137,8 @@ Route::group(['middleware' => ['permission:pengesahanpembida'],'prefix'=>'pembid
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::post('/resitpembayaran',['as'=>'serahan.resitpembayaran','uses'=>'SerahanController@resitpembayaran']);
Route::get('/penyatabayaran/{user_id}',['as'=>'serahan.penyatabayaran','uses'=>'SerahanController@penyatabayaran']);
Route::get('/senaraibid',['as'=>'serahan.senaraibid','uses'=>'SerahanController@senaraibid']);
});