@extends("common.layout") @section("header") {!! resource('css/dashboard.css') !!} {!! resource('js/dashboard/dashboard-common.js') !!} @endsection @section("content") {{-- @dd($studyPersonCount)--}}
@php $currentYear = \Carbon\Carbon::now()->year; $currentMonth = \Carbon\Carbon::now()->month; $selectedYear = Request::get('year', $currentYear); $selectedMonths = Request::get('month', []); // 월이 아무것도 선택되지 않았고, 선택된 연도가 현재 연도일 경우에만 최근 3개월을 기본값으로 설정 if (empty($selectedMonths) && $selectedYear == $currentYear) { $startMonth = max(1, $currentMonth - 2); // 현재 월-2 또는 1월 중 큰 값 $selectedMonths = range($startMonth, $currentMonth); } @endphp @for($i=12; $i>=1; $i--) @php $isChecked = in_array($i, $selectedMonths); @endphp @endfor

수강생 수 & 매출 통계

@php $colCount = count($monthArray); // foreach로 생길 중간 열 개수 $dynamicWidth = "calc((100% - 360px) / {$colCount})"; @endphp @foreach($monthArray as $row) @endforeach @foreach($monthArray as $row) @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($monthArray as $row) @php $countData = $monthlyCountData->where('target_month', $row)->first(); @endphp @endforeach @foreach($combinedRevenueData as $key => $data) @endforeach @foreach($combinedRevenueData as $key => $data) @endforeach @foreach($combinedRevenueData as $key => $data) @endforeach @foreach($combinedRevenueData as $key => $data) @endforeach @foreach($combinedCalcData as $month => $data) @endforeach @foreach($combinedCalcData as $month => $data) @endforeach @foreach($combinedRevenueData as $key => $data) @endforeach @foreach($combinedRevenueData as $data) @endforeach @foreach($combinedCalcData as $data) @endforeach @foreach($combinedCalcData as $month => $data) @endforeach @foreach($combinedCalcData as $data) @endforeach @foreach($combinedCalcData as $data) @endforeach @foreach($combinedCalcData as $month => $data) @endforeach @foreach($combinedCalcData as $data) @endforeach
구분{{Carbon\Carbon::parse($row)->month}}월합계
인원 수강생수{{$countData?->student_count ?? 0}}{{$totalCountData->student_count}}
①신규{{$countData?->new ?? 0}}{{$totalCountData->new}}
②재등록{{$countData?->renew ?? 0}}{{$totalCountData->renew}}
③기존{{$countData?->active ?? 0}}{{$totalCountData->active}}
매출 인원수(①+②){{$countData?->revenue_person_count ?? 0}}{{$totalCountData->revenue_person_count}}
환불인원수{{$countData?->refund_person_count ?? 0}}{{$totalCountData->refund_person_count}}
총 인원{{$countData?->total_person_count ?? 0}}{{$totalCountData->total_person_count}}
매출 신규{{ number_format($data['new']) }}{{ number_format($totalRevenueData['new']) }}
재등록{{ number_format($data['renew']) }}{{ number_format($totalRevenueData['renew']) }}
변경{{ number_format($data['change']) }}{{ number_format($totalRevenueData['change']) }}
기타{{ number_format($data['etc']) }}{{ number_format($totalRevenueData['etc']) }}
시험센터 대여 {{ number_format($data['lease']) }} {{ number_format($totalCalcData['lease']) }}
B2B 쉐어 {{ number_format($data['b2b']) }} {{ number_format($totalCalcData['b2b']) }}
환불{{ number_format($data['refund'] * -1) }}{{ number_format($totalRevenueData['refund'] * -1) }}
총 매출{{ number_format($data['total']) }}{{ number_format($totalRevenueData['total']) }}
정산 사업팀 일반{{ number_format($data['business_general']) }}{{ number_format($totalCalcData['business_general']) }}
사업팀 기타{{ number_format($data['business_etc']) }}{{ number_format($totalCalcData['business_etc']) }}
사업팀 합계{{ number_format($data['business_general'] + $data['business_etc']) }}{{ number_format($totalCalcData['business_general'] + $totalCalcData['business_etc']) }}
TNC팀 일반{{ number_format($data['tnc_general']) }}{{ number_format($totalCalcData['tnc_general']) }}
TNC팀 기타{{ number_format($data['tnc_etc']) }}{{ number_format($totalCalcData['tnc_etc']) }}
TNC팀 합계{{ number_format($data['tnc_general'] + $data['tnc_etc']) }}{{ number_format($totalCalcData['tnc_general'] + $totalCalcData['tnc_etc']) }}
@endsection @push("script") @endpush