32 lines
809 B
PHP
32 lines
809 B
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/** Finsoorten_model februari 2017 */
|
|
|
|
class Finsoorten_model extends MY_Model{
|
|
|
|
|
|
protected $tablename = 'finsoorten';
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
$models = array('');
|
|
$this->load->model($models);
|
|
}
|
|
|
|
function get_soorten($jaarnr, $orgid){
|
|
$this->sql="SELECT id, categorie, naam
|
|
FROM finsoorten
|
|
WHERE swv_id ={$orgid}
|
|
AND kalenderjaar = {$jaarnr}";
|
|
return $this->get_query_result();
|
|
}
|
|
|
|
function get_all_soorten($jaarnr, $orgID){
|
|
$swvID = $this->Organisaties_model->get_swvid($orgID);
|
|
$soorten = $this->get_soorten($jaarnr, $swvID);
|
|
if (! $soorten) $soorten = $this->get_soorten(0, $swvID);
|
|
if (! $soorten) $soorten = $this->get_soorten(0,0);
|
|
return $soorten;
|
|
}
|
|
}
|