diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php
index 56087644..7a3a89a1 100755
--- a/app/Controllers/ClientController.php
+++ b/app/Controllers/ClientController.php
@@ -6652,7 +6652,7 @@ class ClientController extends AdminController
// Check in Enrollment (client_policy)
$client_policy_data = $this->clientPolicyModel
->where('is_active', 1)
- ->where('policy_status', 1)
+ // ->where('policy_status', 1)
->where('TRIM(policy_no)', $policy_no)
->first();
diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php
index 5ebdebc5..61d395e7 100755
--- a/app/Views/batch_list.php
+++ b/app/Views/batch_list.php
@@ -34,7 +34,7 @@ if (!empty($batch_list) && is_array($batch_list)) {
$countStr = ($file['count'] ?? null) === null ? '-' : (string) $file['count'];
$batch_col_max_len[9] = max($batch_col_max_len[9], mb_strlen($countStr));
$batch_col_max_len[10] = max($batch_col_max_len[10], mb_strlen((string) format_indian_number($file['amount'])));
- $userTime = change_date_format($file['created_at'] ?? '', 'Y-m-d H:i:s', 'd M Y h:i a')
+ $userTime = change_date_format($file['created_at'] ?? '', 'Y-m-d H:i:s', 'd/m/Y h:i a')
. ' by '
. get_username($file['created_by'] ?? '');
$batch_col_max_len[11] = max($batch_col_max_len[11], mb_strlen($userTime));
@@ -350,7 +350,7 @@ for ($i = 0; $i < $batch_col_count; $i++) {
|
- by
+ by
|
diff --git a/app/Views/bds_dump_file_list.php b/app/Views/bds_dump_file_list.php
index b56448fa..2ea6207a 100644
--- a/app/Views/bds_dump_file_list.php
+++ b/app/Views/bds_dump_file_list.php
@@ -49,7 +49,7 @@
|
- ' . $file['user_name'] . '' ?> |
+ ' . $file['user_name'] . '' ?> |
= $file['status'] ?>
diff --git a/app/Views/cd_master_add_modal.php b/app/Views/cd_master_add_modal.php
index e73b807f..29597a75 100644
--- a/app/Views/cd_master_add_modal.php
+++ b/app/Views/cd_master_add_modal.php
@@ -107,13 +107,50 @@
var isCdMasterPage = ;
console.log("isCdMasterPage", isCdMasterPage);
+ function formatCdOpeningDateForInput(inputDate) {
+ if (!inputDate || String(inputDate).trim() === '') {
+ return '';
+ }
+ var str = String(inputDate).trim();
+ var iso = str.match(/^(\d{4})-(\d{2})-(\d{2})/);
+ if (iso) {
+ return iso[3] + '/' + iso[2] + '/' + iso[1];
+ }
+ var dmy = str.match(/^(\d{1,2})[-\/](\d{1,2})[-\/](\d{4})$/);
+ if (dmy) {
+ var day = ('0' + dmy[1]).slice(-2);
+ var month = ('0' + dmy[2]).slice(-2);
+ return day + '/' + month + '/' + dmy[3];
+ }
+ return str;
+ }
+
+ function cdOpeningDateForSubmit(inputDate) {
+ var formatted = formatCdOpeningDateForInput(inputDate);
+ if (!formatted) {
+ return inputDate || '';
+ }
+ var parts = formatted.split('/');
+ return parts[0] + '-' + parts[1] + '-' + parts[2];
+ }
+
+ var openingDatePicker;
+
$(document).ready(function(){
- var openingDatePicker = flatpickr("#opening_date", {
- dateFormat: "d-m-Y",
+ openingDatePicker = flatpickr("#opening_date", {
+ dateFormat: "d/m/Y",
allowInput: false
});
+ $('#con-close-modal').on('shown.bs.modal', function() {
+ var val = $('#opening_date').val();
+ if (val) {
+ var formatted = formatCdOpeningDateForInput(val);
+ openingDatePicker.setDate(formatted, false);
+ }
+ });
+
if(isCdMasterPage == true){
$('#cd_client_id').select2();
$('#insurer_id_for_cd').select2();
@@ -172,6 +209,10 @@
}
let formData = new FormData($('#CDMasterForm')[0]);
+ var openingDate = formData.get('opening_date');
+ if (openingDate) {
+ formData.set('opening_date', cdOpeningDateForSubmit(openingDate));
+ }
console.log("formData", formData);
let url = '= base_url('master/cash_deposite/create') ?>';
diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php
index 1314066a..1bd8dc4e 100755
--- a/app/Views/cd_master_list.php
+++ b/app/Views/cd_master_list.php
@@ -15,12 +15,12 @@ foreach ($CD_Master_Data as $index => $row) {
$cdm_col_max_len[1] = max($cdm_col_max_len[1], mb_strlen($clientCell));
$cdm_col_max_len[2] = max($cdm_col_max_len[2], mb_strlen((string) ($row['insurer_name'] ?? '')));
$cdm_col_max_len[3] = max($cdm_col_max_len[3], mb_strlen((string) ($row['insurer_branch_name'] ?? '')));
- $od = ! empty($row['opening_date']) ? date('d-m-Y', strtotime((string) $row['opening_date'])) : '';
+ $od = ! empty($row['opening_date']) ? date('d/m/Y', strtotime((string) $row['opening_date'])) : '';
$cdm_col_max_len[4] = max($cdm_col_max_len[4], mb_strlen($od));
$cdm_col_max_len[5] = max($cdm_col_max_len[5], mb_strlen((string) ($row['cd_ac_no'] ?? '')));
$cdm_col_max_len[6] = max($cdm_col_max_len[6], mb_strlen((string) ($row['opening_bal'] ?? '')));
$du = ! empty($row['created_at'])
- ? (date('d-M-Y h:i A', strtotime((string) $row['created_at'])) . ' by ' . ($row['user_name'] ?? ''))
+ ? (date('d/m/Y h:i A', strtotime((string) $row['created_at'])) . ' by ' . ($row['user_name'] ?? ''))
: '';
$cdm_col_max_len[7] = max($cdm_col_max_len[7], mb_strlen($du));
$cdm_col_max_len[8] = max($cdm_col_max_len[8], 4);
@@ -118,10 +118,10 @@ $cdm_col_width_px = nhance_dt_column_widths_px($cdm_header_labels, $cdm_col_max_
| ( = $row['short_name'] ?> ) |
|
|
- |
+ |
|
|
- by |
+ by |
diff --git a/app/Views/claim_dump_file_list.php b/app/Views/claim_dump_file_list.php
index ee00683e..63d7cedf 100644
--- a/app/Views/claim_dump_file_list.php
+++ b/app/Views/claim_dump_file_list.php
@@ -161,7 +161,7 @@
|
- ' . $file['user_name'] . '' ?> |
+ ' . $file['user_name'] . '' ?> |
= $file['status'] ?>
@@ -262,7 +262,7 @@
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php
index 9e654e80..26bcab2c 100755
--- a/app/Views/client_policy.php
+++ b/app/Views/client_policy.php
@@ -209,7 +209,7 @@ input:checked + .slider_blue::before {
data-parsley-pattern="^[1-9][0-9]*$"
data-parsley-pattern-message="Please select a valid Policy Type.">
-
+
@@ -230,7 +230,7 @@ input:checked + .slider_blue::before {
| |