Fix expired insured list
This commit is contained in:
parent
862c63604d
commit
3896576797
|
@ -39,7 +39,11 @@ class Insurances_model extends CI_Model
|
|||
$this->db->from($this->table);
|
||||
$this->db->where('network_id', $postData['id_network']);
|
||||
if (!empty($postData['state'])) {
|
||||
$this->db->where('state', $postData['state']);
|
||||
if($postData['state'] == "STOPPED"){
|
||||
$this->db->where_in('state', ["STOPPED","EXPIRED"]);
|
||||
}else{
|
||||
$this->db->where('state', $postData['state']);
|
||||
}
|
||||
}
|
||||
return $this->db->count_all_results();
|
||||
}
|
||||
|
@ -69,7 +73,11 @@ class Insurances_model extends CI_Model
|
|||
$this->db->where('created_at <', date('Y-m-d', strtotime($postData['endDate']. "+1 day")));
|
||||
}
|
||||
if (!empty($postData['state'])) {
|
||||
$this->db->where('state', $postData['state']);
|
||||
if($postData['state'] == "STOPPED"){
|
||||
$this->db->where_in('state', ["STOPPED","EXPIRED"]);
|
||||
}else{
|
||||
$this->db->where('state', $postData['state']);
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
|
Loading…
Reference in New Issue