Commit a16a9040 authored by agaikwad's avatar agaikwad

Request_id-FI2KSUN006, Added Budget Amount,Available Amount and Consumed Amount


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98336 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b3974d73
...@@ -2711,6 +2711,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -2711,6 +2711,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
String taskcodeParent=""; String taskcodeParent="";
double apprvlead= 0 ; double apprvlead= 0 ;
String remark=""; String remark="";
String analcode="",cctrcode1="",acctcode1="",deptcode="",sitecode="";
String BudgetStr="",CONSStr="",totStr="";
try try
{ {
...@@ -3423,7 +3425,13 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -3423,7 +3425,13 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
{ {
lineNoOrd = checkNull(genericUtility.getColumnValue("line_no__ord", dom)); lineNoOrd = checkNull(genericUtility.getColumnValue("line_no__ord", dom));
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom)); purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
sitecode= checkNull(genericUtility.getColumnValue("site_code", dom));
// acctcode1=checkNull(genericUtility.getColumnValue("acct_code__dr", dom));
// cctrcode1=checkNull(genericUtility.getColumnValue("cctr_code__dr", dom));
//deptcode=checkNull(genericUtility.getColumnValue("dept_code", dom));
analcode=checkNull(genericUtility.getColumnValue("anal_code", dom1));
System.out.println("anal code is:"+analcode);
if( lineNoOrd != null && lineNoOrd.trim().length() > 0 && purcOrder != null && purcOrder.trim().length() > 0 ) if( lineNoOrd != null && lineNoOrd.trim().length() > 0 && purcOrder != null && purcOrder.trim().length() > 0 )
{ {
...@@ -3493,6 +3501,75 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -3493,6 +3501,75 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Site code is"+siteCode);
System.out.println("Site code is"+sitecode);
//Added by Abhijit on 22-7-2015
sql="select acct_code__dr,cctr_code__dr, dept_code from porddet where purc_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
rs = pstmt.executeQuery();
if (rs.next())
{
acctcode1 = checkNull(rs.getString("acct_code__dr"));
cctrcode1 = checkNull(rs.getString("cctr_code__dr"));
deptcode= checkNull(rs.getString("dept_code"));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("account code is:"+acctcode1);
System.out.println("cctr code is:"+acctcode1);
System.out.println("dept code is:"+deptcode);
// sql="select FN_GET_BUDGET_AMT('P-AMD','"+sitecode+"','"+acctcode1+"','"+cctrcode1+"','"+analcode+"','"+deptcode+"','A') from dual";
sql="select FN_GET_BUDGET_AMT('P-AMD','"+siteCode+"','"+acctcode1+"','"+cctrcode1+"','"+analcode+"','"+deptcode+"','A') from dual";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
BudgetStr =rs.getString(1);
}
rs.close();
pstmt.close();
rs = null;
pstmt = null;
System.out.println("budget amount.................. !["+BudgetStr+"]");
//('P-AMD','"+sitecode+"','"+acctcode1+"','"+cctrcode1+"','"+analcode+"','"+deptcode+"','A')
sql="select FN_GET_CONS_AMT('P-AMD','"+siteCode+"','"+acctcode1+"','"+cctrcode1+"','"+analcode+"','"+deptcode+"','A') from dual";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
CONSStr =rs.getString(1);
}
rs.close();
pstmt.close();
rs = null;
pstmt = null;
System.out.println("consumed amount.................. !["+CONSStr+"]");
sql="select (FN_GET_BUDGET_AMT('P-AMD','"+siteCode+"','"+acctcode1+"','"+cctrcode1+"','"+analcode+"','"+deptcode+"','A'))- (FN_GET_CONS_AMT('P-AMD','"+sitecode+"','"+acctcode1+"','"+cctrcode1+"','"+analcode+"','"+deptcode+"','A')) from dual";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
totStr =rs.getString(1);
}
rs.close();
pstmt.close();
rs = null;
pstmt = null;
System.out.println("total amount.................. !["+totStr+"]");
//Added by chandrashekar on 22-04-2014 //Added by chandrashekar on 22-04-2014
descr = setDescription("descr","item","item_code",itemCode,conn); descr = setDescription("descr","item","item_code",itemCode,conn);
valueXmlString.append("<item_descr>").append("<![CDATA["+descr+"]]>").append("</item_descr>"); valueXmlString.append("<item_descr>").append("<![CDATA["+descr+"]]>").append("</item_descr>");
...@@ -3563,6 +3640,10 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -3563,6 +3640,10 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
valueXmlString.append("<dept_code >").append("<![CDATA["+deptCode+"]]>").append("</dept_code>"); valueXmlString.append("<dept_code >").append("<![CDATA["+deptCode+"]]>").append("</dept_code>");
valueXmlString.append("<proj_code >").append("<![CDATA[" + projCode + "]]>").append("</proj_code>"); valueXmlString.append("<proj_code >").append("<![CDATA[" + projCode + "]]>").append("</proj_code>");
valueXmlString.append("<proj_code__o >").append("<![CDATA[" + projCode + "]]>").append("</proj_code__o>"); valueXmlString.append("<proj_code__o >").append("<![CDATA[" + projCode + "]]>").append("</proj_code__o>");
valueXmlString.append("<budget_amt_anal >").append("<![CDATA[" + BudgetStr + "]]>").append("</budget_amt_anal>");
valueXmlString.append("<consumed_amt_anal >").append("<![CDATA[" + CONSStr + "]]>").append("</consumed_amt_anal>");
valueXmlString.append("<budget_amt >").append("<![CDATA[" + totStr + "]]>").append("</budget_amt>");
sql = " select emp_code__qcaprv from porddet where purc_order = ? and line_no = ? " ; sql = " select emp_code__qcaprv from porddet where purc_order = ? and line_no = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -3995,7 +4076,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -3995,7 +4076,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
valueXmlString.append("<tax_class >").append("<![CDATA["+ taxClass +"]]>").append("</tax_class>"); valueXmlString.append("<tax_class >").append("<![CDATA["+ taxClass +"]]>").append("</tax_class>");
} }
if ( taxEnv == null || taxEnv.trim().length()== 0 ) if ( taxEnv == null || taxEnv.trim().length()== 0 )
{ taxChap = genericUtility.getColumnValue("tax_chap", dom); {
taxChap = genericUtility.getColumnValue("tax_chap", dom);
taxClass = genericUtility.getColumnValue("tax_class", dom); taxClass = genericUtility.getColumnValue("tax_class", dom);
stationFr = genericUtility.getColumnValue("supplier_stan_code", dom); stationFr = genericUtility.getColumnValue("supplier_stan_code", dom);
stationTo = setDescription("stan_code", "site", "site_code", siteCode, conn); stationTo = setDescription("stan_code", "site", "site_code", siteCode, conn);
......
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