Commit 48e51d50 authored by arawankar's avatar arawankar

Changes made in FinCommon.java

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@172173 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bc7e2c3d
......@@ -8574,6 +8574,108 @@ public class FinCommon
}
}
//Added by wasim on 31-MAY-2017 for Purpose SRET (Sales Return) [END]
//Added by Rupesh Pawar on [23/10/2017] for "STKINVRCP" [Input by Mr.Piyush Sir] [Start].
else if(purpose.equalsIgnoreCase("STKINVRCP"))
{
int counter = 0;
sql ="select acct_code__iss,cctr_code__iss from item_acct_detr " +
" where item_code = ? and item_ser = ? and tran_type = ? and fin_entity = ' '";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
pstmt.setString(2,itemSer);
pstmt.setString(3,tranType);
rs = pstmt.executeQuery();
if(rs.next())
{
counter++;
acctCode = rs.getString("acct_code__iss");
cctrCode = rs.getString("cctr_code__iss");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(acctCode == null || acctCode.trim().length() == 0 || counter == 0)
{
counter = 0;
sql = "select acct_code__iss,cctr_code__iss from item_acct_detr " +
" where item_ser = ' ' and item_code = ? and tran_type = ? and fin_entity = ' '";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
pstmt.setString(2,tranType);
rs = pstmt.executeQuery();
if(rs.next())
{
counter++;
acctCode = rs.getString("acct_code__iss");
cctrCode = rs.getString("cctr_code__iss");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(acctCode == null || acctCode.trim().length() == 0 || counter == 0)
{
counter = 0;
sql = "select acct_code__iss,cctr_code__iss from item_acct_detr " +
" where item_ser = ' ' and item_code = ? and tran_type = ' ' and fin_entity = ' '";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
counter++;
acctCode = rs.getString("acct_code__iss");
cctrCode = rs.getString("cctr_code__iss");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(acctCode == null || acctCode.trim().length() == 0 || counter == 0)
{
sql = "select acct_code__iss,cctr_code__iss from item_acct_detr " +
"where item_ser = ? and item_code = ' ' and tran_type = ? and fin_entity = ' '";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemSer);
pstmt.setString(2,tranType);
rs = pstmt.executeQuery();
if(rs.next())
{
acctCode = rs.getString("acct_code__iss");
cctrCode = rs.getString("cctr_code__iss");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(acctCode == null || acctCode.trim().length() == 0)
{
sql = "select acct_code__iss,cctr_code__iss from item_acct_detr" +
" where item_ser = ? and item_code = ' ' and tran_type = ' ' and fin_entity = ' '";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemSer);
rs = pstmt.executeQuery();
if(rs.next())
{
acctCode = rs.getString("acct_code__iss");
cctrCode = rs.getString("cctr_code__iss");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
}
}
}//Added by Rupesh Pawar on [23/10/2017] for "STKINVRCP"[Input by Mr.Piyush Sir] [End].
if (acctCode == null) acctCode = "";
if (cctrCode == null) cctrCode = "";
} catch (SQLException e) {
......
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