Skip to content

Commit

Permalink
Update API, fix yellow percentage bug, finishing project
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaprojects committed May 27, 2022
1 parent 0cfc295 commit 5b9cd24
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions api_absen/persentase.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,23 @@
}

//On Time
if ($value['hadir'] == "1" && $value['full_absen'] == "1" && $value['telat'] == "0" ) {
$onTime++;
if ($value['hadir'] == "1") {
if ($value['full_absen'] == "1" && $value['telat'] == "0") {
$onTime++;
} else if ($value['full_absen'] == "0" || $value['telat'] == "1"){
$totalTelatAtauTidakFullAbsen++;
}
}

//Telat
if ($value['hadir'] == "1" && $value['telat'] == "1" || $value['full_absen'] == "0" || $value['full_absen'] == null) {
$totalTelatAtauTidakFullAbsen++;
}
// if ($value['hadir'] == "1") {
// if ($value['telat'] == "1") {
// $totalTelatAtauTidakFullAbsen++;
// }
// if ($value['full_absen'] == "0" || $value['full_absen'] == null) {
// $totalTelatAtauTidakFullAbsen++;
// }
// }

//Tidak Hadir
if ($value['hadir'] == null && $value['hadir'] != "1" && $value['izin'] != "1") {
Expand Down

0 comments on commit 5b9cd24

Please sign in to comment.