application count
This commit is contained in:
@@ -29,7 +29,7 @@ class BkoDash extends BaseController
|
|||||||
// LEFT JOIN customers c ON c.uid = a.customer_uid LIMIT 10");
|
// LEFT JOIN customers c ON c.uid = a.customer_uid LIMIT 10");
|
||||||
|
|
||||||
$dash_data["active_loans"] = 0;
|
$dash_data["active_loans"] = 0;
|
||||||
$dash_data["applications"] = 0;
|
$dash_data["applications"] = $this->applicationCount(1);
|
||||||
$dash_data["today_application"] = 0;
|
$dash_data["today_application"] = 0;
|
||||||
|
|
||||||
$dash_data["curr_month"] = date('F');
|
$dash_data["curr_month"] = date('F');
|
||||||
@@ -68,6 +68,16 @@ class BkoDash extends BaseController
|
|||||||
// return $this->respond([], 200);
|
// return $this->respond([], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function applicationCount($applicationStatus){
|
||||||
|
$count_status = 0;
|
||||||
|
$mysqA = "select count(id) AS app_count from applications WHERE status= ".$applicationStatus;
|
||||||
|
$query2 = $this->db->query($mysqA);
|
||||||
|
$row2 = $query2->getResult('array');
|
||||||
|
if ($row2 && count($row2)> 0 ){
|
||||||
|
$count_status = $row2[0]["app_count"];
|
||||||
|
}
|
||||||
|
return $count_status;
|
||||||
|
}
|
||||||
public function pendingApplication() :ResponseInterface
|
public function pendingApplication() :ResponseInterface
|
||||||
{
|
{
|
||||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
||||||
|
|||||||
Reference in New Issue
Block a user