Add anual report feature

This commit is contained in:
2021-09-17 21:26:28 +07:00
parent 8da0a69176
commit cd74f850b0
23 changed files with 1155 additions and 18 deletions

View File

@@ -101,6 +101,28 @@ class UserModel extends CI_Model
return $this->db->update($this->_table, $this, array('id_user' => $id_pemilik));
}
public function selfUpdate($id_pemilik,$foto_user)
{
$post = $this->input->post();
$this->alamat_user = $post["alamat"];
if($post['kelurahan']!=='luar'){
$kelurahan = $post['kelurahan'];
$kecamatan = $this->KelurahanModel->getKecamatanByKelurahan($post['kelurahan']);
$kota = 'Kota Magelang';
} else {
$kelurahan = 'Luar Kota Magelang';
$kecamatan = 'Luar Kota Magelang';
$kota = 'Luar Kota Magelang';
}
$this->kelurahan_user = $kelurahan;
$this->kecamatan_user = $kecamatan;
$this->kota_user = $kota;
$this->telp_user = $post["telp"];
$this->npwp = $post["npwp"];
$this->foto_user = $foto_user;
return $this->db->update($this->_table, $this, array('id_user' => $id_pemilik));
}
public function resetPassword($id_user)
{
$post = $this->input->post();