vb_book/app/Views/dashboard.php
2024-12-13 17:14:51 +05:30

190 lines
9.9 KiB
PHP
Executable File

<?php if ($business_id == 2 && $loggedin_person_role !== 'manager') : ?>
<div class="row">
<div class="col-xl-4 col-md-6">
<div class="card">
<div class="card-body">
<div class="dropdown float-right">
<i class="mdi mdi-dots-horizontal"></i>
<!-- <a href="#" class="dropdown-toggle arrow-none card-drop" data-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal"></i>
</a> -->
<div class="dropdown-menu dropdown-menu-right">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Action</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Another action</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Something else</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Separated link</a>
</div>
</div>
<h4 class="header-title mt-0">Sales</h4>
<div class="mt-3">
<div class="media">
<div dir="ltr">
<h3 class="mt-0 mb-1"><span data-plugin="counterup"><?= $invoice['today']['count']; ?></span></h3>
<p class="text-muted mb-0">Books</p>
<!-- <input data-plugin="knob" data-width="64" data-height="64" data-fgColor="#675db7"
data-bgColor="#e8e7f4" value=""
data-skin="tron" data-angleOffset="" data-readOnly=true
data-thickness=".15" style="font: bold 18px Arial;"/> -->
</div>
<div class="media-body text-right align-self-center">
<h3 class="mt-0 mb-1">₹<?= $invoice['today']['total_amount']; ?></h3>
<p class="text-muted mb-0">Today sale</p>
</div>
</div>
<br>
<div class="text-success">
<span class="float-left"> MTD :
<span data-toggle="tooltip" data-placement="bottom" data-original-title="Monthly Invoice Raised" data-plugin="counterup"><?= $invoice['month']['count']; ?></span>
<span data-toggle="tooltip" data-placement="bottom" data-original-title="Monthly Invoice Total Amount">- ₹<?= $invoice['month']['total_amount']; ?></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']['count']; ?></span>
<span data-toggle="tooltip" data-placement="bottom" data-original-title="Yearly Invoice Total Amount">- ₹<?= $invoice['year']['total_amount']; ?></span>
</span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<?php
if (!empty($active_schemes)) {
foreach ($active_schemes as $a) {
?>
<div class="col-xl-4 col-md-6">
<div class="card">
<div class="card-body">
<div class="dropdown float-right">
<a href="#" class="dropdown-toggle arrow-none card-drop" data-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal"></i>
</a>
<div class="dropdown-menu dropdown-menu-right">
<!-- item-->
<!-- <a href="javascript:void(0);" class="dropdown-item">Action</a> -->
<!-- item-->
<!-- <a href="javascript:void(0);" class="dropdown-item">Another action</a> -->
<!-- item-->
<!-- <a href="javascript:void(0);" class="dropdown-item">Something else</a> -->
<!-- item-->
<!-- <a href="javascript:void(0);" class="dropdown-item">Separated link</a> -->
<center><i><?= $a['name']; ?></i></center>
</div>
</div>
<h4 class="header-title mt-0"><?= $a['short_code']; ?></h4>
<div class="mt-3">
<div class="media">
<div dir="ltr">
<!-- <h3 class="my-2 py-1"><span data-plugin="counterup"><?php // $a['activeoverall']; ?></span></h3> -->
<!-- <input data-plugin="knob" data-width="64" data-height="64" data-fgColor="#675db7"
data-bgColor="#e8e7f4" value=""
data-skin="tron" data-angleOffset="" data-readOnly=true
data-thickness=".15" style="font: bold 18px Arial;"/> -->
</div>
<!-- <div class="avatar-md mr-3">
<div>
<?php if (!empty($a['wp_img_url'])) { ?>
<img src="<?= $a['wp_img_url']; ?>" alt="table-user" class="mr-3 rounded avatar-md">
<?php } else { ?>
<div class="avatar-title bg-light rounded text-body font-20 font-weight-semibold">
</div>
<?php } ?>
</div>
</div> -->
<!-- <div class="media-body">
<h5 class="my-1"><a href="javascript:void(0);" class="text-dark"><?= $a['short_code']; ?></a></h5>
<p class="text-muted mb-0">
</p>
</div> -->
<div class="media-body text-center align-self-center">
<h3 class="mt-0 mb-1"><?= $a['overall']; ?></h3>
<p class="text-muted mb-0">Total Subscriber</p>
</div>
</div>
<br>
</div>
</div>
</div>
</div><!-- end col -->
<?php
}
}
?>
</div>
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h4 class="header-title mt-1">Expiring Membership List in next 30 days</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" style="table-layout: fixed;">
<thead class="thead-light">
<tr>
<th style="width: 10%;">S.No</th>
<th style="width: 20%;">Name</th>
<th style="width: 20%;">Mobile No</th>
<th style="width: 35%;">Email</th>
<th style="width: 30%;">Scheme Name</th> <!-- Reduced width -->
<th style="width: 15%;">Expires By</th>
<th style="width: 25%; text-align:center">Notification On</th> <!-- Increased width -->
<th style="display: none;">member id</th>
</tr>
</thead>
<tbody>
<?php
$tempinx = 0;
if(!empty($expiring_membership)):
foreach ($expiring_membership as $e) :
if ($e['renewed'] == null):
$daysincount = (int)$e['countdays'];
$daysincountstring = ($daysincount == 0 ? 'Today' : ($daysincount == 1 ? 'Tomorrow' : $daysincount . ' days')); ?>
<tr>
<td><?= ++$tempinx; ?></td>
<td><h5 class="mt-0 mb-1"><?= $e['customer_name']; ?></h5></td>
<td><?= $e['customer_mobile'];?></td>
<td><?= $e['customer_email'];?></td>
<td><?= $e['short_code']; ?></td>
<td>
<span class="badge badge-success badge-pill"><?= $daysincountstring; ?></span>
<span class="font-13"><br><?= $e['to_subscription_date_format']; ?></span>
</td>
<td>
<?php
echo !empty($e['email_last_notify_on'])
? date('d-m-Y h:i A', strtotime($e['email_last_notify_on']))
: '';
?>
</td>
<td style="display: none;"><?= $e['membership_id']; ?></td>
</tr>
<?php endif;endforeach;
else : ?>
<tr>
<td colspan="7"><center>No data found</center></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div> <!-- end table-responsive-->
</div>
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->
</div>
<?php endif; ?>