DashBoard : ps

This commit is contained in:
VE10-Sanjeev 2024-01-18 14:14:30 +05:30
parent 1f4a0b8d51
commit a73f062a28
2 changed files with 4 additions and 2 deletions

View File

@ -61,7 +61,9 @@ class HomeModel extends Model
{
$query = $this->db->table('subscription AS S')
->select('S.business_id,BK.title as name,BK.book_id as id,S.scheme_id,LEFT(BK.title, 1) AS first_letter,COUNT(S.customer_id) AS count,BI.wp_img_url')
->select('COUNT(S.customer_id) AS overall,COUNT(IF(S.isactive = 0, S.customer_id, NULL)) AS nonrenewal,COUNT(IF(S.isactive = 1, S.customer_id, NULL)) AS renewal')
//->select('COUNT(S.customer_id) AS overall,COUNT(IF(S.isactive = 0, S.customer_id, NULL)) AS nonrenewal,COUNT(IF(S.isactive = 1, S.customer_id, NULL)) AS renewal')
//->select('COUNT(IF(S.isactive = 1, S.customer_id, NULL)) AS overall,COUNT(IF(S.is_renew = 0 AND S.isactive = 1, S.customer_id, NULL)) AS nonrenewal,COUNT(IF(S.is_renew = 1 AND S.isactive = 1, S.customer_id, NULL)) AS renewal')
->select('COUNT(S.customer_id) AS overall,COUNT(IF(S.isactive = 1, S.customer_id, NULL)) AS activeoverall,COUNT(IF(S.is_renew = 0 AND S.isactive = 1, S.customer_id, NULL)) AS nonrenewal,COUNT(IF(S.is_renew = 1 AND S.isactive = 1, S.customer_id, NULL)) AS renewal')
->join('customers AS C', 'C.customer_id = S.customer_id AND C.isactive = 1', 'left')
->join('books AS BK', 'BK.book_id = S.scheme_id', 'left')
->join('book_categories AS BC', 'BC.book_id = S.scheme_id AND BC.isactive = 1', 'left')

View File

@ -159,7 +159,7 @@
<h4 class="text-white mt-0">Members - OverAll </h4>
<h3 class="my-3"><i class="fe-user-check text-white"></i></h3>
<!-- fe-layers -->
<h4 class="text-white mb-0"><?= $a['overall']; ?></h4>
<h4 class="text-white mb-0"><?= $a['activeoverall']; ?></h4>
</div>
<div class="col-4 text-center">
<h4 class="text-white mt-0">Members - Renewal </h4>