penyata pembayaran by user_id

This commit is contained in:
Amirah22
2022-02-21 10:12:55 +08:00
parent c450b8b475
commit 2463c05a6f
4 changed files with 20 additions and 15 deletions
+11 -6
View File
@@ -47,6 +47,8 @@ class SerahanController extends Controller
* @return \Illuminate\Contracts\Support\Renderable
*/
public function pembayaran()
{
@@ -60,18 +62,21 @@ class SerahanController extends Controller
}
public function penyatabayaran(Request $request)
public function penyatabayaran($user_id)
{
$payment_id = $request->paymentid;
// 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('payment.user_id','=',$request->payment) // nnti tanya fifi tunggu dia sihat
->where('lelongbidder.user_id','=',$user_id)
->where('lelongbidder.status_bidder','=','1')
->get();
$pdf = PDF::loadView('pdf.penyatabayaran',compact('payment','payment_id'))
// dd($payment);
$pdf = PDF::loadView('pdf.penyatabayaran',compact('payment','pembida'))
->setPaper('a4', 'landscape');
return $pdf->download('Penyata Bayaran.pdf');
+6 -6
View File
@@ -46,7 +46,7 @@
<body>
@foreach ($payment as $index=>$info)
<table width="100%" border="0" id="marhun" >
<tr>
@@ -85,22 +85,22 @@
<tr>
<td width="66">Nama </td>
<td width="10">:</td>
<td width="957">{{ $info['nama_bidder'] }}</td>
<td width="957">{{ $pembida['name'] }}</td>
</tr>
<tr>
<td>No.K/P</td>
<td>:</td>
<td>{{$info['nokp']}}</td>
<td>{{$pembida['nokp']}}</td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td>{{$info['alamat']}}</td>
<td>{{$pembida['alamat']}}</td>
</tr>
<tr>
<td>No.Telefon</td>
<td>:</td>
<td>{{$info['notelbimbit']}}</td>
<td>{{$pembida['notelbimbit']}}</td>
</tr>
</table> </div>
@@ -117,7 +117,7 @@
<th width="10%"> Harga Bidaan(RM)</th>
</tr>
</thead>
@foreach ($payment as $index=>$info)
<tr>
<td>{{$index+1}}</td>
<td>{{$info['norujukan']}}</td>
+2 -2
View File
@@ -37,7 +37,7 @@
<td>{{ $pay->nokp }}</td>
<td>{{ $pay->notelbimbit }}</td>
<td>{{ $pay->lelongbid_id }}</td>
<td>{{ $pay->total_payment }}</td>
<td>{{ $pay->hargajual }}</td>
<td class="text-center">
{{-- @hasrole('jurulelong')
@@ -52,7 +52,7 @@
@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>
+1 -1
View File
@@ -128,7 +128,7 @@ 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::post('/resitpembayaran',['as'=>'serahan.resitpembayaran','uses'=>'SerahanController@resitpembayaran']);
Route::get('/penyatabayaran',['as'=>'serahan.penyatabayaran','uses'=>'SerahanController@penyatabayaran']);
Route::get('/penyatabayaran/{user_id}',['as'=>'serahan.penyatabayaran','uses'=>'SerahanController@penyatabayaran']);
Route::get('/senaraibid',['as'=>'serahan.senaraibid','uses'=>'SerahanController@senaraibid']);