fix peratus decimal
This commit is contained in:
@@ -44,9 +44,17 @@
|
|||||||
{{-- @endif --}}
|
{{-- @endif --}}
|
||||||
@endforeach
|
@endforeach
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><b>Peratus Kehadiran</b></td>
|
<td colspan="6" class="text-right"><b>Peratus Kehadiran</b></td>
|
||||||
<td><b>{{ ($totalkehadiranAll / $votes) * 100 }}%</b></td>
|
<td>
|
||||||
|
<b>
|
||||||
|
@php
|
||||||
|
$percentage = $votes > 0 ? number_format(($totalkehadiranAll / $votes) * 100, 2) : '0.00';
|
||||||
|
echo $percentage . '%';
|
||||||
|
@endphp
|
||||||
|
</b>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user