Commit fdb01d41 authored by ngadkari's avatar ngadkari

new configuration of remittance form

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199195 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6a18be93
...@@ -267,6 +267,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -267,6 +267,7 @@ Put a validation chq amount in filter and total of details matches in case heade
Timestamp chequeDate = null; Timestamp chequeDate = null;
Timestamp custRefDate= null; Timestamp custRefDate= null;
Timestamp dueDate = null; Timestamp dueDate = null;
Timestamp dueDateFR = null;// ADDED BY NANDKUMAR GADKARI ON 03/04/19
try try
{ {
...@@ -382,7 +383,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -382,7 +383,7 @@ Put a validation chq amount in filter and total of details matches in case heade
sdueDate = genericUtility.getValidDateString(sdueDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()); sdueDate = genericUtility.getValidDateString(sdueDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
dueDate = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00"); dueDate = java.sql.Timestamp.valueOf(sdueDate + " 00:00:00");
System.out.println("due_dateFr is ::Timestamp::"+dueDate); System.out.println("due_dateFr is ::Timestamp::"+dueDate);
dueDateFR=dueDate;// ADDED BY NANDKUMAR GADKARI ON 03/04/19
sdueDate = genericUtility.getColumnValue("due_date_to",headerDom); sdueDate = genericUtility.getColumnValue("due_date_to",headerDom);
System.out.println("due_dateTo is ::DOM::"+sdueDate); System.out.println("due_dateTo is ::DOM::"+sdueDate);
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,"sdueDate:::"+sdueDate,true); //Commented by Manoj dtd 03/05/2014writeLog(filePtr,"sdueDate:::"+sdueDate,true);
...@@ -584,6 +585,52 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -584,6 +585,52 @@ Put a validation chq amount in filter and total of details matches in case heade
retTabSepStrBuff.append("</group0>"); retTabSepStrBuff.append("</group0>");
retTabSepStrBuff.append("</DocumentRoot>"); retTabSepStrBuff.append("</DocumentRoot>");
//added by nandkumar gadkari---------------start--------------1/04/19-----for Remittance form Manual flag
String refNo="",refSer="";
int cnt=0;
ArrayList<String> rcpFormRefNo = new ArrayList<String>();
sql = "select b.ref_no ,b.ref_ser from receipt_form a, rcpdet_form b where a.tran_id= b.tran_id and b.adj_method='M' "
+ " and a.tran_date >= ? and a.tran_date<=? and confirmed = 'Y' and a.site_code= ? "
+ " and a.cust_code <=? and a.cust_code >=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1,dueDateFR);
pstmt.setTimestamp(2,dueDateTo);
pstmt.setString(3,siteCode.trim());
pstmt.setString(4,custCodeTo.trim());
pstmt.setString(5,custCodeFrom.trim());
System.out.println("The rcpdet_form Becomes ......:"+sql);
rs = pstmt.executeQuery();
while (rs.next())
{
refNo=rs.getString(1) == null ? " ":rs.getString(1).trim();
refSer=rs.getString(2);
sql = "select count(*) from receivables where ref_no=? and tran_ser= ? and tot_amt -adj_amt > 0 and tran_date >= ? and tran_date<=? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,refNo);
pstmt1.setString(2,refSer);
pstmt1.setTimestamp(3,dueDateFR);
pstmt1.setTimestamp(4,dueDateTo);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
cnt=rs1.getInt(1);
if(cnt > 0)
{
rcpFormRefNo.add(refNo);
}
}
rs1.close();
pstmt1.close();
}
rs.close();
pstmt.close();
cnt =rcpFormRefNo.size();
System.out.println("^^^^^^^rcpFormRefNo rcpFormRefNo["+rcpFormRefNo);
//added by nandkumar gadkari---------------end--------------1/04/19-----for Remittance form Manual flag
//Added by Pavan R on 24MAY18 [F18BGTP001]- "Suggest adjustments" in Automatic AR settlement filter screen. //Added by Pavan R on 24MAY18 [F18BGTP001]- "Suggest adjustments" in Automatic AR settlement filter screen.
if("Y".equalsIgnoreCase(suggestAdj)) if("Y".equalsIgnoreCase(suggestAdj))
{ {
...@@ -606,6 +653,9 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -606,6 +653,9 @@ Put a validation chq amount in filter and total of details matches in case heade
BigDecimal totNegAmt = new BigDecimal(0.0); BigDecimal totNegAmt = new BigDecimal(0.0);
BigDecimal totPosAmt = new BigDecimal(0.0); BigDecimal totPosAmt = new BigDecimal(0.0);
// Storing Positive amounts List as posList // Storing Positive amounts List as posList
for (int i = 0; i < templist.size(); i++) { for (int i = 0; i < templist.size(); i++) {
ReceiptBean rcpBean = templist.get(i); ReceiptBean rcpBean = templist.get(i);
...@@ -614,13 +664,33 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -614,13 +664,33 @@ Put a validation chq amount in filter and total of details matches in case heade
adjAmt = rcpBean.getAdjAmt(); adjAmt = rcpBean.getAdjAmt();
adjustedAmt = rcpBean.getAdjustedAmt(); adjustedAmt = rcpBean.getAdjustedAmt();
invAmt = rcpBean.getInvAmt(); invAmt = rcpBean.getInvAmt();
refNo = rcpBean.getInvoiceId();// added by nandkumar gadkari on 2/04/19
System.out.println("Global refNo["+refNo+"]"+balAmt);
//if (balAmt > 0) //if (balAmt > 0)
if ((balAmt.compareTo(BigDecimal.ZERO) == 1)) if ((balAmt.compareTo(BigDecimal.ZERO) == 1))
{ {
//totPosAmt = totPosAmt + balAmt; //totPosAmt = totPosAmt + balAmt;
// added by nandkumar gadkari on 2/04/19-------------start----
if(cnt > 0)
{
System.out.println("cnt cnt["+cnt+"]");
if (rcpFormRefNo.contains(refNo.trim()))
{
totPosAmt = totPosAmt.add(balAmt);
posList.add(rcpBean);
System.out.println("posList123["+posList+"]");
}
}
else // added by nandkumar gadkari on 2/04/19 ------------end
{
totPosAmt = totPosAmt.add(balAmt); totPosAmt = totPosAmt.add(balAmt);
posList.add(rcpBean); posList.add(rcpBean);
} }
}
} }
// Storing Negative amounts List as negList // Storing Negative amounts List as negList
for (int i = 0; i < templist.size(); i++) { for (int i = 0; i < templist.size(); i++) {
...@@ -806,6 +876,47 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -806,6 +876,47 @@ Put a validation chq amount in filter and total of details matches in case heade
gCnt++; gCnt++;
} }
} }
//added by nandkumar gadkari on 04/04/19---------------start-------------------for Remittance form Manual flag---------
//below loop added to append unselected Positive records after matched selected
if(cnt > 0)
{
for (int i = 0; i < templist.size(); i++) {
ReceiptBean rcpBean = templist.get(i);
totAmt = rcpBean.getTotAmt();
balAmt = rcpBean.getBalAmt();
adjAmt = rcpBean.getAdjAmt();
adjustedAmt = rcpBean.getAdjustedAmt();
invAmt = rcpBean.getInvAmt();
refNo = rcpBean.getInvoiceId();
System.out.println("Global refNo["+refNo+"]"+balAmt);
//if (balAmt > 0)
if ((balAmt.compareTo(BigDecimal.ZERO) == 1))
{
System.out.println("cnt1 cnt1["+cnt+"]");
if (!rcpFormRefNo.contains(refNo.trim()))
{
posList.add(rcpBean);
System.out.println("posList123["+posList+"]");
}
}
}
for (int i = 0; i < posList.size(); i++)
{
ReceiptBean rcpBean = posList.get(i);
if("".equalsIgnoreCase(rcpBean.getIsSelected()))
{//ReceiptBean rcpBean = negList.get(i);
xmlBuff.append(generateXmls(detailDom, gCnt, rcpBean.getIsSelected(), rcpBean));
gCnt++;
}
}
}
//added by nandkumar gadkari on 04/04/19---------------end-----------------for Remittance form Manual flag-----------
} }
//Changes done on 26JUN2018 End //Changes done on 26JUN2018 End
}//end of for (ArrayList templist : custGrpMap.values()) }//end of for (ArrayList templist : custGrpMap.values())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment