Add anual report feature
This commit is contained in:
@@ -25,9 +25,11 @@ class AbsenModel extends CI_Model
|
||||
public function getAbsenTahun(){
|
||||
$this->db->select('tahun');
|
||||
$this->db->distinct('tahun');
|
||||
$this->db->order_by('tahun','DESC');
|
||||
return $tahun = $this->db->get($this->_table)->result();
|
||||
}
|
||||
|
||||
|
||||
public function getCountActiveAbsen(){
|
||||
$this->db->where('status_absen', 'open');
|
||||
return $absen = count($this->db->get($this->_table)->result());
|
||||
@@ -106,6 +108,17 @@ class AbsenModel extends CI_Model
|
||||
return $this->db->insert($this->_table, $this);
|
||||
}
|
||||
|
||||
public function update($id_absen,$omset,$aset,$karyawan_l,$karyawan_p)
|
||||
{
|
||||
|
||||
$this->omset = $omset;
|
||||
$this->aset = $aset;
|
||||
$this->karyawan_l = $karyawan_l;
|
||||
$this->karyawan_p = $karyawan_p;
|
||||
|
||||
return $this->db->update($this->_table, $this, array('id_absen' => $id_absen));
|
||||
}
|
||||
|
||||
public function delete($id_absen)
|
||||
{
|
||||
return $this->db->delete($this->_table, array("id_absen" => $id_absen));
|
||||
|
||||
Reference in New Issue
Block a user