function add_defaults($data)
 {
     $data['password'] = MD5($data['password']);
     $result = $this->db->insert('default', $data);
     if ($result) {
         create_logs('defaults', 'add', json_encode($data));
     }
     return $result;
 }
 function delete_notification($notification_id)
 {
     $data = $this->get_notification($notification_id);
     $this->db->where('notification_id', $notification_id);
     $result = $this->db->delete('notification');
     if ($result) {
         create_logs('user', 'delete', json_encode($data));
     }
     return $result;
 }
 function delete_member($member_id)
 {
     $data = $this->get_member($member_id);
     $this->db->where('member_id', $member_id);
     $result = $this->db->delete('member');
     if ($result) {
         create_logs('member', 'delete', json_encode($data));
     }
     return $result;
 }
 function delete_payment($payment_id)
 {
     $data = $this->get_payment_by_id($payment_id);
     $this->db->where('payment_id', $payment_id);
     $result = $this->db->delete('payment');
     if ($result) {
         create_logs('payment', 'delete', json_encode($data));
     }
     return $result;
 }
 function delete_meter_reading($meter_reading_id)
 {
     $data = $this->get_reading_by_id($meter_reading_id);
     $this->db->where('meter_reading_id', $meter_reading_id);
     $result = $this->db->delete('meter_reading');
     if ($result) {
         create_logs('account', 'delete', json_encode($data));
     }
     return $result;
 }