Commit 9e189323 authored by ngadkari's avatar ngadkari

More quantity of PO & GRN wrt Indent for reason

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184054 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1698be7f
...@@ -59,12 +59,12 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por ...@@ -59,12 +59,12 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null,pstmt1=null; PreparedStatement pstmt = null,pstmt1=null;
String errString = null; String errString = null;
String confirm = "",status= "" ,indNo = "",reason = "" ,pordType = "",ediOption = "", String confirm = "",status= "" ,indNo = "",reason = "" ,pordType = "",ediOption = "",userIdOp="",
projCode = "",suppCode= "" , pordSite = ""; projCode = "",suppCode= "" , pordSite = "";
String loginEmpCode=""; String loginEmpCode="";
double totordqty = 0.0 ,amount = 0.0 ,hnetAmt = 0.0,hordAmt = 0.0; double totordqty = 0.0 ,amount = 0.0 ,hnetAmt = 0.0,hordAmt = 0.0,ordQty=0.0,indQty=0.0;
ResultSet rs = null,rs1=null; ResultSet rs = null,rs1=null;
int cnt = 0; int cnt = 0,count=0;
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
try try
...@@ -162,13 +162,15 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por ...@@ -162,13 +162,15 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pOrder); pstmt.setString(1, pOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
//Changes by Nandkumar Gadkari on 24/04/18----------------------Start-------------
while(rs.next()) while(rs.next())
{ {
count++;
indNo = checkNull(rs.getString(4)); indNo = checkNull(rs.getString(4));
//indQty = rs.getDouble(10); indQty = rs.getDouble(10);
//ordQty = rs.getDouble(7); ordQty = rs.getDouble(7);
reason = rs.getString(8); reason = rs.getString(8);
//userIdOp = rs.getString(9); userIdOp = rs.getString(9);
sql1 = " select case when (sum(case when porddet.quantity__stduom is null then 0 else porddet.quantity__stduom end ))" + sql1 = " select case when (sum(case when porddet.quantity__stduom is null then 0 else porddet.quantity__stduom end ))" +
" is null then 0 else (sum(case when porddet.quantity__stduom is null then 0 else porddet.quantity__stduom end ))" + " is null then 0 else (sum(case when porddet.quantity__stduom is null then 0 else porddet.quantity__stduom end ))" +
...@@ -184,9 +186,25 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por ...@@ -184,9 +186,25 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
rs1.close();rs1 = null; rs1.close();rs1 = null;
pstmt1.close();pstmt1 = null; pstmt1.close();pstmt1 = null;
System.out.println("totordqty>>>>"+totordqty); System.out.println("totordqty>>>>"+totordqty);
if ((totordqty + ordQty) > indQty && ( reason== null) || reason.trim().length() == 0)
{
continue;
}
else
{
count--;
}
} }
rs.close();rs = null; rs.close();rs = null;
pstmt.close();pstmt = null; pstmt.close();pstmt = null;
if(count > 0 ) {
errString = itmDBAccessLocal.getErrorString("", "VTPORESN1", "");
return errString;
}
//Changes by Nandkumar Gadkari on 24/04/18----------------------end-------------
if(errString == null || errString.trim().length() == 0 ) if(errString == null || errString.trim().length() == 0 )
{ {
...@@ -3646,10 +3664,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por ...@@ -3646,10 +3664,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
xmlBuffkeyGen.append("<Detail1 dbID='' domID=\"1\" objName=\"voucher\" objContext=\"1\">"); xmlBuffkeyGen.append("<Detail1 dbID='' domID=\"1\" objName=\"voucher\" objContext=\"1\">");
xmlBuffkeyGen.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />"); xmlBuffkeyGen.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuffkeyGen.append("<site_code><![CDATA["+site +"]]></site_code>"); xmlBuffkeyGen.append("<site_code><![CDATA["+site +"]]></site_code>");
//changes done by mayur on 24-04-18--start xmlBuffkeyGen.append("<tran_date><![CDATA["+currDate +"]]></tran_date>");
//xmlBuffkeyGen.append("<tran_date><![CDATA["+currDate+"]]></tran_date>");
xmlBuffkeyGen.append("<tran_date><![CDATA["+sdf.format(currDate.toString()) +"]]></tran_date>");
//changes done by mayur on 24-04-18--end
xmlBuffkeyGen.append("<vouch_type><![CDATA["+"A" +"]]></vouch_type>"); xmlBuffkeyGen.append("<vouch_type><![CDATA["+"A" +"]]></vouch_type>");
xmlBuffkeyGen.append("</Detail1>"); xmlBuffkeyGen.append("</Detail1>");
...@@ -4019,10 +4034,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por ...@@ -4019,10 +4034,7 @@ public class PorderConf extends ActionHandlerEJB implements PorderConfLocal, Por
xmlBuffkeyGen.append("<Detail1 dbID='' domID=\"1\" objName=\"voucher\" objContext=\"1\">"); xmlBuffkeyGen.append("<Detail1 dbID='' domID=\"1\" objName=\"voucher\" objContext=\"1\">");
xmlBuffkeyGen.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />"); xmlBuffkeyGen.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuffkeyGen.append("<site_code><![CDATA["+site +"]]></site_code>"); xmlBuffkeyGen.append("<site_code><![CDATA["+site +"]]></site_code>");
//changes done by mayur on 24-04-18--start xmlBuffkeyGen.append("<tran_date><![CDATA["+currDate +"]]></tran_date>");
//xmlBuffkeyGen.append("<tran_date><![CDATA["+currDate+"]]></tran_date>");
xmlBuffkeyGen.append("<tran_date><![CDATA["+sdf.format(currDate.toString()) +"]]></tran_date>");
//changes done by mayur on 24-04-18--end
xmlBuffkeyGen.append("<vouch_type><![CDATA["+"A" +"]]></vouch_type>"); xmlBuffkeyGen.append("<vouch_type><![CDATA["+"A" +"]]></vouch_type>");
xmlBuffkeyGen.append("</Detail1>"); xmlBuffkeyGen.append("</Detail1>");
......
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