@extends('layouts.admin') @section('header_style') @endsection @section('content')
{{ csrf_field() }}
@php $i=1; $total = 0;@endphp @foreach($damage as $items) @php $i++; @endphp @php $total += (float)$items->total; @endphp @endforeach
No Booking Date Check-in Check-out Night Booking No Hotel Guest Name Price Agent Staff
{{$i}} @if($items->created == '0000-00-00' || is_null($items->created)) - @else {{date('d/m/Y', strtotime($items->created))}} @endif @if($items->check_in == '0000-00-00' || is_null($items->check_in)) - @else {{date('d/m/Y', strtotime($items->check_in))}} @endif @if($items->check_out == '0000-00-00' || is_null($items->check_out)) - @else {{date('d/m/Y', strtotime($items->check_out))}} @endif @php $diffTime = (strtotime($items->check_out)) - (strtotime($items->check_in)); $diffDays = $diffTime / (60 * 60 * 24); @endphp {{ $diffDays }} {{$items->booking_id}} {{$items->hotelName}} {{$items->first_name}} RM {{ number_format(round((float)$items->total,0), 2) }} {{$items->agentName}} {{$items->staffName}}
Total RM {{ number_format(round((float)$total,0), 2) }}
@endsection @section('footer_script') @endsection