Dash data

This commit is contained in:
dev-chiefworks
2022-04-23 15:14:16 -04:00
parent ca802eb5a0
commit 5f40e637ea
2 changed files with 14 additions and 8 deletions
+10 -2
View File
@@ -167,12 +167,20 @@ class Bko_Controller extends WRB_Controller {
$row = $query->row_array();
$data['total_members'] = $row['total_members'];
$mysql = "SELECT sum(balance)AS total_balance FROM members WHERE status =1";
$mysql = "SELECT sum(amount) AS total_balance FROM members_wallet WHERE currency = 'NAIRA'";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_balance'] = $row['total_balance'];
$mysql = "SELECT count(id) AS total_active_jobs FROM members_jobs_contract WHERE status IN (1,2)";
$mysql = "SELECT sum(amount) AS total_balance FROM members_wallet WHERE currency = 'USD'";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_balance_usd'] = $row['total_balance'];
$mysql = "SELECT count(id) AS total_active_jobs FROM members_jobs_contract WHERE status IN (1,2) AND delivery_date > now()";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_active_jobs'] = $row['total_active_jobs'];
+4 -6
View File
@@ -15,8 +15,8 @@
<!-- Members online -->
<div class="panel bg-teal-400">
<div class="panel-body">
<h3 class="no-margin"><?php echo $total_members; ?></h3>
<a href='/bkoreport/signup'>Members Count</a>
<a href='/bkoreport/signup'> <h5 class="no-margin" style="color:white;">MEMBERS : <?php echo $total_members; ?></h5></a>
<h5 class="no-margin">APP : 0</h5>
</div>
</div>
<!-- /members online -->
@@ -28,11 +28,9 @@
<!-- Members online -->
<div class="panel bg-pink-400">
<div class="panel-body">
<h3 class="no-margin"><?php echo $total_balance * 0.01; ?> </h3>
Total Balance [ Naira ]-[Escrow=]
<h5 class="no-margin">NAIRA:<?php echo $total_balance * 0.01; ?> </h5>
<h5 class="no-margin">USD:<?php echo $total_balance_usd * 0.01; ?> </h5>
</div>
</div>
<!-- /members online -->