Minor Fixes : ps
This commit is contained in:
parent
43d27d1654
commit
d52795eb11
@ -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,6 +797,28 @@ 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;
|
||||
@ -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");
|
||||
|
||||
@ -65,13 +65,7 @@ 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)) {
|
||||
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'];
|
||||
|
||||
@ -924,33 +924,29 @@ $encodedUrl = urlencode($url);
|
||||
}
|
||||
public function expired_customer_report()
|
||||
{
|
||||
|
||||
$model = new InvoiceModel();
|
||||
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 ");
|
||||
}
|
||||
$this->logger->info("'Membership Renewals Report'");
|
||||
$data['page_name'] = 'Membership Renewals Report';
|
||||
$this->render_page('report_expired_customers', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function itemwise_report()
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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']);
|
||||
|
||||
|
||||
@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -503,14 +503,16 @@ public function getExpiredCustomers($f_date = null, $t_date = null)
|
||||
}
|
||||
|
||||
$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;
|
||||
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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,9 +99,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>
|
||||
|
||||
@ -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>
|
||||
@ -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>
|
||||
<!-- <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>
|
||||
@ -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>
|
||||
<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>
|
||||
</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> -->
|
||||
<div class="media-body text-center align-self-center">
|
||||
<h3 class="mt-0 mb-1"><?= $firstScheme['activeoverall']; ?></h3>
|
||||
<h3 class="mt-0 mb-1"><?= $a['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>
|
||||
<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>
|
||||
</div><!-- end col -->
|
||||
<?php endif; ?>
|
||||
<?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-->
|
||||
|
||||
@ -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 }]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@ -39,8 +38,6 @@
|
||||
<th>To Subscription</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($expired_customers as $row) { ?>
|
||||
<tr>
|
||||
@ -68,10 +65,11 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var table = $('#datatable-buttons').DataTable({
|
||||
"order": [[0, 'desc']],
|
||||
"order": [
|
||||
[0, 'desc']
|
||||
],
|
||||
"dom": 'Bfrtip',
|
||||
buttons: [
|
||||
{
|
||||
buttons: [{
|
||||
extend: 'print',
|
||||
title: 'Expired Invoice Report',
|
||||
text: 'Print',
|
||||
@ -89,8 +87,11 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
],
|
||||
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
|
||||
]
|
||||
});
|
||||
@ -176,8 +177,4 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
@ -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
|
||||
// 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']));
|
||||
@ -78,20 +75,16 @@
|
||||
}
|
||||
?>
|
||||
<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 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>
|
||||
<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>
|
||||
@ -101,7 +94,7 @@
|
||||
<?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">
|
||||
@ -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>
|
||||
@ -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> © <?= $company_name; ?> -->
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © <?= "<a href=".$footer_about." target='_blank' >".$company_name."</a>"; ?>
|
||||
2023 - <script> document.write(new Date().getFullYear()) </script> © <?= "<a href=".$footer_about." target='_blank' >".$company_name."</a>"; ?>
|
||||
<!-- <p> <?= date('Y') ?> © <?= $company_name; ?>.</p>
|
||||
<p> <?= date('Y') ?> © <?= $company_name; ?>. Page rendered in {elapsed_time} seconds</p> -->
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<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
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user