@extends(\Auth::user()->role != 10 ? 'layout' : 'layoutfrontdesk') @section('title', 'Rate Code') @section('css') @endsection @section('content')
{{-- --}}
@php $i = 1; @endphp {{-- invalid ratecode --}} @foreach($inva_ratecodes as $inva_ratecode) {{-- --}} {{-- Grand Total --}} @php $grand_total = $inva_ratecode->harga ?? 0; if ($inva_ratecode->include_breakfast == 1 && @$inva_ratecode->arrangement->arrangementCodeDetail) { foreach (@$inva_ratecode->arrangement->arrangementCodeDetail as $key_arrangement_code_detail => $arrangement_code_detail) { if ($arrangement_code_detail->always_one != 1) { $grand_total += @$arrangement_code_detail->harga * @$inva_ratecode->jenisKamar->kapasitas; }else{ $grand_total += $arrangement_code_detail->harga; } } } @endphp {{-- Grand Total --}} @php $i++ @endphp @endforeach {{-- valid ratecode --}} @foreach($ratecodes as $ratecode) {{-- --}} {{-- Grand Total --}} @php $grand_total = $ratecode->harga ?? 0; if ($ratecode->include_breakfast == 1 && @$ratecode->arrangement->arrangementCodeDetail) { foreach (@$ratecode->arrangement->arrangementCodeDetail as $key_arrangement_code_detail => $arrangement_code_detail) { if ($arrangement_code_detail->always_one != 1) { $grand_total += $arrangement_code_detail->harga * @$ratecode->jenisKamar->kapasitas; }else{ $grand_total += $arrangement_code_detail->harga; } } } @endphp {{-- Grand Total --}} @php $i++ @endphp @endforeach
no Rate Code Segment Room Type Price Period of validity Actions
{{ $loop->iteration }}{{ $i }} Rate {{ $inva_ratecode->rate_code ?? '-' }} {{ config('custom.segment_ratecodes')[$inva_ratecode->segment_ratecode] ?? '-' }} {{ $inva_ratecode->jenisKamar->nama ?? '-' }}{{ ribuanWithComma($grand_total)}} {{ ($inva_ratecode->start_date == "" ? '-' : tanggalIndo($inva_ratecode->start_date)).' until '.($inva_ratecode->end_date == "" ? '-' : tanggalIndo($inva_ratecode->end_date))}} {{-- --}}
{{ $loop->iteration }}{{ $i }} Rate {{ $ratecode->rate_code ?? '-' }} {{ config('custom.segment_ratecodes')[$ratecode->segment_ratecode] ?? '-' }} {{ $ratecode->jenisKamar->nama ?? '-' }}{{ ribuanWithComma($grand_total)}} {{ ($ratecode->start_date == "" ? '-' : tanggalIndo($ratecode->start_date)).' until '.($ratecode->end_date == "" ? '-' : tanggalIndo($ratecode->end_date))}} {{-- --}} @if(!count($ratecode->bookingDetail) > 0) @endif
@endsection @section('js') @endsection