|
|
@ -270,7 +270,11 @@ |
|
|
class="btn btn-sm btn-outline-light rounded-pill px-3"> |
|
|
class="btn btn-sm btn-outline-light rounded-pill px-3"> |
|
|
<i class="fa-solid fa-arrow-left me-1"></i> Back to Dashboard |
|
|
<i class="fa-solid fa-arrow-left me-1"></i> Back to Dashboard |
|
|
</a> --> |
|
|
</a> --> |
|
|
<a href="#" onclick="window.close(); return false;" class="btn-back d-flex align-items-center gap-2"> |
|
|
|
|
|
|
|
|
<!-- <a href="/gccadjustmentmanagementfiles/dashboard" onclick="window.close(); return false;" |
|
|
|
|
|
class="btn-back d-flex align-items-center gap-2"> |
|
|
|
|
|
<i class="fa-solid fa-arrow-left"></i> Back to Dashboard |
|
|
|
|
|
</a> --> |
|
|
|
|
|
<a th:href="@{/gccadjustmentmanagement/dashboard}" class=" btn-back d-flex align-items-center gap-2"> |
|
|
<i class="fa-solid fa-arrow-left"></i> Back to Dashboard |
|
|
<i class="fa-solid fa-arrow-left"></i> Back to Dashboard |
|
|
</a> |
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
|
@ -1209,10 +1213,10 @@ |
|
|
document.getElementById('form-rtgs-date').value = r.rtgs_date || ''; |
|
|
document.getElementById('form-rtgs-date').value = r.rtgs_date || ''; |
|
|
document.getElementById('form-dc-completed-date').value = r.dc_completed_date || ''; |
|
|
document.getElementById('form-dc-completed-date').value = r.dc_completed_date || ''; |
|
|
|
|
|
|
|
|
// Hide financial year input in edit mode (keep enabled but hidden so its value gets submitted) |
|
|
|
|
|
document.getElementById('form-fin-year-container').style.display = 'none'; |
|
|
|
|
|
|
|
|
// Show financial year input in edit mode |
|
|
|
|
|
document.getElementById('form-fin-year-container').style.display = 'block'; |
|
|
document.getElementById('form-fin-year').removeAttribute('disabled'); |
|
|
document.getElementById('form-fin-year').removeAttribute('disabled'); |
|
|
document.getElementById('form-fin-year').required = false; |
|
|
|
|
|
|
|
|
document.getElementById('form-fin-year').required = true; |
|
|
|
|
|
|
|
|
// Run visibility check after populating fields |
|
|
// Run visibility check after populating fields |
|
|
toggleVendorNameVisibility(); |
|
|
toggleVendorNameVisibility(); |
|
|
@ -1675,7 +1679,11 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const fileUrl = contextPath + 'gccadjustmentmanagementfiles/' + filePath; |
|
|
|
|
|
|
|
|
let cleanPath = String(filePath).trim(); |
|
|
|
|
|
if (cleanPath.startsWith('/')) { |
|
|
|
|
|
cleanPath = cleanPath.substring(1); |
|
|
|
|
|
} |
|
|
|
|
|
const fileUrl = contextPath + cleanPath; |
|
|
|
|
|
|
|
|
const titleEl = document.getElementById('docViewerModalLabel'); |
|
|
const titleEl = document.getElementById('docViewerModalLabel'); |
|
|
if (titleEl) { |
|
|
if (titleEl) { |
|
|
@ -1790,20 +1798,64 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const formatDateForExcel = dateStr => { |
|
|
|
|
|
if (!dateStr || dateStr === '-' || dateStr === 'null') return ''; |
|
|
|
|
|
try { |
|
|
|
|
|
const date = new Date(dateStr); |
|
|
|
|
|
if (isNaN(date.getTime())) { |
|
|
|
|
|
return dateStr; |
|
|
|
|
|
} |
|
|
|
|
|
const pad = num => String(num).padStart(2, '0'); |
|
|
|
|
|
const dd = pad(date.getDate()); |
|
|
|
|
|
const mm = pad(date.getMonth() + 1); |
|
|
|
|
|
const yyyy = date.getFullYear(); |
|
|
|
|
|
return `${dd}/${mm}/${yyyy}`; |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
return dateStr; |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const data = filteredRecords.map((r, index) => ({ |
|
|
const data = filteredRecords.map((r, index) => ({ |
|
|
'S.No': index + 1, |
|
|
'S.No': index + 1, |
|
|
'Fin Year': r.fin_year || '', |
|
|
|
|
|
'File Num': r.file_num || '', |
|
|
|
|
|
|
|
|
'File Number': r.file_data_num || '', |
|
|
|
|
|
'Financial Year': r.fin_year || '', |
|
|
|
|
|
'Subject': r.subject || '', |
|
|
|
|
|
'Vendor Name': r.vend_name || '', |
|
|
'Advance Type': r.adv_type || '', |
|
|
'Advance Type': r.adv_type || '', |
|
|
// 'File Available': r.file_available_status || '', |
|
|
|
|
|
|
|
|
'Fund Type': r.fund_type || '', |
|
|
|
|
|
'A/C Head Code': r.ac_code || '', |
|
|
|
|
|
'File Available Status': r.file_available_status || '', |
|
|
|
|
|
'File Status (Category)': r.file_status || '', |
|
|
'Bal Amount': r.bal_amt || 0, |
|
|
'Bal Amount': r.bal_amt || 0, |
|
|
|
|
|
'AS Signed Date': formatDateForExcel(r.as_file_gen_date), |
|
|
'PO Amount': r.po_amt || 0, |
|
|
'PO Amount': r.po_amt || 0, |
|
|
|
|
|
'PO Completed Date': formatDateForExcel(r.po_file_gen_date), |
|
|
'PI Amount': r.pi_amt || 0, |
|
|
'PI Amount': r.pi_amt || 0, |
|
|
|
|
|
'PI Completed Date': formatDateForExcel(r.pi_file_gen_date), |
|
|
|
|
|
'RTGS Date': formatDateForExcel(r.rtgs_date), |
|
|
'FI Amount': r.fi_amt || 0, |
|
|
'FI Amount': r.fi_amt || 0, |
|
|
|
|
|
'FI Completed Date': formatDateForExcel(r.fi_file_gen_date), |
|
|
|
|
|
'DC Completed Date': formatDateForExcel(r.dc_completed_date), |
|
|
'EJV Num': r.ejv_num || '', |
|
|
'EJV Num': r.ejv_num || '', |
|
|
|
|
|
'EJV Date': formatDateForExcel(r.ejv_num_file_gen_date), |
|
|
|
|
|
'AS Final Date': formatDateForExcel(r.as_final_file_gen_date), |
|
|
|
|
|
'TC Date': formatDateForExcel(r.tc_file_gen_date), |
|
|
'Status': isAdjusted(r) ? 'Adjusted' : 'Pending', |
|
|
'Status': isAdjusted(r) ? 'Adjusted' : 'Pending', |
|
|
'Remarks': r.remarks || '', |
|
|
|
|
|
'Created Date': r.cdate || '' |
|
|
|
|
|
|
|
|
'Remarks': r.file_remark || '', |
|
|
|
|
|
'Created Date': formatDateForExcel(r.cdate), |
|
|
|
|
|
'Updated Date': formatDateForExcel(r.updated_date), |
|
|
|
|
|
'AS File Path': r.as_file_path || '', |
|
|
|
|
|
'PI File Path': r.pi_file_path || '', |
|
|
|
|
|
'RTGS File Path': r.rtgs_file_path || '', |
|
|
|
|
|
'PO File Path': r.po_file_path || '', |
|
|
|
|
|
'DC File Path': r.dc_file_path || '', |
|
|
|
|
|
'SR File Path': r.sr_filepath || '', |
|
|
|
|
|
'IR File Path': r.ir_file_path || '', |
|
|
|
|
|
'FI File Path': r.fi_file_path || '', |
|
|
|
|
|
'AS Final File Path': r.as_final_file_path || '', |
|
|
|
|
|
'TC File Path': r.tc_file_path || '', |
|
|
|
|
|
'EJV File Path': r.ejv_num_file_path || '', |
|
|
|
|
|
'Main File Path': r.file_path || '' |
|
|
})); |
|
|
})); |
|
|
|
|
|
|
|
|
const ws = XLSX.utils.json_to_sheet(data); |
|
|
const ws = XLSX.utils.json_to_sheet(data); |
|
|
|