Commit 7be1e28f authored by vvengurlekar's avatar vvengurlekar

MiscPayAutoPrc.java- acct_code__adv set if voucher type is advance in case of employee

MiscVoucherIC.java-added pay amount, net payable amount and unconfirmed amount in alert 


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@188812 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f2ae06ac
......@@ -711,7 +711,9 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
StringBuffer detailBuff = null;
//StringBuffer xmlString = null;
StringBuffer xmlString1 = null;
//Added by Varsha V on 06-08-18 for declaring variable outside try
double payAmt = 0.0, netPayable = 0.0, totUnconfAmt = 0.0;
//Ended by Varsha V on 06-08-18 for declaring variable outside try
ArrayList<String> alreadyExist = null;
try
{
......@@ -721,11 +723,13 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
itmDBAccess = new ITMDBAccessEJB();// changes by Nandkumar Gadkari on 20/07/18
successLine = "-----------------Confirmed Transactions------------";
//Changes successLine and errorLine string by Varsha V on 06-08-18
successLine = "Confirmed Transactions</br>";
//successLine = "-----------------Confirmed Transactions------------";
succesString = successLine + succesString;
errorLine = "-----------------Unconfirmed Transactions------------";
errorLine = "Payment Are Not Generated Due To Unconfirmed Payment Pending";
//errorLine = "-----------------Unconfirmed Transactions------------";
errorString = errorLine + errorString;
xmlString = new StringBuffer("<?xml version = \"1.0\"?>");
......@@ -1002,11 +1006,11 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
detailBuff.append("<Detail2 dbID=\"\" domID=\""+cnt+"\" objName=\"misc_pay\" objContext=\"2\">");
detailBuff.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
double payAmt = Double.parseDouble(genericUtility.getColumnValueFromNode("pay_amt",parentNode1));
payAmt = Double.parseDouble(genericUtility.getColumnValueFromNode("pay_amt",parentNode1));
String refSer = genericUtility.getColumnValueFromNode("tran_ser",parentNode1);
String refNo = genericUtility.getColumnValueFromNode("ref_no",parentNode1);
double netPayable = Double.parseDouble(genericUtility.getColumnValueFromNode("net_payable",parentNode1));
double totUnconfAmt= Double.parseDouble(genericUtility.getColumnValueFromNode("unconfirm_amt",parentNode1));
netPayable = Double.parseDouble(genericUtility.getColumnValueFromNode("net_payable",parentNode1));
totUnconfAmt= Double.parseDouble(genericUtility.getColumnValueFromNode("unconfirm_amt",parentNode1));
System.out.println("payAmt--["+payAmt+"] \n refSer--["+refSer+"] \n refNo ---["+refNo+"] \n netPayable--["+netPayable+"] \n totUnconfAmt--["+totUnconfAmt+"]");
......@@ -1753,13 +1757,14 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
pstmt.close();
pstmt = null;
}
//Changes successString and errorString string by Varsha V on 06-08-18
if(!"Y".equalsIgnoreCase(confirmed))
{
errorString = errorString + "\n" + miscPaymentTranID+"\n";
errorString = errorString + "</br>Voucher No. " + miscPaymentTranID+"</br> Pay Amount:- "+payAmt+" Unconfirmed Pay Amount:- "+totUnconfAmt+" Net Payable Amount:- "+netPayable;
}
else
{
succesString = succesString + "\n" + miscPaymentTranID+"\n";
succesString = succesString + "</br>Voucher No. " + miscPaymentTranID+"</br> Pay Amount:- "+payAmt+" Unconfirmed Pay Amount:- "+totUnconfAmt+" Net Payable Amount:- "+netPayable;
}
}
confirmRetString = "";
......@@ -1935,7 +1940,9 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
StringBuffer detailBuff = null;
//StringBuffer xmlString = null;
StringBuffer xmlString1 = null;
//Added by Varsha V on 06-08-18 for declaring variable outside try
double payAmt = 0.0, netPayable = 0.0, totUnconfAmt = 0.0;
//Ended by Varsha V on 06-08-18 for declaring variable outside try
ArrayList<String> alreadyExist = null;
try
{
......@@ -1943,11 +1950,11 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
finCommon = new FinCommon();
utilMethods = new UtilMethods();
itmDBAccess =new ITMDBAccessEJB();// changes by Nandkumar Gadkari on 20/07/18
successLine = "-----------------Confirmed Transactions------------";
//Changes successLine and errorLine string by Varsha V on 06-08-18
successLine = "Confirmed Transactions</br>";
succesString = successLine + succesString;
errorLine = "-----------------Unconfirmed Transactions------------";
errorLine = "Payment Are Not Generated Due To Unconfirmed Payment Pending</br>";
errorString = errorLine + errorString;
......@@ -2224,11 +2231,11 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
detailBuff.append("<Detail2 dbID=\"\" domID=\""+cnt+"\" objName=\"misc_pay\" objContext=\"2\">");
detailBuff.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
double payAmt = Double.parseDouble(genericUtility.getColumnValueFromNode("pay_amt",parentNode1));
payAmt = Double.parseDouble(genericUtility.getColumnValueFromNode("pay_amt",parentNode1));
String refSer = genericUtility.getColumnValueFromNode("tran_ser",parentNode1);
String refNo = genericUtility.getColumnValueFromNode("ref_no",parentNode1);
double netPayable = Double.parseDouble(genericUtility.getColumnValueFromNode("net_payable",parentNode1));
double totUnconfAmt= Double.parseDouble(genericUtility.getColumnValueFromNode("unconfirm_amt",parentNode1));
netPayable = Double.parseDouble(genericUtility.getColumnValueFromNode("net_payable",parentNode1));
totUnconfAmt= Double.parseDouble(genericUtility.getColumnValueFromNode("unconfirm_amt",parentNode1));
System.out.println("payAmt--["+payAmt+"] \n refSer--["+refSer+"] \n refNo ---["+refNo+"] \n netPayable--["+netPayable+"] \n totUnconfAmt--["+totUnconfAmt+"]");
......@@ -2966,13 +2973,14 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
pstmt.close();
pstmt = null;
}
//Changes successString and errorString string by Varsha V on 06-08-18
if(!"Y".equalsIgnoreCase(confirmed))
{
errorString = errorString + "\n" + miscPaymentTranID+"\n";
errorString = errorString + "</br>Voucher No. " + miscPaymentTranID+"</br> Pay Amount:- "+payAmt+" Unconfirmed Pay Amount:- "+totUnconfAmt+" Net Payable Amount:- "+netPayable;
}
else
{
succesString = succesString + "\n" + miscPaymentTranID+"\n";
succesString = succesString + "</br>Voucher No. " + miscPaymentTranID+"</br> Pay Amount:- "+payAmt+" Unconfirmed Pay Amount:- "+totUnconfAmt+" Net Payable Amount:- "+netPayable;
}
}
confirmRetString = "";
......@@ -3071,13 +3079,14 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
pstmt.close();
pstmt = null;
}
//Changes successString and errorString string by Varsha V on 06-08-18
if(!"Y".equalsIgnoreCase(confirmed))
{
errorString = errorString + "\n" + miscPaymentTranID+"\n";
errorString = errorString + "</br>Voucher No. " + miscPaymentTranID+"</br> Pay Amount:- "+payAmt+" Unconfirmed Pay Amount:- "+totUnconfAmt+" Net Payable Amount:- "+netPayable;
}
else
{
succesString = succesString + "\n" + miscPaymentTranID+"\n";
succesString = succesString + "</br>Voucher No. " + miscPaymentTranID+"</br> Pay Amount:- "+payAmt+" Unconfirmed Pay Amount:- "+totUnconfAmt+" Net Payable Amount:- "+netPayable;
}
}
confirmRetString = "";
......
......@@ -3238,8 +3238,20 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
System.out.println("Sarita 02JUL18::: cctrCodeAdv ["+cctrCodeAdv+"] \t empAdvSchemeCd ["+empAdvSchemeCd+"]");
if("NULLFOUND".equalsIgnoreCase(empAdvSchemeCd) || (empAdvSchemeCd == null ||empAdvSchemeCd.trim().length() == 0))
{
acctCodeAdv = "";
valueXmlString.append("<acct_code__adv>").append("<![CDATA[" + "" + "]]>").append("</acct_code__adv>");
//Added by Varsha V on 06-08-18 for setting acct_code_adv if vouch type is A
acctCodeAdv = findValue(conn, "c.acct_code__ap" , "employee a", "site b", "department c", "a.pay_site", "a.emp_code", "a.dept_code", "b.site_code", sundryCode, "c.dept_code");;
if(acctCodeAdv == null || (acctCodeAdv.trim().length() == 0 ))
{
acctCodeAdv = findValue(conn, "a.acct_code__sal" , " employee a, site b ", " a.pay_site = b.site_code and a.emp_code", sundryCode);
}
if(acctCodeAdv == null || (acctCodeAdv.trim().length() == 0 ))
{
acctCodeAdv = "";
}
System.out.println("acctCodeAdv: ["+acctCodeAdv+"]");
//Ended by Varsha V on 06-08-18 for setting acct_code_adv if vouch type is A
//valueXmlString.append("<acct_code__adv>").append("<![CDATA[" + "" + "]]>").append("</acct_code__adv>");
valueXmlString.append("<acct_code__adv>").append("<![CDATA[" + acctCodeAdv + "]]>").append("</acct_code__adv>");
valueXmlString.append("<cctr_code__adv>").append("<![CDATA[" + cctrCodeAdv + "]]>").append("</cctr_code__adv>");
}
else
......@@ -3343,19 +3355,31 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
}
vouchType = genericUtility.getColumnValue("vouch_type", dom);
if("F".equalsIgnoreCase(vouchType))
{
//Added by Varsha V on 03-08-18 for setting grade in tran_type
tranTypeTerm = finCommon.getFinparams("999999","MVOUCH_TRNTYPE_LOGIC",conn);
//commented and added by Varsha V on 30-07-18 to avoid setting grade in case of trantypeTerm value in other than G
/*empCode = findValue(conn, "grade" , "employee", "emp_code", empCode);
valueXmlString.append("<tran_type>").append("<![CDATA[" + empCode + "]]>").append("</tran_type>");
//Added by Jaffar S. on 21-05-18
setNodeValue(dom, "tran_type", empCode);*/
System.out.println("tranTypeTerm:: ["+tranTypeTerm+"]");
if(tranTypeTerm != null && !tranTypeTerm.equalsIgnoreCase("NULLFOUND") && tranTypeTerm.equalsIgnoreCase("G") && tranTypeTerm.trim().length()>0)
{
empCode = findValue(conn, "grade" , "employee", "emp_code", empCode);
valueXmlString.append("<tran_type>").append("<![CDATA[" + empCode + "]]>").append("</tran_type>");
//Added by Jaffar S. on 21-05-18
setNodeValue(dom, "tran_type", empCode);
}
//ended by Varsha V on 03-08-18 for setting grade in tran_type
}
fldName = "SP_TYPE";
//Added by Abhijit
lsSiteCodePay=findValue(conn, "site_code__pay" , "SITE_SALES_PERS", "site_code","sales_pers", siteCode,sundryCode);
if(lsSiteCodePay== null || lsSiteCodePay.trim().length() == 0)
{
empCode = findValue(conn, "grade" , "employee", "emp_code", empCode);
valueXmlString.append("<tran_type>").append("<![CDATA[" + empCode + "]]>").append("</tran_type>");
//Added by Jaffar S. on 21-05-18
setNodeValue(dom, "tran_type", empCode);
}
fldName = "SP_TYPE";
//Added by Abhijit
lsSiteCodePay=findValue(conn, "site_code__pay" , "SITE_SALES_PERS", "site_code","sales_pers", siteCode,sundryCode);
if(lsSiteCodePay== null || lsSiteCodePay.trim().length() == 0)
{
lsSiteCodePay= findValue(conn, "site_code__pay" , "SITE_SALES_PERS", "sales_pers", sundryCode);
}//end
lsSiteCodePay= findValue(conn, "site_code__pay" , "SITE_SALES_PERS", "sales_pers", sundryCode);
}//end
}
else if("T".equalsIgnoreCase(sundryType))
{
......
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