| 신규 |
@foreach($academyMonthArray as $month)
@php
$currNet = $detailByMonth[$month]->payment_new ?? 0;
$newRevenue += $currNet;
@endphp
{{ number_format($currNet) }} |
@endforeach
{{ number_format($newRevenue) }} |
| 재등록 |
@foreach($academyMonthArray as $month)
@php
$currNet = $detailByMonth[$month]->payment_re ?? 0;
$reRevenue += $currNet;
@endphp
{{ number_format($currNet) }} |
@endforeach
{{ number_format($reRevenue) }} |
| (+) 변경 |
@foreach($academyMonthArray as $month)
@php
$currNet = $detailByMonth[$month]->payment_change ?? 0;
$changeRevenue += $currNet;
@endphp
{{ number_format($currNet) }} |
@endforeach
{{ number_format($changeRevenue) }} |
| (-) 변경 / 환불 |
@foreach($academyMonthArray as $month)
@php
$currNet = $detailByMonth[$month]->refund_total ?? 0;
$refundRevenue += $currNet;
@endphp
{{ $currNet > 0 ? '-' . number_format($currNet) : number_format($currNet) }}
|
@endforeach
{{ $refundRevenue > 0 ? '-' . number_format($refundRevenue) : number_format($refundRevenue) }}
|
| 기타 |
@foreach($academyMonthArray as $month)
@php
$currNet = $detailByMonth[$month]->payment_etc ?? 0;
$etcRevenue += $currNet;
@endphp
{{ number_format($currNet) }} |
@endforeach
{{ number_format($etcRevenue) }} |
| 합계 |
@foreach($academyMonthArray as $month)
@php
$currNet = $resultsByMonth[$month]->curr_net ?? 0;
$totalRevenue += $currNet;
@endphp
{{ number_format($currNet) }} |
@endforeach
{{ number_format($totalRevenue) }} |
| 증감율 |
@foreach($academyMonthArray as $month)
@php
$currNet = $resultsByMonth[$month]->curr_net ?? 0;
$prevMonthNet = $resultsByMonth[$month]->prev_net ?? 0;
if (is_null($prevMonthNet) || $prevMonthNet == 0) {
$growth = null; // 0이 아니라 null로 표시
} else {
$growth = ($currNet - $prevMonthNet) / $prevMonthNet * 100;
}
// 색 결정 (양수: 파랑, 음수: 빨강, null: 기본)
if (is_null($growth)) {
$colorClass = '';
} elseif ($growth > 0) {
$colorClass = 'text-blue'; // Tailwind 예시
} else {
$colorClass = 'text-red';
}
@endphp
{{ is_null($growth) ? '-' : number_format($growth, 1) . '%' }}
|
@endforeach
{{ is_null($growth) ? '-' : number_format($growth, 1) . '%' }}
|