Commit 1ba57949 by Juliper

no message

parent 1094d4ea
...@@ -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;
} }
......
...@@ -765,7 +765,7 @@ ul.callbacks_tabs li { ...@@ -765,7 +765,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;
......
...@@ -46,36 +46,6 @@ ...@@ -46,36 +46,6 @@
</form> </form>
</td> </td>
</tr> </tr>
<tr class="success">
<td>{{$a->noRekening}}</td>
<td>{{$a->nama}}</td>
<td>{{$a->total_pembayaran}}</td>
<td>
@if($a->bukti_pembayaran==null)
<img alt="Buku Transfer Tidak Ada" class="img-circle img-responsive">
@else
<img alt="User Pic" src="{{ url('/img/'.$a ->bukti_pembayaran) }}" class="img-responsive" >
@endif
</td>
<td>
@if($a->status==0) Belum Dikonfirmasi
@elseif($a->status==1) Di Terima
@elseif($a->status==2) Di Tolak
@endif
</td>
<td>
<a href="{{url('buktipembayaran/'.$a->id)}}">Upload Bukti</a>
</td>
<td>
<form action="{{url('batalkanPemesanan/'.$a->id)}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="_method" id="hapus" value="DELETE">
<button type="submit" class="btn btn-danger">Hapus</button>
</form>
</td>
</tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
......
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