@ -1098,8 +1098,8 @@
< thead class = "table-light text-secondary fw-bold" style = "font-size: 0.75rem;" >
< tr id = "summary-thead-tr" >
< th style = "background-color: #f8fafc; color: #475569;" > Total No of Bills< / th >
< th style = "background-color: #f0fdf4; color: #166534;" > Completed File s< / th >
< th style = "background-color: #fef2f2; color: #991b1b;" > Pending File s< / th >
< th style = "background-color: #f0fdf4; color: #166534;" > Completed Bill s< / th >
< th style = "background-color: #fef2f2; color: #991b1b;" > Pending Bill s< / th >
< th style = "background-color: #fafaf9; color: #44403c;" > 1 to 15 Days< / th >
< th style = "background-color: #fafaf9; color: #44403c;" > 16 to 30 Days< / th >
< th style = "background-color: #fafaf9; color: #44403c;" > 31 to 60 Days< / th >
@ -1114,11 +1114,11 @@
style="background-color: #f8fafc;"
onclick="openModalForCount('total', null, 'Total No of Bills')">0< / td >
< td id = "summary-completed" class = "cursor-pointer text-success"
onclick="openModalForCount('completed_custom', null, 'Completed File s')">0
onclick="openModalForCount('completed_custom', null, 'Completed Bill s')">0
< / td >
< td id = "summary-pending" class = "cursor-pointer text-danger"
style="color: #991b1b; font-weight: bold;"
onclick="openModalForCount('pending_custom', null, 'Pending File s')">0< / td >
onclick="openModalForCount('pending_custom', null, 'Pending Bill s')">0< / td >
< td id = "summary-1-15" class = "cursor-pointer"
onclick="openModalForCount('age', [1, 15], 'Age: 1 to 15 Days')">0< / td >
< td id = "summary-16-30" class = "cursor-pointer"
@ -1183,7 +1183,7 @@
< tr id = "vendor-breakdown-thead-tr" >
< th style = "text-align: left; background-color: #f8fafc;" > Vendor Name< / th >
< th style = "background-color: #f8fafc;" > Total No of Bills< / th >
< th style = "background-color: #f0fdf4;" > Completed File s< / th >
< th style = "background-color: #f0fdf4;" > Completed Bill s< / th >
< th style = "background-color: #fffbeb;" > Awaiting Details< / th >
< th style = "background-color: #f0f9ff;" > Pending with Dept< / th >
< th style = "background-color: #fef2f2;" > Pending< / th >
@ -2024,8 +2024,8 @@
if (summaryTheadTr) {
let summaryHeadHtml = `
< th style = "background-color: #f8fafc; color: #475569;" > Total No of Bills< / th >
< th style = "background-color: #f0fdf4; color: #166534;" > Completed File s< / th >
< th style = "background-color: #fef2f2; color: #991b1b;" > Pending File s< / th >
< th style = "background-color: #f0fdf4; color: #166534;" > Completed Bill s< / th >
< th style = "background-color: #fef2f2; color: #991b1b;" > Pending Bill s< / th >
`;
summaryHeadHtml += `
< th style = "background-color: #fafaf9; color: #44403c;" > 1 to 15 Days< / th >
@ -2053,14 +2053,14 @@
vendorHeadHtml += `< th style = "background-color: ${style.bg}; color: ${style.text};" > ${escapeHtml(s.status_name)}< / th > `;
});
// Pending file s column header with click toggle icon
// Pending Bill s column header with click toggle icon
const toggleIcon = showPendingSubBreakdown ? 'fa-angles-left' : 'fa-angles-right';
const titleText = showPendingSubBreakdown ? 'Click to hide status breakdown' : 'Click to show Pending with IT Cell & Pending with Others breakdown';
const subDNone = showPendingSubBreakdown ? '' : 'd-none';
vendorHeadHtml += `
< th class = "cursor-pointer" style = "background-color: #fef2f2; color: #991b1b; cursor: pointer;" onclick = "togglePendingSubBreakdown()" title = "${titleText}" >
Pending file s < i class = "fa-solid ${toggleIcon} ms-1 text-muted" style = "transition: transform 0.2s;" > < / i >
Pending Bill s < i class = "fa-solid ${toggleIcon} ms-1 text-muted" style = "transition: transform 0.2s;" > < / i >
< / th >
`;
@ -3219,8 +3219,8 @@
let summaryBodyHtml = `
< td id = "summary-total" class = "cursor-pointer text-primary" style = "background-color: #f8fafc;" onclick = "openModalForCount('total', null, 'Total No of Bills')" > ${total}< / td >
< td id = "summary-completed" class = "cursor-pointer text-success-dark" onclick = "openModalForCount('completed_custom', null, 'Completed File s')" > ${completedTotal}< / td >
< td id = "summary-pending" class = "cursor-pointer text-danger-dark" onclick = "openModalForCount('pending_custom', null, 'Pending File s')" > ${pendingTotal}< / td >
< td id = "summary-completed" class = "cursor-pointer text-success-dark" onclick = "openModalForCount('completed_custom', null, 'Completed Bill s')" > ${completedTotal}< / td >
< td id = "summary-pending" class = "cursor-pointer text-danger-dark" onclick = "openModalForCount('pending_custom', null, 'Pending Bill s')" > ${pendingTotal}< / td >
`;
summaryBodyHtml += `
< td id = "summary-1-15" class = "cursor-pointer" onclick = "openModalForCount('age', [1, 15], 'Age: 1 to 15 Days')" > ${age_1_15}< / td >
@ -3442,7 +3442,7 @@
// 2. Custom "Pending" column
const sumPending = sumTotal - sumCompleted;
totalTrHtml += `< td class = "cursor-pointer text-danger-dark fw-bold" onclick = "openModalForCount('pending_custom', null, 'Pending File s')" > ${sumPending}< / td > `;
totalTrHtml += `< td class = "cursor-pointer text-danger-dark fw-bold" onclick = "openModalForCount('pending_custom', null, 'Pending Bill s')" > ${sumPending}< / td > `;
// 3. Sub-breakdown: Pending with IT Cell & Pending with Others
totalTrHtml += `
@ -3797,7 +3797,7 @@
}
if (clickType === 'age') {
// Exclude completed file s for pending age column clicks
// Exclude Completed Bill s for pending age column clicks
const rowStatusStr = String(row.status || '').trim();
const isCompleted = activeStatus.filter(s => getStatusKey(s.status_name) === 'completed').some(s =>
rowStatusStr === String(s.id) ||
@ -3893,7 +3893,7 @@
const rowVendor = String(row.resolved_vendor || row.vendor_name || 'Unknown').trim();
if (rowVendor !== vendorName) return false;
// Exclude completed file s for pending vendor age clicks
// Exclude Completed Bill s for pending vendor age clicks
const rowStatusStr = String(row.status || '').trim();
const isCompleted = activeStatus.filter(s => getStatusKey(s.status_name) === 'completed').some(s =>
rowStatusStr === String(s.id) ||