Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix urutan siswa salah saat generate laporan #123

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

ikhsan3adi
Copy link
Owner

@ikhsan3adi ikhsan3adi commented Jul 24, 2024

Fix fatal bug 🙏

Resolve #117, #78, #69

Lupa untuk memberikan orderBy('nama_siswa') saat mengambil data siswa menyebabkan data siswa dan absensi tidak sinkron di laporan

# PresensiSiswaModel.php
public function getPresensiByKelasTanggal($idKelas, $tanggal)
 {
    return $this->setTable('tb_siswa')
       ->select('*')
       ->join(...)
       ->join(...)
       ->where(...)
       ->orderBy('nama_siswa') # << ORDER BY NAMA SAAT MENGAMBIL DATA ABSENSI
       ->findAll();
 }
# SiswaModel.php
public function getSiswaByKelas($id_kelas)
 {
    return $this->join(...)
       ->join(...)
       ->where(...)
       ->orderBy('nama_siswa') # << SEBELUMNYA TIDAK ADA, DAN MENJADI `orderBy('id_siswa')` SECARA DEFAULT 
       ->findAll();
 }

@ikhsan3adi ikhsan3adi added the bug Something isn't working label Jul 24, 2024
@ikhsan3adi ikhsan3adi self-assigned this Jul 24, 2024
This was linked to issues Jul 24, 2024
@ikhsan3adi ikhsan3adi merged commit 5f60322 into master Jul 24, 2024
1 check passed
@ikhsan3adi ikhsan3adi deleted the fix-bug-laporan branch July 27, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Data absensi tidak sesuai dengan laporan Generate Laporan Bantuan[BUG]
1 participant