tambah fitur produk

This commit is contained in:
2021-09-16 15:37:22 +07:00
parent 8734950537
commit 2a453c851c
23 changed files with 2395 additions and 30 deletions

View File

@@ -10,6 +10,22 @@ class AbsensiModel extends CI_Model
return $absensi = $this->db->get($this->_table)->result();
}
public function getAbsensiByAbsenIdAndUmkmId($id_umkm,$id_absen){
$this->db->where('id_absen', $id_absen);
$this->db->where('id_umkm', $id_umkm);
return $absensi = $this->db->get($this->_table)->row();
}
public function update($id_absensi){
$post = $this->input->post();
$this->aset = $post["aset"];
$this->omset = $post["omset"];
$this->karyawan_l = $post["karyawan_l"];
$this->karyawan_p = $post["karyawan_p"];
$this->signed = 1;
return $this->db->update($this->_table, $this, array('id_absensi' => $id_absensi));
}
public function getLastMonthAbsensi($bulan,$tahun){
$bulan = $bulan-1;
$this->db->where('bulan', $bulan);
@@ -75,6 +91,7 @@ class AbsensiModel extends CI_Model
public function getSignedAbsensiByUmkmId($id_umkm){
$this->db->where('signed', true);
$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');
return $user = $this->db->get($this->_table)->result();