public function filter($showActiveOnly, $showNotAdded, $showHalfAdded, $showDeclined)
{
$newRow = $this->db->table(self::TABLE_NAME);
$rows = $this->db->table(self::TABLE_NAME);
if ($showActiveOnly == 1) {
$newRow = $rows->where(array('status' => 'dodano'));
}
$rows = $this->db->table(self::TABLE_NAME);
if($showNotAdded == 1){
$newRow = $rows->where(array('status' => 'nedodano'));
}
$rows = $this->db->table(self::TABLE_NAME);
if($showHalfAdded == 1){
$newRow = $rows->where(array('status' => 'casdodano'));
}
$rows = $this->db->table(self::TABLE_NAME);
if($showDeclined == 1){
$newRow = $rows->where(array('status' => 'storno'));
}
return $newRow;
}