<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Model_zone_claim_type extends CI_Model {
  
    public function fetchZoneByType($type_id)
    {
        $this->db->select('a.id as zone_claim_type_id,a.zone_id as id,a.type_id,a.seq,a.param,b.zone');
        $this->db->where('a.type_id',$type_id);
        $this->db->where('a.is_delete',0);
        $this->db->where('b.is_delete',0);
        $this->db->join('hr__ref_claim_travelling_zone b','b.id = a.zone_id');

        $query = $this->db->get('hr__ref_claim_traveling_zone_claim_type a');
        return ($query->result() > 0)?$query->result():null;
    }
}
?>