@php $colspan_summary = 0; $summary_room_rate = 0; $summary_pax = 0; $summary_com = 0; $summary_lodging = 0; $summary_arrangement = 0; $summary_total_rate = 0; $summary_total_room = 0; @endphp {{-- @foreach(config('custom.revenue_groups') as $revenue_group) --}} {{-- @php $colspan_summary++ @endphp @endforeach --}} {{-- @foreach($bookings as $booking) --}} @foreach($booking_details as $booking_detail) @php $booking = $booking_detail->booking; $summary_total_room +=1; @endphp {{-- Com --}} {{-- Lodging --}} @php $total_arrangement = 0; @endphp {{-- @foreach(config('custom.revenue_groups') as $key => $revenue_group) --}} {{-- @endforeach --}} @endforeach {{-- @endforeach --}} {{-- Com --}} {{-- Lodging --}}
No Date RmNo Argt RCode Curr Room Rate Pax Com LodgingTotal Arrangement
(Breakfast, etc.)
Total Rate Arrival Depart BillNum Reservation Name Guest Name
{{ $loop->iteration }} {{$booking_detail->date_now}} {{$booking_detail->nomor_kamar}} {{$booking_detail->arrangement_codes}} {{$booking_detail->rate_codes}} Rp @php $total_arr_sum = 0; if ($excludebtn) { $total_arr_sum += @$booking_detail->per_item_arr; }else{ $total_arr_sum += @$booking_detail->per_item_arr + @$booking_detail->per_item_arr_services + @$booking_detail->per_item_arr_tax; } @endphp @if($excludebtn) @if (in_array(@$booking_detail->rate_code->segment_ratecode, [10, 11])) {{(0)}} @php $summary_room_rate += 0 @endphp @else {{($booking_detail->per_item_real + ($total_arr_sum))}} @php $summary_room_rate += $booking_detail->per_item_real + ($total_arr_sum) @endphp @endif @else {{($booking_detail->per_item)}} @php $summary_room_rate += $booking_detail->per_item @endphp @endif {{$booking_detail->pax}} @php $summary_pax += $booking_detail->pax @endphp @php $summary_com += in_array($booking_detail->rate_code->segment_ratecode, [10, 11]) ? 1 : 0; @endphp {{ in_array($booking_detail->rate_code->segment_ratecode, [10, 11]) ? 1 : '' }} @if($excludebtn) @php if (in_array(@$booking_detail->rate_code->segment_ratecode, [10, 11])) { $lodging = 0; }else { $lodging = $booking_detail->per_item_real; } $summary_lodging += $lodging; @endphp {{ ( $lodging ) }} @else @php $lodging = ($booking_detail->per_item_real + $booking_detail->per_item_tax + $booking_detail->per_item_services); $summary_lodging += $lodging; @endphp {{ ( $lodging ) }} @endif @php if (in_array(@$booking_detail->rate_code->segment_ratecode, [10, 11])) { }else { if ($excludebtn) { $summary_arrangement += @$booking_detail->per_item_arr; $total_arrangement += @$booking_detail->per_item_arr; }else { $summary_arrangement+= @$booking_detail->per_item_arr + @$booking_detail->per_item_arr_services + @$booking_detail->per_item_arr_tax; $total_arrangement += @$booking_detail->per_item_arr + @$booking_detail->per_item_arr_services + @$booking_detail->per_item_arr_tax; } } @endphp {{(@$total_arrangement)}} @if($excludebtn) @php if (in_array(@$booking_detail->rate_code->segment_ratecode, [10, 11])) { $summary_total_rate += 0; }else{ $summary_total_rate += $booking_detail->per_item_real + $total_arrangement; } @endphp @if (in_array(@$booking_detail->rate_code->segment_ratecode, [10, 11])) {{ (0) }} @else {{ ($booking_detail->per_item_real + $total_arrangement) }} @endif @else @php $summary_total_rate += $booking_detail->per_item; @endphp {{ ($booking_detail->per_item) }} @endif {{-- {{ formatDate($booking_detail->checkin ?? $booking_detail->start_date) }}
--}} {{$booking_detail->checkin_real ? dateFormat($booking_detail->checkin_real, 'd-m-Y yH:i:s') : ($booking_detail->checkin ? $booking_detail->checkin->format('d-m-Y yH:i:s') : '-')}}
{{-- {{ formatDate($booking_detail->checkout ?? $booking_detail->end_date) }}
--}} {{$booking_detail->checkout_real ? dateFormat($booking_detail->checkout_real, 'd-m-Y yH:i:s') : ($booking_detail->checkout ? $booking_detail->checkout->format('d-m-Y yH:i:s') : '-')}}
{{ @$invoice_array[$booking_detail->booking_id][$booking_detail->room_index]->no_invoice }} {{ $booking->title ? $booking->title.' ' : '' }}{{ $booking->nama }} {{ $booking->company ? @$booking->company->name : ($booking_detail->guest_room ?? $booking->nama) }}{{ $booking->company ? ', '.@$booking->company->comp_title : '' }}
SUMMARY
{{$summary_total_room}} Rp {{ ($summary_room_rate) }} {{ ($summary_pax) }} {{ ($summary_com) }}{{ ($summary_lodging) }} {{ ($summary_arrangement) }} {{ ($summary_total_rate) }}
@php $total_ringkasan = $summary_lodging; @endphp @foreach(config('custom.revenue_groups') as $key => $revenue_group) @php $total_ringkasan += @array_sum($summary_arrangement[$key]); @endphp @endforeach
Amount Curr Local Amount
{{ ($summary_lodging) }} Rp {{ ($summary_lodging) }}
{{ (@array_sum($summary_arrangement[$key])) }} Rp {{ (@array_sum($summary_arrangement[$key])) }}
Total {{($total_ringkasan)}}