Minor Fixes : ps

This commit is contained in:
VE10-Sanjeev 2024-03-27 19:21:27 +05:30
parent 43d27d1654
commit d52795eb11
25 changed files with 401 additions and 515 deletions

View File

@ -730,6 +730,7 @@ class ApiIntegration extends ResourceController
$extensive_correspondence = "";
$invoice_id = "";
if (count($records) > 0 && !empty($wordpress_order_id)) {
if($records['status'] == 'completed' || $records['status'] == 'processing'){
$where = ['wp_api_order_id' => $wordpress_order_id, 'isactive' => 1];
$invoice_details = $api_model->setTable('invoice')->where($where)->first();
if (isset($invoice_details['invoice_id']) && $invoice_details['invoice_id'] != "") {
@ -796,7 +797,29 @@ class ApiIntegration extends ResourceController
$subtotal = (float)$lineitems_subtotal + (float)$records['shipping_total'];
$tax = $lineitems_tax + (float)$records['shipping_tax'];
$total = ($lineitems_total)+(float)$records['shipping_total'] + (float)$records['shipping_tax'];
$final_status = '';
switch ($records['status']) {
case 'completed':
case 'processing':
$final_status = 'Approved';
break;
case 'refunded':
$final_status = 'Refunded';
break;
case 'failed':
case 'cancelled':
$final_status = 'Cancelled';
break;
case 'checkout-draft':
case 'pending':
case 'on-hold':
$final_status = 'Inprogress';
break;
default:
$final_status = 'Inprogress';
}
$invoice_data['invoice_id']=$invoice_id;
$invoice_data['invoice_number']=$records['number'];
@ -811,7 +834,7 @@ class ApiIntegration extends ResourceController
$invoice_data['payment_status']=$records['status'];
$invoice_data['order_number']=$records['order_key'];
$invoice_data['payment_method']=$records['payment_method_title'];
$invoice_data['status']='Approved';
$invoice_data['status']=$final_status;
$invoice_data['event_id']=NULL;
$invoice_data['business_id']=$this->global_variable_business_id;
$invoice_data['shipping_address']=$shipping_addr;
@ -922,7 +945,7 @@ class ApiIntegration extends ResourceController
// return $element['category_name'] === 'Membership' && $element['sku'] === $skuId;
// });
$result_book_category = array_filter($get_book_category, function ($element) use ($skuId) {
return $element['category_name'] === 'Membership' && $element['sku'] === $skuId;
return strtolower($element['category_name']) === strtolower('Membership') && $element['sku'] === $skuId;
});
$fromDate = NULL;
$toDate = NULL;
@ -1088,6 +1111,10 @@ class ApiIntegration extends ResourceController
// $this->logger->error("Api SaveSalesDetails : Err = Invoice items (Shipping) Data Not Found");
// }
$response = ['status' => 200, 'message' => $basic_message ,'indetails' => $extensive_correspondence];
}else{
$this->logger->error("Api SaveSalesDetails : Err = Because Status from Request is ".$records['status']);
$response = ['status' => 204, 'message' => 'Data No Found Because Status from Request is '.$records['status']];
}
}
else {
$this->logger->error("Api SaveSalesDetails : Err = Data Not Found");

View File

@ -65,14 +65,8 @@ abstract class BaseController extends Controller
echo "This is a command-line request.";
// echo $requestedRoute;
} else {
if ($uri->getSegment(1) != 'getExpCustomerDetail'&& $uri->getSegment(1) != 'download_invoice_pdf') {
$this->authData = $this->session_log();
}
$routesArr = ['login', 'authenticate', 'auth_confirm_mail', 'auth_reset_password', 'auth_reset_password_save'];
if (!in_array($requestedRoute, $routesArr)) {
$this->authData = $this->session_log();
if ($requestedRoute !== '/login' && $requestedRoute !== '/authenticate' && $requestedRoute !== '/auth_confirm_mail' && $requestedRoute !== '/auth_reset_password' && $requestedRoute !== 'auth_reset_password_save' && $uri->getSegment(1) != 'getExpCustomerDetail'&& $uri->getSegment(1) != 'download_invoice_pdf') {
$this->authData = $this->session_log();
}
}
@ -111,7 +105,7 @@ abstract class BaseController extends Controller
$details = $auth_model->getheringDetailsForHeader($session_uid);
// $data['company_name'] = $details[0]['site_name'];
$data['company_name'] = $details[0]['company_name'];
$data['company_name'] = $details[0]['company_name'] ? $details[0]['company_name'] : "ABD";
$data['company_short_name'] = $details[0]['site_short_name'];
$data['company_address'] = $details[0]['company_address'];
$data['company_mobile_no'] = $details[0]['company_mobile_no'];

View File

@ -923,33 +923,29 @@ $encodedUrl = urlencode($url);
}
}
public function expired_customer_report()
{
if($this->request->getmethod() == 'get')
{
$model = new InvoiceModel();
$data['expired_customers'] = $model->getExpiredCustomers();
$data['selected_data'] = "";
$this->logger->info("'Membership Renewals Report'");
$data['page_name'] = 'Membership Renewals Report';
$this->render_page('report_expired_customers', $data);
}
else
{
$dateParts = explode(' - ', $this->request->getVar('date') );
$fromDate = $dateParts[0];
$toDate = $dateParts[1];
$dateTime = \DateTime::createFromFormat('d/m/Y', $fromDate);
$dateTime1 = \DateTime::createFromFormat('d/m/Y', $toDate);
$model = new InvoiceModel();
$data['expired_customers'] = $model->getExpiredCustomers( $dateTime->format('Y-m-d') , $dateTime1->format('Y-m-d') );
$data['selected_data'] = $this->request->getVar('date');
$this->logger->info("Itemwise Report ");
if($this->request->getmethod() == 'get')
{
$data['expired_customers'] = $model->getExpiredCustomers();
$data['selected_data'] = "";
}
else
{
$dateParts = explode(' - ', $this->request->getVar('date') );
$fromDate = $dateParts[0];
$toDate = $dateParts[1];
$dateTime = \DateTime::createFromFormat('d/m/Y', $fromDate);
$dateTime1 = \DateTime::createFromFormat('d/m/Y', $toDate);
$model = new InvoiceModel();
$data['expired_customers'] = $model->getExpiredCustomers( $dateTime->format('Y-m-d') , $dateTime1->format('Y-m-d') );
$data['selected_data'] = $this->request->getVar('date');
$this->logger->info("Itemwise Report ");
}
$this->logger->info("'Membership Renewals Report'");
$data['page_name'] = 'Membership Renewals Report';
$this->render_page('report_expired_customers', $data);
}
}
public function itemwise_report()

