@php
$jumlah_ibu_hamil = 0;
$dapat_ttd = 0;
$konsumsi_ttd = 0;
@endphp
@role('Admin|superadmin')
@foreach ($unit_kerja as $key => $item)
@php
$jumlah_ibu_hamil += $item->ibu_hamil_per_desa(Session::get('year'))["jumlah_ibu_hamil"];
$dapat_ttd += $item->ibu_hamil_per_desa(Session::get('year'))["dapat_ttd"];
$konsumsi_ttd += $item->ibu_hamil_per_desa(Session::get('year'))["konsumsi_ttd"];
@endphp
{{$item->kecamatan}} |
{{$item->nama}} |
{{$item->ibu_hamil_per_desa(Session::get('year'))["jumlah_ibu_hamil"]}} |
{{$item->ibu_hamil_per_desa(Session::get('year'))["dapat_ttd"]}} |
{{$item->ibu_hamil_per_desa(Session::get('year'))["jumlah_ibu_hamil"]>0?number_format($item->ibu_hamil_per_desa(Session::get('year'))["dapat_ttd"]/$item->ibu_hamil_per_desa(Session::get('year'))["jumlah_ibu_hamil"] * 100, 2):0 }} |
{{$item->ibu_hamil_per_desa(Session::get('year'))["konsumsi_ttd"]}} |
{{$item->ibu_hamil_per_desa(Session::get('year'))["jumlah_ibu_hamil"]>0?number_format($item->ibu_hamil_per_desa(Session::get('year'))["konsumsi_ttd"]/$item->ibu_hamil_per_desa(Session::get('year'))["jumlah_ibu_hamil"] * 100, 2):0 }} |
@endforeach
Total |
|
{{$jumlah_ibu_hamil}} |
{{$dapat_ttd}} |
{{$jumlah_ibu_hamil > 0?number_format(($dapat_ttd/$jumlah_ibu_hamil) * 100, 2):0}} |
{{$konsumsi_ttd}} |
{{$jumlah_ibu_hamil > 0?number_format(($konsumsi_ttd/$jumlah_ibu_hamil) * 100, 2):0}} |
@endrole
@role('Puskesmas|Pihak Wajib Pajak')
@foreach ($desa as $key => $item)
@if($item->filterDesa(Session::get('year')))
@php
$jumlah_ibu_hamil += $item->filterDesa(Session::get('year'))->jumlah_ibu_hamil;
$dapat_ttd += $item->filterDesa(Session::get('year'))->dapat_ttd;
$konsumsi_ttd += $item->filterDesa(Session::get('year'))->konsumsi_ttd;
@endphp
{{$item->UnitKerja->kecamatan}} |
{{$item->nama}} |
{{$item->filterDesa(Session::get('year'))->jumlah_ibu_hamil}} |
{{ $item->filterDesa(Session::get('year'))->dapat_ttd }} |
{{ $item->filterDesa(Session::get('year'))->jumlah_ibu_hamil > 0
? number_format($item->filterDesa(Session::get('year'))->dapat_ttd / $item->filterDesa(Session::get('year'))->jumlah_ibu_hamil * 100, 2)
: 0 }}
|
{{ $item->filterDesa(Session::get('year'))->konsumsi_ttd }} |
{{ $item->filterDesa(Session::get('year'))->jumlah_ibu_hamil > 0
? number_format($item->filterDesa(Session::get('year'))->konsumsi_ttd / $item->filterDesa(Session::get('year'))->jumlah_ibu_hamil * 100, 2)
: 0 }}
|
@endif
@endforeach
Total |
|
{{$jumlah_ibu_hamil}} |
{{$dapat_ttd}} |
{{$jumlah_ibu_hamil > 0?number_format(($dapat_ttd/$jumlah_ibu_hamil) * 100, 2):0}} |
{{$konsumsi_ttd}} |
{{$jumlah_ibu_hamil > 0?number_format(($konsumsi_ttd/$jumlah_ibu_hamil) * 100, 2):0}} |
@endrole