Merge Confits

This commit is contained in:
VE10-Sanjeev 2024-11-27 05:53:07 +00:00
commit f0415c7359
14 changed files with 241 additions and 197 deletions

View File

@ -497,7 +497,7 @@ public function prepare_invoice_data($invoice_id, $msg_flag_name)
'shipping_label' => ((int)$invoiceType === 1) ? $this->request->getPost('shippingChargesLabel') : NULL, 'shipping_label' => ((int)$invoiceType === 1) ? $this->request->getPost('shippingChargesLabel') : NULL,
'order_number' => $this->request->getPost('order_number'), 'order_number' => $this->request->getPost('order_number'),
'payment_method' => $invoice_status !== 'Draft' ? $this->request->getPost('payment_method') : NULL, 'payment_method' => $invoice_status !== 'Draft' ? $this->request->getPost('payment_method') : NULL,
'payment_status' => 'Pending', 'payment_status' => $invoice_status !== 'Draft'?'Paid':'Pending',
'payment_note' => $this->request->getPost('payment_note'), 'payment_note' => $this->request->getPost('payment_note'),
'event_id' => (int)$this->request->getPost('event_id'), 'event_id' => (int)$this->request->getPost('event_id'),
'business_id' => (int)get_business_id(), 'business_id' => (int)get_business_id(),
@ -1195,7 +1195,7 @@ public function create_or_update_subscription($invoice_id,$invoice_status, $msg_
$data['selected_data'] = $this->request->getVar('date'); $data['selected_data'] = $this->request->getVar('date');
$this->logger->info("Itemwise Report "); $this->logger->info("Itemwise Report ");
} }
$this->logger->info("'Membership Renewals Report'");
if (empty($data['selected_data'])){ if (empty($data['selected_data'])){
//dd($data['selected_data']); //dd($data['selected_data']);
$data['page_name'] = 'Membership Renewals Report (30 days)'; $data['page_name'] = 'Membership Renewals Report (30 days)';
@ -1287,7 +1287,7 @@ public function create_or_update_subscription($invoice_id,$invoice_status, $msg_
$data['selected_data'] = $this->request->getVar('date'); $data['selected_data'] = $this->request->getVar('date');
} }
$data['page_name'] = 'Received Payments Report'; $data['page_name'] = 'Received Payments Report';
log_message('info',json_encode($data)); // log_message('info',json_encode($data));
$this->render_page('received_payments_report',$data); $this->render_page('received_payments_report',$data);
} }
public function itemwise_report_with_payment_method(){ public function itemwise_report_with_payment_method(){

View File

@ -75,9 +75,10 @@ class Payment extends BaseController
$userAgent = $_SERVER['HTTP_USER_AGENT']; $userAgent = $_SERVER['HTTP_USER_AGENT'];
$payment_method = preg_match('/mobile/i', $userAgent) ? "mobile" : 'website'; $payment_method = preg_match('/mobile/i', $userAgent) ? "mobile" : 'website';
$data = $_POST; $data = $_POST;
$membership_id = $this->request->getPost('membership_id');
$paramList = array(); $paramList = array();
$CUST_ID = (string) $this->request->getPost("CustomerID"); $CUST_ID = (string) $this->request->getPost("CustomerID");
$ORDER_ID = (string) $this->request->getPost("membership_id"); $ORDER_ID = (string) uniqid($CUST_ID . "_".$membership_id."_");
$CHANNEL_ID = ($payment_method == "mobile") ? (string) env('Channel_ID_Mobile') : (string) env('Channel_ID_WEB'); $CHANNEL_ID = ($payment_method == "mobile") ? (string) env('Channel_ID_Mobile') : (string) env('Channel_ID_WEB');
$TXN_AMOUNT = (string) $this->request->getPost("amount"); $TXN_AMOUNT = (string) $this->request->getPost("amount");
@ -160,12 +161,12 @@ public function payment_failure(){
public function payment_success() { public function payment_success() {
helper('session'); helper('session');
helper('financial_year_helper'); helper('financial_year_helper');
$past_membership_id = $this->request->getVar('ORDERID');
$payment_method = $this->request->getVar('PAYMENTMODE');
$subModel = new SubscriptionModel(); $subModel = new SubscriptionModel();
$customer = $subModel->select('customer_id')->where('membership_id',$past_membership_id)->first(); $ORDER_ID = $this->request->getVar('ORDERID');
$customer_id = $customer['customer_id']; $parts = explode('_', $ORDER_ID);
$customer_id = (int)$parts[0];
$past_membership_id = (int)$parts[1];
$payment_method = $this->request->getVar('PAYMENTMODE');
//dd($past_membership_id); //dd($past_membership_id);
// $parts = explode('_', $ORDER_ID); // $parts = explode('_', $ORDER_ID);
// $customer_id = (int)$parts[0]; // $customer_id = (int)$parts[0];
@ -204,6 +205,7 @@ public function payment_success() {
'billing_address'=> $address['address_1'], 'billing_address'=> $address['address_1'],
'billing_address_id' => isset($address['customer_address_id']) ? $address['customer_address_id'] : '', 'billing_address_id' => isset($address['customer_address_id']) ? $address['customer_address_id'] : '',
'payment_method' => $payment_method, 'payment_method' => $payment_method,
'business_id' =>2
]; ];
$model->save($data); $model->save($data);
$update_invoice_numbering = [ $update_invoice_numbering = [
@ -242,7 +244,6 @@ public function payment_success() {
'to_subscription' =>$tsubscription, 'to_subscription' =>$tsubscription,
]; ];
$invoice = new Invoice();
$db->table('invoiceitems')->insert($requestData); $db->table('invoiceitems')->insert($requestData);
$model3 = new SubscriptionModel(); $model3 = new SubscriptionModel();
$invoiceController = new Invoice(); $invoiceController = new Invoice();
@ -251,16 +252,21 @@ public function payment_success() {
// if ($membership_id<=0){ // if ($membership_id<=0){
// $membership_id = $invoice->generate_membership_id(6); // $membership_id = $invoice->generate_membership_id(6);
// } // }
$subscription = $subModel->select('sub_id')->where('membersip_id',$past_membership_id)->first();
$subscriptionData = [ $subscriptionData = [
'scheme_id' =>3, 'scheme_id' =>3,
'customer_id' => $customer_id, 'customer_id' => $customer_id,
'invoice_id' => $invoice_id, 'invoice_id' => $invoice_id,
'from_subscription'=>$fsubscription, 'from_subscription'=>$fsubscription,
'to_subscription'=>$tsubscription, 'to_subscription'=>$tsubscription,
'is_renew' => 1, 'is_renew' => $subscription['sub_id'],
'business_id'=>2, 'business_id'=>2,
'status' =>1, 'status' =>1,
'membership_id' =>$membership_id 'membership_id' =>$membership_id,
'isactive' =>1,
'business_id' =>2
]; ];
$db->table('subscription')->insert($subscriptionData); $db->table('subscription')->insert($subscriptionData);

View File

@ -147,7 +147,7 @@ public function getJoinedData($where, $orderby = [])
// Print the last executed query // Print the last executed query
// echo $this->db->getLastQuery();die; //echo $this->db->getLastQuery();die;
return $resultArray; return $resultArray;
} }
@ -561,28 +561,32 @@ public function getExpiredCustomers($f_date = null, $t_date = null)
// Calculate the date 30 days from now // Calculate the date 30 days from now
$futureDate = date('Y-m-d', strtotime('+30 days')); $futureDate = date('Y-m-d', strtotime('+30 days'));
// Initialize query builder $query = $this->db->table('subscription as S');
$query = $this->db->table('subscription as S');
// Apply custom date range filter if both $f_date and $t_date are provided if (!empty($f_date) && !empty($t_date)) {
if (!empty($f_date) && !empty($t_date)) { $query->where('S.to_subscription >=', $f_date)
$query->where('S.to_subscription >=', $f_date) ->where('S.to_subscription <=', $t_date);
->where('S.to_subscription <=', $t_date); } else {
$query->where('S.to_subscription >=', date('Y-m-d'))
->where('S.to_subscription <=', $futureDate);
}
} else { $subquery = $this->db->table('subscription as S2')
$query->where('S.to_subscription >=', date('Y-m-d')) ->select('S.sub_id')
->where('S.to_subscription <=', $futureDate); ->where('S2.customer_id = S.customer_id')
} ->where('S.sub_id = S2.is_renew');
$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, B.short_code, S.membership_id')
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
->join('books as B', 'B.book_id = S.scheme_id', 'left')
->where('S.isactive', 1)
->whereNotIn('S.sub_id', $subquery)
->orderBy('S.to_subscription', 'ASC')
->get();
// Build the query
$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, B.short_code')
->join('customers as C', 'C.customer_id = S.customer_id', 'left')
->join('books as B', 'B.book_id = S.scheme_id', 'left')
->where('S.isactive', 1) // Only active subscriptions
->get();
// Debugging: output the generated SQL query // Debugging: output the generated SQL query
// echo $this->db->getLastQuery(); // echo $this->db->getLastQuery();

View File

@ -35,13 +35,13 @@
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="csname" class="col-form-label">Last Name<span class="text-danger"> *</span></label> <label for="csname" class="col-form-label">Last Name<span class="text-danger"> </span></label>
<input type="text" class="form-control" name="csname" value="<?= isset($customer['last_name']) ? $customer['last_name'] : '' ?>" placeholder="Last Name" required /> <input type="text" class="form-control" name="csname" value="<?= isset($customer['last_name']) ? $customer['last_name'] : '' ?>" placeholder="Last Name" />
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="cmail" class="col-form-label">Email<span class="text-danger"> *</span></label> <label for="cmail" class="col-form-label">Email<span class="text-danger"> </span></label>
<input type="text" class="form-control" id="cmail" name="cmail" value="<?= isset($customer['email']) ? $customer['email'] : '' ?>" placeholder="Email" onkeyup="validateEmail(this.value)" onchange="checkExisting(this.value,'email','cmail')" required /> <input type="text" class="form-control" id="cmail" name="cmail" value="<?= isset($customer['email']) ? $customer['email'] : '' ?>" placeholder="Email" onkeyup="validateEmail(this.value)" onchange="checkExisting(this.value,'email','cmail')" />
<span id="emailValidationMessage"></span> <span id="emailValidationMessage"></span>
</div> </div>
</div> </div>
@ -110,8 +110,8 @@
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="baddress2" class="col-form-label">Address 2<span class="text-danger"> *</span></label> <label for="baddress2" class="col-form-label">Address 2<span class="text-danger"> </span></label>
<input type="text" class="form-control" id="baddress2" name="baddress2[]" placeholder="Address (eg : 1234 Main St)" required /> <input type="text" class="form-control" id="baddress2" name="baddress2[]" placeholder="Address (eg : 1234 Main St)" />
</div> </div>
</div> </div>
@ -182,8 +182,8 @@
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="saddress2" class="col-form-label">Address 2<span class="text-danger"> *</span></label> <label for="saddress2" class="col-form-label">Address 2<span class="text-danger"> </span></label>
<input type="text" class="form-control" id="saddress2" name="saddress2[]" placeholder="Address (eg : 1234 Main St)" required /> <input type="text" class="form-control" id="saddress2" name="saddress2[]" placeholder="Address (eg : 1234 Main St)" />
</div> </div>
</div> </div>

View File

@ -1557,7 +1557,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
cm = response['data']['customer_membership']; cm = response['data']['customer_membership'];
console.log(cm); console.log(cm);
cm.sort(function(a, b) { cm.sort(function(a, b) {
return b.is_renew - a.is_renew; return b.is_renew - a.is_renew;n
}); });
if (cm.length > 0) { if (cm.length > 0) {
$(".subscribedetails").show(); $(".subscribedetails").show();

View File

@ -1,12 +1,15 @@
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<!-- Title Section -->
<div class="col-md-4"> <div class="col-md-4">
<div class="page-title-box page-title-box-alt"> <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> </div>
<div class="offset-md-3 col-md-5">
<form action="<?php echo base_url('itemwise_report_with_payment_method'); ?>" method="post"> <!-- Form Section -->
<div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
@ -21,6 +24,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">

View File

@ -1,49 +1,55 @@
<style> <style>
/* Styling for the card layout */
/* Styling for the card layout */ .payment-button {
.nav { background-color: #f9f9f9; /* Light background color matching the card */
display: flex; /* Flex layout for horizontal alignment */ color: #333; /* Dark text for readability */
flex-wrap: wrap; /* Allow cards to wrap if needed */ border: 1px solid #ddd; /* Subtle border for the button */
gap: 10px; /* Adds spacing between cards */ border-radius: 5px; /* Rounded corners */
justify-content: flex-start; /* Align cards to the left */ padding: 8px; /* Inner padding for compactness */
padding: 5px; /* Add padding around the card section */ font-size: 0.9rem; /* Font size for button text */
margin-bottom: 10px; /* Space below the cards */ cursor: pointer; /* Pointer cursor on hover */
list-style: none; /* Remove bullet points from the list */ text-align: center; /* Center-align text */
line-height: 1.3; /* Adjust line height for multiline text */
width: 100%; /* Button fills card width */
height: 100%; /* Button fills card height */
box-shadow: none; /* Remove extra shadow for a flat look */
}
.payment-button:hover {
background-color: #f0f0f0; /* Slightly darker background on hover */
box-shadow: none; /* Keep flat design on hover */
} }
.card-summary { .card-summary {
flex: 0 1 auto; /* Prevents cards from shrinking or growing too much */ flex: 0 1 auto; /* Prevent layout disruptions */
padding: 8px; /* Reduced inner padding for compact size */ text-align: center; /* Center-align content */
text-align: center; /* Center-align card content */ border: none; /* No border for container */
border: 1px solid #ddd; /* Border for the card */ background-color: transparent; /* Transparent container */
border-radius: 5px; /* Slightly rounded corners */ width: 190px; /* Card width */
background-color: #f9f9f9; /* Light background color */ height: 50px; /* Card height */
width: 190px; /* Compact card width */
height: 50px; /* Adjusted height for compactness */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
font-size: 0.85rem; /* Slightly smaller font size for compactness */
display: flex; /* Flex layout for alignment */
align-items: center; /* Vertically center content */
justify-content: center; /* Horizontally center content */
} }
.card-summary span { .nav {
font-size: 0.9rem; /* Adjusted font size */ display: flex; /* Keep existing layout */
font-weight: 500; /* Medium font weight */ flex-wrap: wrap; /* Allow wrapping */
color: #333; /* Darker color for better readability */ gap: 10px; /* Spacing between cards */
list-style: none; /* Remove list style */
padding: 5px; /* Padding for layout */
margin-bottom: 10px; /* Margin below */
} }
</style> </style>
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<div class="col-md-4"> <!-- Title Section -->
<div class="page-title-box page-title-box-alt"> <div class="col-md-4">
<h4 class="page-title"><?= $page_name ?></h4> <div class="page-title-box page-title-box-alt">
</div> <h4 class="page-title"><?= $page_name ?></h4>
</div> </div>
</div>
<div class="offset-md-3 col-md-5"> <!-- Form Section -->
<form action="<?php echo base_url('received_payments_report'); ?>" method="post"> <div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
@ -55,47 +61,26 @@
</div> </div>
</div> </div>
</form> </form>
</div>
</div>
<div class="row">
<div>
<ul class="nav">
<!-- Card 1 -->
<li>
<div class="card-summary"<?= isset($payment_data['result2']['UPI'])?'':'hidden'?>>
<span>UPI - <?= isset($payment_data['result2']['UPI'])?$payment_data['result2']['UPI']:''?></span>
</div>
</li>
<!-- Card 2 -->
<li>
<div class="card-summary" <?= isset($payment_data['result2']['cash'])?'':'hidden'?>>
<span>CASH - <?= isset($payment_data['result2']['cash'])?$payment_data['result2']['cash']:''?></span>
</div>
</li>
<!-- Card 3 -->
<li>
<div class="card-summary" <?= isset($payment_data['result2']['debit'])?'':'hidden'?>>
<span>DEBIT CARD - <?= isset($payment_data['result2']['debit'])?$payment_data['result2']['debit']:''?></span>
</div>
</li>
<!-- Card 4 -->
<li>
<div class="card-summary" <?= isset($payment_data['result2']['credit'])?'':'hidden'?>>
<span>CREDIT CARD - <?= isset($payment_data['result2']['credit'])?$payment_data['result2']['credit']:''?></span>
</div>
</li>
<!-- Card 5 -->
<li>
<div class="card-summary" <?= isset($payment_data['result2']['banktransfer'])?'':'hidden'?>>
<span>BANK TRANSFER - <?= isset($payment_data['result2']['banktransfer'])?$payment_data['result2']['banktransfer']:''?></span>
</div>
</li>
</ul>
</div> </div>
</div> </div>
<div class="row">
<div>
<ul class="nav">
<?php foreach ($payment_data['result2'] as $key => $amount) {
if ($key != '' && $key != null) { ?>
<li>
<div class="card-summary">
<button id = 'payment_method_button' class="payment-button">
<?= strtoupper($key) ?> <br> ₹<?= $amount ?>
</button>
</div>
</li>
<?php } } ?>
</ul>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@ -133,10 +118,17 @@
<!-- Total row --> <!-- Total row -->
</tbody> </tbody>
<tr> <!-- <tr>
<td colspan="5" style="text-align: right; font-weight: bold;">Total Amount</td> <td colspan="5" style="text-align: right; font-weight: bold;">Total Amount</td>
<td style="text-align: right;"><?= isset($total) ? $total : "" ?></td> <td class="total-row" style="text-align: right;"></td>
</tr> </tr> -->
<?php //<?= isset($total) ? $total : "" ?>
<tfoot>
<tr>
<td colspan="5" style="text-align: right; font-weight: bold;">Total Amount</td>
<td class="total-row" style="text-align: right;"></td>
</tr>
</tfoot>
</table> </table>
</div> </div>
</div> <!-- end card body--> </div> <!-- end card body-->
@ -145,48 +137,70 @@
</div> </div>
<!-- end row--> <!-- end row-->
<script>
$(document).ready(function () {
var table = $('#datatable-buttons').DataTable({
"dom": '<"row mb-3"<"col-md-6 d-flex align-items-center"B><"col-md-6 d-flex justify-content-end"f>>rtip',
buttons: [
{
extend: 'print',
title: 'Itemwise Report',
text: 'Print',
customize: function (win) { }
},
{
extend: 'csv',
text: 'CSV',
title: 'Itemwise Report',
exportOptions: {}
}
]
});
function updateTotal() {
var total = table.rows({ filter: 'applied' }).data().pluck(5).reduce(function (a, b) {
return a + parseFloat(b) || 0;
}, 0);
$('#datatable-buttons tfoot .total-row').html(total.toFixed(2));
}
$(document).on('click', '.payment-button', function () {
var paymentMethod = $(this).contents().first().text().trim().toUpperCase();
if (!paymentMethod) {
return;
}
table.column(3)
.search(paymentMethod, true, false)
.draw();
updateTotal();
});
updateTotal();
});
</script>
<script> <script>
$(document).ready(function () { // $(document).ready(function () {
var table = $('#datatable-buttons').DataTable({ // // Initially hide all nested tables
// "order": [[0, 'desc']], // $('.nested-table-data').hide();
"dom": '<"row mb-3"<"col-md-6 d-flex align-items-center"B><"col-md-6 d-flex justify-content-end"f>>rtip',
buttons: [
{
extend: 'print',
title: 'Itemwise Report',
text: 'Print',
customize: function (win) { }
},
{
extend: 'csv',
text: 'CSV',
title: 'Itemwise Report',
exportOptions: {}
}
]
});
});
</script>
<!-- <script>
$(document).ready(function () {
// Initially hide all nested tables
$('.nested-table-data').hide();
// Toggle nested table visibility on parent row click // // Toggle nested table visibility on parent row click
$('.custom-tbody tr').click(function () { // $('.custom-tbody tr').click(function () {
var nestedTable = $(this).next().find('.nested-table-data'); // var nestedTable = $(this).next().find('.nested-table-data');
// Toggle visibility // // Toggle visibility
nestedTable.slideToggle(); // nestedTable.slideToggle();
// You can add additional styling or animation here if needed // // You can add additional styling or animation here if needed
// Prevent the parent row from triggering the toggle when nested table row is clicked // // Prevent the parent row from triggering the toggle when nested table row is clicked
return false; // return false;
}); // });
}); // });
</script> --> // </script>
<script> <script>

View File

@ -1,22 +1,20 @@
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<!-- Title Section -->
<div class="col-md-4"> <div class="col-md-4">
<div class="page-title-box page-title-box-alt"> <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> </div>
<div class="offset-md-3 col-md-5">
<form action="<?php echo base_url('book_publishwise_Report'); ?>" method="post"> <!-- Form Section -->
<div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
<div class="input-group"> <input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php echo $selected_data; ?>" />
<input type="text" class="form-control input-daterange-datepicker" name="date" />
</div>
<!-- <input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php if (isset($selected_data)) { echo $selected_data; } ?>" /> -->
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<button type="submit" class="btn btn-primary">Generate Report</button> <button type="submit" class="btn btn-primary">Generate Report</button>
</div> </div>
@ -25,6 +23,7 @@
</form> </form>
</div> </div>
</div> </div>
<!-- end page title --> <!-- end page title -->
<div class="row"> <div class="row">

View File

@ -1,11 +1,14 @@
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<div style="max-width: max-content;" class="col-md-4"> <!-- Title Section -->
<div class="col-md-4">
<div class="page-title-box page-title-box-alt"> <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> </div>
<div class="offset-md-3 col-md-5">
<!-- Form Section -->
<div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post"> <form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
@ -21,6 +24,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
@ -30,6 +34,7 @@
<thead> <thead>
<tr> <tr>
<th hidden>id</th> <th hidden>id</th>
<th>Membership ID</th>
<th>From Subscription</th> <th>From Subscription</th>
<th>To Subscription</th> <th>To Subscription</th>
<th>Member Name</th> <th>Member Name</th>
@ -41,6 +46,7 @@
<tbody> <tbody>
<?php foreach ($expired_customers as $row) { ?> <?php foreach ($expired_customers as $row) { ?>
<tr> <tr>
<td style="text-align: center;"><?= $row['membership_id'] ?></td>
<td style="text-align: center;"><?= date("d/m/Y", strtotime($row['from_subscription'])); ?></td> <td style="text-align: center;"><?= date("d/m/Y", strtotime($row['from_subscription'])); ?></td>
<td style="text-align: center;"><?= date("d/m/Y", strtotime($row['to_subscription'])); ?></td> <td style="text-align: center;"><?= date("d/m/Y", strtotime($row['to_subscription'])); ?></td>
<td hidden><?php echo $row["sub_id"]; ?></td> <td hidden><?php echo $row["sub_id"]; ?></td>
@ -63,7 +69,7 @@
$(document).ready(function() { $(document).ready(function() {
var table = $('#datatable-buttons').DataTable({ var table = $('#datatable-buttons').DataTable({
"order": [ "order": [
[0, 'desc'] [2, 'asc']
], ],
"dom": '<"row"<"col-md-6"B><"col-md-6"f>>rtip', "dom": '<"row"<"col-md-6"B><"col-md-6"f>>rtip',
buttons: [ buttons: [

View File

@ -1,33 +1,29 @@
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<!-- Title Section -->
<div class="col-md-4"> <div class="col-md-4">
<div class="page-title-box page-title-box-alt"> <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> </div>
<div class="offset-md-3 col-md-5">
<form action="<?php echo base_url('general_inv_rp'); ?>" method="post"> <!-- Form Section -->
<div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
<div class="input-group"> <input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php echo $selected_data; ?>" />
<input type="text" class="form-control input-daterange-datepicker" name="date" value="<?php echo $selected_data?>" />
</div>
<!-- <input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php if (isset($selected_data)) { echo $selected_data; } ?>" /> -->
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<button type="submit" class="btn btn-primary">Generate Report</button> <button type="submit" class="btn btn-primary">Generate Report</button>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<!-- end page title --> <!-- end page title -->
<div class="row"> <div class="row">

View File

@ -24,19 +24,21 @@
</style> </style>
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<!-- Title Section -->
<div class="col-md-4"> <div class="col-md-4">
<div class="page-title-box page-title-box-alt"> <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> </div>
<div class="offset-md-3 col-md-5">
<form action="<?php echo base_url('itemwise_report'); ?>" method="post"> <!-- Form Section -->
<input type="hidden" value="date" id="value" name="value"> <div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
<input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php echo $selected_data ?>" /> <input class="form-control input-daterange-datepicker" type="text" name="date" value="<?php echo $selected_data; ?>" />
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<button type="submit" class="btn btn-primary">Generate Report</button> <button type="submit" class="btn btn-primary">Generate Report</button>
@ -46,6 +48,7 @@
</form> </form>
</div> </div>
</div> </div>
<!-- end page title --> <!-- end page title -->
<div class="row"> <div class="row">

View File

@ -1,12 +1,15 @@
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row d-flex align-items-center">
<!-- Title Section -->
<div class="col-md-4"> <div class="col-md-4">
<div class="page-title-box page-title-box-alt"> <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> </div>
<div class="offset-md-3 col-md-5">
<form action="<?php echo base_url('report_userwise_and_eventwise'); ?>" method="post"> <!-- Form Section -->
<div class="col-md-5 offset-md-3">
<form action="<?php echo base_url('expired_customer_report'); ?>" method="post">
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
@ -21,6 +24,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">

View File

@ -37,8 +37,8 @@
<th>Member's Mobile</th> <th>Member's Mobile</th>
<th>From Subscription</th> <th>From Subscription</th>
<th>To Subscription</th> <th>To Subscription</th>
<th>Short-Code</th>
<th>Expiring Status</th> <th>Expiring Status</th>
<th>Short-Code</th>
<th>Invoice Number</th> <th>Invoice Number</th>
<th>Total () </th> <th>Total () </th>
<th>Status</th> <th>Status</th>
@ -96,8 +96,8 @@
<td data-order="<?= $row['mobile_no']; ?>"><?= $row['mobile_no']; ?></td> <td data-order="<?= $row['mobile_no']; ?>"><?= $row['mobile_no']; ?></td>
<td data-order="<?= strtotime($row['from_subscription']); ?>"><?= $from_date; ?></td> <td data-order="<?= strtotime($row['from_subscription']); ?>"><?= $from_date; ?></td>
<td data-order="<?= strtotime($row['to_subscription']); ?>"><?= $to_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="<?= $message; ?>"><span class="<?php echo $class; ?>"><?php echo $message; ?></span></td>
<td data-order="<?= $row['scheme_code']; ?>"><?= $row['scheme_code']; ?></td>
<td data-order="<?= $row['invoice_number']; ?>"><?= $row['invoice_number']; ?></td> <td data-order="<?= $row['invoice_number']; ?>"><?= $row['invoice_number']; ?></td>
<td style="text-align: end;" data-order="<?= $row['total_amount']; ?>"><?=$row['total_amount']; ?></td> <td style="text-align: end;" data-order="<?= $row['total_amount']; ?>"><?=$row['total_amount']; ?></td>
<td data-order="<?= $row['status']; ?>"><?= $row['status']; ?></td> <td data-order="<?= $row['status']; ?>"><?= $row['status']; ?></td>

View File

@ -22,7 +22,7 @@
padding: 15px; padding: 15px;
} }
.card-header { .card-header {
background-color: #007bff; background-color: #40acdc;
color: white; color: white;
padding: 10px; padding: 10px;
font-size: 1.2rem; font-size: 1.2rem;
@ -45,16 +45,24 @@
p { p {
margin: 0; margin: 0;
} }
.logo{
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
}
</style> </style>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div class="card"> <div class="card">
<div class="logo"> <div class="logo">
<img src="public/uploads/Vijayabharatham_withname_1.png"/><br><br> <img src="public/uploads/Vijayabharatham_withname.png" />
</div> </div><div><br></div>
<div class="card-header text-center"> <div class="card-header text-center">
<h4 class="mb-1">Subscription Renewal</h4> <h4 class="mb-1">Renew Your Subscription</h4>
</div> </div>
<!-- <p class="text-center" style="font-size: 0.8rem;">Please fill in your details to renew your subscription.</p> --> <!-- <p class="text-center" style="font-size: 0.8rem;">Please fill in your details to renew your subscription.</p> -->
<div class="card-body"> <div class="card-body">
@ -86,7 +94,7 @@
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<button type="submit" class="btn btn-primary btn-block">Proceed to Pay</button> <button type="submit" class="btn btn-primary btn-rounded waves-effect waves-light">Proceed to Pay</button>
</div> </div>
</form> </form>
</div> </div>