FIX_OPD_NOT_SHOWING_QUERY_ISSUE
This commit is contained in:
parent
63830ba02a
commit
a0459a3fbb
@ -4567,10 +4567,17 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
(
|
(
|
||||||
SELECT id FROM client_policy
|
SELECT id FROM client_policy
|
||||||
WHERE policy_type_id in (4, 72)
|
WHERE policy_type_id = 4
|
||||||
AND base_policy = gmc_client_policy_id
|
AND base_policy = gmc_client_policy_id
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
) AS gmc_topup_policy_id
|
) AS gmc_topup_policy_id,
|
||||||
|
|
||||||
|
(
|
||||||
|
SELECT id FROM client_policy
|
||||||
|
WHERE policy_type_id = 72
|
||||||
|
AND base_policy = gmc_client_policy_id
|
||||||
|
LIMIT 1
|
||||||
|
) AS opd_topup_policy_id
|
||||||
")
|
")
|
||||||
->join('employee_polices', 'employees.id = employee_polices.employee_id')
|
->join('employee_polices', 'employees.id = employee_polices.employee_id')
|
||||||
->join('client_policy', 'employee_polices.client_policy_id = client_policy.id')
|
->join('client_policy', 'employee_polices.client_policy_id = client_policy.id')
|
||||||
@ -4607,6 +4614,7 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
$policyIds[] = $data['gmc_topup_policy_id'];
|
$policyIds[] = $data['gmc_topup_policy_id'];
|
||||||
$policyIds[] = $data['gmc_parent_policy_id'];
|
$policyIds[] = $data['gmc_parent_policy_id'];
|
||||||
|
$policyIds[] = $data['opd_topup_policy_id'] ?? null;
|
||||||
$policyIds[] = $getParentTopUp['gmc_parent_topup_policy_id'] ?? null;
|
$policyIds[] = $getParentTopUp['gmc_parent_topup_policy_id'] ?? null;
|
||||||
|
|
||||||
return $policyIds;
|
return $policyIds;
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class UserModel extends Model
|
|||||||
|
|
||||||
public function getUserByEmail($email){
|
public function getUserByEmail($email){
|
||||||
|
|
||||||
$userData = $this->where('email', $email)->get();
|
$userData = $this->where('email', $email)->where('is_active', 1)->get();
|
||||||
if ($userData->getNumRows() > 0) {
|
if ($userData->getNumRows() > 0) {
|
||||||
return $userData->getRow();
|
return $userData->getRow();
|
||||||
} else {
|
} else {
|
||||||
@ -87,7 +87,7 @@ class UserModel extends Model
|
|||||||
|
|
||||||
public function getUserById($id){
|
public function getUserById($id){
|
||||||
|
|
||||||
$userData = $this->where('id', $id)->get();
|
$userData = $this->where('id', $id)->where('is_active', 1)->get();
|
||||||
if ($userData->getNumRows() > 0) {
|
if ($userData->getNumRows() > 0) {
|
||||||
return $userData->getRow();
|
return $userData->getRow();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user