FIX VARIOUS ISSUES

This commit is contained in:
Srinivas Saravanan A 2024-12-11 15:29:37 +05:30
parent 47dd643e53
commit 9a1d4d076a
5 changed files with 18 additions and 10 deletions

View File

@ -139,6 +139,10 @@ class Invoice extends BaseController
{
$customer_id = $this->request->getPost('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]);
}

View File

@ -31,7 +31,8 @@ class Payment extends BaseController
$customer_details = $model->get_customer_details_by_customer_id($customer_id);
$scheme = $model2->get_subscription_details_by_membership_id($membership_id);
//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'];
log_message('debug','amount is '.$amount);
$response = [
@ -56,7 +57,8 @@ class Payment extends BaseController
$customer_id = $model2->select('customer_id')->where('membership_id',$membership_id)->first();
$customer_details = $model->get_customer_details_by_customer_id($customer_id);
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'];
$response = [
'customer_details' => $customer_details,
@ -188,7 +190,8 @@ public function payment_success() {
//var_dump($result);die();
$invoice_number = $result['serial_number'];
$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'];
$data = [
'invoice_number' => $invoice_number,

View File

@ -1701,7 +1701,9 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
$('#tosubcription').val(tsubscription).prop('readonly', true);
$('#myForm').parsley().validate();
$('#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);
var element = $('#book0')[0]; // Get the actual DOM element (not the value)
displayBookTag(element, 0);

View File

@ -25,10 +25,9 @@
text-align: center; /* Center-align content */
border: none; /* No border for container */
background-color: transparent; /* Transparent container */
width: 160px; /* Card width */
height: 50px; /* Card height */
width: 170px; /* Card width */
height: 70px; /* Card height */
padding-left: 20px;
}
.nav {

View File

@ -46,8 +46,8 @@
<tbody>
<?php foreach ($expired_customers as $row) { ?>
<tr>
<td style="text-align: left;"><?= $row['first_name'] . ' ' . $row['last_name'] ?></td>
<td style="text-align: center;"><?= $row['membership_id'] ?></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;"><?= date("d/m/Y", strtotime($row['from_subscription'])); ?></td>
<td style="text-align: center;"><?= date("d/m/Y", strtotime($row['to_subscription'])); ?></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) + '/' +
to_subscription.getFullYear();
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,
from_subscription_formatted,
to_subscription_formatted,