FIX VARIOUS ISSUES
This commit is contained in:
parent
47dd643e53
commit
9a1d4d076a
@ -139,6 +139,10 @@ class Invoice extends BaseController
|
|||||||
{
|
{
|
||||||
$customer_id = $this->request->getPost('customer_id');
|
$customer_id = $this->request->getPost('customer_id');
|
||||||
$data['customer_membership'] = $this->get_customer_membership("membership", (int)$customer_id);
|
$data['customer_membership'] = $this->get_customer_membership("membership", (int)$customer_id);
|
||||||
|
$bookModel = new BooksModel();
|
||||||
|
$book_id = env('RENEWAL_SCHEME_ID');
|
||||||
|
$scheme = $bookModel->select('book_id,short_code,price')->where('book_id',$book_id)->where('isactive',1)->first();
|
||||||
|
$data['scheme'] = $scheme;
|
||||||
return $this->response->setJSON(['data' => $data]);
|
return $this->response->setJSON(['data' => $data]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,8 @@ class Payment extends BaseController
|
|||||||
$customer_details = $model->get_customer_details_by_customer_id($customer_id);
|
$customer_details = $model->get_customer_details_by_customer_id($customer_id);
|
||||||
$scheme = $model2->get_subscription_details_by_membership_id($membership_id);
|
$scheme = $model2->get_subscription_details_by_membership_id($membership_id);
|
||||||
//var_dump($customer_details);die();
|
//var_dump($customer_details);die();
|
||||||
$price = $bookModel->select('price')->where('book_id', 3)->first();
|
$book_id = env('RENEWAL_SCHEME_ID');
|
||||||
|
$price = $bookModel->select('price')->where('book_id', $book_id)->first();
|
||||||
$amount = $price['price'];
|
$amount = $price['price'];
|
||||||
log_message('debug','amount is '.$amount);
|
log_message('debug','amount is '.$amount);
|
||||||
$response = [
|
$response = [
|
||||||
@ -56,7 +57,8 @@ class Payment extends BaseController
|
|||||||
$customer_id = $model2->select('customer_id')->where('membership_id',$membership_id)->first();
|
$customer_id = $model2->select('customer_id')->where('membership_id',$membership_id)->first();
|
||||||
$customer_details = $model->get_customer_details_by_customer_id($customer_id);
|
$customer_details = $model->get_customer_details_by_customer_id($customer_id);
|
||||||
log_message('info','inside the method post');
|
log_message('info','inside the method post');
|
||||||
$price = $bookModel->select('price')->where('book_id', 3)->first();
|
$book_id = env('RENEWAL_SCHEME_ID');
|
||||||
|
$price = $bookModel->select('price')->where('book_id', $book_id)->first();
|
||||||
$amount = $price['price'];
|
$amount = $price['price'];
|
||||||
$response = [
|
$response = [
|
||||||
'customer_details' => $customer_details,
|
'customer_details' => $customer_details,
|
||||||
@ -188,7 +190,8 @@ public function payment_success() {
|
|||||||
//var_dump($result);die();
|
//var_dump($result);die();
|
||||||
$invoice_number = $result['serial_number'];
|
$invoice_number = $result['serial_number'];
|
||||||
$next_id_numeric = $result['next_id'];
|
$next_id_numeric = $result['next_id'];
|
||||||
$price = $bookModel->select('price')->where('book_id', 3)->first();
|
$book_id = env('RENEWAL_SCHEME_ID');
|
||||||
|
$price = $bookModel->select('price')->where('book_id', $book_id)->first();
|
||||||
$amount = $price['price'];
|
$amount = $price['price'];
|
||||||
$data = [
|
$data = [
|
||||||
'invoice_number' => $invoice_number,
|
'invoice_number' => $invoice_number,
|
||||||
|
|||||||
@ -1701,7 +1701,9 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
|
|||||||
$('#tosubcription').val(tsubscription).prop('readonly', true);
|
$('#tosubcription').val(tsubscription).prop('readonly', true);
|
||||||
$('#myForm').parsley().validate();
|
$('#myForm').parsley().validate();
|
||||||
$('#book0').empty();
|
$('#book0').empty();
|
||||||
$('#book0').append('<option value="<?= $books[1]->book_id ?>"><?= $books[1]->title; ?></option>');
|
var scheme = response['data']['scheme']['short_code'];
|
||||||
|
var book_id = response['data']['scheme']['book_id']
|
||||||
|
$('#book0').append(`<option value= "${book_id}">${scheme}</option>`);
|
||||||
$('#book0').prop('readonly',true);
|
$('#book0').prop('readonly',true);
|
||||||
var element = $('#book0')[0]; // Get the actual DOM element (not the value)
|
var element = $('#book0')[0]; // Get the actual DOM element (not the value)
|
||||||
displayBookTag(element, 0);
|
displayBookTag(element, 0);
|
||||||
|
|||||||
@ -25,10 +25,9 @@
|
|||||||
text-align: center; /* Center-align content */
|
text-align: center; /* Center-align content */
|
||||||
border: none; /* No border for container */
|
border: none; /* No border for container */
|
||||||
background-color: transparent; /* Transparent container */
|
background-color: transparent; /* Transparent container */
|
||||||
width: 160px; /* Card width */
|
width: 170px; /* Card width */
|
||||||
height: 50px; /* Card height */
|
height: 70px; /* Card height */
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
|
|||||||
@ -46,8 +46,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($expired_customers as $row) { ?>
|
<?php foreach ($expired_customers as $row) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left;"><?= $row['first_name'] . ' ' . $row['last_name'] ?></td>
|
<td style="text-align: left;"><?= $row['first_name'] . ' ' . (isset($row['last_name']) ? $row['last_name'] : "") ?></td>
|
||||||
<td style="text-align: center;"><?= $row['membership_id'] ?></td>
|
<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>
|
||||||
@ -160,7 +160,7 @@ Sri Kasi, 12, M.V. Naidu Street, Chetpet,Chennai -
|
|||||||
('0' + (to_subscription.getMonth() + 1)).slice(-2) + '/' +
|
('0' + (to_subscription.getMonth() + 1)).slice(-2) + '/' +
|
||||||
to_subscription.getFullYear();
|
to_subscription.getFullYear();
|
||||||
table.row.add([
|
table.row.add([
|
||||||
item.first_name+' '+item.last_name,
|
item.first_name + ' ' + ((typeof item.last_name !== 'undefined' && item.last_name !== null) ? item.last_name : ''),
|
||||||
item.membership_id,
|
item.membership_id,
|
||||||
from_subscription_formatted,
|
from_subscription_formatted,
|
||||||
to_subscription_formatted,
|
to_subscription_formatted,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user