diff --git a/app/Models/TicketMasterModel.php b/app/Models/TicketMasterModel.php index 7b50d11e..324a18db 100644 --- a/app/Models/TicketMasterModel.php +++ b/app/Models/TicketMasterModel.php @@ -664,9 +664,13 @@ class TicketMasterModel extends Model // Execute the query $binds = ["start_date"=>$start_date,"end_date"=>$end_date]; + // Merge policy_type binds if present + if (!empty($statusBinds)) { + $binds = array_merge($binds, $statusBinds); + } $result = $this->db->query($sql, $binds)->getResultArray(); - - // print_rr($result);die(); + // print_rr(count(($result))); + // print_rr($this->db->lastQuery);die(); return $result; } @@ -729,8 +733,13 @@ class TicketMasterModel extends Model "; $binds = ["start_date"=>$start_date,"end_date"=>$end_date]; + // Merge policy_type binds if present + if (!empty($statusBinds)) { + $binds = array_merge($binds, $statusBinds); + } $result = $this->db->query($sql,$binds)->getResultArray(); - + // print_rr(count(($result))); + // print_rr($this->db->lastQuery);die(); return $result; } else { $ticket_type_data_1 = ""; @@ -804,8 +813,13 @@ class TicketMasterModel extends Model $binds = ["start_date"=>$start_date,"end_date"=>$end_date]; // Execute the query - $result = $this->db->query($sql,$binds)->getResultArray(); + // Merge policy_type binds if present + if (!empty($statusBinds)) { + $binds = array_merge($binds, $statusBinds); + } + $result = $this->db->query($sql,$binds)->getResultArray(); + // print_rr($this->db->lastQuery);die(); return $result;