diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index e7c634ba..12f99567 100755 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -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]); } diff --git a/app/Controllers/Payment.php b/app/Controllers/Payment.php index 398120e2..3807e553 100644 --- a/app/Controllers/Payment.php +++ b/app/Controllers/Payment.php @@ -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, diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index bfa4a0a9..f5b78273 100755 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -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(''); + var scheme = response['data']['scheme']['short_code']; + var book_id = response['data']['scheme']['book_id'] + $('#book0').append(``); $('#book0').prop('readonly',true); var element = $('#book0')[0]; // Get the actual DOM element (not the value) displayBookTag(element, 0); diff --git a/app/Views/received_payments_report.php b/app/Views/received_payments_report.php index a883f65d..30409ece 100644 --- a/app/Views/received_payments_report.php +++ b/app/Views/received_payments_report.php @@ -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 { diff --git a/app/Views/report_expired_customers.php b/app/Views/report_expired_customers.php index 025601d3..178f0b77 100755 --- a/app/Views/report_expired_customers.php +++ b/app/Views/report_expired_customers.php @@ -46,8 +46,8 @@ - - + + @@ -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,