@php $paxIn = $paxInInf = $paxTra = $paxTraInf = $paxOut = $paxOutInf = $delayTotal = $delayMinTotal = 0 @endphp
@php $totalFlights = 0 @endphp
@php $ssrTotalsDep = $ssrTotalsArr = [] @endphp
@foreach ($flights as $k => $items)
{{-- @foreach ($flights->lines as $k => $line)--}}
{{-- @php $items = $line->getFlights()@endphp --}}
@php $depFlight = $depFN = $depAp = $arrAp = $depAC = null @endphp
@php $in = $inInf = $tra = $traInf = $out = $outInf = $dlTotal = $dlMins = 0 @endphp
@if (count($items) == 2)
@php $depFlight = $items[0] @endphp
@php $depAp = getFlightDepartureAirport($depFlight, false, true) @endphp
@php $arrAp = getFlightArrivalAirport($depFlight, false, true) @endphp
@php $depSTD = $depFlight->std && $depFlight->std != EMPTY_DATETIME ? baseDateFormat($depFlight->std, true) : null @endphp
@php $depSTDDate = $depSTD ? date("Y-m-d", strtotime($depSTD)) : null @endphp
@php $depFN = getFlightNumberFull($depFlight->flightNumber) @endphp
@php $depAC = getFlightAircraft($depFlight) @endphp
@php $depACType = getFlightAircraftType($depFlight) @endphp
@php $arrFlight = $items[1] @endphp
@php $arrAC = getFlightAircraft($arrFlight) @endphp
@php $arrACType = getFlightAircraftType($arrFlight) @endphp
@php $arrFN = getFlightNumberFull($arrFlight->flightNumber) @endphp
@php $arrDepAp = getFlightDepartureAirport($arrFlight, false, true) @endphp
@php $arrArrAp = getFlightArrivalAirport($arrFlight) @endphp
@php $arrSTA = $arrFlight->sta && $arrFlight->sta != EMPTY_DATETIME ? baseDateFormat($arrFlight->sta, true) : null @endphp
@php $arrSTADate = $arrSTA ? date("Y-m-d", strtotime($arrSTA)) : null @endphp
@php $depFltCancelledClass = $depFlight->cancelled_at ? "color-red" : "" @endphp
@php $arrFltCancelledClass = $arrFlight->cancelled_at ? "color-red" : "" @endphp
@if ($pairingPermission)
{!! Form::checkbox("selected", "1", false, ['class' => 'form-control flight', "data-flight_id" => $depFlight->id ]) !!}
|
@endif
{{ getFlightDepartureInitialDate($depFlight, true) }} |
{{--Departure Flight--}}
{{ $depAp }} |
@if ($pairingPermission)
{{ $depFN }}
@else
{{ $depFN }}
@endif
@if ($depFlight->cancelled_at)
(Cancelled)
@endif
|
{{ $depAC }} |
{{ $depACType }} |
{{--Arrival flight ATA--}}
@if ($pairingPermission)
{{ $arrFN }}
@else
{{ $arrFN }}
@endif
@if ($arrFlight->cancelled_at)
(Cancelled)
@endif
|
@if ($pairingPermission)
{{ $arrAC }} |
{{ $arrACType }} |
@endif
{{ $arrDepAp }} |
{{ $arrFlight->sta && $arrFlight->sta != EMPTY_DATETIME ? baseDateFormat($arrFlight->sta, true, " ", true, false, "") : "" }} |
{{ $arrFlight->ata && $arrFlight->ata != EMPTY_DATETIME ? baseDateFormat($arrFlight->ata, true, " ", true, false, "") : "" }} |
{{ getFlightDelayFromStaToAta($arrFlight) }} |
{{ $arrAp }} |
{{ $depFlight->std && $depFlight->std != EMPTY_DATETIME ? baseDateFormat($depFlight->std, true, " ", true, false, "") : "" }} |
{{--Departure flight ATD--}}
{{ $depFlight->atd && $depFlight->atd != EMPTY_DATETIME ? baseDateFormat($depFlight->atd, true, " ", true, false, "") : "" }} |
{{--DELAYS OUT--}}
@php list($codes, $times, $dlTotal, $dlMins) = getFlightDelays($depFlight) @endphp
@if (count($codes))
{{ implode("/", $codes) }} |
{{ implode("/", $times) }} |
{{ $dlMins }} |
{{ $dlTotal }} |
@else
|
|
|
|
@endif
{{--- PAX IN---}}
@if ($arrFlight->sectors)
{{ $in = $arrFlight->sectors[$arrArrAp->id]["pax_total"]}} |
{{ $inInf = $arrFlight->sectors[$arrArrAp->id]["pax_inf"] }} |
{{--PAX TRA--}}
{{ $tra = nullableArrayValue($arrFlight->sectors, "tra", "pax_total") }} |
{{ $traInf = nullableArrayValue($arrFlight->sectors, "tra", "pax_inf") }} |
{{--- PAX OUT---}}
{{ $out = getFlightPaxTotal($depFlight, true) }} |
{{ $outInf = $depFlight->pax_inf_actual }} |
@else
{{ $in = getFlightPaxTotal($arrFlight, true) }} |
{{ $inInf = $arrFlight->pax_inf_actual }} |
{{--PAX TRA--}}
|
|
{{--- PAX OUT---}}
{{ $out = getFlightPaxTotal($depFlight, true) }} |
{{ $outInf = $depFlight->pax_inf_actual }} |
@endif
{{-- {{ $arrAp }} | --}}
{{-- {{ baseTimeFormat($depSTD) }} | --}}
{{--Arrival Flight--}}
{{-- {{ $arrFN }} | --}}
{{-- {{ $arrDepAp }} | --}}
{{-- {{ ($depSTDDate != $arrSTADate ? $arrSTADate." " : ""). baseTimeFormat($arrSTA) }} | --}}
{{--SSR--}}
@foreach($ssrList as $ssr)
{{--IN--}}
@if ($arrFlight->ssr_ready && isset($arrFlight->ssr_ready[$ssr]))
@php $s = $arrFlight->ssr_ready[$ssr] @endphp
{{ $s }} |
@if (!isset($ssrTotalsArr[$ssr]))
@php $ssrTotalsArr[$ssr] = 0 @endphp
@endif
@php $ssrTotalsArr[$ssr] += $s @endphp
@else
|
@endif
{{--OUT--}}
@if ($depFlight->ssr_ready && isset($depFlight->ssr_ready[$ssr]))
@php $s = $depFlight->ssr_ready[$ssr] @endphp
{{ $s }} |
@if (!isset($ssrTotalsDep[$ssr]))
@php $ssrTotalsDep[$ssr] = 0 @endphp
@endif
@php $ssrTotalsDep[$ssr] += $s @endphp
@else
|
@endif
@endforeach
{{--Counters--}}
@if ($depFlight->ckin_num)
{{ $depFlight->ckin_num }}
@endif
@if ($arrFlight->ckin_num)
/ {{ $arrFlight->ckin_num }}
@endif
|
@if ($depFlight->cancelled_at)
{{ getUserName($depFlight->updatedBy) }} |
{{ baseDateFormat($depFlight->cancelled_at, true, " ", true, false, "") ?? "" }} |
{{ baseDateFormat($depFlight->cancellation_received_at, true, " ", true, false, "") ?? "" }} |
{{ $depFlight->remark }} |
{{ $depFlight->sla }} |
|
@else
|
|
|
|
{{ $depFlight->sla }} |
{{ $depFlight->remark }} |
@endif
@php $totalFlights++ @endphp
@else
@php $flight = $items[0] @endphp
@php $fn = getFlightNumberFull($flight->flightNumber) @endphp
@if ($flight->type == DEPARTURE)
@php $ac = getFlightAircraft($flight) @endphp
@php $acType = getFlightAircraftType($flight) @endphp
@php $depAp = getFlightDepartureAirport($flight, false, true) @endphp
@php $arrAp = getFlightArrivalAirport($flight, false, true) @endphp
@php $fltCancelledClass = $flight->cancelled_at ? "color-red" : "" @endphp
@if ($pairingPermission)
|
@endif
{{ getFlightDepartureInitialDate($flight, true) }} |
{{--Departure Flight--}}
{{ $depAp }} |
@if ($pairingPermission)
{{ $fn }}
@else
{{ $fn }}
@endif
@if ($flight->cancelled_at)
(Cancelled)
@endif
|
{{--{{ $arrAp }} | --}}
{{ $ac }} |
{{ $acType }} |
{{--Arrival flight ATA--}}
|
@if ($pairingPermission)
|
|
@endif
|
|
|
|
{{ $arrAp }} |
{{ $flight->std && $flight->std != EMPTY_DATETIME ? baseDateFormat($flight->std, true, " ", true, false, "") : "" }} |
{{--Departure flight ATD--}}
{{ $flight->atd && $flight->atd != EMPTY_DATETIME ? baseDateFormat($flight->atd, true, " ", true, false, "") : "" }} |
{{--Departure Flight--}}
{{-- {{ $flight->std && $flight->std != EMPTY_DATETIME ? baseTimeFormat($flight->std) : "" }} | --}}
@php list($codes, $times, $dlTotal, $dlMins) = getFlightDelays($flight) @endphp
@if (count($codes))
{{ implode("/", $codes) }} |
{{ implode("/", $times) }} |
{{ $dlMins }} |
{{ $dlTotal }} |
@else
|
|
|
|
@endif
{{--- PAX IN---}}
|
|
{{--PAX TRA--}}
|
|
{{--- PAX OUT---}}
{{ $out = getFlightPaxTotal($flight, true) }} |
{{ $outInf = $flight->pax_inf_actual }} |
@foreach($ssrList as $ssr)
{{--IN--}}
|
{{--OUT--}}
@if ($flight->ssr_ready && isset($flight->ssr_ready[$ssr]))
@php $s = $flight->ssr_ready[$ssr] @endphp
{{ $s }} |
@if (!isset($ssrTotalsDep[$ssr]))
@php $ssrTotalsDep[$ssr] = 0 @endphp
@endif
@php $ssrTotalsDep[$ssr] += $s @endphp
@else
|
@endif
@endforeach
{{--Counters--}}
{{ $flight->ckin_num }} |
@if ($flight->cancelled_at)
{{ getUserName($flight->updatedBy) }} |
{{ baseDateFormat($flight->cancelled_at, true, " ", true, false, "") ?? "" }} |
{{ baseDateFormat($flight->cancellation_received_at, true, " ", true, false, "") ?? "" }} |
{{ $flight->remark }} |
{{ $flight->sla }} |
|
@else
|
|
|
|
{{ $flight->sla }} |
{{ $flight->remark }} |
@endif
@php $totalFlights++ @endphp
@else
@php $ac = getFlightAircraft($flight) @endphp
@php $acType = getFlightAircraftType($flight) @endphp
@php $arrAp = getFlightArrivalAirport($flight, false, true) @endphp
@php $arrArrAp = getFlightArrivalAirport($flight) @endphp
@php $arrDepAp = getFlightDepartureAirport($flight, false, true) @endphp
@php $arrSTA = $flight->sta && $flight->sta != EMPTY_DATETIME ? baseDateFormat($flight->sta, true, " ", true, false, "") : null @endphp
@php $arrSTADate = $arrSTA ? date("Y-m-d", strtotime($arrSTA)) : null @endphp
@php $arrFltCancelledClass = $flight->cancelled_at ? "color-red" : "" @endphp
@if ( $pairingPermission)
|
@endif
{{ getFlightArrivalInitialDate($flight, true) }} |
{{--Departure Flight--}}
|
|
{{ $ac }} |
{{ $acType }} |
{{--Arrival flight ATA--}}
@if ($pairingPermission)
{{ $fn }}
@else
{{ $fn }}
@endif
@if ($flight->cancelled_at)
(Cancelled)
@endif
|
@if ($pairingPermission)
|
|
@endif
{{ $arrDepAp }} |
{{ $flight->sta && $flight->sta != EMPTY_DATETIME ? baseDateFormat($flight->sta, true, " ", true, false, "") : "" }} |
{{ $flight->ata && $flight->ata != EMPTY_DATETIME ? baseDateFormat($flight->ata, true, " ", true, false, "") : "" }} |
{{ getFlightDelayFromStaToAta($flight) }} |
{{ $arrAp }} |
|
{{--Departure flight ATD--}}
|
{{--DELAYS OUT--}}
|
|
|
|
{{--- PAX IN---}}
@if ($flight->sectors)
{{ $in = $flight->sectors[$arrArrAp->id]["pax_total"]}} |
{{ $inInf = $flight->sectors[$arrArrAp->id]["pax_inf"] }} |
{{--PAX TRA--}}
{{ $tra = nullableArrayValue($flight->sectors, "tra", "pax_total") }} |
{{ $traInf = nullableArrayValue($flight->sectors, "tra", "pax_inf") }} |
{{--- PAX OUT---}}
|
|
@else
{{ $in = getFlightPaxTotal($flight, true) }} |
{{ $inInf = $flight->pax_inf_actual }} |
{{--PAX TRA--}}
|
|
{{--- PAX OUT---}}
|
|
@endif
{{--SSR--}}
@foreach($ssrList as $ssr)
{{--IN--}}
@if ($flight->ssr_ready && isset($flight->ssr_ready[$ssr]))
@php $s = $flight->ssr_ready[$ssr] @endphp
{{ $s }} |
@if (!isset($ssrTotalsArr[$ssr]))
@php $ssrTotalsArr[$ssr] = 0 @endphp
@endif
@php $ssrTotalsArr[$ssr] += $s @endphp
@else
|
@endif
{{--OUT--}}
|
@endforeach
{{--Counters--}}
@if ($flight->ckin_num)
/ {{ $flight->ckin_num }}
@endif
|
@if ($flight->cancelled_at)
{{ getUserName($flight->updatedBy) }} |
{{ baseDateFormat($flight->cancelled_at, true, " ", true, false, "") ?? "" }} |
{{ baseDateFormat($flight->cancellation_received_at, true, " ", true, false, "") ?? "" }} |
{{ $flight->remark }} |
|
|
@else
|
|
|
|
|
{{ $flight->remark }} |
@endif
@php $totalFlights++ @endphp
@endif
@endif
@php $paxIn += ($in ? $in : 0) @endphp
@php $paxInInf += ($inInf ? $inInf : 0) @endphp
@php $paxTra += ($tra ? $tra : 0) @endphp
@php $paxTraInf += ($traInf ? $traInf : 0) @endphp
@php $paxOut += ($out ? $out : 0) @endphp
@php $paxOutInf += ($outInf ? $outInf : 0) @endphp
@php $delayMinTotal += ($dlMins ? $dlMins : 0) @endphp
@php $delayTotal += ($dlTotal ? $dlTotal : 0) @endphp
@endforeach
@if ( $pairingPermission)
|
@endif
FLIGHTS |
{{ $totalFlights }} |
|
|
|
|
|
|
@if ($pairingPermission)
|
|
@endif
|
|
|
|
|
|
DELAY |
{{ $delayMinTotal }} |
{{ $delayTotal }} |
{{--IN--}}
{{ $paxIn }} |
{{ $paxInInf }} |
{{--TRA--}}
{{ $paxTra }} |
{{ $paxTraInf }} |
{{--OUT--}}
{{ $paxOut }} |
{{ $paxOutInf }} |
@foreach($ssrList as $ssr)
{{ isset($ssrTotalsArr[$ssr]) ? $ssrTotalsArr[$ssr] : "" }} |
{{ isset($ssrTotalsDep[$ssr]) ? $ssrTotalsDep[$ssr] : "" }} |
@endforeach
|
|
|
|
|
|
|