Add Anual Chart Report Feature
This commit is contained in:
@@ -10,6 +10,12 @@ class AbsensiModel extends CI_Model
|
||||
return $absensi = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
public function getAbsenIdByAbsensiId($id_absensi){
|
||||
$this->db->select('id_absen');
|
||||
$this->db->where('id_absensi', $id_absensi);
|
||||
return $absensi = $this->db->get($this->_table)->row();
|
||||
}
|
||||
|
||||
public function getAbsensiByAbsenIdAndUmkmId($id_umkm,$id_absen){
|
||||
$this->db->where('id_absen', $id_absen);
|
||||
$this->db->where('id_umkm', $id_umkm);
|
||||
@@ -44,9 +50,11 @@ class AbsensiModel extends CI_Model
|
||||
return $absensi = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
public function getAbsensByTahunAndKelurahan($tahun,$kelurahan){
|
||||
public function getAbsensByTahunByBulanAndKelurahan($tahun,$bulan,$kelurahan){
|
||||
$this->db->where('kelurahan', $kelurahan);
|
||||
$this->db->where('bulan', $bulan);
|
||||
$this->db->where('tahun', $tahun);
|
||||
$this->db->order_by('id_absensi','ASC');
|
||||
return $absensi = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
@@ -113,6 +121,8 @@ class AbsensiModel extends CI_Model
|
||||
return $absensi = count($this->db->get($this->_table)->result());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getLatestSignedAbsensiByUmkmId($id_umkm){
|
||||
$this->db->where('signed', true);
|
||||
$this->db->where('id_umkm', $id_umkm);
|
||||
@@ -130,12 +140,19 @@ class AbsensiModel extends CI_Model
|
||||
}
|
||||
|
||||
public function getSignedAbsensiByUmkmId($id_umkm){
|
||||
$this->db->where('signed', 1);
|
||||
$this->db->where_in('signed', array(1,3));
|
||||
// $this->db->where('signed', 3);
|
||||
$this->db->where('id_umkm', $id_umkm);
|
||||
$this->db->where('tahun', date('Y'));
|
||||
$this->db->order_by('bulan', 'DESC');
|
||||
$this->db->order_by('tahun', 'DESC');
|
||||
$this->db->order_by('id_absensi', 'DESC');
|
||||
return $user = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
public function getAllSignedAbsensiByUmkmId($id_umkm){
|
||||
$this->db->where_in('signed', array(1,3));
|
||||
$this->db->where('id_umkm', $id_umkm);
|
||||
$this->db->order_by('tahun', 'DESC');
|
||||
$this->db->order_by('id_absensi', 'DESC');
|
||||
return $user = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user