CHANGE_DATE_FORMATE_ALL_PLACE

This commit is contained in:
VENKATESHWARAN 2026-05-29 14:01:29 +05:30
parent 11b47b2dff
commit 49c5881eba
17 changed files with 160 additions and 64 deletions

View File

@ -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();

View File

@ -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++) {
<td><?php echo format_indian_number($file['amount'])?></td>
<td class="reload">
<?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd M Y h:i a') ?> by <?php echo get_username($file['created_by']) ?>
<?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd/m/Y h:i a') ?> by <?php echo get_username($file['created_by']) ?>
</td>

View File

@ -49,7 +49,7 @@
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name'] ?>
</td>
<td><?php echo change_date_format($file['created_at'], 'Y-m-d H:i:s', 'd M Y h:i A') . ' by <strong>' . $file['user_name'] . '</strong>' ?> </td>
<td><?php echo change_date_format($file['created_at'], 'Y-m-d H:i:s', 'd/m/Y h:i A') . ' by <strong>' . $file['user_name'] . '</strong>' ?> </td>
<td>
<?php if ($file['status'] == "failed") { ?>
<span> <?= $file['status'] ?> </span>

View File

@ -107,13 +107,50 @@
var isCdMasterPage = <?php echo isset($CD_Master_Data) ? 'true' : 'false'; ?>;
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') ?>';

View File

@ -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_
<td><?php echo $row['client_name']; ?>( <?= $row['short_name'] ?> )</td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['insurer_branch_name']; ?></td>
<td><?php echo date('d-m-Y', strtotime($row['opening_date'])); ?></td>
<td><?php echo date('d/m/Y', strtotime($row['opening_date'])); ?></td>
<td><?php echo $row['cd_ac_no']; ?></td>
<td><?php echo $row['opening_bal']; ?></td>
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> <br>by <?php echo $row['user_name']; ?></td>
<td><?php echo date('d/m/Y h:i A', strtotime($row['created_at'])) ?> <br>by <?php echo $row['user_name']; ?></td>
<td class="text-center table-action-cell">
<div class="btn-group dropdown">
<a href="javascript: void(0);"class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>

View File

@ -161,7 +161,7 @@
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name'] ?>
</td>
<td><?php echo change_date_format($file['created_at'], 'Y-m-d H:i:s', 'd M Y h:i A') . ' by <strong>' . $file['user_name'] . '</strong>' ?> </td>
<td><?php echo change_date_format($file['created_at'], 'Y-m-d H:i:s', 'd/m/Y h:i A') . ' by <strong>' . $file['user_name'] . '</strong>' ?> </td>
<td>
<?php if ($file['status'] == "failed") { ?>
<span style="color : #BD0707 ;"> <?= $file['status'] ?> </span>
@ -262,7 +262,7 @@
<label for="tpa">TPA<span id="tpa_danger" class="text-danger"></span></label>
<select class="form-control readonly-select" id="tpa_id" name="tpa_id">
<option value="">Select TPA</option>
<?php foreach ($tpa_list as $value) { ?>
<?php foreach ($tpa_list ?? [] as $value) { ?>
<option value="<?= $value['id'] ?>"><?= $value['short_name'] ?></option>
<?php } ?>
</select>

View File

@ -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.">
<option value="0">Select Policy Type</option>
<?php foreach ($policy_types as $value) { ?>
<?php foreach ($policy_types ?? [] as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['policy_type'] ?></option>
<?php } ?>
</select>
@ -230,7 +230,7 @@ input:checked + .slider_blue::before {
<label for="insurer">Insurer<span class="text-danger">*</span></label>
<select class="form-control" id="insurer" name="insurer" onchange="setInsuerAndBranchValue(this)" required>
<option value="">Select Insurer</option>
<?php foreach ($insurer as $value) { ?>
<?php foreach ($insurer ?? [] as $value) { ?>
<option data-id="<?= $value['insurer_id']?>" value="<?= $value['id'] . '-' . $value['insurer_id'] ?>">
<?= $value['insurer_name'] . '-' . $value['branch_code'] ?></option>
<?php } ?>
@ -241,7 +241,7 @@ input:checked + .slider_blue::before {
<label for="tpa">TPA<span id="tpa_danger" class="text-danger">*</span></label>
<select class="form-control" id="tpa" name="tpa" required>
<option value="">Select TPA</option>
<?php foreach ($tpa as $value) { ?>
<?php foreach ($tpa ?? [] as $value) { ?>
<option value="<?= $value['id'] . '-' . $value['tpa_id'] ?>">
<?= $value['tpa_short_name'] . '-' . $value['branch_code'] ?></option>
<?php } ?>
@ -454,7 +454,7 @@ input:checked + .slider_blue::before {
const showExpired = $('#chk-show-expired').is(':checked');
var startDatePicker = flatpickr("#start_date", {
dateFormat: "d-m-Y",
dateFormat: "d/m/Y",
defaultDate: today,
allowInput: false,
onChange: function(selectedDates, dateStr, instance) {
@ -467,7 +467,7 @@ input:checked + .slider_blue::before {
// Initialize Flatpickr for the start date with today's date
var openDatePicker = flatpickr("#open_date", {
dateFormat: "d-m-Y",
dateFormat: "d/m/Y",
defaultDate: today,
allowInput: false,
});
@ -478,14 +478,14 @@ input:checked + .slider_blue::before {
closeDate.setDate(closeDate.getDate() - 1); // Set end date to last day of next year
var endDatePicker = flatpickr("#end_date", {
dateFormat: "d-m-Y",
dateFormat: "d/m/Y",
defaultDate: closeDate,
allowInput: false
});
// Initialize Flatpickr for the end date with the calculated end date
var closeDatePicker = flatpickr("#close_date", {
dateFormat: "d-m-Y",
dateFormat: "d/m/Y",
defaultDate: today,
allowInput: false
});
@ -566,7 +566,7 @@ input:checked + .slider_blue::before {
<td>${policy_name_data}</td>
<td>${item.branch_name ? item.branch_name : ' - '}</td>
<td>${tpaValue}</td>
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
<td>${formatPolicyDisplayDate(item.policy_start_date)} - ${formatPolicyDisplayDate(item.policy_end_date)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td>
@ -751,6 +751,12 @@ input:checked + .slider_blue::before {
$('.loader-mask').fadeIn();
var formData = new FormData($('#policy_form')[0]);
['policy_start_date', 'policy_end_date', 'open_date', 'close_date'].forEach(function(fieldName) {
var val = formData.get(fieldName);
if (val) {
formData.set(fieldName, policyFormDateForSubmit(val));
}
});
var policy_form_action = $('#policy_form_action').val();
console.log(formData+'form data');
$.ajax({
@ -853,7 +859,7 @@ input:checked + .slider_blue::before {
<td>${item.branch_name ? item.branch_name : ' - '}</td>
<td>${tpaValue}</td>
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
<td>${formatPolicyDisplayDate(item.policy_start_date)} - ${formatPolicyDisplayDate(item.policy_end_date)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td>
<div class="btn-group dropdown">
@ -1512,31 +1518,74 @@ input:checked + .slider_blue::before {
});
//for date convert to indian formate like this 'yyyy-mm-dd' to this 'dd-mm-yyyy'
function rearrangeDateFormat(inputDate) {
console.log('inputDate', inputDate)
// Check if inputDate is a string and not empty
if (typeof inputDate === 'string' && inputDate.trim() !== '') {
var dateComponents = inputDate.split("-");
// Check if dateComponents has the expected number of parts
if (dateComponents.length === 3) {
var rearrangedDate = dateComponents[2] + "-" + dateComponents[1] + "-" + dateComponents[0];
return rearrangedDate;
} else {
// Handle unexpected date format
return '';
}
} else {
// Handle the case where inputDate is not a valid string
return '';
function parsePolicyDate(inputDate) {
if (!inputDate || (typeof inputDate === 'string' && inputDate.trim() === '')) {
return null;
}
var str = String(inputDate).trim();
var dmyMon = str.match(/^(\d{1,2})\/([A-Za-z]{3})\/(\d{4})$/i);
if (dmyMon) {
return new Date(str);
}
var dmy = str.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
if (dmy) {
return new Date(parseInt(dmy[3], 10), parseInt(dmy[2], 10) - 1, parseInt(dmy[1], 10));
}
var iso = str.match(/^(\d{4})-(\d{2})-(\d{2})/);
if (iso) {
return new Date(parseInt(iso[1], 10), parseInt(iso[2], 10) - 1, parseInt(iso[3], 10));
}
var dmyDash = str.match(/^(\d{1,2})-([A-Za-z]{3}|\d{1,2})-(\d{4})$/i);
if (dmyDash) {
if (/^[A-Za-z]{3}$/i.test(dmyDash[2])) {
return new Date(str);
}
return new Date(parseInt(dmyDash[3], 10), parseInt(dmyDash[2], 10) - 1, parseInt(dmyDash[1], 10));
}
var parsed = new Date(str);
return isNaN(parsed.getTime()) ? null : parsed;
}
var policyMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
function formatPolicyDisplayDate(inputDate) {
var d = parsePolicyDate(inputDate);
if (!d) {
return (inputDate && String(inputDate).trim() !== '') ? String(inputDate) : '';
}
return d.getDate() + '/' + policyMonthNames[d.getMonth()] + '/' + d.getFullYear();
}
function formatPolicyFormDate(inputDate) {
var d = parsePolicyDate(inputDate);
if (!d) {
return (inputDate && String(inputDate).trim() !== '') ? String(inputDate) : '';
}
var day = ('0' + d.getDate()).slice(-2);
var month = ('0' + (d.getMonth() + 1)).slice(-2);
return day + '/' + month + '/' + d.getFullYear();
}
function policyFormDateForSubmit(inputDate) {
var formatted = formatPolicyFormDate(inputDate);
if (!formatted) {
return inputDate || '';
}
var parts = formatted.split('/');
return parts[0] + '-' + parts[1] + '-' + parts[2];
}
// Convert API/storage dates to d/m/Y for form inputs
function rearrangeDateFormat(inputDate) {
return formatPolicyFormDate(inputDate);
}
function checkDateStatus(inputDate, bg = false) {
var givenDate = new Date(inputDate);
var givenDate = parsePolicyDate(inputDate);
if (!givenDate) {
return bg ? '' : '';
}
var currentDate = new Date();
if (bg != false) {
@ -2763,7 +2812,7 @@ $(document).ready(function () {
<td>${policy_name_data}</td>
<td>${item.branch_name ? item.branch_name : ' - '}</td>
<td>${tpaValue}</td>
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
<td>${formatPolicyDisplayDate(item.policy_start_date)} - ${formatPolicyDisplayDate(item.policy_end_date)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td>
@ -2809,7 +2858,7 @@ $(document).ready(function () {
<td>${policy_name_data}</td>
<td>${item.branch_name ? item.branch_name : ' - '}</td>
<td>${tpaValue}</td>
<td>${(item.policy_start_date)} / ${(item.policy_end_date)}</td>
<td>${formatPolicyDisplayDate(item.policy_start_date)} - ${formatPolicyDisplayDate(item.policy_end_date)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td>

View File

@ -182,7 +182,7 @@
<td><?php echo ucfirst($row['department']) ?> </td>
<td><?php echo $row['rules_count'] ?></td>
<td><?php echo ucfirst($row['file_status']) ?> </td>
<td><?php echo change_date_format($row['created_at'],'Y-m-d H:i:s', 'd M Y h:i A') . ' by <strong>' . $row['created_user_name'] . '</strong>' ?>
<td><?php echo change_date_format($row['created_at'],'Y-m-d H:i:s', 'd/m/Y h:i A') . ' by <strong>' . $row['created_user_name'] . '</strong>' ?>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>

View File

@ -252,7 +252,7 @@ $ex_col_width_px = nhance_dt_column_widths_px($ex_header_labels, $ex_col_max_len
<td><?= number_format((float) ($row['amount'] ?? 0), 2); ?></td>
<td>
<?php if (! empty($row['expense_date'])): ?>
<?= date('d-m-Y', strtotime($row['expense_date'])); ?>
<?= date('d/m/Y', strtotime($row['expense_date'])); ?>
<?php endif; ?>
</td>
<td>

View File

@ -23,7 +23,7 @@ if (!empty($fileList) && is_array($fileList)) {
);
$fl_col_max_len[4] = max($fl_col_max_len[4], mb_strlen($policy_display));
$fl_col_max_len[5] = max($fl_col_max_len[5], mb_strlen((string) ($file['action'] ?? '')));
$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 '
. ($file['first_name'] ?? '');
$fl_col_max_len[6] = max($fl_col_max_len[6], mb_strlen($userTime));
@ -203,7 +203,7 @@ $fl_col_width_px = nhance_dt_column_widths_px($fl_header_labels, $fl_col_max_len
<!-- <td><?php echo isset($file['policy_name']) ? $file['policy_name'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?> - <?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?></td> -->
<td><?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?></td>
<td><?php echo $file['action'] ?></td>
<td><?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd M Y h:i a') . ' by <strong>' . $file['first_name'] . '</strong>' ?>
<td><?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd/m/Y h:i a') . ' by <strong>' . $file['first_name'] . '</strong>' ?>
</td>
<td>
<?php

View File

@ -255,7 +255,7 @@ $hr_col_width_px = nhance_dt_column_widths_px($hr_header_labels, $hr_col_max_len
<td><?php echo $file['branch_name'] ?></td>
<td><?php echo $file['policy_no'] ?></td>
<td><?php echo $file['file_action'] ?></td>
<td><?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd M Y h:i A') . ' by <strong>' . $file['first_name'] . '</strong>' ?></td>
<td><?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd/m/Y h:i A') . ' by <strong>' . $file['first_name'] . '</strong>' ?></td>
<td><?php echo $file['status']; ?> </td>
<td> </td>
</tr>

View File

@ -64,7 +64,7 @@
<td><?= $row['nhance_claim_ref_no'] ?: 'N/A'; ?></td>
<td><?= $row['short_name'] ?: ($row['client_name'] ?? 'N/A'); ?></td>
<td><?= $row['insurer_short_name'] ?: ($row['insurer_name'] ?: 'N/A'); ?></td>
<td><?= !empty($row['loss_date']) ? date('d-m-Y', strtotime($row['loss_date'])) : 'N/A'; ?></td>
<td><?= !empty($row['loss_date']) ? date('d/m/Y', strtotime($row['loss_date'])) : 'N/A'; ?></td>
<td><?= $row['nature_of_loss'] ?: 'N/A'; ?></td>
<td style="display:none;"><?= $row['acm_name'] ?? ''; ?></td>

View File

@ -1,11 +1,14 @@
<style>
.table th,
.table td {
padding: 8px;
#scroll-horizontal-datatable thead th,
#scroll-horizontal-datatable tbody td {
padding: 4px 4px !important;
box-sizing: border-box;
}
table.dataTable tbody td {
#scroll-horizontal-datatable_wrapper .dataTables_scrollHead table thead th,
#scroll-horizontal-datatable_wrapper .dataTables_scrollBody table tbody td {
padding: 4px 4px !important;
box-sizing: border-box;
}
.col-12 {
@ -76,7 +79,7 @@ table.dataTable tbody td {
</div>
<div class="badge-container">
Total Policy Count: <span class="text-primary"><?= $policy_count ?></span>
Total Policy Count: <span class="text-primary"><?= $policy_count ?? 0 ?></span>
</div>
</div>
@ -111,7 +114,7 @@ table.dataTable tbody td {
<th style="display: none;">Total Premium</th>
<th>Agreed BP %</th>
<th>Agreed TP %</th>
<th style="display: true;">Rewards</th>
<th>Rewards</th>
<th>Agreed Amount</th>
<th>Invoiced Amount</th>
<th>Outstanding Amount</th>
@ -199,7 +202,7 @@ table.dataTable tbody td {
<td class="right-align-input" style="display: none;"><?php echo ($row['total_irda_amt'] != 0.00) ? ($row['total_premium'] ?: '0.00') : '0.00'; ?></td>
<td class="right-align-input"><?php echo ($row['total_irda_amt'] != 0.00) ? ($row['agreed_bp_per'] ?: '0.00') : '0.00'; ?>%</td>
<td class="right-align-input"><?php echo ($row['total_irda_amt'] != 0.00) ? ($row['agreed_tp_or_ter_per'] ?: '0.00') : '0.00'; ?>%</td>
<td class="right-align-input" style="display: true;"><?php echo isset($row['reward']) ? $row['reward'] : '0.00'; ?></td>
<td class="right-align-input"><?php echo isset($row['reward']) ? $row['reward'] : '0.00'; ?></td>
<?php
// Below Line its old version i am removed. reason no value ['total_irda_amt'] means taken as ['exp_amt'] so.
@ -335,8 +338,9 @@ $(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
nhanceListDataTableBeforeInit();
var nhBdsReportTable = ticketsTable.DataTable(nhanceMergeListDataTableOptions({
autoWidth: false,
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
// "<'row'<'col-sm-12'tr>>" +
// "<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
@ -711,7 +715,9 @@ $(document).ready(function() {
// var totalUnbilled = getUniqueUnbilled(27);
// $('#total_unbilled').text(totalUnbilled.toFixed(2));
}
});
}));
nhanceListDataTableAfterInit();
nhanceListDataTableBindAdjust(nhBdsReportTable);
} else {
console.error("Table atet found.");
}

View File

@ -257,7 +257,7 @@ $ret_col_width_px = nhance_dt_column_widths_px($ret_header_labels, $ret_col_max_
<td><?php echo $employee['agent_name'] ?? 'N/A' ?></td>
<td><?php echo $employee['manager_name'] ?? 'N/A' ?></td>
<td><?php if (!empty($employee['created_at'])):
$cd = date("j F Y", strtotime($employee['created_at']));
$cd = date("j/F/Y", strtotime($employee['created_at']));
$ct = date("h:i A", strtotime($employee['created_at']));
echo $cd . "<br><span class='time'> " . $ct . "</span>";
endif; ?></td>

View File

@ -269,7 +269,7 @@ $gst_total = 0;
<td><?php echo $employee['emp_code']; ?></td>
<td><?php echo $employee['relationship']; ?></td>
<td><?php echo $employee['gender']; ?></td>
<td><?php echo date('d/M/Y', strtotime($employee['dob'])); ?></td>
<td><?php echo date('d/m/Y', strtotime($employee['dob'])); ?></td>
<?php /*
<!-- <td><?php //echo isset($employee['policy_type']) ? $employee['policy_type'] : ''; ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : ''; ?></td>

View File

@ -188,7 +188,7 @@ beccause = dataTables_length and dataTables_paginate need in same line thats why
<td class="text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : 'N/A'; ?></td>
<td class="text-left">
<?php if (!empty($row['created_at'])):
$cd = date("j M Y", strtotime($row['created_at']));
$cd = date("j/m/Y", strtotime($row['created_at']));
$ct = date("h:i A", strtotime($row['created_at']));
echo $cd . "<br><span class='time'> " . $ct . "</span>";
endif;
@ -196,7 +196,7 @@ beccause = dataTables_length and dataTables_paginate need in same line thats why
</td>
<td class="text-left">
<?php if (!empty($row['updated_at'])):
$ud = date("j M Y", strtotime($row['updated_at']));
$ud = date("j/m/Y", strtotime($row['updated_at']));
$ut = date("h:i A", strtotime($row['updated_at']));
echo $ud . "<br><span class='time'> " . $ut . "</span>";
endif;

View File

@ -80,7 +80,7 @@
var end = moment(end, 'DD/MM/YYYY');
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange span').html(start.format('D/MM/YYYY') + ' - ' + end.format('D/MM/YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}