From ae98fd368c2cf16e5b6de1357f37dae69d55778d Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 4 Jan 2024 19:47:45 +0530 Subject: [PATCH] scheme members list with overll,renew,and not renewed : ps --- app/Models/HomeModel.php | 1 + app/Views/dashboard.php | 268 ++++++++++++++++++++++++--------------- 2 files changed, 164 insertions(+), 105 deletions(-) diff --git a/app/Models/HomeModel.php b/app/Models/HomeModel.php index 92421c95..c00cdca7 100644 --- a/app/Models/HomeModel.php +++ b/app/Models/HomeModel.php @@ -61,6 +61,7 @@ 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') ->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') diff --git a/app/Views/dashboard.php b/app/Views/dashboard.php index 525d213e..1d2ef1da 100644 --- a/app/Views/dashboard.php +++ b/app/Views/dashboard.php @@ -48,19 +48,19 @@
-
-
- -
-
-

Today : -

-
-
- MTD : - YTD : -
-
+
+
+ +
+
+

Today : +

+
+
+ MTD : + YTD : +
+
@@ -70,27 +70,26 @@

Schemes

- $a) : ?> -
- - table-user - -
-
- + $a) : ?> +
+ + table-user + +
+
+ +
+
+ +
+
+

+ Subscribers +

- -
-
-

- Subscribers -

-
-
-
- +
+ - +
+ + + + + + + $a) : + $color = $class[$i % 4]; + ?> +
+
+
+
+
+ + +
+

+

+
+
+
+
+
+
+

Members - OverAll

+

+ +

+
+
+

Members - Renewal

+

+ +

+
+
+

Members - NonRenewal

+

+ +

+
+
+
+
+
+
+ +
-

Expiring Membership List

-
-
- - - - - - - - - - - "; - // print_r($expiring_membership); - // print ""; - $tempinx = 0; - foreach ($expiring_membership as $e) : - $daysincount = (int)$e['countdays'] ; - $daysincountstring = ($daysincount == 0 ? 'Today' : ($daysincount == 1 ? 'Tomorrow' : $daysincount.' days')); +

Expiring Membership List

+
+
+
#NameScheme NameExpiring In
+ + + + + + + + + + "; + // print_r($expiring_membership); + // print ""; + $tempinx = 0; + foreach ($expiring_membership as $e) : + $daysincount = (int)$e['countdays']; + $daysincountstring = ($daysincount == 0 ? 'Today' : ($daysincount == 1 ? 'Tomorrow' : $daysincount . ' days')); ?> - - - - - - - - - + + + + + + + - -
#NameScheme NameExpiring In
-
- -

+
+ +

-
-
+ + +
+
@@ -188,7 +245,7 @@
-

Books Published Report

+

Books Published Report

@@ -208,7 +265,7 @@

Last One Month

-
+
@@ -218,39 +275,40 @@ - 0) : foreach ($book_published['book_published'] as $b) :?> - - - - - + 0) : foreach ($book_published['book_published'] as $b) : ?> + + + + +
- -

- -

- - -

- -

- - -

- -

- -
- - - -
+ +

+ +

+ + +

+ +

+ + +

+ +

+ +
+ + + +