Dashboard + due date mail : ps
This commit is contained in:
parent
77d56c076d
commit
f67028962d
@ -22,6 +22,13 @@ class Home extends BaseController
|
||||
$model = new HomeModel();
|
||||
$data['customer'] = $model->customers($where);
|
||||
$data['customer']['label'] = "Customer";
|
||||
$data['invoice'] = $model->invoice();
|
||||
$data['active_category'] = $model->schemes();
|
||||
$data['expiring_membership'] = $model->expiring_membership_list();
|
||||
// $data['active_category'] = array_filter($model->schemes(), function ($element) {
|
||||
// return $element['count'] !== '0' ;
|
||||
// });
|
||||
$data['book_published'] = $model->book_published_list();
|
||||
$this->render_page('dashboard', $data);
|
||||
|
||||
}
|
||||
|
||||
@ -432,6 +432,13 @@ class Invoice extends BaseController
|
||||
$tax = "";
|
||||
$total_amount = "";
|
||||
$payment_method = "";
|
||||
$business_name= "";
|
||||
$business_address= "";
|
||||
$business_city= "";
|
||||
$business_state= "";
|
||||
$business_postal_code= "";
|
||||
$business_email= "";
|
||||
$business_mobile_no= "";
|
||||
if (isset($details)) {
|
||||
$this->logger->info("Invoice: approve notification Request data type = ".gettype($details));
|
||||
}
|
||||
@ -449,6 +456,13 @@ class Invoice extends BaseController
|
||||
$tax = $rec['tax'];
|
||||
$total_amount = $rec['total_amount'];
|
||||
$payment_method = $rec['payment_method'];
|
||||
$business_name= $rec['business_name'];
|
||||
$business_address= $rec['business_address'];
|
||||
$business_city= $rec['business_city'];
|
||||
$business_state= $rec['business_state'];
|
||||
$business_postal_code= $rec['business_postal_code'];
|
||||
$business_email= $rec['business_email'];
|
||||
$business_mobile_no= $rec['business_mobile_no'];
|
||||
}
|
||||
$records['invoice_order_number'] = $reference_number;
|
||||
$records['invoice_serial_number'] = $invoice_serial_number;
|
||||
@ -479,12 +493,12 @@ class Invoice extends BaseController
|
||||
</ul><br>
|
||||
<p>Best regards,</p>
|
||||
<ul style='list-style: none;'>
|
||||
<li>VijayaBharathamBooks,</li>
|
||||
<li>Sri Kasi, 12, M.V. Naidu Street, Chetpet, Chennai.</li>
|
||||
<li>Call Us: +91 89391 49466</li>
|
||||
<li>Email Us: contact@vijayabharathambooks.com</li></body></html>";
|
||||
<li>".$business_name.",</li>
|
||||
<li>".$business_address." ".$business_city." ".$business_state." - ".$business_postal_code."</li>
|
||||
<li>Call Us: +91 ".$business_mobile_no."</li>
|
||||
<li>Email Us: ".$business_email."</li></body></html>";
|
||||
|
||||
$template = "Dear " . $recipient_name . ",\r\r\n\nYour Invoice has been approved.\n\nDetails:\r\n- Approval Date: " . $approval_date . "\r\n- Approved By: " . $approved_by . "\r\n- Reference ID: " . $reference_number . "\r\n\nBest regards,\nVijayaBharathamBooks,\nSri Kasi, 12, M.V. Naidu Street, Chetpet, Chennai.\nCall Us: +91 89391 49466\nEmail Us: contact@vijayabharathambooks.com";
|
||||
$template = "Dear " . $recipient_name . ",\r\r\n\nYour Invoice has been approved.\n\nDetails:\r\n- Approval Date: " . $approval_date . "\r\n- Approved By: " . $approved_by . "\r\n- Reference ID: " . $reference_number . "\r\n\nBest regards,\n".$business_name.",\n".$business_address." ".$business_city." ".$business_state." - ".$business_postal_code.".\nCall Us: +91 ".$business_mobile_no."\nEmail Us:".$business_email;
|
||||
|
||||
$params = (object) Null;
|
||||
$params->number = (int)'91' . $recipient_mobile;
|
||||
|
||||
@ -3,12 +3,13 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Helpers\NotificationHelper;
|
||||
use App\Models\NotificationModel;
|
||||
|
||||
class Notifications extends BaseController
|
||||
{
|
||||
|
||||
## Email Section :
|
||||
public function mail_custom_notifications()
|
||||
public function mail_custom_notificationsi()
|
||||
{
|
||||
$request = \Config\Services::request();
|
||||
if ($request->is('post')) {
|
||||
@ -70,4 +71,68 @@ class Notifications extends BaseController
|
||||
$data['page_name'] = 'Custom Notifications';
|
||||
$this->render_page('notifications_form', $data);
|
||||
}
|
||||
|
||||
// public function due_date_notifications()
|
||||
public function mail_custom_notifications()
|
||||
{
|
||||
$model = new NotificationModel();
|
||||
$details = $model->getSubscriptionDueDetail();
|
||||
|
||||
$records = [];
|
||||
$recipient_name = "";
|
||||
$recipient_email = "";
|
||||
$recipient_mobile = "";
|
||||
$subscription_name = "";
|
||||
$business_name= "";
|
||||
$to_subscription= "";
|
||||
if (isset($details)) {
|
||||
$this->logger->info("Notification : Duedate notification Request data type = ".gettype($details));
|
||||
}
|
||||
helper('notification');
|
||||
$notification = new NotificationHelper();
|
||||
foreach ($details as $rec) {
|
||||
$recipient_name = $rec['customer_name'];
|
||||
$recipient_email = $rec['customer_email'];
|
||||
$recipient_mobile = $rec['customer_mobile'];
|
||||
// $recipient_email = "sanjeev.p@venbainfotech.com";
|
||||
// $recipient_mobile = 6369084112;
|
||||
$business_name= $rec['business_name'];
|
||||
$subscription_name = $rec['title'];
|
||||
$to_subscription= $rec['to_subscription'];
|
||||
|
||||
}
|
||||
$records['template_name'] = '';
|
||||
$records['recipient_name'] = $recipient_name;
|
||||
$records['recipient_email'] = $recipient_email ? $recipient_email : "sanjeev.p@venbainfotech.com";
|
||||
$records['subject'] = $business_name ." - Due Date Reminder";
|
||||
$records['description'] = "<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Due Date Reminder</title></head>
|
||||
<body>
|
||||
<p>Hello ".$recipient_name.",</p>
|
||||
<p>This is a reminder that the following subscription is due soon:</p>
|
||||
<p><strong>Subscription Name:</strong>".$subscription_name." </p>
|
||||
<p><strong>Due Date:</strong> ".$to_subscription."</p>
|
||||
<p>Please make sure to complete this subscription on time.</p>
|
||||
<p>Thank you.</p>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
$template = "Hello " . $recipient_name . ",\r\r\n\nThis is a reminder that the following subscription is due soon:\r\n- Subscription Name: " . $subscription_name . "\r\n Due Date: " . $to_subscription . "\r\n\nPlease make sure to complete this subscription on time.\n Thank you.";
|
||||
|
||||
$params = (object) Null;
|
||||
$params->number = (int)'91' . $recipient_mobile;
|
||||
$params->type = "text";
|
||||
$params->message = $template;
|
||||
$params->instance_id = WAAI_INSTANCE;
|
||||
$params->access_token = WAAI_TOKEN;
|
||||
$this->logger->info("Notification : Duedate notification Email Request data = ".json_encode($records));
|
||||
|
||||
$email_result = $notification->sendEmail($records);
|
||||
$this->logger->info("Notification : Duedate notification Email Response = " . json_encode($email_result));
|
||||
$this->logger->info("Notification : Duedate notification Whatsapp Request data = ".json_encode($params));
|
||||
$whatsapp_result = $notification->sendWhatsAppMessage(SEND_WAAI_URL, "POST", $params);
|
||||
$this->logger->info("Notification : Duedate notification Whatsapp Response = " . json_encode($whatsapp_result));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,4 +24,71 @@ class HomeModel extends Model
|
||||
$customer['today'] = $todayCustomers;
|
||||
return $customer;
|
||||
}
|
||||
|
||||
public function invoice() {
|
||||
if (date('m') <= 3) {
|
||||
$invoice['financial_year'] = (date('Y')-1) . '-' . date('Y');
|
||||
$start_date = (date('Y')-1).'-04-01';
|
||||
$end_date = date('Y').'-03-31';
|
||||
} else {
|
||||
$invoice['financial_year'] = date('Y') . '-' . (date('Y') + 1);
|
||||
$start_date = date('Y').'-04-01';
|
||||
$end_date = (date('Y')+1).'-03-31';
|
||||
}
|
||||
$date_where = ['DATE(created_on)' => date('Y-m-d'),'isactive'=>1];
|
||||
$date_query = $this->db->table('invoice')->where($date_where)->countAllResults();
|
||||
$month_where = ['MONTH(created_on)' => date('m'),'isactive'=>1];
|
||||
$month_query = $this->db->table('invoice')->where($month_where)->countAllResults();
|
||||
$fin_year_where = ['DATE(created_on) >= ' => $start_date , 'DATE(created_on) <= ' => $end_date,'isactive'=>1];
|
||||
$fin_year_query = $this->db->table('invoice')->where($fin_year_where)->countAllResults();
|
||||
$invoice['today'] = $date_query;
|
||||
$invoice['month'] = $month_query;
|
||||
$invoice['year'] = $fin_year_query;
|
||||
return $invoice;
|
||||
}
|
||||
|
||||
public function schemes(){
|
||||
$query = $this->db->table('category AS C')
|
||||
->select('C.id,C.name,LEFT(C.name, 1) AS first_letter, COUNT(S.customer_id) AS count')
|
||||
->join('subscription AS S', 'C.id = S.scheme_id', 'left')
|
||||
->where(['C.isactive'=>1,'C.business_id'=>1])
|
||||
->groupBy('C.id, S.scheme_id');
|
||||
$results = $query->get()->getResultArray();
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function expiring_membership_list(){
|
||||
$now = date('Y-m-d');
|
||||
$last30days = date('Y-m-d', strtotime('+30 days'));
|
||||
|
||||
return $this->db->table('subscription as S')
|
||||
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
|
||||
->join('category as CM', 'CM.id = S.scheme_id', 'left')
|
||||
->join('book_categories as BC', 'BC.category_id = S.scheme_id', 'left')
|
||||
->join('books as BK', 'BC.book_id = BK.book_id', 'left')
|
||||
->select('CM.name, CONCAT(C.first_name, " ", C.last_name) as customer_name, C.email as customer_email, C.mobile_no as customer_mobile, S.sub_id, S.scheme_id, S.customer_id, S.from_subscription, S.to_subscription, S.business_id, S.to_subscription, S.from_subscription, BK.title, BK.book_id,DATEDIFF(S.to_subscription, CURDATE()) as countdays')
|
||||
->where('S.to_subscription >=', $now)
|
||||
->where('S.to_subscription <=', $last30days)
|
||||
->where('BC.category_id', 5)
|
||||
->groupBy('S.sub_id')
|
||||
->get()
|
||||
->getResultArray();
|
||||
}
|
||||
|
||||
public function book_published_list(){
|
||||
$now = date('Y-m-d');
|
||||
$oneMonthAgo = date('Y-m-d', strtotime($now . ' -1 month'));
|
||||
|
||||
return $this->db->table('books as B')
|
||||
->select("B.book_id, B.title, B.created_on, B.publisher, B.author, B.publication_date, DATE_FORMAT(B.publication_date, '%d-%m-%Y') as publication_date_format, GROUP_CONCAT(CM.name, ',') as categories")
|
||||
->join('book_categories as BC', 'BC.book_id = B.book_id and BC.isactive = 1', 'left')
|
||||
->join('category as CM', 'BC.category_id = CM.id', 'left')
|
||||
->where('B.created_on >=', $oneMonthAgo)
|
||||
->where('B.created_on <=', $now)
|
||||
->where('B.isactive', 1)
|
||||
->groupBy('B.book_id')
|
||||
->get()
|
||||
->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ public function updateData($table, $data, $where)
|
||||
->join('business as B', 'B.business_id = I.business_id', 'left')
|
||||
->join('users as U1', 'U1.user_id = I.created_by', 'left')
|
||||
->join('users as U2', 'U2.user_id = I.updated_by', 'left')
|
||||
->select('I.invoice_id, I.invoice_number, I.customer_id,concat(C.first_name," ",C.last_name) as customer_name , I.invoice_date, I.due_date, I.subtotal, I.tax, I.discount, I.total_amount,I.status, I.payment_status, I.order_number, I.payment_method,I.invoice_type, I.event_id,E.event_name, I.business_id,B.title as business_name, I.created_on, I.created_by,concat(U1.first_name," ",U1.last_name) as created_by_name, I.updated_on, I.updated_by,concat(U2.first_name," ",U2.last_name) as updated_by_name, I.isactive,C.email as customer_email,C.mobile_no as customer_mobile,I.shipping_address_id,I.shipping_address,I.billing_address_id,I.billing_address')
|
||||
->select('I.invoice_id, I.invoice_number, I.customer_id,concat(C.first_name," ",C.last_name) as customer_name , I.invoice_date, I.due_date, I.subtotal, I.tax, I.discount, I.total_amount,I.status, I.payment_status, I.order_number, I.payment_method,I.invoice_type, I.event_id,E.event_name, I.business_id,B.title as business_name, I.created_on, I.created_by,concat(U1.first_name," ",U1.last_name) as created_by_name, I.updated_on, I.updated_by,concat(U2.first_name," ",U2.last_name) as updated_by_name, I.isactive,C.email as customer_email,C.mobile_no as customer_mobile,I.shipping_address_id,I.shipping_address,I.billing_address_id,I.billing_address,B.address as business_address,B.city as business_city,B.state as business_state,B.postal_code as business_postal_code,B.email as business_email,B.mobile_no as business_mobile_no')
|
||||
->where($where)
|
||||
->get()
|
||||
->getResultArray();
|
||||
|
||||
@ -3,20 +3,36 @@ namespace App\Models;
|
||||
use CodeIgniter\Model;
|
||||
class NotificationModel extends Model
|
||||
{
|
||||
protected $table = 'users';
|
||||
protected $primaryKey = 'user_id';
|
||||
protected $allowedFields = ['user_id','user_name','email','first_name','last_name','password','mobile_no','date_of_birth','address','gender','profile_picture','city','state','postal_code','country','role','isactive','business_id'];
|
||||
protected $table;
|
||||
|
||||
public function saveData($data, $id = null)
|
||||
public function setCustomTable($tableName)
|
||||
{
|
||||
if ($id === null) {
|
||||
// Insert new record
|
||||
return $this->insert($data);
|
||||
} else {
|
||||
// Update existing record
|
||||
return $this->update($id, $data);
|
||||
}
|
||||
$this->table = $tableName;
|
||||
}
|
||||
|
||||
// public function getTasksDueLastWeek()
|
||||
// {
|
||||
// $now = date('Y-m-d');
|
||||
// $oneWeekAgo = date('Y-m-d', strtotime('-7 days', strtotime($now)));
|
||||
|
||||
// return $this->where('due_date >=', $oneWeekAgo)
|
||||
// ->where('due_date <=', $now)
|
||||
// ->findAll();
|
||||
// }
|
||||
|
||||
public function getSubscriptionDueDetail(){
|
||||
$now = date('Y-m-d');
|
||||
$lastWeek = date('Y-m-d', strtotime('+7 days'));
|
||||
return $this->db->table('subscription as S' )
|
||||
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
|
||||
->join('category as CM', 'CM.id = S.scheme_id', 'left')
|
||||
->join('business as B', 'B.business_id = S.business_id', 'left')
|
||||
->join('book_categories as BC', 'BC.category_id = S.scheme_id', 'left')
|
||||
->join('books as BK', 'BC.book_id = BK.book_id', 'left')
|
||||
->select('CM.name,concat(C.first_name, " ", C.last_name) as customer_name,C.email as customer_email,C.mobile_no as customer_mobile,S.sub_id,S.scheme_id,S.customer_id,S.from_subscription,S.to_subscription,S.business_id,B.title as business_name,B.address as business_address,B.city as business_city,B.state as business_state,B.postal_code as business_postal_code,B.email as business_email,B.mobile_no as business_mobile_no,S.to_subscription,S.from_subscription,BK.title,BK.book_id')
|
||||
->where('S.to_subscription >=', $now)->where('S.to_subscription <=',$lastWeek)
|
||||
->groupBy('S.sub_id')
|
||||
->get()->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -149,12 +149,12 @@
|
||||
<div style="font-weight : 300; color : rgb(68,68,68); line-height : 22px; ">
|
||||
<p>
|
||||
<span><?= $recipient_name; ?><br></span>
|
||||
<span>22/2, SriKrishna Apartments<br> </span>
|
||||
<span>1st Street, Subramania Nagar, Kodambakkam<br> </span>
|
||||
<span>CHENNAI 600024<br></span>
|
||||
<span>Tamil Nadu<br></span>
|
||||
<span><a style="color : rgb(68,68,68); font-weight : 300; " target="_blank">+919445062922</a><br></span>
|
||||
<span><a style="color : rgb(68,68,68); font-weight : 300; " target="_blank">arasubu@gmail.com</a><br></span>
|
||||
<span><?= $recipient_name; ?><br> </span>
|
||||
<span><?= $recipient_name; ?><br> </span>
|
||||
<span><?= $recipient_name; ?><br></span>
|
||||
<span><?= $recipient_name; ?><br></span>
|
||||
<span><a style="color : rgb(68,68,68); font-weight : 300; " target="_blank">+91<?= $recipient_name; ?></a><br></span>
|
||||
<span><a style="color : rgb(68,68,68); font-weight : 300; " target="_blank"><?= $recipient_name; ?></a><br></span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -1,93 +1,337 @@
|
||||
<?php if ($loggedin_person_role !== 'manager') : ?>
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#1abc9c"
|
||||
data-bgColor="#d1f2eb" value="<?= $customer['percentage']; ?>"
|
||||
data-skin="tron" data-angleOffset="0" data-readOnly=true
|
||||
data-thickness=".15"/>
|
||||
</div>
|
||||
<!-- <div class="text-right">
|
||||
<?php if ($loggedin_person_role === 'sadmin') : ?>
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#1abc9c" data-bgColor="#d1f2eb" value="<?= $customer['percentage']; ?>" data-skin="tron" data-angleOffset="0" data-readOnly=true data-thickness=".15" />
|
||||
</div>
|
||||
<!-- <div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['active']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'Available '.$customer['label']; ?></p>
|
||||
<p class="text-muted mb-0"><?= 'Available ' . $customer['label']; ?></p>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['total']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'Total '.$customer['label']; ?></p>
|
||||
<p class="text-muted mb-0"><?= 'Total ' . $customer['label']; ?></p>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup">268</span> </h3>
|
||||
<p class="text-muted mb-0">New Customers</p>
|
||||
</div> -->
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['today']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'New '.$customer['label']; ?></p>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['today']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'New ' . $customer['label']; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div><!-- end col -->
|
||||
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#3bafda"
|
||||
data-bgColor="#d8eff8" value="80"
|
||||
data-skin="tron" data-angleOffset="0" data-readOnly=true
|
||||
data-thickness=".15"/>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup">8574</span> </h3>
|
||||
<p class="text-muted mb-0">Online Orders</p>
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#3bafda" data-bgColor="#d8eff8" value="80" data-skin="tron" data-angleOffset="0" data-readOnly=true data-thickness=".15" />
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup">8574</span> </h3>
|
||||
<p class="text-muted mb-0">Online Orders</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div><!-- end col -->
|
||||
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#f672a7"
|
||||
data-bgColor="#fde3ed" value="77"
|
||||
data-skin="tron" data-angleOffset="0" data-readOnly=true
|
||||
data-thickness=".15"/>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> ₹ <span data-plugin="counterup">958.25</span> </h3>
|
||||
<p class="text-muted mb-0">Revenue</p>
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#f672a7" data-bgColor="#fde3ed" value="77" data-skin="tron" data-angleOffset="0" data-readOnly=true data-thickness=".15" />
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> ₹ <span data-plugin="counterup">958.25</span> </h3>
|
||||
<p class="text-muted mb-0">Revenue</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div><!-- end col -->
|
||||
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#6c757d"
|
||||
data-bgColor="#e2e3e5" value="35"
|
||||
data-skin="tron" data-angleOffset="0" data-readOnly=true
|
||||
data-thickness=".15"/>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> ₹ <span data-plugin="counterup">89.25</span> </h3>
|
||||
<p class="text-muted mb-1">Daily Average</p>
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="knob-chart" dir="ltr">
|
||||
<input data-plugin="knob" data-width="70" data-height="70" data-fgColor="#6c757d" data-bgColor="#e2e3e5" value="35" data-skin="tron" data-angleOffset="0" data-readOnly=true data-thickness=".15" />
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> ₹ <span data-plugin="counterup">89.25</span> </h3>
|
||||
<p class="text-muted mb-1">Daily Average</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div><!-- end col -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- end row -->
|
||||
<!-- end row -->
|
||||
<?php if ($loggedin_person_role !== 'manager') : ?>
|
||||
<!-- <div class="row">
|
||||
<div class="col-xl-6">
|
||||
<div class="card bg-info border-info">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-6 text-center">
|
||||
<h1 class="display-4"><i class="wi ri-stack-line"></i></h1>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="text-white">
|
||||
<h2 class="text-white"><b>32°</b></h2>
|
||||
<p>Partly cloudy</p>
|
||||
<p class=" mb-0">15km/h - 37%</p>
|
||||
</div>
|
||||
</div
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="row">
|
||||
<div class="col-4 text-center">
|
||||
<h4 class="text-white mt-0">SAT</h4>
|
||||
<h3 class="my-3"><i class="wi wi-night-alt-cloudy text-white"></i></h3>
|
||||
<h4 class="text-white mb-0">30<i class="wi wi-degrees"></i></h4>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<h4 class="text-white mt-0">SUN</h4>
|
||||
<h3 class="my-3"><i class="wi wi-day-sprinkle text-white"></i></h3>
|
||||
<h4 class="text-white mb-0">28<i class="wi wi-degrees"></i></h4>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<h4 class="text-white mt-0">MON</h4>
|
||||
<h3 class="my-3"><i class="wi wi-hot text-white"></i></h3>
|
||||
<h4 class="text-white mb-0">33<i class="wi wi-degrees"></i></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div style="min-height: 200px !important">
|
||||
<div class="text-primary float-right">
|
||||
<span data-toggle="tooltip" data-placement="bottom" data-original-title="Current Financial Year"> <?= $invoice['financial_year']; ?></span>
|
||||
</div>
|
||||
<div style="padding: 80px 0;">
|
||||
<h3 class="text-center">Today : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Today Invoice Raised" data-plugin="counterup"><?= $invoice['today']; ?></span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="text-success">
|
||||
<span> MTD : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Monthly Invoice Raised" data-plugin="counterup"><?= $invoice['month']; ?></span></span>
|
||||
<span class="float-right" > YTD : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Yearly Invoice Raised" data-plugin="counterup"><?= $invoice['year']; ?></span></span>
|
||||
</div>
|
||||
</div><!-- end min-height-->
|
||||
</div> <!-- end card-body-->
|
||||
</div><!--end card-->
|
||||
</div> <!-- end col -->
|
||||
|
||||
<div class="col-xl-9 col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2">Schemes</h4>
|
||||
<div class="conversation-list" data-simplebar style="max-height: 200px !important"> <!-- default 460px -->
|
||||
<?php foreach ($active_category as $a) : ?>
|
||||
|
||||
<div class="media">
|
||||
<div class="avatar-md mr-3">
|
||||
<div class="avatar-title bg-light rounded text-body font-20 font-weight-semibold">
|
||||
<?= $a['first_letter']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h5 class="my-1"><?= $a['name']; ?></h5>
|
||||
<p class="text-muted mb-0">
|
||||
<span class="badge badge-soft-success"><i class="mdi mdi-account mr-1"></i> <span data-plugin="counterup"><?= $a['count']; ?></span> Subscribers </span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<?php endforeach; ?>
|
||||
<!-- <div class="media">
|
||||
<div class="avatar-md mr-3">
|
||||
<div class="avatar-title bg-light rounded text-body font-20 font-weight-semibold">
|
||||
ச
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h5 class="my-1">Samarth Scheme (2years) </h5>
|
||||
<p class="text-muted mb-0">
|
||||
<span class="badge badge-soft-success"><i class="mdi mdi-account mr-1"></i> <span data-plugin="counterup"> 32 </span> Subscribers </span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr> -->
|
||||
|
||||
<!-- <div class="media">
|
||||
<div class="mr-3">
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-1.jpg" ?>" alt="user-image" class="rounded avatar-md">
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h5 class="my-1">Samarth Scheme (1years) </h5>
|
||||
<p class="text-muted mb-0">
|
||||
<span class="badge badge-soft-success"><i class="mdi mdi-account mr-1"></i> <span data-plugin="counterup"> 32 </span> Subscribers </span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr> -->
|
||||
</div>
|
||||
</div><!-- end card-body -->
|
||||
</div><!--end card-->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-4 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mt-1">Expiring Membership List</h4>
|
||||
<div class="conversation-list" data-simplebar style="max-height: 255px !important">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-centered mb-0 font-14">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 5%;">#</th>
|
||||
<th style="width: 20%;">Name</th>
|
||||
<th style="width: 50%;">Scheme Name</th>
|
||||
<th style="width: 25%;">Expiring In</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// print "<pre>";
|
||||
// print_r($expiring_membership);
|
||||
// print "</pre>";
|
||||
foreach ($expiring_membership as $e) : ?>
|
||||
<tr>
|
||||
<td><?= $e['sub_id']; ?></td>
|
||||
<td>
|
||||
<h5 class="mt-0 mb-1"><?= $e['customer_name']; ?></h5>
|
||||
<span class="font-13"><?= $e['customer_mobile']; ?></span>
|
||||
</td>
|
||||
<td><?= $e['title']; ?></td>
|
||||
<td><span class="badge badge-success badge-pill"><span data-plugin="counterup"><?= $e['countdays']; ?></span> days</span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<!-- <tr>
|
||||
<td>
|
||||
<h5 class="mt-0 mb-1">Sangavi</h5>
|
||||
<span class="font-13">9092279559</span>
|
||||
</td>
|
||||
<td>Samarth Scheme (5years)</td>
|
||||
<td><span class="badge badge-success badge-pill">5 days</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h5 class="mt-0 mb-1">Suganya</h5>
|
||||
<span class="font-13">7128122050</span>
|
||||
</td>
|
||||
<td>Samarth Scheme (5years)</td>
|
||||
<td><span class="badge badge-success badge-pill">5 days</span></td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
</div>
|
||||
</div> <!-- end card-body-->
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
|
||||
<div class="col-xl-4 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mt-1">Books Published in Last One Month</h4>
|
||||
<div class="conversation-list" data-simplebar style="max-height: 255px !important">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-centered mb-0 font-14">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th style="width: 50%;">Book Details</th>
|
||||
<th style="width: 50%;">Category</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($book_published as $b) :?>
|
||||
<tr>
|
||||
<td><?= $b['title']; ?>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-account mr-1"></i><?= $b['author']; ?>
|
||||
</p>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-book-open-variant mr-1"></i><?= $b['publisher']; ?>
|
||||
</p>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-update mr-1"></i><?= $b['publication_date_format']; ?>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<?php // echo $b['categories'];
|
||||
$splitted = explode(', ', $b['categories']);
|
||||
if(!empty($splitted)){
|
||||
// print_r($splitted);
|
||||
for ($i = 0; $i < count($splitted); $i++) {
|
||||
if($splitted[$i] !== ''){ ?>
|
||||
<span class="badge badge-success badge-pill mr-1"><?= str_replace(',', '', $splitted[$i]); ?></span>
|
||||
<?php }
|
||||
}
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<!-- <tr>
|
||||
<td>First std English
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-account mr-1"></i> தி. ச. வைகுண்டம்
|
||||
</p>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-book-open-variant mr-1"></i> விஜயபாரதம் பிரசுரம்
|
||||
</p>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-update mr-1"></i> 17/10/2023
|
||||
</p>
|
||||
</td>
|
||||
<td><span class="badge badge-success badge-pill mr-1">History</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>First std Science
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-account mr-1"></i> Dr. சரத் ஹேபால்கர்
|
||||
</p>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-book-open-variant mr-1"></i> அலைகள் வெளியீட்டகம்
|
||||
</p>
|
||||
<p class="text-muted mb-0">
|
||||
<i class="mdi mdi-update mr-1"></i> 17/10/2023
|
||||
</p>
|
||||
</td>
|
||||
<td><span class="badge badge-success badge-pill mr-1">Paperbacks</span></td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
</div>
|
||||
</div> <!-- end card-body-->
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
BIN
public/uploads/avatar.png
Executable file → Normal file
BIN
public/uploads/avatar.png
Executable file → Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 5.7 KiB |
Loading…
Reference in New Issue
Block a user