employer - name

This commit is contained in:
CHIEFSOFT\ameye
2024-06-13 10:38:58 -04:00
parent da091cb935
commit bc5d173a20
+9 -6
View File
@@ -59,12 +59,15 @@ class BkoReports extends BaseController
{
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
$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 = 2 ");
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,
e.name AS employer_name
FROM applications a
LEFT JOIN customers c ON c.uid::text = a.customer_uid::text
LEFT JOIN employers e ON e.uid::text = a.employer_uid::text
WHERE a.status = 2 ");
$row = $query->getResult('array');
$data = [
'call_return' => '100',