|
|
@ -2,56 +2,58 @@ |
|
|
pageEncoding="UTF-8"%> |
|
|
pageEncoding="UTF-8"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.dto.User, java.util.*"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.dto.User, java.util.*"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.dto.Bill,java.net.*"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.dto.Bill,java.net.*"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.util.TimeUtils, java.text.*"%> |
|
|
|
|
|
|
|
|
<%@ page language="java" |
|
|
|
|
|
import="com.cont_mgmt.util.TimeUtils, java.text.*"%> |
|
|
<%@ page language="java" |
|
|
<%@ page language="java" |
|
|
import="com.cont_mgmt.wrapper.BillDetListWrapper"%> |
|
|
import="com.cont_mgmt.wrapper.BillDetListWrapper"%> |
|
|
<%@ page language="java" |
|
|
<%@ page language="java" |
|
|
import="com.cont_mgmt.wrapper.ContDetListWrapper"%> |
|
|
import="com.cont_mgmt.wrapper.ContDetListWrapper"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.dto.Contract"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.dto.Contract"%> |
|
|
<%@ page language="java" import="com.cont_mgmt.service.ExistExtContDetService"%> |
|
|
|
|
|
|
|
|
<%@ page language="java" |
|
|
|
|
|
import="com.cont_mgmt.service.ExistExtContDetService"%> |
|
|
<% |
|
|
<% |
|
|
// Check if the user is logged in by checking if the user object is not null |
|
|
// Check if the user is logged in by checking if the user object is not null |
|
|
User user = (User) session.getAttribute("user"); |
|
|
|
|
|
if (user == null || user.getUserName().equals("")) { |
|
|
|
|
|
// If not logged in, redirect to logout.jsp |
|
|
|
|
|
response.sendRedirect("logout.jsp"); |
|
|
|
|
|
return; // Stop further execution of the page |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String errorMessage = (String) request.getAttribute("errorMessage"); |
|
|
|
|
|
String reqSrc = (String) request.getAttribute("reqSrc"); |
|
|
|
|
|
String vendName = (String) request.getAttribute("vendName"); |
|
|
|
|
|
|
|
|
|
|
|
Integer lockPercent = 0; |
|
|
|
|
|
Integer lockAmount = 0; |
|
|
|
|
|
|
|
|
|
|
|
// Call the TimeUtils |
|
|
|
|
|
TimeUtils timeUtils = new TimeUtils(); |
|
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); |
|
|
|
|
|
Date currentDate = sdf.parse(sdf.format(new Date())); |
|
|
|
|
|
|
|
|
|
|
|
// Call the ExistExtContDetService |
|
|
|
|
|
ExistExtContDetService existExtContDetService = new ExistExtContDetService(); |
|
|
|
|
|
|
|
|
|
|
|
// Retrieve the BillDetListWrapper and ContractDetListWrapper attribute set by the servlet |
|
|
|
|
|
BillDetListWrapper billDetListWrapper = (BillDetListWrapper) request.getAttribute("billListWrapper"); |
|
|
|
|
|
ContDetListWrapper contDetListWrapper = (ContDetListWrapper) request.getAttribute("contListWrapper"); |
|
|
|
|
|
|
|
|
|
|
|
if (billDetListWrapper != null && !billDetListWrapper.getBillDetList().isEmpty()) { |
|
|
|
|
|
for (Bill bill : billDetListWrapper.getBillDetList()) { |
|
|
|
|
|
lockPercent += (int) Math.round(bill.getPercentApplied()); |
|
|
|
|
|
lockAmount += (int) Math.round(bill.getTotAmt()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Integer thresholdAmt = (int) Math.round(contDetListWrapper.getContList().get(0).getContAmt()); |
|
|
|
|
|
String contNum = contDetListWrapper.getContList().get(0).getContNum(); |
|
|
|
|
|
Integer isExtendedFlag = (int) Math.round(contDetListWrapper.getContList().get(0).getIsExtended()); |
|
|
|
|
|
List<Contract> extContList = new ArrayList<Contract>(); |
|
|
|
|
|
if (isExtendedFlag == 1) { |
|
|
|
|
|
extContList = existExtContDetService.getExtContDet(null, contNum); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
User user = (User) session.getAttribute("user"); |
|
|
|
|
|
if (user == null || user.getUserName().equals("")) { |
|
|
|
|
|
// If not logged in, redirect to logout.jsp |
|
|
|
|
|
response.sendRedirect("logout.jsp"); |
|
|
|
|
|
return; // Stop further execution of the page |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String errorMessage = (String) request.getAttribute("errorMessage"); |
|
|
|
|
|
String reqSrc = (String) request.getAttribute("reqSrc"); |
|
|
|
|
|
String vendName = (String) request.getAttribute("vendName"); |
|
|
|
|
|
|
|
|
|
|
|
Integer lockPercent = 0; |
|
|
|
|
|
Integer lockAmount = 0; |
|
|
|
|
|
|
|
|
|
|
|
// Call the TimeUtils |
|
|
|
|
|
TimeUtils timeUtils = new TimeUtils(); |
|
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); |
|
|
|
|
|
Date currentDate = sdf.parse(sdf.format(new Date())); |
|
|
|
|
|
|
|
|
|
|
|
// Call the ExistExtContDetService |
|
|
|
|
|
ExistExtContDetService existExtContDetService = new ExistExtContDetService(); |
|
|
|
|
|
|
|
|
|
|
|
// Retrieve the BillDetListWrapper and ContractDetListWrapper attribute set by the servlet |
|
|
|
|
|
BillDetListWrapper billDetListWrapper = (BillDetListWrapper) request.getAttribute("billListWrapper"); |
|
|
|
|
|
ContDetListWrapper contDetListWrapper = (ContDetListWrapper) request.getAttribute("contListWrapper"); |
|
|
|
|
|
|
|
|
|
|
|
if (billDetListWrapper != null && !billDetListWrapper.getBillDetList().isEmpty()) { |
|
|
|
|
|
for (Bill bill : billDetListWrapper.getBillDetList()) { |
|
|
|
|
|
lockPercent += (int) Math.round(bill.getPercentApplied()); |
|
|
|
|
|
lockAmount += (int) Math.round(bill.getTotAmt()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Integer thresholdAmt = (int) Math.round(contDetListWrapper.getContList().get(0).getContAmt()); |
|
|
|
|
|
String contNum = contDetListWrapper.getContList().get(0).getContNum(); |
|
|
|
|
|
Integer isExtendedFlag = (int) Math.round(contDetListWrapper.getContList().get(0).getIsExtended()); |
|
|
|
|
|
List<Contract> extContList = new ArrayList<Contract>(); |
|
|
|
|
|
if (isExtendedFlag == 1) { |
|
|
|
|
|
extContList = existExtContDetService.getExtContDet(null, contNum); |
|
|
|
|
|
} |
|
|
%> |
|
|
%> |
|
|
<!DOCTYPE html> |
|
|
<!DOCTYPE html> |
|
|
<html> |
|
|
<html> |
|
|
@ -61,14 +63,15 @@ |
|
|
<title>Contract Management System</title> |
|
|
<title>Contract Management System</title> |
|
|
<link rel="stylesheet" type="text/css" href="css/body-form-style.css"> |
|
|
<link rel="stylesheet" type="text/css" href="css/body-form-style.css"> |
|
|
<link rel="stylesheet" type="text/css" href="css/datatable-styles.css"> |
|
|
<link rel="stylesheet" type="text/css" href="css/datatable-styles.css"> |
|
|
<link rel="stylesheet" type="text/css" href="css/exist-bill-det-display.css"> |
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" |
|
|
|
|
|
href="css/exist-bill-det-display.css"> |
|
|
<link rel="stylesheet" type="text/css" href="css/btn-secondary.css"> |
|
|
<link rel="stylesheet" type="text/css" href="css/btn-secondary.css"> |
|
|
<%@include file="includes/header.jsp"%> |
|
|
<%@include file="includes/header.jsp"%> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
|
<% |
|
|
|
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
|
|
|
%> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
|
|
|
%> |
|
|
<%@include file="includes/exist_navbar.jsp"%> |
|
|
<%@include file="includes/exist_navbar.jsp"%> |
|
|
<% |
|
|
<% |
|
|
} else if (reqSrc.equalsIgnoreCase("exp_cont_det_display_page")) { |
|
|
} else if (reqSrc.equalsIgnoreCase("exp_cont_det_display_page")) { |
|
|
@ -83,12 +86,12 @@ |
|
|
%> |
|
|
%> |
|
|
<div class="container mt-4"> |
|
|
<div class="container mt-4"> |
|
|
<div class="form-container"> |
|
|
<div class="form-container"> |
|
|
<div class="header-row"> |
|
|
|
|
|
<button class="back-button" onclick="goBack()">← Back</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<% |
|
|
|
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
|
|
|
%> |
|
|
|
|
|
|
|
|
<div class="header-row"> |
|
|
|
|
|
<button class="back-button" onclick="goBack()">← Back</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<% |
|
|
|
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
|
|
|
%> |
|
|
<h2 class="cont-title">Contract Details</h2> |
|
|
<h2 class="cont-title">Contract Details</h2> |
|
|
<% |
|
|
<% |
|
|
} else if (reqSrc.equalsIgnoreCase("exp_cont_det_display_page")) { |
|
|
} else if (reqSrc.equalsIgnoreCase("exp_cont_det_display_page")) { |
|
|
@ -97,11 +100,11 @@ |
|
|
<% |
|
|
<% |
|
|
} else if (reqSrc.equalsIgnoreCase("cust_rep_det_display_page")) { |
|
|
} else if (reqSrc.equalsIgnoreCase("cust_rep_det_display_page")) { |
|
|
%> |
|
|
%> |
|
|
<h2 class="cont-title">Custom Reports Contract Details</h2> |
|
|
|
|
|
|
|
|
<h2 class="cont-title">Custom Reports Contract Details</h2> |
|
|
<% |
|
|
<% |
|
|
} |
|
|
|
|
|
if (contDetListWrapper != null && !contDetListWrapper.getContList().isEmpty()) { |
|
|
|
|
|
%> |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (contDetListWrapper != null && !contDetListWrapper.getContList().isEmpty()) { |
|
|
|
|
|
%> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<div class="col-md-6"> |
|
|
<div class="col-md-6"> |
|
|
<p> |
|
|
<p> |
|
|
@ -110,9 +113,8 @@ |
|
|
<input type="hidden" id="hid_vend_id" name="hid_vend_id" |
|
|
<input type="hidden" id="hid_vend_id" name="hid_vend_id" |
|
|
value="<%=contDetListWrapper.getContList().get(0).getVendId()%>"> |
|
|
value="<%=contDetListWrapper.getContList().get(0).getVendId()%>"> |
|
|
<input type="hidden" id="hid_vend_name" name="hid_vend_name" |
|
|
<input type="hidden" id="hid_vend_name" name="hid_vend_name" |
|
|
value="<%=vendName%>"> |
|
|
|
|
|
<input type="hidden" id="hid_user_id" name="hid_user_id" |
|
|
|
|
|
value="<%=user.getUserId()%>"> |
|
|
|
|
|
|
|
|
value="<%=vendName%>"> <input type="hidden" |
|
|
|
|
|
id="hid_user_id" name="hid_user_id" value="<%=user.getUserId()%>"> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
@ -125,19 +127,21 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<div class="col-12"> |
|
|
|
|
|
<p><Strong>Work Order Amount :</Strong> |
|
|
|
|
|
₹ <%=String.format("%,.2f", contDetListWrapper.getContList().get(0).getContAmt())%> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="col-12"> |
|
|
|
|
|
<p> |
|
|
|
|
|
<Strong>Work Order Amount :</Strong> ₹ |
|
|
|
|
|
<%=String.format("%,.2f", contDetListWrapper.getContList().get(0).getContAmt())%> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div id="fileRow" class="row mb-3 d-flex justify-content-between text-center"> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
|
|
|
|
|
|
<div id="fileRow" |
|
|
|
|
|
class="row mb-3 d-flex justify-content-between text-center"> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
<p> |
|
|
<strong>AS File : </strong> |
|
|
<strong>AS File : </strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','AS', |
|
|
onclick="viewFileInModal('<%=contNum%>','AS', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContASFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContASFilePath(), "UTF-8").replace("+", |
|
|
|
|
|
"%20")%>')"> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
@ -146,23 +150,23 @@ |
|
|
if (!contDetListWrapper.getContList().get(0).getContLOAFilePath().trim().equals("-")) { |
|
|
if (!contDetListWrapper.getContList().get(0).getContLOAFilePath().trim().equals("-")) { |
|
|
%> |
|
|
%> |
|
|
<div class="col-12 col-md-3"> |
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
|
|
|
|
|
|
<p> |
|
|
<strong>LOA File :</strong> |
|
|
<strong>LOA File :</strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','LOA', |
|
|
onclick="viewFileInModal('<%=contNum%>','LOA', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContLOAFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContLOAFilePath(), "UTF-8").replace("+", |
|
|
|
|
|
"%20")%>')"> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
<div class="col-12 col-md-3"> |
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
|
|
|
|
|
|
<p> |
|
|
<strong>Agreement File :</strong> |
|
|
<strong>Agreement File :</strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','Agreement', |
|
|
onclick="viewFileInModal('<%=contNum%>','Agreement', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContAgreeFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContAgreeFilePath(), "UTF-8") |
|
|
|
|
|
.replace("+", "%20")%>')"> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
@ -171,12 +175,12 @@ |
|
|
} else { |
|
|
} else { |
|
|
%> |
|
|
%> |
|
|
<div class="col-12 col-md-3"> |
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
|
|
|
|
|
|
<p> |
|
|
<strong>Agreement File :</strong> |
|
|
<strong>Agreement File :</strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','Agreement', |
|
|
onclick="viewFileInModal('<%=contNum%>','Agreement', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContAgreeFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContAgreeFilePath(), "UTF-8") |
|
|
|
|
|
.replace("+", "%20")%>')"> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-light fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
@ -189,70 +193,73 @@ |
|
|
<strong>WO File : </strong> |
|
|
<strong>WO File : </strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','Work-Order', |
|
|
onclick="viewFileInModal('<%=contNum%>','Work-Order', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContWOFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContWOFilePath(), "UTF-8").replace("+", |
|
|
|
|
|
"%20")%>')"> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div id="fileRow2" class="row mb-3 d-flex justify-content-between text-center"> |
|
|
|
|
|
<% |
|
|
|
|
|
if (!contDetListWrapper.getContList().get(0).getContEMDFilePath().trim().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
|
|
|
|
|
|
<div id="fileRow2" |
|
|
|
|
|
class="row mb-3 d-flex justify-content-between text-center"> |
|
|
|
|
|
<% |
|
|
|
|
|
if (!contDetListWrapper.getContList().get(0).getContEMDFilePath().trim().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
<p> |
|
|
<strong>EMD File : </strong> |
|
|
<strong>EMD File : </strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','EMD', |
|
|
onclick="viewFileInModal('<%=contNum%>','EMD', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContEMDFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContEMDFilePath(), "UTF-8").replace("+", |
|
|
|
|
|
"%20")%>')"> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
<% |
|
|
|
|
|
} if (!contDetListWrapper.getContList().get(0).getContSDFilePath().trim().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
if (!contDetListWrapper.getContList().get(0).getContSDFilePath().trim().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
<p> |
|
|
<strong>SD File : </strong> |
|
|
<strong>SD File : </strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','SD', |
|
|
onclick="viewFileInModal('<%=contNum%>','SD', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContSDFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContSDFilePath(), "UTF-8").replace("+", |
|
|
|
|
|
"%20")%>')"> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
<% |
|
|
|
|
|
} if (!contDetListWrapper.getContList().get(0).getContASDFilePath().trim().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
if (!contDetListWrapper.getContList().get(0).getContASDFilePath().trim().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<div class="col-12 col-md-3"> |
|
|
<p> |
|
|
<p> |
|
|
<strong>ASD File : </strong> |
|
|
<strong>ASD File : </strong> |
|
|
<button class="btn" |
|
|
<button class="btn" |
|
|
onclick="viewFileInModal('<%=contNum%>','ASD', |
|
|
onclick="viewFileInModal('<%=contNum%>','ASD', |
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContASDFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20")%>')"> |
|
|
|
|
|
|
|
|
'<%=java.net.URLEncoder.encode(contDetListWrapper.getContList().get(0).getContASDFilePath(), "UTF-8").replace("+", |
|
|
|
|
|
"%20")%>')"> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
<i class="fas fa-eye" style="cursor: pointer"></i> |
|
|
</button> |
|
|
</button> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
</div> |
|
|
</div> |
|
|
<% |
|
|
<% |
|
|
} |
|
|
} |
|
|
%> |
|
|
%> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<div class="col-md-6"> |
|
|
|
|
|
<p> |
|
|
|
|
|
|
|
|
<div class="col-md-6"> |
|
|
|
|
|
<p> |
|
|
<strong>Remarks :</strong> |
|
|
<strong>Remarks :</strong> |
|
|
<%=contDetListWrapper.getContList().get(0).getContRmrk()%> |
|
|
<%=contDetListWrapper.getContList().get(0).getContRmrk()%> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<h2 class="bill-title">Bill Details</h2> |
|
|
<h2 class="bill-title">Bill Details</h2> |
|
|
<% |
|
|
<% |
|
|
@ -262,8 +269,7 @@ |
|
|
<!-- Adds spacing and a responsive layout --> |
|
|
<!-- Adds spacing and a responsive layout --> |
|
|
<div class="col-12 col-md-8 mb-2 mb-md-0"> |
|
|
<div class="col-12 col-md-8 mb-2 mb-md-0"> |
|
|
<!-- Buttons on the left --> |
|
|
<!-- Buttons on the left --> |
|
|
<div class="btn-group" role="group" |
|
|
|
|
|
aria-label="Options"> |
|
|
|
|
|
|
|
|
<div class="btn-group" role="group" aria-label="Options"> |
|
|
<% |
|
|
<% |
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
%> |
|
|
%> |
|
|
@ -279,15 +285,14 @@ |
|
|
</div> |
|
|
</div> |
|
|
<p class="text-danger text-center"><%=errorMessage%></p> |
|
|
<p class="text-danger text-center"><%=errorMessage%></p> |
|
|
<% |
|
|
<% |
|
|
} else if ((billDetListWrapper == null) && (contDetListWrapper != null || |
|
|
|
|
|
!contDetListWrapper.getContList().isEmpty())) { |
|
|
|
|
|
|
|
|
} else if ((billDetListWrapper == null) |
|
|
|
|
|
&& (contDetListWrapper != null || !contDetListWrapper.getContList().isEmpty())) { |
|
|
%> |
|
|
%> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<!-- Adds spacing and a responsive layout --> |
|
|
<!-- Adds spacing and a responsive layout --> |
|
|
<div class="col-12 col-md-8 mb-2 mb-md-0"> |
|
|
<div class="col-12 col-md-8 mb-2 mb-md-0"> |
|
|
<!-- Buttons on the left --> |
|
|
<!-- Buttons on the left --> |
|
|
<div class="btn-group" role="group" |
|
|
|
|
|
aria-label="Options"> |
|
|
|
|
|
|
|
|
<div class="btn-group" role="group" aria-label="Options"> |
|
|
<% |
|
|
<% |
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
%> |
|
|
%> |
|
|
@ -305,23 +310,25 @@ |
|
|
<p>No results found for the given criteria.</p> |
|
|
<p>No results found for the given criteria.</p> |
|
|
</div> |
|
|
</div> |
|
|
<% |
|
|
<% |
|
|
} if (billDetListWrapper != null && !billDetListWrapper.getBillDetList().isEmpty()) { |
|
|
|
|
|
Integer pos = billDetListWrapper.getBillDetList().size() - 1; |
|
|
|
|
|
String rtgsFile = billDetListWrapper.getBillDetList().get(pos).getRtgsFilePath(); |
|
|
|
|
|
String sdFile = contDetListWrapper.getContList().get(0).getContSDFilePath(); |
|
|
|
|
|
Integer amtDueFlag = (int) Math.round(billDetListWrapper.getBillDetList().get(pos).getAmtDue()); |
|
|
|
|
|
Integer diffInDaysFlag = Integer.parseInt(timeUtils.getExpiryDays(sdf, currentDate, |
|
|
|
|
|
contDetListWrapper.getContList().get(0).getContEndDate())); |
|
|
|
|
|
boolean rtgsFileFlag = rtgsFile.trim().equals("-") ? true : false; |
|
|
|
|
|
boolean sdFileFlag = sdFile.trim().equals("-") ? true : false; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (billDetListWrapper != null && !billDetListWrapper.getBillDetList().isEmpty()) { |
|
|
|
|
|
Integer pos = billDetListWrapper.getBillDetList().size() - 1; |
|
|
|
|
|
String rtgsFile = billDetListWrapper.getBillDetList().get(pos).getRtgsFilePath(); |
|
|
|
|
|
String billFile = billDetListWrapper.getBillDetList().get(pos).getBillFilePath(); |
|
|
|
|
|
String sdFile = contDetListWrapper.getContList().get(0).getContSDFilePath(); |
|
|
|
|
|
Integer amtDueFlag = (int) Math.round(billDetListWrapper.getBillDetList().get(pos).getAmtDue()); |
|
|
|
|
|
Integer diffInDaysFlag = Integer |
|
|
|
|
|
.parseInt(timeUtils.getExpiryDays(sdf, currentDate, contDetListWrapper.getContList().get(0).getContEndDate())); |
|
|
|
|
|
boolean rtgsFileFlag = rtgsFile.trim().equals("-") ? true : false; |
|
|
|
|
|
boolean billFileFlag = billFile.trim().equals("-") ? true : false; |
|
|
|
|
|
boolean sdFileFlag = sdFile.trim().equals("-") ? true : false; |
|
|
%> |
|
|
%> |
|
|
<!-- Button and Filter Bar --> |
|
|
<!-- Button and Filter Bar --> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<!-- Adds spacing and a responsive layout --> |
|
|
<!-- Adds spacing and a responsive layout --> |
|
|
<div class="col-12 col-md-8 mb-2 mb-md-0"> |
|
|
<div class="col-12 col-md-8 mb-2 mb-md-0"> |
|
|
<!-- Buttons on the left --> |
|
|
<!-- Buttons on the left --> |
|
|
<div class="btn-group" role="group" |
|
|
|
|
|
aria-label="Options"> |
|
|
|
|
|
|
|
|
<div class="btn-group" role="group" aria-label="Options"> |
|
|
<button class="btn btn-secondary" id="export_excel" |
|
|
<button class="btn btn-secondary" id="export_excel" |
|
|
name="export_excel"> |
|
|
name="export_excel"> |
|
|
<i class="fas fa-file-excel"></i> Export Excel |
|
|
<i class="fas fa-file-excel"></i> Export Excel |
|
|
@ -331,37 +338,57 @@ |
|
|
<i class="fas fa-file-pdf"></i> Export PDF |
|
|
<i class="fas fa-file-pdf"></i> Export PDF |
|
|
</button> |
|
|
</button> |
|
|
<% |
|
|
<% |
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
|
|
|
if (lockPercent < 100 && lockAmount < thresholdAmt) { |
|
|
|
|
|
|
|
|
if (reqSrc.equalsIgnoreCase("exist_cont_det_display_page")) { |
|
|
|
|
|
if (lockPercent < 100 && lockAmount < thresholdAmt) { |
|
|
%> |
|
|
%> |
|
|
<button class="btn btn-secondary" id="new_bill_det_btn" |
|
|
<button class="btn btn-secondary" id="new_bill_det_btn" |
|
|
name="new_bill_det_btn" onclick="redirectToAddNewBillPage()"> |
|
|
name="new_bill_det_btn" onclick="redirectToAddNewBillPage()"> |
|
|
<i class="fas fa-circle-plus"></i> Add Bill |
|
|
<i class="fas fa-circle-plus"></i> Add Bill |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
<button class="btn btn-secondary" id="upd_bill_det_btn" |
|
|
|
|
|
name="upd_bill_det_btn" onclick="redirectToUpdateBillPage()"> |
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload Payment |
|
|
|
|
|
</button> |
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
<i class="fas fa-light fa-pen"></i> Modify Bill |
|
|
|
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload RTGS |
|
|
</button> |
|
|
</button> |
|
|
<% |
|
|
<% |
|
|
} else if (lockAmount < thresholdAmt) { |
|
|
|
|
|
|
|
|
} else if (lockAmount < thresholdAmt) { |
|
|
%> |
|
|
%> |
|
|
<button class="btn btn-secondary" id="new_bill_det_btn" |
|
|
<button class="btn btn-secondary" id="new_bill_det_btn" |
|
|
name="new_bill_det_btn" onclick="redirectToAddNewBillPage()"> |
|
|
name="new_bill_det_btn" onclick="redirectToAddNewBillPage()"> |
|
|
<i class="fas fa-circle-plus"></i> Add Bill |
|
|
<i class="fas fa-circle-plus"></i> Add Bill |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
<button class="btn btn-secondary" id="upd_bill_det_btn" |
|
|
|
|
|
name="upd_bill_det_btn" onclick="redirectToUpdateBillPage()"> |
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload Payment |
|
|
|
|
|
</button> |
|
|
|
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
|
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload RTGS |
|
|
|
|
|
</button> |
|
|
|
|
|
<% |
|
|
|
|
|
} else if (rtgsFileFlag && billFileFlag) { |
|
|
|
|
|
%> |
|
|
|
|
|
<button class="btn btn-secondary" id="upd_bill_det_btn" |
|
|
|
|
|
name="upd_bill_det_btn" onclick="redirectToUpdateBillPage()"> |
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload Payment |
|
|
|
|
|
</button> |
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
<i class="fas fa-light fa-pen"></i> Modify Bill |
|
|
|
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload RTGS |
|
|
</button> |
|
|
</button> |
|
|
<% |
|
|
<% |
|
|
} else if (rtgsFileFlag) { |
|
|
} else if (rtgsFileFlag) { |
|
|
%> |
|
|
%> |
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
<button class="btn btn-secondary" id="modify_bill_det_btn" |
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
name="modify_bill_det_btn" onclick="redirectToModifyBillPage()"> |
|
|
<i class="fas fa-light fa-pen"></i> Modify Bill |
|
|
|
|
|
|
|
|
<i class="fas fa-light fa-pen"></i> Upload RTGS |
|
|
</button> |
|
|
</button> |
|
|
<% |
|
|
<% |
|
|
} if ((amtDueFlag <= 0 || diffInDaysFlag < 0) && (sdFileFlag)) { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if ((amtDueFlag <= 0 || diffInDaysFlag < 0) && (sdFileFlag)) { |
|
|
%> |
|
|
%> |
|
|
<button class="btn btn-secondary" id="close_cont_det_btn" |
|
|
<button class="btn btn-secondary" id="close_cont_det_btn" |
|
|
name="close_cont_det_btn" onclick="redirectToCloseContract()"> |
|
|
name="close_cont_det_btn" onclick="redirectToCloseContract()"> |
|
|
@ -369,16 +396,16 @@ |
|
|
</button> |
|
|
</button> |
|
|
<% |
|
|
<% |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
%> |
|
|
%> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<% |
|
|
<% |
|
|
if (isExtendedFlag == 1) { |
|
|
if (isExtendedFlag == 1) { |
|
|
%> |
|
|
%> |
|
|
<div class="col-md-8" style="padding-top:5px"> |
|
|
|
|
|
<div class="btn-group" role="group" aria-label="Options"> |
|
|
|
|
|
<button class="btn btn-secondary" id="view_ext_det_btn" |
|
|
|
|
|
|
|
|
<div class="col-md-8" style="padding-top: 5px"> |
|
|
|
|
|
<div class="btn-group" role="group" aria-label="Options"> |
|
|
|
|
|
<button class="btn btn-secondary" id="view_ext_det_btn" |
|
|
name="view_ext_det_btn" onclick="redirectToViewExtension()"> |
|
|
name="view_ext_det_btn" onclick="redirectToViewExtension()"> |
|
|
<i class="fa-solid fa-folder-open"></i> View Ext.Bills |
|
|
<i class="fa-solid fa-folder-open"></i> View Ext.Bills |
|
|
</button> |
|
|
</button> |
|
|
@ -417,111 +444,158 @@ |
|
|
<th>SNA Ret.Amount</th> |
|
|
<th>SNA Ret.Amount</th> |
|
|
<th>Total Amount</th> |
|
|
<th>Total Amount</th> |
|
|
<% |
|
|
<% |
|
|
if (contDetListWrapper.getContList().get(0) |
|
|
|
|
|
.getInvoiceBillTypeName() |
|
|
|
|
|
.equalsIgnoreCase("PERCENTAGE BASED PAYMENT")) { |
|
|
|
|
|
|
|
|
if (contDetListWrapper.getContList().get(0).getInvoiceBillTypeName().equalsIgnoreCase("PERCENTAGE BASED PAYMENT")) { |
|
|
%> |
|
|
%> |
|
|
<th>Percent Applied</th> |
|
|
<th>Percent Applied</th> |
|
|
<% |
|
|
<% |
|
|
} |
|
|
} |
|
|
%> |
|
|
%> |
|
|
<th>Balance To Be Claimed</th> |
|
|
<th>Balance To Be Claimed</th> |
|
|
|
|
|
<th>Days Passed after Invoice Upload</th> |
|
|
|
|
|
<th>Days Passed after Payment Upload</th> |
|
|
<th class="no-export">View Files</th> |
|
|
<th class="no-export">View Files</th> |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
<tbody> |
|
|
<tbody> |
|
|
<% |
|
|
|
|
|
double lastClaimedAmountDue = 0.0; |
|
|
|
|
|
boolean isFirstRow = true; |
|
|
|
|
|
|
|
|
|
|
|
for (Bill bill : billDetListWrapper.getBillDetList()) { |
|
|
|
|
|
boolean isClaimed = bill.getBillStatName().equalsIgnoreCase("CLAIMED"); |
|
|
|
|
|
double amtDue; |
|
|
|
|
|
if (isFirstRow) { |
|
|
|
|
|
// First row logic |
|
|
|
|
|
lastClaimedAmountDue = isClaimed ? bill.getAmtDue() : bill.getContAmt(); |
|
|
|
|
|
amtDue = lastClaimedAmountDue; |
|
|
|
|
|
isFirstRow = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
if (isClaimed) { |
|
|
|
|
|
// For claimed rows, deduct amount paid |
|
|
|
|
|
lastClaimedAmountDue -= bill.getAmtPaid(); |
|
|
|
|
|
} |
|
|
|
|
|
// For unclaimed rows, retain the lastClaimedAmountDue |
|
|
|
|
|
amtDue = lastClaimedAmountDue; |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td></td> |
|
|
|
|
|
<td><%= bill.getInvoiceBillingPeriod() %></td> |
|
|
|
|
|
<td><%= bill.getInvoiceStartDate() %></td> |
|
|
|
|
|
<td><%= bill.getInvoiceEndDate() %></td> |
|
|
|
|
|
<td><%= bill.getInvoiceBillDate() %></td> |
|
|
|
|
|
<td><%= bill.getBillStatName() %></td> |
|
|
|
|
|
<td>₹ |
|
|
|
|
|
<% |
|
|
|
|
|
double currentAmt = bill.getTotAmt() + bill.getAmtDue(); |
|
|
|
|
|
if (bill.getBillStatName().equals("CLAIMED")) { |
|
|
|
|
|
out.print(String.format("%,.2f", currentAmt)); |
|
|
|
|
|
} else { |
|
|
|
|
|
out.print(String.format("%,.2f", lastClaimedAmountDue)); |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getAmtExclTax()) %></td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getCgstAmt()) %></td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getSgstAmt()) %></td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getIgstAmt()) %></td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getItTaxAmt())%></td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getSnaRetAmt())%></td> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", bill.getTotAmt()) %></td> |
|
|
|
|
|
<% if (contDetListWrapper.getContList().get(0) |
|
|
|
|
|
.getInvoiceBillTypeName() |
|
|
|
|
|
.equalsIgnoreCase("PERCENTAGE BASED PAYMENT")) { %> |
|
|
|
|
|
<td><%= bill.getPercentApplied()%> %</td> |
|
|
|
|
|
<% } %> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", amtDue) %></td> <!-- Corrected Balance To Be Claimed --> |
|
|
|
|
|
<td class="no-export"> |
|
|
|
|
|
<div style="display: flex; gap :10px; align-items: center"> |
|
|
|
|
|
<button onclick="viewFileInModal('<%= contNum %>','Bill', |
|
|
|
|
|
'<%= java.net.URLEncoder.encode(bill.getBillFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20") %>')" style="cursor: pointer;" |
|
|
|
|
|
class="btn btn-secondary">Bill</button> |
|
|
|
|
|
<button onclick="viewFileInModal('<%= contNum %>','Invoice', |
|
|
|
|
|
'<%= java.net.URLEncoder.encode(bill.getInvoiceFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20") %>')" style="cursor: pointer;" |
|
|
|
|
|
class="btn btn-secondary">Invoice</button> |
|
|
|
|
|
<% if (!bill.getRtgsFilePath().equals("-")) { %> |
|
|
|
|
|
<button onclick="viewFileInModal('<%= contNum %>','RTGS', |
|
|
|
|
|
'<%= java.net.URLEncoder.encode(bill.getRtgsFilePath(), |
|
|
|
|
|
"UTF-8").replace("+", "%20") %>')" style="cursor: pointer;" |
|
|
|
|
|
class="btn btn-secondary">RTGS</button> |
|
|
|
|
|
<% } %> |
|
|
|
|
|
</div> |
|
|
|
|
|
</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<% } %> |
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
double lastClaimedAmountDue = 0.0; |
|
|
|
|
|
boolean isFirstRow = true; |
|
|
|
|
|
|
|
|
|
|
|
for (Bill bill : billDetListWrapper.getBillDetList()) { |
|
|
|
|
|
boolean isClaimed = bill.getBillStatName().equalsIgnoreCase("CLAIMED"); |
|
|
|
|
|
double amtDue; |
|
|
|
|
|
long diffMillis = 0L; |
|
|
|
|
|
long diffDays = 0L; |
|
|
|
|
|
if (isFirstRow) { |
|
|
|
|
|
// First row logic |
|
|
|
|
|
lastClaimedAmountDue = isClaimed ? bill.getAmtDue() : bill.getContAmt(); |
|
|
|
|
|
amtDue = lastClaimedAmountDue; |
|
|
|
|
|
isFirstRow = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
if (isClaimed) { |
|
|
|
|
|
// For claimed rows, deduct amount paid |
|
|
|
|
|
lastClaimedAmountDue -= bill.getAmtPaid(); |
|
|
|
|
|
} |
|
|
|
|
|
// For unclaimed rows, retain the lastClaimedAmountDue |
|
|
|
|
|
amtDue = lastClaimedAmountDue; |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td></td> |
|
|
|
|
|
<td><%=bill.getInvoiceBillingPeriod()%></td> |
|
|
|
|
|
<td><%=bill.getInvoiceStartDate()%></td> |
|
|
|
|
|
<td><%=bill.getInvoiceEndDate()%></td> |
|
|
|
|
|
<td><%=bill.getInvoiceBillDate()%></td> |
|
|
|
|
|
<td><%=bill.getBillStatName()%></td> |
|
|
|
|
|
<td>₹ <% |
|
|
|
|
|
double currentAmt = bill.getTotAmt() + bill.getAmtDue(); |
|
|
|
|
|
if (bill.getBillStatName().equals("CLAIMED")) { |
|
|
|
|
|
out.print(String.format("%,.2f", currentAmt)); |
|
|
|
|
|
} else { |
|
|
|
|
|
out.print(String.format("%,.2f", lastClaimedAmountDue)); |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
</td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getAmtExclTax())%></td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getCgstAmt())%></td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getSgstAmt())%></td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getIgstAmt())%></td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getItTaxAmt())%></td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getSnaRetAmt())%></td> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", bill.getTotAmt())%></td> |
|
|
|
|
|
<% |
|
|
|
|
|
if (contDetListWrapper.getContList().get(0).getInvoiceBillTypeName().equalsIgnoreCase("PERCENTAGE BASED PAYMENT")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<td><%=bill.getPercentApplied()%> %</td> |
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
<td>₹ <%=String.format("%,.2f", amtDue)%></td> |
|
|
|
|
|
<td><% |
|
|
|
|
|
if (bill.getBillFilePath().equals("-") && !bill.getInvoiceFilePath().equals("-")) { |
|
|
|
|
|
Date createdDate = sdf.parse(bill.getCreatedDate()); // e.g. 15-05-2026 |
|
|
|
|
|
diffMillis = currentDate.getTime() - createdDate.getTime(); |
|
|
|
|
|
diffDays = diffMillis / (1000 * 60 * 60 * 24); |
|
|
|
|
|
//out.println(diffDays); |
|
|
|
|
|
out.println("<span style='color:red;font-weight:bold;'>" + diffDays + " Days</span>"); |
|
|
|
|
|
} else if (!bill.getBillFilePath().equals("-") && !bill.getInvoiceFilePath().equals("-")) { |
|
|
|
|
|
out.println("Invoice and Payment Files are uploaded"); |
|
|
|
|
|
} |
|
|
|
|
|
diffMillis = 0L; |
|
|
|
|
|
diffDays = 0l; |
|
|
|
|
|
%></td> |
|
|
|
|
|
<td><% |
|
|
|
|
|
if (!bill.getInvoiceFilePath().equals("-") && !bill.getBillFilePath().equals("-") |
|
|
|
|
|
&& bill.getRtgsFilePath().equals("-")) { |
|
|
|
|
|
Date updatedDate = sdf.parse(bill.getUpdatedDate()); // e.g. 17-05-2026 |
|
|
|
|
|
diffMillis = currentDate.getTime() - updatedDate.getTime(); |
|
|
|
|
|
diffDays = diffMillis / (1000 * 60 * 60 * 24); |
|
|
|
|
|
//out.println(diffDays); |
|
|
|
|
|
out.println("<span style='color:red;font-weight:bold;'>" + diffDays + " Days</span>"); |
|
|
|
|
|
} else if (!bill.getInvoiceFilePath().equals("-") && !bill.getBillFilePath().equals("-") |
|
|
|
|
|
&& !bill.getRtgsFilePath().equals("-")) { |
|
|
|
|
|
out.println("Invoice, Payment and RTGS Files are uploaded"); |
|
|
|
|
|
} else if (!bill.getInvoiceFilePath().equals("-") && bill.getBillFilePath().equals("-") |
|
|
|
|
|
&& bill.getRtgsFilePath().equals("-")) { |
|
|
|
|
|
out.println("Only Invoice File Uploaded"); |
|
|
|
|
|
} |
|
|
|
|
|
diffMillis = 0L; |
|
|
|
|
|
diffDays = 0l; |
|
|
|
|
|
%></td> |
|
|
|
|
|
<!-- Corrected Balance To Be Claimed --> |
|
|
|
|
|
<td class="no-export"> |
|
|
|
|
|
<div style="display: flex; gap: 10px; align-items: center"> |
|
|
|
|
|
<% if (!bill.getBillFilePath().equals("-")) { %> |
|
|
|
|
|
<button |
|
|
|
|
|
onclick="viewFileInModal('<%=contNum%>','Bill', |
|
|
|
|
|
'<%=java.net.URLEncoder.encode(bill.getBillFilePath(), "UTF-8").replace("+", "%20")%>')" |
|
|
|
|
|
style="cursor: pointer;" class="btn btn-secondary">Bill</button> |
|
|
|
|
|
<% } %> |
|
|
|
|
|
<button |
|
|
|
|
|
onclick="viewFileInModal('<%=contNum%>','Invoice', |
|
|
|
|
|
'<%=java.net.URLEncoder.encode(bill.getInvoiceFilePath(), "UTF-8").replace("+", "%20")%>')" |
|
|
|
|
|
style="cursor: pointer;" class="btn btn-secondary">Invoice</button> |
|
|
|
|
|
<% |
|
|
|
|
|
if (!bill.getRtgsFilePath().equals("-")) { |
|
|
|
|
|
%> |
|
|
|
|
|
<button |
|
|
|
|
|
onclick="viewFileInModal('<%=contNum%>','RTGS', |
|
|
|
|
|
'<%=java.net.URLEncoder.encode(bill.getRtgsFilePath(), "UTF-8").replace("+", "%20")%>')" |
|
|
|
|
|
style="cursor: pointer;" class="btn btn-secondary">RTGS</button> |
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
</div> |
|
|
|
|
|
</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
</tbody> |
|
|
</table> |
|
|
</table> |
|
|
</div> |
|
|
</div> |
|
|
<%@include file="export_pdf.html"%> |
|
|
<%@include file="export_pdf.html"%> |
|
|
<% } %> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
|
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<div class="col-md-4 text-center" id="custom_info"></div> |
|
|
<div class="col-md-4 text-center" id="custom_info"></div> |
|
|
<div class="col-md-8" id="custom_pagination"></div> |
|
|
<div class="col-md-8" id="custom_pagination"></div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<input type="hidden" value="<%= contDetListWrapper.getContList().get(0).getWorkDesc() %>" |
|
|
|
|
|
name="hid_work_desc" id="hid_work_desc" class="form-control"> |
|
|
|
|
|
<input type="hidden" value="<%= reqSrc %>" class="form-control" id="hid_req_src" |
|
|
|
|
|
name="hid_req_src"> |
|
|
|
|
|
<input type="hidden" value="<%= request.getContextPath() %>/ExistExtBillDetServlet" |
|
|
|
|
|
name="hid_frm_action" id="hid_frm_action" class="form-control"> |
|
|
|
|
|
<input type="hidden" class="form-control" name="hid_type" id="hid_type" |
|
|
|
|
|
value="<%= reqSrc.equalsIgnoreCase("exp_cont_det_display_page") ? 1 : 0 %>"> |
|
|
|
|
|
|
|
|
<input type="hidden" |
|
|
|
|
|
value="<%=contDetListWrapper.getContList().get(0).getWorkDesc()%>" |
|
|
|
|
|
name="hid_work_desc" id="hid_work_desc" class="form-control"> |
|
|
|
|
|
<input type="hidden" value="<%=reqSrc%>" class="form-control" |
|
|
|
|
|
id="hid_req_src" name="hid_req_src"> <input type="hidden" |
|
|
|
|
|
value="<%=request.getContextPath()%>/ExistExtBillDetServlet" |
|
|
|
|
|
name="hid_frm_action" id="hid_frm_action" class="form-control"> |
|
|
|
|
|
<input type="hidden" class="form-control" name="hid_type" |
|
|
|
|
|
id="hid_type" |
|
|
|
|
|
value="<%=reqSrc.equalsIgnoreCase("exp_cont_det_display_page") ? 1 : 0%>"> |
|
|
</div> |
|
|
</div> |
|
|
<%@include file="pdf_modal.html" %> |
|
|
|
|
|
|
|
|
<%@include file="pdf_modal.html"%> |
|
|
<%@include file="includes/footer.jsp"%> |
|
|
<%@include file="includes/footer.jsp"%> |
|
|
<script src="js/go-back.js" type="text/javascript"></script> |
|
|
<script src="js/go-back.js" type="text/javascript"></script> |
|
|
<script src="js/adjust-row-class.js" type="text/javascript"></script> |
|
|
<script src="js/adjust-row-class.js" type="text/javascript"></script> |
|
|
|