Commit 77105c24 by Palti Sinaga
parents 7ce04834 6dc43c0c
......@@ -63,7 +63,7 @@ class CustomerController extends Controller
$feed->save();
return redirect()->action('CustomerController@detailhomestay', ['id' => $id]);
return redirect()->action('GuestController@detailhomestay', ['id' => $id]);
}
//Upload Bukti Pembayaran
......@@ -236,20 +236,15 @@ class CustomerController extends Controller
if($dataBookingMulai->count() > 0){
$currentJumlahKamar = $homestayJumlahKamar[0]->jumlah_kamar - $dataBookingMulai[0]->jumlah_kamar;
if($currentJumlahKamar >= $request['jumlah_kamar']){
dd("masuk gan" ,$request['jumlah_kamar'],$request['tanggal']);
}else{
dd("nggak boleh");
if($currentJumlahKamar < $request['jumlah_kamar']){
return redirect()->action('GuestController@detailhomestay',['id'=>$request['id']])->with('message', 'Maaf Anda Tidak Bisa Melakukan Pembookingan di karenakan kamar yang tersisa tidak sesuai dengan permintaan anda!');
}
}else{
if($dataBookingBerakhir->count() > 0){
$currentJumlahKamar2 = $homestayJumlahKamar[0]->jumlah_kamar - $dataBookingBerakhir[0]->jumlah_kamar;
if($currentJumlahKamar2 >= $request['jumlah_kamar']){
dd('boleh aja agan');
}else{
dd('nggak boleh');
if($currentJumlahKamar2 < $request['jumlah_kamar']){
return redirect()->action('GuestController@detailhomestay',['id'=>$request['id']])->with('message', 'Maaf Anda Tidak Bisa Melakukan Pembookingan di karenakan kamar yang tersisa tidak sesuai dengan permintaan anda!');
}
}
}
......@@ -277,18 +272,22 @@ class CustomerController extends Controller
if($time[1]%2==1){
$time[2] += $request['jumlah_hari'];
if($time[2]>31){
if($request['jumlah_hari']!=1){
$time[2] = 0;
$time[2] += $request['jumlah_hari'];
$time[1] +=1;
}
}
$time[2] -=1;
}else{
$time[2] += $request['jumlah_hari'];
if($time[2]>30){
if($request['jumlah_hari']!=1){
$time[2] = 0;
$time[2] += $request['jumlah_hari'];
$time[1] +=1;
}
}
$time[2] -=1;
}
}
......
......@@ -849,7 +849,7 @@ ul.callbacks_tabs li {
/*--w3layouts--*/
/*--agileits--*/
padding: 50px 0 50px;
background: url("../img/bulbul.jpg");
background: url("../img/3190_pantai-bul-bul.jpg");
background-repeat: no-repeat;
background-position: center;
background-size: cover;
......
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