FEAT_EXPIRED MEMBERS IN LAST 30 DAYS ADDED IN DASHBOARD
This commit is contained in:
parent
3dccfe78f8
commit
3f24ab8eac
@ -184,7 +184,7 @@ class HomeModel extends Model
|
|||||||
public function expiring_membership_with_notification_list() {
|
public function expiring_membership_with_notification_list() {
|
||||||
$now = date('Y-m-d');
|
$now = date('Y-m-d');
|
||||||
$last30days = date('Y-m-d', strtotime('+30 days'));
|
$last30days = date('Y-m-d', strtotime('+30 days'));
|
||||||
|
$past30days = date('Y-m-d', strtotime('-30 days'));
|
||||||
$membershipList = $this->db->table('subscription as S')
|
$membershipList = $this->db->table('subscription as S')
|
||||||
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
|
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
|
||||||
->join('books as BK', 'BK.book_id = S.scheme_id', 'left')
|
->join('books as BK', 'BK.book_id = S.scheme_id', 'left')
|
||||||
@ -200,7 +200,7 @@ class HomeModel extends Model
|
|||||||
DATE_FORMAT(S.to_subscription, "%d/%m/%Y") as to_subscription_date_format,
|
DATE_FORMAT(S.to_subscription, "%d/%m/%Y") as to_subscription_date_format,
|
||||||
S.is_renew,
|
S.is_renew,
|
||||||
( NHC.sent_time ) as email_last_notify_on,(select is_renew from subscription as sub where S.sub_id = sub.is_renew LIMIT 1)as renewed')
|
( NHC.sent_time ) as email_last_notify_on,(select is_renew from subscription as sub where S.sub_id = sub.is_renew LIMIT 1)as renewed')
|
||||||
->where('S.to_subscription >=', $now)
|
->where('S.to_subscription >=', $past30days)
|
||||||
->where('S.to_subscription <=', $last30days)
|
->where('S.to_subscription <=', $last30days)
|
||||||
->where('S.isactive', 1)
|
->where('S.isactive', 1)
|
||||||
->where('LOWER(CM.name)', strtolower("Membership"))
|
->where('LOWER(CM.name)', strtolower("Membership"))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user