@extends('layouts.app') @php $tt_white = $all_amp_leader; @endphp @section('content') @if (Session::has('success_message'))
{!! session('success_message') !!}
@endif
{{ env('APP_NAME_TH') }}
@if (count($amphurs) == 0)

ไม่พบข้อมูล อำเภอ

@else
@foreach ($amphurs as $amphur) @php $amp_blue = 0; $amp_yellow = 0; $amp_red = 0; $win_percent = 0; foreach ($Amp_sums as $ampsum) { if ($ampsum->amphurs_id == $amphur->id) { $amp_blue = $ampsum->blue; $amp_yellow = $ampsum->yellow; $amp_red = $ampsum->red; # dd($ampsum->blue); } } $total = $amp_blue + $amp_yellow + $amp_red; $win_percent = $total > 0 ? ($amp_blue / $total) * 100 : 0; $TT_blue +=$amp_blue; $TT_yellow +=$amp_yellow; $TT_red += $amp_red; @endphp @php $tt_tambon += $amphur->total_tambon; $tt_mooban += $amphur->total_mooban; $tt_home += $amphur->total_home; $tt_people += $amphur->total_people; @endphp @endforeach @php $tt_total = $TT_blue + $TT_yellow + $TT_red; $TT_percent = $tt_total > 0 ? ($TT_blue / $tt_total) * 100 : 0; @endphp
ลำดับที่ เขต อำเภอ จำนวนตำบล จำนวนหมู่บ้าน จำนวนหลังคาเรือน จำนวนผู้มีสิทธิ์เลือกตั้ง สีน้ำเงิน สีเหลือง สีแดง โอกาสชนะ
{{ ++$r }} {{ optional($amphur->electorate)->name }} {{ $amphur->name_th }} {{ number_format($amphur->total_tambon) }} {{ number_format($amphur->total_mooban) }} {{ number_format($amphur->total_home) }} {{ number_format($amphur->total_people) }} {{ number_format($amp_blue) }} {{ number_format($amp_yellow) }} {{ number_format($amp_red) }} {{number_format( $win_percent,2) }}%
รวม {{ number_format($tt_tambon) }} {{ number_format($tt_mooban) }} {{ number_format($tt_home) }} {{ number_format($tt_people) }} {{ number_format( $TT_blue) }} {{ number_format( $TT_yellow) }} {{ number_format( $TT_red) }} {{ number_format( $TT_percent,2) }}%

ผลการประเมินแกนนำ ครั้งที่ 1 (แกนนำทั้งเขต {{ number_format($tt_white) }} ราย)


ผลการประเมินแกนนำ ครั้งที่ 2 (แกนนำทั้งเขต {{ number_format($tt_white) }} ราย)


@endif
@endsection @section('style') @endsection @section('script') @endsection