Commit d93f670c by Palti Sinaga

asdasd

parent db87a5d5
......@@ -360,7 +360,7 @@ class AdminController extends Controller
$data = DB::table('pemilikhomestay')
->join('requestfasilitas','pemilikhomestay.id','=','requestfasilitas.id_pemilik_homestay')
->join('homestay','pemilikhomestay.id','=','homestay.id_pemilik')
->select('pemilikhomestay.nama','pemilikhomestay.no_telepon','requestfasilitas.*','homestay.*')
->select('pemilikhomestay.nama','pemilikhomestay.no_telepon','requestfasilitas.*','homestay.nama_homestay','homestay.alamat')
->where('requestfasilitas.id','=',$id)
->get();
......
......@@ -20,6 +20,7 @@ use Psy\Command\ListCommand\ConstantEnumerator;
use Illuminate\Notifications\Messages\NexmoMessage;
use SimpleSoftwareIO\SMS\Drivers\NexmoSMS;
use Nexmo\Laravel\Facade\Nexmo;
use PDF;
class CustomerController extends Controller
......@@ -282,6 +283,19 @@ class CustomerController extends Controller
return view('adminlte::layouts.customers.rincianHistory')->with('data',$rincianHistory[0]);
}
public function rincianHistoryPrint($id){
$rincianHistory = DB::table('transaksi')
->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
->join('homestay','transaksi.id_homestay','=','homestay.id')
->join('pemilikhomestay','homestay.id_pemilik','=','pemilikhomestay.id')
->select('transaksi.status','transaksi.total_pembayaran','transaksi.bukti_pembayaran','transaksi.tanggal_mulai','transaksi.id','transaksi.tanggal_berakhir','transaksi.jumlah_kamar','transaksi.lama_menginap','pelanggan.nama','pelanggan.no_telepon','pemilikhomestay.no_rekening','homestay.nama_homestay')
->where('transaksi.id','=',$id)
->get();
$pdf = PDF::loadView('pdf.rincianHistory',['data' => $rincianHistory[0]]);
return $pdf->stream('rincianHistory.pdf');
}
//Mengakses Profile Pelanggan
public function profile(){
$data = DB::table('pelanggan')
......
......@@ -42,9 +42,11 @@
<td>: </td>
<td>{{$data->deskripsi}}</td>
</tr>
<tr>
<th>Gambar</th>
<td>: </td>
</tr>
</table>
<img src="img/{{$data->gambar}}" style="min-width: 400px;">
</body>
</html>
......@@ -49,11 +49,11 @@
<td>: </td>
<td>Rp. {{$data->total_pembayaran}}</td>
</tr>
<!-- <tr>
<tr>
<th>bukti Pembayaran</th>
<td>: </td>
<td><img src="/img/{{ $data->bukti_pembayaran }}"></td>
</tr> -->
<td><img src="img/{{ $data->bukti_pembayaran }}"></td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<p style="float:right;"><b>Tanggal : </b> <?php echo date("Y/m/d") ;?></p>
<br><br><br>
<center> <h1>Rincian Pemesanan</h1></center>
<table class="table table-user-information">
<tr>
<th>Nama pemilikhomestay</th>
<td>: </td>
<td>{{$data->nama}}</td>
</tr>
<tr>
<th>Nama Homestay</th>
<td>: </td>
<td>{{$data->nama_homestay}}</td>
</tr>
<tr>
<th>Tanggal Check-in</th>
<td>: </td>
<td>{{$data->tanggal_mulai}}</td>
</tr>
<tr>
<th>Lama Menginap</th>
<td>: </td>
<td>{{$data->lama_menginap}} Malam </td>
</tr>
<tr>
<th>Tanggal Check-out</th>
<td>: </td>
<td>{{$data->tanggal_berakhir}}</td>
</tr>
<tr>
<th>Total Pembayaran</th>
<td>:</td>
<td>{{$data->total_pembayaran}}</td>
</tr>
<tr>
<th>Bukti pembayaran</th>
<td>:</td>
</tr>
</table>
<img src="img/{{ $data->bukti_pembayaran }}" style="max-height: 250px;
width: auto;">
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<p style="float:right;"><b>Tanggal : </b> <?php echo date("Y/m/d") ;?></p>
<br><br><br>
Test
<table class="table table-user-information">
<!-- <tr>
<th>bukti Pembayaran</th>
<td>: </td>
<td><img src="/img/{{ $data->bukti_pembayaran }}"></td>
</tr> -->
</table>
</body>
</html>
@extends('adminlte::layouts.master')
@section('main-content')
<div class="cuisines agileits w3layouts" style="padding-top: 50px; margin-top: 80px; margin-bottom: 100px;">
<div class="container">
<table class="table table-striped">
<thead>
<tr>
<th> No. Rekening </th>
<th> Nama Pemilik Homestay </th>
<th> Total Pembayaran </th>
<th> Tanggal Mulai </th>
<th> Tanggal Berakhir </th>
<th> Bukti Pembayaran </th>
<th> Status Pemesanan</th>
<th></th>
<th></th>
<th colspan="2">Rincian Pemesanan</th>
</tr>
</thead>
<tbody>
@foreach($data as $a)
<tr>
<td>{{$a->no_rekening}}</td>
<td>{{$a->nama}}</td>
<td>{{$a->total_pembayaran}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>
@if($a->bukti_pembayaran==null)
Belum ada bukti transfer
@else
<!-- <img alt="User Pic" src="{{ url('/img/'.$a ->bukti_pembayaran) }}" class="img-responsive" > -->
<a href="/img/{{ $a->bukti_pembayaran }}" alt="Bukti Pembayaran" data-lightbox="roadtrip"><img src="/img/{{ $a->bukti_pembayaran }}" style="max-height: 100px;
width: auto;"></a>
@endif
</td>
<td>
@if($a->status==0) <span class="label label-warning"> Belum Dikonfirmasi </span>
<td>
<a href="{{url('buktipembayaran/'.$a->id)}}" class="btn btn-primary">Upload Bukti</a>
</td>
@elseif($a->status==1)
<td colspan="3"><span class="label label-success"> Diterima </span></td>
@elseif($a->status==2)
<td colspan="3"><span class="label label-danger"> Ditolak </span> </td>
@endif
</td>
<td>
@if($a->status==1)
<a href="{{url('detailpesanan/'.$a->id)}}" class="btn btn-primary"><i class="glyphicon glyphicon-eye-open"></i> </a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<script src="{{asset('js/jquery-ui.js')}}"></script>
@endsection
@extends('adminlte::layouts.master')
@section('main-content')
<div class="cuisines agileits w3layouts" style="padding-top: 50px; margin-top: 80px; margin-bottom: 100px;">
<div class="container">
<form class="form-horizontal" action="{{url('perbaharui/'.$data->id)}}" method="post">
<input type="hidden" name="_method" value="PUT">
{{csrf_field()}}
<label>Tanggal Mulai</label>
<input type="text" name="tanggal" value="{{$data->tanggal_mulai}}" id="noTelepon" class="form-control">
<label>Lama Menginap</label>
<input type="text" name="lama_menginap" value="{{$lama_menginap}}" class="form-control" >
<label>Jumlah Kamar</label>
<input type="text" name="jumlah_kamar" value="{{$data->jumlah_kamar}}" class="form-control">
<br>
<div class="form-group" align="right" style="margin-right:0px;">
<input type="submit" class="btn btn-primary" value="Simpan">
</div>
</form>
</div>
</div>
@endsection
@extends('adminlte::layouts.master')
@section('main-content')
<div class="cuisines agileits w3layouts" style="padding-top: 50px; margin-top: 80px; margin-bottom: 100px;">
<div class="container">
<form class="form-horizontal" action="{{url('upload/'.$data->id)}}" method="post" enctype="multipart/form-data">
<input type="hidden" name="_method" value="PUT">
{{csrf_field()}}
<label>Tanggal Mulai</label>
<input type="text" name="tanggal_mulai" value="{{$data->tanggal_mulai}}" id="noTelepon" class="form-control" disabled>
<label>Tanggal Berakhir</label>
<input type="text" name="tanggal_berakhir" value="{{$data->tanggal_berakhir}}" class="form-control" disabled>
<label>Jumlah Kamar</label>
<input type="text" name="jumlah_kamar" value="{{$data->jumlah_kamar}}" class="form-control" disabled>
<label>Bukti Pembayaran</label>
<input type="file" name="bukti_pembayaran" id="foto" class="form-corol">nt<br>
<div class="form-group" align="right">
<input type="submit" class="btn btn-primary" value="simpan">
</div>
</form>
</div>
</div>
@endsection
@extends('adminlte::layouts.master')
@section('main-content')
<div class="cuisines agileits w3layouts" style="padding-top: 50px; margin-top: 80px; ">
<div class="container">
<div class="register agileits w3layouts ">
<form class="form-horizontal" action="{{url('editProfileCustomer/'.$data->id)}}" method="post" enctype="multipart/form-data">
<input type="hidden" name="_method" value="PUT">
{{csrf_field()}}
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Nama</label>
<div class="col-sm-10">
<input type="text" name="nama" class="form-control" id="inputEmail3" value="{{$data->nama}}">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Alamat</label>
<div class="col-sm-10">
<input type="text" name="alamat" class="form-control" id="inputPassword3" value="{{$data->alamat}}">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">No.Telepon</label>
<div class="col-sm-10">
<input type="text" name="noTelepon" class="form-control" id="inputPassword3" value="{{$data->no_telepon}}">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Pekerjaan</label>
<div class="col-sm-10">
<input type="text" name="pekerjaan" class="form-control" id="inputPassword3" value="{{$data->pekerjaan}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"> Foto </label>
<div class="col-sm-10">
<input type="file" value="Browse" name="foto" id="picture" >
</div>
<div class="form-group" align="right">
<div class="col-sm-12">
<input type="submit" class="btn btn-primary">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
@extends('adminlte::layouts.master')
@section('main-content')
<div class="cuisines agileits w3layouts" style="padding-top: 50px; margin-top: 40px; ">
<div class="container">
<div class="col-md-4 col-sm-3 cuisines-grids agileits w3layouts cuisines-grids-2">
<img src="img/{{Auth::user()->foto}}" alt="Agileits W3layouts" style="width:250px;">
<h3 style="margin-left:60px ; margin-top: 3px;"> {{Auth::user()->name}} </h2>
</div>
<div class="col-md-8 col-sm-8 cuisines-grids agileits w3layouts cuisines-grids-1">
<h3>Data Diri</h3>
<table class="table-condensed" style="font-size: 16px; margin-left: -3px; color: #777;" >
<tr>
<td>Nama</td>
<td>:</td>
<td>{{$data->nama}}</td>
</tr>
<tr>
<td> Alamat</td>
<td>:</td>
<td>{{$data->alamat}}</td>
</tr>
<tr>
<td> No Telepon</td>
<td>:</td>
<td>{{$data->no_telepon}}</td>
</tr>
<tr>
<td> Pekerjaan </td>
<td>:</td>
<td>{{$data->pekerjaan}}</td>
</tr>
</table>
<br><br>
<div class="services agileits w3layouts" style="background-color: #fff; padding: 1px 1px 1px 0px; margin-top: 30px;">
<a class="agileits w3layoutswow slideInLeft" href="{{url('editProfileCustomer/'.$data->id)}}" >Edit Profile <span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></a>
<a class="agileits w3layoutswow slideInLeft" href="{{url('customerHistory')}}">History <span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></a>
</div>
<br><br>
@if(Session::has('message'))
<div class="alert alert-danger">
{{ Session::get('message') }}
</div>
@endif
</div>
<div class="clearfix"></div>
</div>
</div>
@endsection
@extends('adminlte::layouts.master')
@section('main-content')
<div class="cuisines agileits w3layouts" style="padding-top: 50px; margin-top: 70px; ">
<div class="container">
<div class="col-md-6 col-sm-6 cuisines-grids agileits w3layouts" style="padding:0px;">
<h3>Data Pemesanan Homestay</h3> <br>
<!-- <h3 style="margin-left:60px ; margin-top: 3px;"> </h2> -->
<form class="form-horizontal" action="{{url('booking')}}" method="post" enctype="multipart/form-data">
{{csrf_field()}}
<div class="form-group">
<div class="col-sm-10">
<label for="">Nama</label>
<input type="text" name="nama" class="form-control" value="{{Auth::user()->name}}" id="inputEmail3" >
</div>
</div>
<div class="form-group">
<div class="col-sm-5">
<label>Nomor Handphone Kontak</label>
<input type="text" name="kontak_hp" class="form-control" id="inputEmail3" value="{{$dataUser->no_telepon}}">
</div>
<div class="col-sm-5">
<label>Alamat Email Kontak</label>
<input type="text" name="kontak_email" class="form-control" id="inputEmail3" value="{{Auth::user()->email}}">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<label>Permintaan Khusus</label>
<textarea name="permintaan_khusus" style="border: #cccccc 1px solid;border-radius: 5px; min-height:150px;"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<label>ExtraBed</label>
<input type="number" min="0" name="extrabed" class="form-control" id="inputEmail3" >
</div>
</div>
<input type="hidden" value="{{$dataUser->no_telepon}}" name="id_user">
<input type="hidden" value="{{$request->lama_menginap}}" name="lama_menginap">
<input type="hidden" value="{{$request->tanggal_mulai}}" name="tanggal_mulai">
<input type="hidden" value="{{$request->tanggal_selesai}}" name="tanggal_selesai">
<input type="hidden" value="{{$request->jumlah_kamar}}" name="jumlah_kamar">
<input type="hidden" value="{{$request->jumlah_tamu}}" name="jumlah_tamu">
<input type="hidden" value="{{$data->harga}}" name="harga_homestay">
<input type="hidden" value="{{$totalHarga}}" name="total_harga">
<input type="hidden" value="{{$id}}" name="id_homestay">
<!-- <div class="form-group" align="right">
<div class="col-sm-10">
<input type="submit" class="btn btn-primary">
</div>
</div> -->
<div class="form-group" align="left">
<div class="col-sm-10">
<input type="submit" class="btn btn-warning" value="Lanjutkan Pembayaran">
</div>
</div>
</form>
</div>
<div class="col-md-5 col-sm-5 cuisines-grids agileits w3layouts" style="background-color: #f9f9f9;padding: 40px;border-radius: 9px;">
<h3>Rincian Pemesanan Homestay</h3> <br> <br><br>
<table class="table-condensed" style="font-size: 16px; margin-left: -3px; color: #777;" >
<tr>
<td>Durasi</td>
<td>:</td>
<td>{{$request->lama_menginap}} Malam</td>
</tr>
<tr>
<td> Check-in</td>
<td>:</td>
<td>{{$request->tanggal_mulai}}</td>
</tr>
<tr>
<td> Check-out</td>
<td>:</td>
<td>{{$request->tanggal_selesai}}</td>
</tr>
<tr>
<td>Jumlah Kamar</td>
<td>:</td>
<td>{{$request->jumlah_kamar}}</td>
</tr>
<tr>
<td> Jumlah Tamu </td>
<td>:</td>
<td>{{$request->jumlah_tamu}}</td>
</tr>
</table>
<br><br><br>
<div class=" cuisines-grids agileits w3layouts" >
<h3>Rincian Harga</h3><br>
<table class="table-condensed" style="font-size: 16px; margin-left: -3px; color: #777;" >
<label for="">{{$data->nama_homestay}}</label>
<tr>
<td>Harga Kamar</td>
<td>:</td>
<td>{{$data->harga}}</td>
</tr>
<tr>
<td> Total Bayar</td>
<td>:</td>
<td><input type="text" name="total_harga" value="{{$totalHarga}}" disabled></td>
</tr>
</table>
<br>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
@endsection
......@@ -37,7 +37,7 @@
<td>{{$data->total_pembayaran}}</td>
</tr>
<tr>
<td> <a href="" class="btn btn-warning"><i class="glyphicon glyphicon-print"></i> print </a></td>
<td> <a href="{{url('rincianHistoryPrint/'.$data->id)}}" class="btn btn-warning"><i class="glyphicon glyphicon-print"></i> print </a></td>
</tr>
</table>
</div>
......
......@@ -25,7 +25,7 @@
</ul>
</li>
<li><a href="{{url('listPemesanan')}}"><i class='fa fa-list'></i> <span> Data Pemesanan</span></a></li>
<li><a href="{{url('listPemesanan')}}"><i class='fa fa-check-square'></i> <span> Data Pemesanan</span></a></li>
@elseif(Auth::user()->role=="Owner")
<li class="treeview"><a href="#"><i class='fa fa-television'></i> <span> FASILITAS </span><span class="pull-right-container">
......
......@@ -115,7 +115,7 @@ Route::group(['middleware' => 'customer'], function () {
Route::get('customerProfile','CustomerController@profile');
Route::post('feedback/{id}','CustomerController@sendFeedback');
Route::get('rincianHistory/{id}','CustomerController@rincianHistory');
Route::get('rincianHistoryPrint/{id}','CustomerController@rincianHistoryPrint');
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment