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