View File

@ -86,7 +86,7 @@ class Scheme extends BaseController
$db = db_connect();
$category = $db->table('category')
->select('id')
->where('name', $category_name)
->where('Lower(name)', strtolower($category_name))
->get()
->getRow();
// Check if the category exists

View File

@ -29,7 +29,7 @@ class Subscription extends BaseController
$model = new InvoiceModel();
$data['page_name'] = 'Subscription Invoice Details';
$data['invoice'] = $model->getSubscriptionInvoiceDetail($where);
$this->logger->info("Invoice: Listing Count ." . count($data['invoice']));

View File

@ -154,7 +154,8 @@ class HomeModel extends Model
->groupBy('S.sub_id')
->get()
->getResultArray();
// print_r($membershipList);
// echo $this->db->getLastQuery(); die;
foreach ($membershipList as &$membership) {
$notifications = $this->getNotifications($membership['customer_id']);

View File

@ -104,10 +104,10 @@ public function getSubscriptionInvoiceDetail($where)
$schemes = [];
$invoiceItems = $this->getInvoiceItems($invoiceId, '');
foreach ($invoiceItems as $j => $child) {
if ($child->category_name == 'Membership') {
if (strtolower($child->category_name) == strtolower('Membership')) {
$schemes[] = [
'scheme_name' => $child->title,
'scheme_code' => $child->short_code, // Update this line to use the correct property
'scheme_code' => !empty($child->short_code)?$child->short_code:$child->title,
];
}
}
@ -499,18 +499,20 @@ public function getExpiredCustomers($f_date = null, $t_date = null)
if ($f_date !== null && $t_date !== null) {
$query->where('S.to_subscription >=', $f_date)
->where('S.to_subscription <=', $t_date);
->where('S.to_subscription <=', $t_date);
}
$result = $query
->select('S.customer_id,S.sub_id, S.from_subscription, S.to_subscription, C.first_name, C.last_name, C.email, C.mobile_no, S.scheme_id,books.short_code')
->select('S.customer_id,S.sub_id, S.from_subscription, S.to_subscription, C.first_name, C.last_name, C.email, C.mobile_no, S.scheme_id,B.short_code')
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
->join('books', 'books.book_id = S.scheme_id', 'left')
->join('books as B', 'B.book_id = S.scheme_id', 'left')
->where('S.isactive', 1)
->where('S.to_subscription <=', $now)
->get()
->getResultArray();
// print_r($result);
// echo "<pre>";
// echo $this->db->getLastQuery();
// echo "</pre>";die;
return $result;
}

View File

@ -24,7 +24,7 @@ class SchemeModel extends Model
$builder->join('book_categories', 'book_categories.book_id = books.book_id', 'left');
$builder->join('category', 'category.id = book_categories.category_id', 'left');
$builder->where('books.business_id', $business_id);
$builder->where('category.name', 'membership');
$builder->where('LOWER(category.name)', 'membership');
$builder->where('books.isactive', 1);
$query = $builder->get();

View File

@ -15,7 +15,7 @@ public function getAllSubscribersWithNames($where)
{
$builder = $this->db->table('subscription');
$builder->select('subscription.*, books.title, books.isactive, CONCAT(customers.first_name, " ", customers.last_name) as customer_name');
$builder->select('subscription.*, books.title,books.short_code, books.isactive, CONCAT(customers.first_name, " ", customers.last_name) as customer_name');
$builder->join('books', 'books.book_id = subscription.scheme_id');
$builder->join('customers', 'customers.customer_id = subscription.customer_id');
$builder->where($where);

View File

@ -38,7 +38,7 @@
<th>Year Of Release</th>
<th>Price of the Book</th>
<th>Status</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<tbody>
@ -55,14 +55,14 @@
?>
<tr>
<td hidden><?php echo $row['book_id']; ?></td>
<td><?php echo $row['title']; ?></td>
<td><?php echo isset($row['author']) ? $row['author'] : ""; ?></td>
<td><?php echo $row['category_name']; ?></td>
<td><?php echo $row['language']; ?></td>
<td><?php echo $formattedPublicationYear ; ?></td>
<td data-order="<?= $row['title']; ?>"><?php echo $row['title']; ?></td>
<td data-order="<?= $row['author']; ?>"><?php echo isset($row['author']) ? $row['author'] : ""; ?></td>
<td data-order="<?= $row['category_name']; ?>"><?php echo $row['category_name']; ?></td>
<td data-order="<?= $row['language']; ?>"><?php echo $row['language']; ?></td>
<td data-order="<?= $formattedPublicationYear; ?>"><?php echo $formattedPublicationYear ; ?></td>
<!-- <td> <span data-plugin="counterup"><?php echo $row['price']; ?></span></td> -->
<td> <?php echo $row['price']; ?></td>
<td>
<td data-order="<?= $row['price']; ?>"> <?php echo $row['price']; ?></td>
<td data-order="<?= $message; ?>">
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
</td>
<td>
@ -88,9 +88,10 @@
<!-- end row-->
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_new').DataTable({
"order": [[0, "desc"]] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
"order": [[0, "desc"]],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -38,7 +38,7 @@
<th>Created at</th>
<th>Created by</th>
<th>Status</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<?php foreach ($campaign as $c) :
@ -54,14 +54,14 @@
?>
<tr>
<td hidden><?= $c['campaign_id']; ?></td>
<td><?= $c['campaign_name']; ?></td>
<td><?= $c['template_name']; ?></td>
<td><?= $c['group_name']; ?></td>
<td><?= $c['customer_group_count']; ?></td>
<td data-order="<?= $c['campaign_name']; ?>"><?= $c['campaign_name']; ?></td>
<td data-order="<?= $c['template_name']; ?>"><?= $c['template_name']; ?></td>
<td data-order="<?= $c['group_name']; ?>"><?= $c['group_name']; ?></td>
<td data-order="<?= $c['customer_group_count']; ?>"><?= $c['customer_group_count']; ?></td>
<td><?= $scheduled_date." ".$scheduled_time; ?></td>
<td><?= $c['formatted_created_on']; ?></td>
<td><?= $c['created_by_name']; ?></td>
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td data-order="<?= $c['formatted_created_on']; ?>"><?= $c['formatted_created_on']; ?></td>
<td data-order="<?= $c['created_by_name']; ?>"><?= $c['created_by_name']; ?></td>
<td data-order="<?= $message; ?>"><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td>
<a href="<?= base_url()."campaign_creation_form/".$c['campaign_id']; ?>" class="edit-button" title="Click to Edit Campaign" ><i class="ri-pencil-line"></i></a>
<?php if ($c['isactive']) { ?> <a href="<?= base_url() . "campaign_creation_delete/".$c['campaign_id']; ?>" class="delete-button" title="Click to Delete Campaign" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
@ -78,11 +78,10 @@
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_customer').DataTable({
"order": [
[0, "desc"]
] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
"order": [ [0, "desc"] ],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -34,7 +34,7 @@
<th>Created at</th>
<th>Created by</th>
<th>Status</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<?php foreach ($customer_group as $group) :
@ -47,10 +47,10 @@
} ?>
<tr>
<td hidden><?= $group['group_id']; ?></td>
<td><?= $group['group_name']; ?></td>
<td><?= $group['formatted_created_on']; ?></td>
<td><?= $group['created_by_name']; ?></td>
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td data-order="<?= $group['group_name']; ?>"><?= $group['group_name']; ?></td>
<td data-order="<?= $group['formatted_created_on']; ?>"><?= $group['formatted_created_on']; ?></td>
<td data-order="<?= $group['created_by_name']; ?>"><?= $group['created_by_name']; ?></td>
<td data-order="<?= $message; ?>"><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td>
<a href="<?= base_url() . "view_customer_group/" . $group['group_id']; ?>" class="edit-button" title="Edit" ><i class="ri-pencil-line"></i></a>
<a class="preview-button" title="Customer list" data-toggle="modal" data-target="#scrollable-modal" data-primary-key="<?php echo $group['group_id']; ?>" data-group-name="<?php echo $group['group_name']; ?>"><i class="ri-pages-line"></i></a>
@ -99,10 +99,11 @@
<!-- end row-->
<script>
$(document).ready(function() {
$('#scroll-horizontal-datatable_customer').DataTable({
"order": [[0, "desc"]] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
});
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_customer').DataTable({
"order": [ [0, "desc"] ],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>
<script>

View File

@ -34,16 +34,16 @@
<th>Mobile Number</th>
<th>Email</th>
<th>Mode</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<?php foreach ($customer as $value) :?>
<tr>
<td hidden><?$value['customer_id'];?></td>
<td><?= $value['first_name'].' '.$value['last_name'] ; ?></td>
<td><?= $value['mobile_no']; ?></td>
<td><?= $value['email']; ?></td>
<td><?= $value['mode']; ?></td>
<td data-order="<?= $value['first_name']; ?>"><?= $value['first_name'].' '.$value['last_name'] ; ?></td>
<td data-order="<?= $value['mobile_no']; ?>"><?= $value['mobile_no']; ?></td>
<td data-order="<?= $value['email']; ?>"><?= $value['email']; ?></td>
<td data-order="<?= $value['mode']; ?>"><?= $value['mode']; ?></td>
<td>
<a href="<?= "new_customer/" . $value['customer_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
<a href="<?= "delete_customer/" . $value['customer_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
@ -61,9 +61,10 @@
<!-- end row-->
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_customer').DataTable({
"order": [[0, "desc"]] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
"order": [[0, "desc"]],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -5,9 +5,10 @@
<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 href="#" class="dropdown-toggle arrow-none card-drop" data-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal"></i>
</a>
</a> -->
<div class="dropdown-menu dropdown-menu-right">
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Action</a>
@ -40,209 +41,90 @@
</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>-₹<?= $invoice['month']['total_amount']; ?></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>-₹<?= $invoice['year']['total_amount']; ?></span>
<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) && isset($active_schemes[0])) : ?>
<?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">
<?php $firstScheme = $active_schemes[0]; ?>
<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>
<!-- <a href="javascript:void(0);" class="dropdown-item">Action</a> -->
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Another action</a>
<!-- <a href="javascript:void(0);" class="dropdown-item">Another action</a> -->
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Something else</a>
<!-- <a href="javascript:void(0);" class="dropdown-item">Something else</a> -->
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item">Separated link</a>
<!-- <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"><?= $firstScheme['short_code']; ?></h4>
<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"><?= $firstScheme['activeoverall']; ?></span></h3> -->
<!-- <h3 class="my-2 py-1"><span data-plugin="counterup"><?= $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="media-body text-center align-self-center">
<h3 class="mt-0 mb-1"><?= $firstScheme['activeoverall']; ?></h3>
<p class="text-muted mb-0">Total Subscriber</p>
</div>
</div>
<br>
<div class="text-success">
<span class="float-left"> New : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Monthly Invoice Raised" data-plugin="counterup"><?= $firstScheme['nonrenewal']; ?></span><br></span>
<span class="float-right">Renewed: <span data-toggle="tooltip" data-placement="bottom" data-original-title="Yearly Invoice Raised" data-plugin="counterup"><?= $firstScheme['renewal']; ?></span><br></span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<?php endif; ?>
<?php if (!empty($active_schemes) && isset($active_schemes[1])) : ?>
<div class="col-xl-4 col-md-6">
<div class="card">
<div class="card-body">
<?php $firstScheme = $active_schemes[1]; ?>
<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>
</div>
</div>
<h4 class="header-title mt-0"><?= $firstScheme['short_code']; ?></h4>
<div class="mt-3">
<div class="media">
<div dir="ltr">
</div>
<div class="media-body text-center align-self-center">
<h3 class="mt-0 mb-1"><?= $firstScheme['activeoverall']; ?></h3>
<p class="text-muted mb-0">Total Subscriber</p>
</div>
</div>
<br>
<div class="text-success">
<span class="float-left"> New : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Monthly Invoice Raised" data-plugin="counterup"><?= $firstScheme['nonrenewal']; ?></span><br></span>
<span class="float-right">Renewed: <span data-toggle="tooltip" data-placement="bottom" data-original-title="Yearly Invoice Raised" data-plugin="counterup"><?= $firstScheme['renewal']; ?></span><br></span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<?php endif; ?>
<?php if (!empty($active_schemes) && isset($active_schemes[9])) : ?>
<div class="col-lg-4">
<div class="card">
<div class="card-body" style="width:119%;">
<div class="media">
<?php $firstScheme = $active_schemes[2]; ?>
<div class="avatar-md mr-3">
<!-- <div class="avatar-md mr-3">
<div>
<?php if (!empty($firstScheme['wp_img_url'])) { ?>
<img src="<?= $firstScheme['wp_img_url']; ?>" alt="table-user" class="mr-3 rounded avatar-md">
<?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">
<?= $firstScheme['first_letter']; ?>
<?= $a['first_letter']; ?>
</div>
<?php } ?>
</div>
</div>
<div class="media-body">
<h5 class="my-1"><a href="javascript:void(0);" class="text-dark"><?= $firstScheme['short_code']; ?></a></h5>
</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['activeoverall']; ?></h3>
<p class="text-muted mb-0">Total Subscriber</p>
</div>
</div>
<hr>
<div class="text-muted">
<div class="row">
<div class="col-sm-4 col-6">
<div>
<p class="mb-0">Total Subscribers</p>
<h5 class="mb-sm-0"><?= $firstScheme['activeoverall']; ?></h5>
</div>
</div>
<div class="col-sm-4 col-6">
<div>
<p class="mb-0">New Subscribers</p>
<h5 class="mb-sm-0"><?= $firstScheme['nonrenewal']; ?></h5>
</div>
</div>
<div class="col-sm-4 col-6">
<div class="mt-3 mt-sm-0">
<p class="mb-0">Renewed</p>
<h5 class="mb-0"><?= $firstScheme['renewal']; ?> </h5>
</div>
</div>
</div>
<br>
<div class="text-success">
<span class="float-left"> New : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Active New Subscriber" data-plugin="counterup"><?= $a['nonrenewal']; ?></span><br></span>
<span class="float-right"> Renewed: <span data-toggle="tooltip" data-placement="bottom" data-original-title="Active Re-Newed Subscriber" data-plugin="counterup"><?= $a['renewal']; ?></span><br></span>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php if (!empty($active_schemes) && isset($active_schemes[2])) : ?>
<div class="col-xl-4 col-md-6">
<div class="card">
<div class="card-body">
<?php $firstScheme = $active_schemes[2]; ?>
<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>
</div>
</div>
<h4 class="header-title mt-0"><?= $firstScheme['short_code']; ?></h4>
<div class="mt-3">
<div class="media">
<div dir="ltr">
<!-- <h3 class="my-2 py-1"><span data-plugin="counterup"><?= $firstScheme['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="media-body text-center align-self-center">
<h3 class="mt-0 mb-1"><?= $firstScheme['activeoverall']; ?></h3>
<p class="text-muted mb-0">Total Subscriber</p>
</div>
</div>
<br>
<div class="text-success">
<span class="float-left"> New : <span data-toggle="tooltip" data-placement="bottom" data-original-title="Monthly Invoice Raised" data-plugin="counterup"><?= $firstScheme['nonrenewal']; ?></span><br></span>
<span class="float-right">Renewed: <span data-toggle="tooltip" data-placement="bottom" data-original-title="Yearly Invoice Raised" data-plugin="counterup"><?= $firstScheme['renewal']; ?></span><br></span>
</div>
</div>
</div>
</div>
</div><!-- end col -->
<?php endif; ?>
</div><!-- end col -->
<?php
}
}
?>
</div>
<div class="row">
<div class="col-lg-12">
@ -264,11 +146,9 @@
</tr>
</thead>
<tbody>
<?php
// print "<pre>";
// print_r($expiring_membership);
// print "</pre>";
<?php print_r($expiring_membership);
$tempinx = 0;
if(!empty($expiring_membership)):
foreach ($expiring_membership as $e) :
$daysincount = (int)$e['countdays'];
$daysincountstring = ($daysincount == 0 ? 'Today' : ($daysincount == 1 ? 'Tomorrow' : $daysincount . ' days'));
@ -288,7 +168,11 @@
?>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; else : ?>
<tr>
<td colspan="7"><center>No data found</center></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div> <!-- end table-responsive-->

View File

@ -34,13 +34,13 @@
<tr>
<th hidden ></th>
<th>Event Name</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<?php foreach ($event as $value) :?>
<tr>
<td hidden><?= $value['event_id']; ?></td>
<td><?= $value['event_name']; ?></td>
<td data-order="<?= $value['event_name']; ?>"><?= $value['event_name']; ?></td>
<td>
<div class="custom-control custom-switch">
<input type="radio" class="custom-control-input" name="is_the_default" value="<?= $value['event_id'] ?>" id="<?= $value['event_id'] ?>" <?= $value['is_the_default'] ? "checked" : ""; ?> >
@ -59,8 +59,10 @@
</div><!-- end row-->
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
var table = $('#basic-datatable_new').DataTable({
"order": [[0, "dsc"]] // Sort by the first (index 0) column (id) in ascending order
"order": [[0, "dsc"]], // Sort by the first (index 0) column (id) in ascending order
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});

View File

@ -60,7 +60,7 @@
<th>Customer Name</th>
<th>Status</th>
<th>Total</th>
<th align="center">Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<tbody>
@ -167,11 +167,10 @@
</script>
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_wrapper').DataTable({
"order": [
[0, "desc"]
] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
"order": [ [0, "desc"] ], // 4 is the column index of "created_on" in your table
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -96,7 +96,7 @@
<th>Customer Name</th>
<th>Status</th>
<th>Total</th>
<th align="center">Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<tbody>
@ -187,10 +187,10 @@
</script>
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_wrapper').DataTable({
"order": [
[0, "desc"]
] // 4 is the column index of "created_on" in your table
"order": [ [0, "desc"] ],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
// Other DataTables configuration options
});
});

