empoyes fix

This commit is contained in:
CHIEFSOFT\ameye
2024-06-06 08:21:33 -04:00
parent 685e735bba
commit 99801e83b2
2 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ $routes->get('/digibko/v1/loan/ready', 'BkoReports::readyApplication');
$routes->get('/digibko/v1/loan/approved', 'BkoReports::approvedApplication');
$routes->get('/digibko/v1/loan/rejected', 'BkoReports::rejectedApplication');
$routes->get('/digibko/employers', 'BkoReports::employersList');
$routes->get('/digibko/v1/employers', 'BkoReports::employersList');
/*
* Processing the loan from back office
+8 -9
View File
@@ -113,22 +113,21 @@ class BkoReports extends BaseController
}
public function employersList() :ResponseInterface {
$query = $this->db->query("SELECT uid,name FROM employer_sector");
$employer_sector = $query->getResult('array');
$query = $this->db->query("SELECT c.firstname, c.lastname, a.uid,a.loan_amount,
a.payment_month,a.sales_agent,a.gender,
a.marital_status,a.email,a.address,
a.state,a.country,a.status,a.added,
a.updated
FROM applications a
LEFT JOIN customers c ON c.uid = a.customer_uid WHERE a.status = 7 ");
$query = $this->db->query("SELECT uid,name FROM salary_sources");
$salary_sources = $query->getResult('array');
$query = $this->db->query("SELECT * FROM employers");
$row = $query->getResult('array');
$data = [
'call_return' => '100',
'salary_sources' => $salary_sources,
'employer_sector' => $employer_sector,
'records' => $row
];
return $this->respond($data, 200);
// return $this->respond([], 200);
}
}