|
|
@ -2,13 +2,15 @@ |
|
|
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"); |
|
|
User user = (User) session.getAttribute("user"); |
|
|
@ -61,7 +63,8 @@ |
|
|
<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> |
|
|
@ -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"> |
|
|
@ -126,18 +128,20 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="row mb-3"> |
|
|
<div class="row mb-3"> |
|
|
<div class="col-12"> |
|
|
<div class="col-12"> |
|
|
<p><Strong>Work Order Amount :</Strong> |
|
|
|
|
|
₹ <%=String.format("%,.2f", contDetListWrapper.getContList().get(0).getContAmt())%> |
|
|
|
|
|
|
|
|
<p> |
|
|
|
|
|
<Strong>Work Order Amount :</Strong> ₹ |
|
|
|
|
|
<%=String.format("%,.2f", contDetListWrapper.getContList().get(0).getContAmt())%> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div id="fileRow" class="row mb-3 d-flex justify-content-between text-center"> |
|
|
|
|
|
|
|
|
<div id="fileRow" |
|
|
|
|
|
class="row mb-3 d-flex justify-content-between text-center"> |
|
|
<div class="col-12 col-md-3"> |
|
|
<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> |
|
|
@ -150,8 +154,8 @@ |
|
|
<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> |
|
|
@ -161,8 +165,8 @@ |
|
|
<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> |
|
|
@ -175,8 +179,8 @@ |
|
|
<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,14 +193,15 @@ |
|
|
<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"> |
|
|
|
|
|
|
|
|
<div id="fileRow2" |
|
|
|
|
|
class="row mb-3 d-flex justify-content-between text-center"> |
|
|
<% |
|
|
<% |
|
|
if (!contDetListWrapper.getContList().get(0).getContEMDFilePath().trim().equals("-")) { |
|
|
if (!contDetListWrapper.getContList().get(0).getContEMDFilePath().trim().equals("-")) { |
|
|
%> |
|
|
%> |
|
|
@ -205,36 +210,38 @@ |
|
|
<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("-")) { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (!contDetListWrapper.getContList().get(0).getContSDFilePath().trim().equals("-")) { |
|
|
%> |
|
|
%> |
|
|
<div class="col-12 col-md-3"> |
|
|
<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("-")) { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (!contDetListWrapper.getContList().get(0).getContASDFilePath().trim().equals("-")) { |
|
|
%> |
|
|
%> |
|
|
<div class="col-12 col-md-3"> |
|
|
<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> |
|
|
@ -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,14 +310,17 @@ |
|
|
<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()) { |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (billDetListWrapper != null && !billDetListWrapper.getBillDetList().isEmpty()) { |
|
|
Integer pos = billDetListWrapper.getBillDetList().size() - 1; |
|
|
Integer pos = billDetListWrapper.getBillDetList().size() - 1; |
|
|
String rtgsFile = billDetListWrapper.getBillDetList().get(pos).getRtgsFilePath(); |
|
|
String rtgsFile = billDetListWrapper.getBillDetList().get(pos).getRtgsFilePath(); |
|
|
|
|
|
String billFile = billDetListWrapper.getBillDetList().get(pos).getBillFilePath(); |
|
|
String sdFile = contDetListWrapper.getContList().get(0).getContSDFilePath(); |
|
|
String sdFile = contDetListWrapper.getContList().get(0).getContSDFilePath(); |
|
|
Integer amtDueFlag = (int) Math.round(billDetListWrapper.getBillDetList().get(pos).getAmtDue()); |
|
|
Integer amtDueFlag = (int) Math.round(billDetListWrapper.getBillDetList().get(pos).getAmtDue()); |
|
|
Integer diffInDaysFlag = Integer.parseInt(timeUtils.getExpiryDays(sdf, currentDate, |
|
|
|
|
|
contDetListWrapper.getContList().get(0).getContEndDate())); |
|
|
|
|
|
|
|
|
Integer diffInDaysFlag = Integer |
|
|
|
|
|
.parseInt(timeUtils.getExpiryDays(sdf, currentDate, contDetListWrapper.getContList().get(0).getContEndDate())); |
|
|
boolean rtgsFileFlag = rtgsFile.trim().equals("-") ? true : false; |
|
|
boolean rtgsFileFlag = rtgsFile.trim().equals("-") ? true : false; |
|
|
|
|
|
boolean billFileFlag = billFile.trim().equals("-") ? true : false; |
|
|
boolean sdFileFlag = sdFile.trim().equals("-") ? true : false; |
|
|
boolean sdFileFlag = sdFile.trim().equals("-") ? true : false; |
|
|
%> |
|
|
%> |
|
|
<!-- Button and Filter Bar --> |
|
|
<!-- Button and Filter Bar --> |
|
|
@ -320,8 +328,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"> |
|
|
<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 |
|
|
@ -338,9 +345,13 @@ |
|
|
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) { |
|
|
@ -349,19 +360,35 @@ |
|
|
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()"> |
|
|
@ -417,15 +444,15 @@ |
|
|
<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> |
|
|
@ -437,6 +464,8 @@ |
|
|
for (Bill bill : billDetListWrapper.getBillDetList()) { |
|
|
for (Bill bill : billDetListWrapper.getBillDetList()) { |
|
|
boolean isClaimed = bill.getBillStatName().equalsIgnoreCase("CLAIMED"); |
|
|
boolean isClaimed = bill.getBillStatName().equalsIgnoreCase("CLAIMED"); |
|
|
double amtDue; |
|
|
double amtDue; |
|
|
|
|
|
long diffMillis = 0L; |
|
|
|
|
|
long diffDays = 0L; |
|
|
if (isFirstRow) { |
|
|
if (isFirstRow) { |
|
|
// First row logic |
|
|
// First row logic |
|
|
lastClaimedAmountDue = isClaimed ? bill.getAmtDue() : bill.getContAmt(); |
|
|
lastClaimedAmountDue = isClaimed ? bill.getAmtDue() : bill.getContAmt(); |
|
|
@ -458,8 +487,7 @@ |
|
|
<td><%=bill.getInvoiceEndDate()%></td> |
|
|
<td><%=bill.getInvoiceEndDate()%></td> |
|
|
<td><%=bill.getInvoiceBillDate()%></td> |
|
|
<td><%=bill.getInvoiceBillDate()%></td> |
|
|
<td><%=bill.getBillStatName()%></td> |
|
|
<td><%=bill.getBillStatName()%></td> |
|
|
<td>₹ |
|
|
|
|
|
<% |
|
|
|
|
|
|
|
|
<td>₹ <% |
|
|
double currentAmt = bill.getTotAmt() + bill.getAmtDue(); |
|
|
double currentAmt = bill.getTotAmt() + bill.getAmtDue(); |
|
|
if (bill.getBillStatName().equals("CLAIMED")) { |
|
|
if (bill.getBillStatName().equals("CLAIMED")) { |
|
|
out.print(String.format("%,.2f", currentAmt)); |
|
|
out.print(String.format("%,.2f", currentAmt)); |
|
|
@ -475,50 +503,96 @@ |
|
|
<td>₹ <%=String.format("%,.2f", bill.getItTaxAmt())%></td> |
|
|
<td>₹ <%=String.format("%,.2f", bill.getItTaxAmt())%></td> |
|
|
<td>₹ <%=String.format("%,.2f", bill.getSnaRetAmt())%></td> |
|
|
<td>₹ <%=String.format("%,.2f", bill.getSnaRetAmt())%></td> |
|
|
<td>₹ <%=String.format("%,.2f", bill.getTotAmt())%></td> |
|
|
<td>₹ <%=String.format("%,.2f", bill.getTotAmt())%></td> |
|
|
<% if (contDetListWrapper.getContList().get(0) |
|
|
|
|
|
.getInvoiceBillTypeName() |
|
|
|
|
|
.equalsIgnoreCase("PERCENTAGE BASED PAYMENT")) { %> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
if (contDetListWrapper.getContList().get(0).getInvoiceBillTypeName().equalsIgnoreCase("PERCENTAGE BASED PAYMENT")) { |
|
|
|
|
|
%> |
|
|
<td><%=bill.getPercentApplied()%> %</td> |
|
|
<td><%=bill.getPercentApplied()%> %</td> |
|
|
<% } %> |
|
|
|
|
|
<td>₹ <%= String.format("%,.2f", amtDue) %></td> <!-- Corrected Balance To Be Claimed --> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
|
|
|
<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"> |
|
|
<td class="no-export"> |
|
|
<div style="display: flex; gap: 10px; align-items: center"> |
|
|
<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> |
|
|
|
|
|
|
|
|
<% 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> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<% } %> |
|
|
|
|
|
|
|
|
<% |
|
|
|
|
|
} |
|
|
|
|
|
%> |
|
|
</tbody> |
|
|
</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() %>" |
|
|
|
|
|
|
|
|
<input type="hidden" |
|
|
|
|
|
value="<%=contDetListWrapper.getContList().get(0).getWorkDesc()%>" |
|
|
name="hid_work_desc" id="hid_work_desc" class="form-control"> |
|
|
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" |
|
|
|
|
|
|
|
|
<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"> |
|
|
name="hid_frm_action" id="hid_frm_action" class="form-control"> |
|
|
<input type="hidden" class="form-control" name="hid_type" id="hid_type" |
|
|
|
|
|
|
|
|
<input type="hidden" class="form-control" name="hid_type" |
|
|
|
|
|
id="hid_type" |
|
|
value="<%=reqSrc.equalsIgnoreCase("exp_cont_det_display_page") ? 1 : 0%>"> |
|
|
value="<%=reqSrc.equalsIgnoreCase("exp_cont_det_display_page") ? 1 : 0%>"> |
|
|
</div> |
|
|
</div> |
|
|
<%@include file="pdf_modal.html"%> |
|
|
<%@include file="pdf_modal.html"%> |
|
|
|