update payment migration
This commit is contained in:
@@ -604,6 +604,16 @@ class LelongController extends Controller
|
||||
return view('lelong.lelongtaklaku',compact('lelongtaklaku'));
|
||||
}
|
||||
|
||||
public function senaraipemenang($lelong_id){
|
||||
|
||||
$senaraiwinner = LelongBid::join('lelongbidder', 'lelongbid.id', '=', 'lelongbidder.lelongbid_id')
|
||||
->join('lelong', 'lelongbid.lelong_id', '=', 'lelong.id')
|
||||
->where('lelongbid.lelong_id', $lelong_id)
|
||||
->get();
|
||||
|
||||
return view('lelong.senaraipemenang',compact('senaraiwinner'));
|
||||
}
|
||||
|
||||
public function senaraimarhun($lelongid, $cawid){
|
||||
// $marhun = LelongBid::->get();
|
||||
|
||||
|
||||
@@ -130,7 +130,8 @@ class PaymentController extends Controller
|
||||
'lelongbid.hargaasas',
|
||||
'lelongbid.norujukan',
|
||||
'lelongbidder.lelongbid_id',
|
||||
'lelongbidder.id as lelongbidder_id'
|
||||
'lelongbidder.id as lelongbidder_id',
|
||||
'lelongbid.lelong_id as lelong_id'
|
||||
)
|
||||
->first();
|
||||
|
||||
@@ -144,6 +145,7 @@ class PaymentController extends Controller
|
||||
'user_id' => $request->user_id,
|
||||
'lelongbidder_id' => $eachbid->lelongbidder_id,
|
||||
'lelongbid_id' => $bid,
|
||||
'lelong_id' => $eachbid->lelong_id,
|
||||
'kodcaw' => $user->kodcaw,
|
||||
'status_payment_opt' => 1,
|
||||
'status' => 2,
|
||||
|
||||
@@ -18,6 +18,7 @@ class CreatePaymentTable extends Migration
|
||||
$table->unsignedBigInteger('user_id')->unsigned();
|
||||
$table->unsignedBigInteger('lelongbidder_id')->unsigned()->nullable();
|
||||
$table->unsignedBigInteger('lelongbid_id')->unsigned()->nullable();
|
||||
$table->unsignedBigInteger('lelong_id')->unsigned();
|
||||
$table->string('kodcaw')->nullable();
|
||||
$table->string('back_acc_pembeli')->nullable();
|
||||
$table->string('bank_acc_no_pembeli')->nullable();
|
||||
@@ -54,6 +55,10 @@ class CreatePaymentTable extends Migration
|
||||
$table->foreign('lelongbidder_id')
|
||||
->references('id')->on('lelongbidder')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('lelong_id')
|
||||
->references('id')->on('lelong')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::create('resit', function (Blueprint $table) {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
@elseif ($lel->sts_lelong == 2)
|
||||
<a href="{{ route('lelong.janapemenang',$lel->id) }}" data-toggle="tooltip" data-placement="top" title="Jana Pemenang"><i class="fas fa-users-cog"></i></a>
|
||||
@elseif ($lel->sts_lelong == 3)
|
||||
<a href="{{ route('lelong.janapemenang',$lel->id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Pemenang"><i class="fas fa-trophy"></i></a>
|
||||
<a href="{{ route('lelong.senaraipemenang',$lel->id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Pemenang"><i class="fas fa-trophy"></i></a>
|
||||
@else
|
||||
<a class="stoplelong" href="{{ route('lelong.stop',$lel->id) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong"><i class="fa fa-stop"></i></a>
|
||||
@endif
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
@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
|
||||
<table class="table table-striped table-xl text-center" id="tablekaunter" 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 Bidaan(RM)</th>
|
||||
<th>Jumlah Pembayaran(RM)</th>
|
||||
<th>Penyata Bayaran</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($senaraiwinner as $winner)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td>{{ $winner['details']['name']}}</td>
|
||||
<td>{{ $winner['details']['nokp']}}</td>
|
||||
<td>{{ $winner['details']['notelbimbit']}}</td>
|
||||
<td>{{ $winner['total_surat']}}</td>
|
||||
<td>{{ $winner['totalBid']}}</td>
|
||||
<td>{{ $winner['totalPay']}}</td>
|
||||
<td>
|
||||
<a href="{{ route('serahan.penyatabayaran',['user_id'=>$winner['details']['id'],'lelong_id'=>$lelong_id]) }}" target = "blank" ><i class="fas fa-download"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
@if( $winner['totalPay'] < $winner['totalBid'] )
|
||||
<a href=" {{ route('pembayaran.SAGBidItem', ['user_id'=>$winner['details']['id'], 'lelong_id'=>$lelong_id]) }} "><i class="far fa-edit"></i></a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var tablekaunter = $('#tablekaunter').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 7,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 6,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
// buttons: [
|
||||
// {
|
||||
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
|
||||
// text: '<i class="fas fa-plus" id="test"></i>',
|
||||
// titleAttr: 'Tambah Cawangan',
|
||||
// action: function ( e, dt, node, config ) {
|
||||
// // alert( 'Button activated' );
|
||||
// // console.log('hye');
|
||||
|
||||
// $('#myModal').modal("show");
|
||||
// $('#myModal').on('shown.bs.modal', function () {
|
||||
// $('#rolename').trigger('focus')
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// 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();
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
});
|
||||
|
||||
// $('.addcaw').tooltip();
|
||||
// $('.export').tooltip();
|
||||
// // $( '.dt-buttons').addClass('btn-group');
|
||||
// $( '.addcaw').removeClass('dt-button');
|
||||
// $( '.export').removeClass('dt-button');
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<th>Bilangan Surat</th>
|
||||
<th>Jumlah Bidaan(RM)</th>
|
||||
<th>Jumlah Pembayaran(RM)</th>
|
||||
<th>Resit Bayaran</th>
|
||||
<th>Penyata Bayaran</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -35,7 +35,7 @@
|
||||
<td>{{ $winner['totalBid']}}</td>
|
||||
<td>{{ $winner['totalPay']}}</td>
|
||||
<td>
|
||||
<a href=" # " target = "blank" ><i class="fas fa-download"></i></a>
|
||||
<a href="{{ route('serahan.penyatabayaran',['user_id'=>$winner['details']['id'],'lelong_id'=>$lelong_id]) }}" target = "blank" ><i class="fas fa-download"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
@if( $winner['totalPay'] < $winner['totalBid'] )
|
||||
|
||||
@@ -77,6 +77,7 @@ Route::group(['prefix'=>'lelong'], function () {
|
||||
Route::group(['middleware' => ['permission:pendaftaranbatch']], function () {
|
||||
Route::get('/create/{id}',['as'=>'lelong.create','uses'=>'LelongController@create']);
|
||||
Route::get('/senarailelong',['as'=>'lelong.senarailelong','uses'=>'LelongController@index']);
|
||||
Route::get('/senaraipemenang/{lelong_id}',['as'=>'lelong.senaraipemenang','uses'=>'LelongController@senaraipemenang']);
|
||||
Route::get('/senarailelongtaklaku',['as'=>'lelong.senarailelongtaklaku','uses'=>'LelongController@senarailelongtaklaku']);
|
||||
Route::get('/lelongtaklaku/{lelong_id}',['as'=>'lelong.lelongtaklaku','uses'=>'LelongController@lelongtaklaku']);
|
||||
Route::get('/showlelong/{id}',['as'=>'lelong.show','uses'=>'LelongController@show']);
|
||||
|
||||
Reference in New Issue
Block a user