View File

@ -1,48 +1,45 @@
<!-- start page title -->
<div class="row">
<div class="col-md-4">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"><?= $page_name ?></h4>
<h4 class="page-title"><?= $page_name ?></h4>
</div>
</div>
<div class="offset-md-3 col-md-5">
<div class="offset-md-3 col-md-5">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group">
<div class="row">
<div class="col-md-7">
<input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php echo $selected_data; ?>"/>
</div>
<div class="col-md-5">
<button type="submit" class="btn btn-primary">Generate Report</button>
<div class="row">
<div class="col-md-7">
<input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php echo $selected_data; ?>" />
</div>
<div class="col-md-5">
<button type="submit" class="btn btn-primary">Generate Report</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="datatable-buttons" class="table table-striped nowrap w-100">
<thead>
<tr>
<th hidden>id</th>
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table id="datatable-buttons" class="table table-striped nowrap w-100">
<thead>
<tr>
<th hidden>id</th>
<th>Member Name</th>
<th>Mobile Number</th>
<th>Email</th>
<th>Scheme Code</th>
<th>From Subscription</th>
<th>To Subscription</th>
</tr>
</thead>
<tbody>
<?php foreach ($expired_customers as $row) { ?>
</tr>
</thead>
<tbody>
<?php foreach ($expired_customers as $row) { ?>
<tr>
<td hidden><?php echo $row["sub_id"]; ?></td>
<td><?= $row['first_name'] . ' ' . $row['last_name'] ?></td>
@ -51,133 +48,133 @@
<td><?= $row['short_code'] ?></td>
<td><?= $row['from_subscription'] ?></td>
<td><?= $row['to_subscription'] ?></td>
</tr>
<?php } ?>
</tbody>
</tbody>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->
<script>
$(document).ready(function() {
var table = $('#datatable-buttons').DataTable({
"order": [[0, 'desc']],
"dom": 'Bfrtip',
buttons: [
{
extend: 'print',
title: 'Expired Invoice Report',
text: 'Print',
customize: function(win) {
// Exclude the first and last columns
$(win.document.body).find('table').find('th:first-child, td:first-child').remove();
$(document).ready(function() {
var table = $('#datatable-buttons').DataTable({
"order": [
[0, 'desc']
],
"dom": 'Bfrtip',
buttons: [{
extend: 'print',
title: 'Expired Invoice Report',
text: 'Print',
customize: function(win) {
// Exclude the first and last columns
$(win.document.body).find('table').find('th:first-child, td:first-child').remove();
}
},
{
extend: 'csv',
text: 'CSV',
title: 'Membership Invoice Report',
exportOptions: {
columns: ':not(:first-child)'
}
}
},
{
extend: 'csv',
text: 'CSV',
title: 'Membership Invoice Report',
exportOptions: {
columns: ':not(:first-child)'
],
columnDefs: [{
type: 'date',
targets: [1, 2, 3, 4, 5, 6],
orderable: false
}
}
],
columnDefs: [
{ type: 'date', targets: [1,2,3,4,5,6], orderable: false }
// Specify the column index for date sorting and disable sorting
]
});
// Specify the column index for date sorting and disable sorting
]
});
// Add date range filter and dropdowns
$('#datatable-buttons thead tr').clone(true).appendTo('#datatable-buttons thead');
$('#datatable-buttons thead tr:eq(1) th').each(function (i) {
var title = $(this).text();
// For non-"Invoice Date" columns, add a dropdown
var uniqueValues = table.column(i).data().unique().sort();
var select = $('<select class="form-control form-control-sm"><option value="">Search ' + title + '</option></select>')
.appendTo($(this).empty())
.on('change', function () {
var val = $.fn.dataTable.util.escapeRegex($(this).val());
table.column(i)
.search(val ? '^' + val + '$' : '', true, false)
.draw();
// Add date range filter and dropdowns
$('#datatable-buttons thead tr').clone(true).appendTo('#datatable-buttons thead');
$('#datatable-buttons thead tr:eq(1) th').each(function(i) {
var title = $(this).text();
// For non-"Invoice Date" columns, add a dropdown
var uniqueValues = table.column(i).data().unique().sort();
var select = $('<select class="form-control form-control-sm"><option value="">Search ' + title + '</option></select>')
.appendTo($(this).empty())
.on('change', function() {
var val = $.fn.dataTable.util.escapeRegex($(this).val());
table.column(i)
.search(val ? '^' + val + '$' : '', true, false)
.draw();
});
uniqueValues.each(function(d, j) {
select.append('<option value="' + d + '">' + d + '</option>');
});
uniqueValues.each(function (d, j) {
select.append('<option value="' + d + '">' + d + '</option>');
$('input', this).on('keyup change', function() {
if (table.column(i).search() !== this.value) {
table
.column(i)
.search(this.value)
.draw();
}
});
});
$('input', this).on('keyup change', function () {
if (table.column(i).search() !== this.value) {
table
.column(i)
.search(this.value)
.draw();
}
});
});
// Add date range filter for "Invoice Date" column
moment.updateLocale('en', {
longDateFormat: {
L: 'DD/MM/YYYY',
// LTS: 'h:mm:ss A',
// LTS: 'h:mm A',
}
});
$(document).ready(function () {
var $select_data = '<?php echo $selected_data; ?>';
var dateRangeFilter = $('input.input-daterange-datepicker')
.daterangepicker({
locale: {
format: 'DD/MM/YYYY',
cancelLabel: 'Clear'
},
startDate: $select_data ? moment($select_data.split(' - ')[0], 'DD/MM/YYYY') : moment(),
endDate: $select_data ? moment($select_data.split(' - ')[1], 'DD/MM/YYYY') : moment(),
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'This Month': [moment().startOf('month'), moment().endOf('month')]
// Add date range filter for "Invoice Date" column
moment.updateLocale('en', {
longDateFormat: {
L: 'DD/MM/YYYY',
// LTS: 'h:mm:ss A',
// LTS: 'h:mm A',
}
})
.on('apply.daterangepicker', function (ev, picker) {
var formattedStartDate = picker.startDate.format('DD/MM/YYYY');
var formattedEndDate = picker.endDate.format('DD/MM/YYYY');
var selectedDateRange = formattedStartDate + ' - ' + formattedEndDate;
$(this).val(selectedDateRange);
})
.on('cancel.daterangepicker', function () {
$(this).val('');
});
$('.today-btn').on('click', function () {
var today = moment();
dateRangeFilter.data('daterangepicker').setStartDate(today);
dateRangeFilter.data('daterangepicker').setEndDate(today);
dateRangeFilter.val(today.format('DD/MM/YYYY') + ' - ' + today.format('DD/MM/YYYY'));
dateRangeFilter.trigger('apply.daterangepicker');
$(document).ready(function() {
var $select_data = '<?php echo $selected_data; ?>';
var dateRangeFilter = $('input.input-daterange-datepicker')
.daterangepicker({
locale: {
format: 'DD/MM/YYYY',
cancelLabel: 'Clear'
},
startDate: $select_data ? moment($select_data.split(' - ')[0], 'DD/MM/YYYY') : moment(),
endDate: $select_data ? moment($select_data.split(' - ')[1], 'DD/MM/YYYY') : moment(),
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'This Month': [moment().startOf('month'), moment().endOf('month')]
}
})
.on('apply.daterangepicker', function(ev, picker) {
var formattedStartDate = picker.startDate.format('DD/MM/YYYY');
var formattedEndDate = picker.endDate.format('DD/MM/YYYY');
var selectedDateRange = formattedStartDate + ' - ' + formattedEndDate;
$(this).val(selectedDateRange);
})
.on('cancel.daterangepicker', function() {
$(this).val('');
});
$('.today-btn').on('click', function() {
var today = moment();
dateRangeFilter.data('daterangepicker').setStartDate(today);
dateRangeFilter.data('daterangepicker').setEndDate(today);
dateRangeFilter.val(today.format('DD/MM/YYYY') + ' - ' + today.format('DD/MM/YYYY'));
dateRangeFilter.trigger('apply.daterangepicker');
});
// Trigger "Today" button click to set it as default if $select_data is empty
if ($select_data === '') {
$('.today-btn').trigger('click');
}
});
});
// Trigger "Today" button click to set it as default if $select_data is empty
if ($select_data === '') {
$('.today-btn').trigger('click');
}
});
});
</script>
</script>

View File

@ -65,7 +65,7 @@
<td><?php echo $row->invoice_number; ?></td>
<td><?php echo $row->formatted_invoice_date; ?></td>
<td><?php echo $row->first_name . " " . $row->last_name; ?></td>
<td><?php echo $row->tax . '%'; ?></td>
<td><?php echo $row->tax ? $row->tax . '%' : '0%'; ?></td>
<td><?php echo '₹' . number_format($row->discount, 2, '.', ','); ?></td>
<td><?php echo $row->item_count; ?></td>
<td><?php echo '₹' . number_format($row->shipping_charge, 2, '.', ','); ?></td>

View File

@ -35,7 +35,7 @@
<th>Price</th>
<th>Duration</th>
<th hidden>Category</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<?php foreach ($scheme as $row) : ?>
@ -61,11 +61,10 @@
</div><!-- end row-->
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_scheme').DataTable({
"order": [
[0, "desc"]
] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
"order": [ [0, "desc"] ],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -10,22 +10,22 @@
<br>
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
<?php if (session()->getFlashdata('success') || session()->getFlashdata('error')) : ?>
<?php if (session()->getFlashdata('success')) : ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<?= session('success') ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php endif; ?>
<?php if (session()->getFlashdata('error')) : ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<?= session('error') ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php endif; ?>
<?php if (session()->getFlashdata('success')) : ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<?= session('success') ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php endif; ?>
<?php if (session()->getFlashdata('error')) : ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<?= session('error') ?>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="table-responsive">
<table id="scroll-horizontal-datatable_subcription" class="table w-100 nowrap">
@ -41,15 +41,12 @@
<th>Invoice Date</th>
<th>Total</th>
<th>Status</th>
<th align="center">Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<tbody>
<?php
<?php
// print_r($invoice);
foreach ($invoice as $row) :
$invoice_date = date('d/m/Y', strtotime($row['invoice_date']));
$from_date = date('d/m/Y', strtotime($row['from_subscription']));
@ -77,31 +74,27 @@
}
}
?>
<tr>
<td hidden><?= $row['invoice_id'] ?></td>
<td><?= $row['customer_name']; ?></td>
<td><?= $from_date; ?></td>
<td><?= $to_date; ?></td>
<td><?= $row['scheme_code']; ?></td>
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td><?= $row['invoice_number']; ?></td>
<td><?= $invoice_date; ?></td>
<td><?= "" . $row['total_amount']; ?></td>
<td><?= $row['status']; ?></td>
<td>
<a href="<?= base_url() . "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>&nbsp;
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>&nbsp;
<a href="<?= base_url("print_address/{$row['invoice_id']}") ?>" class="print-address-button" title="Print Address"><i class="ri-printer-line"></i></a>
</td>
</tr>
<tr>
<td hidden><?= $row['invoice_date'] ?></td>
<td data-order="<?= $row['customer_name']; ?>"><?= $row['customer_name']; ?></td>
<td data-order="<?= strtotime($row['from_subscription']); ?>"><?= $from_date; ?></td>
<td data-order="<?= strtotime($row['to_subscription']); ?>"><?= $to_date; ?></td>
<td data-order="<?= $row['scheme_code']; ?>"><?= $row['scheme_code']; ?></td>
<td data-order="<?= $message; ?>"><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td data-order="<?= $row['invoice_number']; ?>"><?= $row['invoice_number']; ?></td>
<td data-order="<?= strtotime($row['invoice_date']); ?>"><?= $invoice_date; ?></td>
<td data-order="<?= $row['total_amount']; ?>"><?= "" . $row['total_amount']; ?></td>
<td data-order="<?= $row['status']; ?>"><?= $row['status']; ?></td>
<td>
<a href="<?= base_url() . "new_subscription_invoice/" . $row['invoice_id']; ?>" class="edit-button" title="Edit the Invoice"><i class="ri-pencil-line" title="Edit the Invoice"></i></a>&nbsp;
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>&nbsp;
<a href="<?= base_url("print_address/{$row['invoice_id']}") ?>" class="print-address-button" title="Print Address"><i class="ri-printer-line"></i></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- Scheme List Modal -->
<!-- Create a modal for scheme selection -->
<div class="modal fade" id="printAddressesModal" tabindex="-1" role="dialog" aria-labelledby="printAddressesModalLabel" aria-hidden="true">
@ -132,45 +125,45 @@
}
endforeach;
?>
<div class="form-group">
<label>Select Subscription Type:</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="download_type" id="activeOption" value="active">
<label class="form-check-label" for="activeOption">Active Customers</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="download_type" id="expiredOption" value="expired">
<label class="form-check-label" for="expiredOption">Expired Customers</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="download_type" id="bothOption" value="both" checked>
<label class="form-check-label" for="bothOption">Both</label>
</div>
<div class="form-group">
<label>Select Subscription Type:</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="download_type" id="activeOption" value="active">
<label class="form-check-label" for="activeOption">Active Customers</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="download_type" id="expiredOption" value="expired">
<label class="form-check-label" for="expiredOption">Expired Customers</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="download_type" id="bothOption" value="both" checked>
<label class="form-check-label" for="bothOption">Both</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-check-label">Select Action:</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="action" value="1" checked>
<label class="form-check-label">1</label>
<div class="col-md-6">
<div class="form-group">
<label class="form-check-label">Select Action:</label>
<div class="form-check">
<input class="form-check-input" type="radio" name="action" value="1" checked>
<label class="form-check-label">1</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="action" value="2">
<label class="form-check-label">2 x 4(A4)</label>
</div>
</div>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="action" value="2">
<label class="form-check-label">2 x 4(A4)</label>
<div class="col-md-6">
<div style="text-align: end;margin-top: 2rem;"> <!-- Adjust the margin as needed -->
<button type="submit" class="btn btn-primary">Download Details</button>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div style="text-align: end;margin-top: 2rem;"> <!-- Adjust the margin as needed -->
<button type="submit" class="btn btn-primary">Download Details</button>
</div>
</div>
</div>
</form>
</div>
</div> <!-- end card body-->
@ -178,18 +171,17 @@
</div><!-- end col-->
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_subcription').DataTable({
"order": [
[0, "desc"]
] // 0 is the column index
"order": [ [0, "desc"] ],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -310,10 +310,7 @@
<div class="row">
<div class="col-md-5">
<img src="<?= $favicon; ?>" alt="company fav icon for footer" width="25" height="25">
<!-- <script>document.write(new Date().getFullYear())</script> &copy; <?= $company_name; ?> -->
<script>
document.write(new Date().getFullYear())
</script> &copy; <?= "<a href=".$footer_about." target='_blank' >".$company_name."</a>"; ?>
2023 - <script> document.write(new Date().getFullYear()) </script> &copy; <?= "<a href=".$footer_about." target='_blank' >".$company_name."</a>"; ?>
<!-- <p> <?= date('Y') ?> &copy; <?= $company_name; ?>.</p>
<p> <?= date('Y') ?> &copy; <?= $company_name; ?>. Page rendered in {elapsed_time} seconds</p> -->

View File

@ -133,20 +133,13 @@
</li>
<?php endif; ?>
<?php if ($loggedin_person_role !== 'sadmin') : ?>
<!-- <li>
<a href="<?= base_url()."invoice_list"; ?>">
<i class="fe-file-text"></i>
<span> Sales </span>
</a>
</li> -->
<li>
<a href="#reportLayouts" data-toggle="collapse">
<a href="#salesLayouts" data-toggle="collapse">
<i class="ri-file-chart-fill"></i>
<span> Sales </span>
<span class="menu-arrow"></span>
</a>
<div class="collapse" id="reportLayouts">
<div class="collapse" id="salesLayouts">
<ul class="nav-second-level">
<li>
<a href="<?= base_url()."invoice_list"; ?>">Online Sales</a>

View File

@ -35,7 +35,7 @@
<th>Created at</th>
<th>Created by</th>
<th>Status</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
<?php foreach ($template as $temp) :
@ -48,11 +48,11 @@
} ?>
<tr>
<td hidden><?= $temp['template_id']; ?></td>
<td><?= $temp['template_name']; ?></td>
<td><?= $temp['mode']; ?></td>
<td><?= $temp['formatted_created_on']; ?></td>
<td><?= $temp['created_by_name']; ?></td>
<td><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td data-order="<?= $temp['template_name']; ?>"><?= $temp['template_name']; ?></td>
<td data-order="<?= $temp['mode']; ?>"><?= $temp['mode']; ?></td>
<td data-order="<?= $temp['formatted_created_on']; ?>"><?= $temp['formatted_created_on']; ?></td>
<td data-order="<?= $temp['created_by_name']; ?>"><?= $temp['created_by_name']; ?></td>
<td data-order="<?= $message; ?>"><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td>
<a href="<?= base_url()."template_creation_form/".$temp['template_id']; ?>" class="edit-button" title="Click to Edit Template" ><i class="ri-pencil-line"></i></a>
<?php if ($temp['isactive']) { ?> <a href="<?php echo "template_creation_delete/".$temp['template_id']; ?>" class="delete-button" title="Click to Delete Template" ><i class="ri-delete-bin-line"></i></a> <?php } ?>
@ -69,11 +69,10 @@
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_customer').DataTable({
"order": [
[0, "desc"]
] // 4 is the column index of "created_on" in your table
// Other DataTables configuration options
"order": [ [0, "desc"] ],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
});
});
</script>

View File

@ -31,14 +31,14 @@
<table id="scroll-horizontal-datatable_user" class="table w-100 nowrap">
<thead class="thead-light">
<tr>
<th hidden ></th>
<th hidden ></th>
<th>Name</th>
<th>Email</th>
<th>Mobile Number</th>
<th>Role</th>
<?php if($session_role === 'sadmin'){ ?> <th>Company</th> <?php } ?>
<th>Status</th>
<th>Action</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
@ -63,11 +63,11 @@
?>
<tr>
<td hidden><?= $row['user_id'] ?></td>
<td><?php echo $row['first_name'].' '.$row['last_name'] ; ?></td>
<td><?php echo $row['email'] ; ?></td>
<td><?php echo $row['mobile_no'] ; ?></td>
<td><?php echo $row['role'] ; ?></td>
<?php if($session_role === 'sadmin'){ ?> <td><?php echo $row['company_name'] ; ?></td> <?php } ?>
<td data-order="<?= $row['first_name']; ?>" ><?php echo $row['first_name'].' '.$row['last_name'] ; ?></td>
<td data-order="<?= $row['email'] ; ?>"><?php echo $row['email'] ; ?></td>
<td data-order="<?= $row['mobile_no']; ?>"><?php echo $row['mobile_no'] ; ?></td>
<td data-order="<?= $row['role']; ?>"><?php echo $row['role'] ; ?></td>
<?php if($session_role === 'sadmin'){ ?> <td data-order="<?= $row['company_name']; ?>"><?php echo $row['company_name'] ; ?></td> <?php } ?>
<td>
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
</td>
@ -89,8 +89,10 @@
<!-- end row-->
<script>
$(document).ready(function() {
var actionColumnIndex = $('#action-column').index();
$('#scroll-horizontal-datatable_user').DataTable({
"order": [[0, "desc"]] // 4 is the column index of "created_on" in your table
"order": [[0, "desc"]],
"columnDefs": [{ "targets": [actionColumnIndex], "orderable": false }]
// Other DataTables configuration options
});
});