fix peratus decimal

This commit is contained in:
nurafrinaalimi16
2025-04-24 17:13:05 +08:00
parent 13662438ec
commit 7539dbed25
+10 -2
View File
@@ -44,9 +44,17 @@
{{-- @endif --}}
@endforeach
<tr>
<td colspan="2"><b>Peratus Kehadiran</b></td>
<td><b>{{ ($totalkehadiranAll / $votes) * 100 }}%</b></td>
<td colspan="6" class="text-right"><b>Peratus Kehadiran</b></td>
<td>
<b>
@php
$percentage = $votes > 0 ? number_format(($totalkehadiranAll / $votes) * 100, 2) : '0.00';
echo $percentage . '%';
@endphp
</b>
</td>
</tr>
</tbody>
</table>
</div>