pengesahan pembayaran by PC
This commit is contained in:
@@ -5,13 +5,15 @@ namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\LelongBid;
|
||||
use App\Models\LelongBidder;
|
||||
use App\Models\LelongBidMarhun;
|
||||
use App\Models\Users;
|
||||
|
||||
class PaymentController extends Controller
|
||||
{
|
||||
public function SenaraiPemenang(Request $request){
|
||||
|
||||
$listwinner = LelongBid::join('lelongbidder', 'lelongbid.id', '=', 'lelongbidder.lelongbid_id')
|
||||
$listwinner = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
->join('users', 'lelongbidder.user_id', '=', 'users.id')
|
||||
->where('lelongbidder.status_bidder', 1)
|
||||
->get();
|
||||
|
||||
@@ -24,8 +26,34 @@ class PaymentController extends Controller
|
||||
$SAGBidItem = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
->join('users', 'lelongbidder.user_id', '=', 'users.id')
|
||||
->where('lelongbidder.status_bidder', 1)
|
||||
->select(
|
||||
'users.name',
|
||||
'users.nokp',
|
||||
'users.alamat'
|
||||
)
|
||||
->get();
|
||||
|
||||
return view('pembayaran.SAGBidItem',compact('SAGBidItem'));
|
||||
foreach($SAGBidItem as $eachbid){
|
||||
|
||||
$eachbid = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
->join('lelongbidmarhun', 'lelongbidder.lelongbid_id', '=', 'lelongbidmarhun.lelongbid_id')
|
||||
->where('lelongbidder.status_bidder', 1)
|
||||
->get();
|
||||
|
||||
}
|
||||
|
||||
return view('pembayaran.SAGBidItem',compact('SAGBidItem','eachbid'));
|
||||
}
|
||||
|
||||
public function pengesahanPembayaran(Request $request){
|
||||
|
||||
$pengesahanPembayaran = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
// ->join('users', 'lelongbidder.user_id', '=', 'users.id')
|
||||
->where('lelongbidder.status_bidder', 1)
|
||||
->get();
|
||||
|
||||
// dd($pengesahanPembayaran);
|
||||
|
||||
return view('pembayaran.pengesahanPembayaran',compact('pengesahanPembayaran'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,12 +57,16 @@ class RolesSeeder extends Seeder
|
||||
//pengurus cawangan
|
||||
Permission::create([
|
||||
'name' => 'pendaftaranpembida',
|
||||
'description' => 'Pemdaftaran pembida di cawangan'
|
||||
'description' => 'Pendaftaran pembida di cawangan'
|
||||
]);
|
||||
Permission::create([
|
||||
'name' => 'jananotis',
|
||||
'description' => 'Jana Notis Lelong'
|
||||
]);
|
||||
Permission::create([
|
||||
'name' => 'pengesahanpembayaranpc',
|
||||
'description' => 'Pengesahan Pembayaran Bagi PC'
|
||||
]);
|
||||
|
||||
//jurulelong
|
||||
Permission::create([
|
||||
@@ -129,6 +133,7 @@ class RolesSeeder extends Seeder
|
||||
$role4 = Role::create(['name' => 'pengurus-cawangan']);
|
||||
$role4->givePermissionTo('pendaftaranpembida');
|
||||
$role4->givePermissionTo('jananotis');
|
||||
$role4->givePermissionTo('pengesahanpembayaranpc');
|
||||
|
||||
$role5 = Role::create(['name' => 'jurulelong']);
|
||||
$role5->givePermissionTo('pendaftaranbatch');
|
||||
|
||||
@@ -60,6 +60,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="{{ (request()->is('pengurus-cawangan/*')) ? 'active' : '' }}">
|
||||
<a href="{{url('lelong/pengesahanPembayaran')}}">Pengesahan Pembayaran</a>
|
||||
</li>
|
||||
@endhasrole
|
||||
@hasrole('jurulelong')
|
||||
<li class="{{ (request()->is('lelong/*')) ? 'active' : '' }}">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
@foreach($SAGBidItem as $BidItem)
|
||||
<p> <b>Nama : </b> {{ $BidItem->nama_bidder }}</p>
|
||||
<p> <b>Nama : </b> {{ $BidItem->name }}</p>
|
||||
<p> <b>No Kad Pengenalan : </b> {{ $BidItem->nokp }}</p>
|
||||
<p> <b>Alamat : </b> {{ $BidItem->alamat }}</p>
|
||||
@endforeach
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="container">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
<table class="table table-striped table-xl" style="width:100%">
|
||||
<table class="table table-border table-hover table-xl" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th class="text-center">No</th>
|
||||
@@ -28,18 +28,19 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($SAGBidItem as $BidItem)
|
||||
@foreach($eachbid as $biditem)
|
||||
<tr>
|
||||
<td class="text-center">1</td>
|
||||
<td class="text-center">{{ $BidItem->norujukan}}</td>
|
||||
<td class="text-center">{{ $BidItem->hargaasas}}</td>
|
||||
<td class="text-center">{{ $BidItem->hargajual}}</td>
|
||||
<td class="text-center">{{ $loop->iteration }}</td>
|
||||
<td class="text-center">{{ $biditem->norujukan}}</td>
|
||||
<td class="text-center">{{ $biditem->hargaasas}}</td>
|
||||
<td class="text-center">{{ $biditem->hargajual}}</td>
|
||||
<td class="text-center"><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $BidItem->norujukan }}"></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="3"><b> Jumlah Bayaran </b></td>
|
||||
<td class="text-center"><b> RM 2000 </b></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
<table class="table table-striped table-xl" style="width:100%">
|
||||
<table class="table table-striped table-xl text-center" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
@@ -22,15 +22,23 @@
|
||||
<tbody>
|
||||
@foreach($listwinner as $winner)
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td><a href=" {{ route('lelong.SAGBidItem') }} " target="blank" style="color:#3490dc">{{ $winner->nama_bidder}}</a></td>
|
||||
<td>{{ $winner->nokp}}</td>
|
||||
<td>{{ $winner->notelbimbit}}</td>
|
||||
<td></td>
|
||||
<td>{{ $winner->hargabida}}</td>
|
||||
<td></td>
|
||||
<td>{{ $winner->status_payment}}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
@if ($winner->status_payment == 0)
|
||||
<button class="btn btn-danger btn-sm" disabled>UNPAID</button>
|
||||
@elseif ($winner->status_payment == 1)
|
||||
<button class="btn btn-success btn-sm" disabled>PAID</button>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href=" # " target = "blank" ><i class="fas fa-download"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
<table class="table table-striped table-xl text-center" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama</th>
|
||||
<th>No Kad Pengenalan</th>
|
||||
<th>No Telefon</th>
|
||||
<th>Bilangan Surat</th>
|
||||
<th>Jumlah Bayaran(RM)</th>
|
||||
<th>Remark</th>
|
||||
<th>Status Bayaran</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($pengesahanPembayaran as $sahbayar)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td><a href=" # " target="blank" style="color:#3490dc">{{ $sahbayar->nama_bidder}}</a></td>
|
||||
<td>{{ $sahbayar->nokp}}</td>
|
||||
<td>{{ $sahbayar->notelbimbit}}</td>
|
||||
<td></td>
|
||||
<td>{{ $sahbayar->hargabida}}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
@if ($sahbayar->status_payment == 0)
|
||||
<button class="btn btn-danger btn-sm" disabled>UNPAID</button>
|
||||
@elseif ($sahbayar->status_payment == 1)
|
||||
<button class="btn btn-success btn-sm" disabled>PAID</button>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-info btn-sm">SAHKAN</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -111,9 +111,6 @@
|
||||
$( '.adduser').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
//var simple = '<?php {{-- echo $totaluser;--}} ?>';
|
||||
// console.log(simple);
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
tabletaraf.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
|
||||
+4
-1
@@ -80,13 +80,16 @@ Route::group(['prefix'=>'lelong'], function () {
|
||||
Route::get('/lelongtaklaku',['as'=>'lelong.lelongtaklaku','uses'=>'LelongController@lelongtaklaku']);
|
||||
Route::get('/showlelong/{id}',['as'=>'lelong.show','uses'=>'LelongController@show']);
|
||||
Route::get('/deletelelong/{id}',['as'=>'lelong.delete','uses'=>'LelongController@delete']);
|
||||
|
||||
Route::get('/export/{id}',['as'=>'lelong.exportnotis','uses'=>'LelongController@exportnotis']);
|
||||
Route::get('/janapemenang', ['as'=>'lelong.janapemenang','uses'=>'LelongController@janapemenang']);
|
||||
Route::get('/kaunterpembayaran', ['as'=>'lelong.kaunterpembayaran','uses'=>'PaymentController@SenaraiPemenang']);
|
||||
Route::get('/SAGBidItem', ['as'=>'lelong.SAGBidItem','uses'=>'PaymentController@SAGBidItem']);
|
||||
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['permission:pengesahanpembayaranpc']], function () {
|
||||
Route::get('/pengesahanPembayaran', ['as'=>'payment.pengesahanPembayaran','uses'=>'PaymentController@pengesahanPembayaran']);
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['permission:import']], function () {
|
||||
Route::get('/refresh/{id}',['as'=>'lelong.refresh','uses'=>'LelongController@refresh']);
|
||||
|
||||
Reference in New Issue
Block a user