Commit 6caff0d4 authored by ngadkari's avatar ngadkari

Changes in generateDocKey() method and changes in lot_no itemChange if...

Changes in generateDocKey() method and changes in lot_no itemChange if invoiceID is not null condition.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@190821 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1aa97fa7
......@@ -280,7 +280,7 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
String childNodeName = null;
String columnValue = null;
int currentFormNo = 0 ,cnt = 0;
String sql = "",descr="";
String sql = "",descr="",sql1="";
ConnDriver connDriver = new ConnDriver();
DistCommon distCommon = null;
distCommon = new DistCommon();
......@@ -3370,17 +3370,39 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
for(int i=size-1;i>=0;i--)
{
minRateDocKey = dokkeyList.get(i);
if(lineNo > 1)
/*if(lineNo > 1)
{
//Changed by Santosh on 16/05/2017 as invoiceId is not set on itemchange
*/ //Changed by Santosh on 16/05/2017 as invoiceId is not set on itemchange
//invoiceId = getAvailableInvId(dom2, curFormItemLotHMap, curRecordItemLotHMap, invoiceId, adjQty);
invoiceId = getAvailableInvId(dom,dom2, curFormItemLotHMap, curRecordItemLotHMap, invoiceId, minRateDocKey, adjQty);// current dom added to parameters by Nandkumar Gadkari on 14/09/18
sql1 = "SELECT COUNT(*) FROM MIN_RATE_HISTORY WHERE DOC_KEY =? AND QUANTITY - CASE WHEN QUANTITY_ADJ IS NULL THEN 0 ELSE QUANTITY_ADJ END > 0";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, minRateDocKey);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
cnt = rs1.getInt(1);
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
if(cnt > 0)
{
invoiceId = getAvailableInvId(dom,dom2, curFormItemLotHMap, curRecordItemLotHMap, invoiceId, minRateDocKey, adjQty);// current dom added to parameters by Nandkumar Gadkari on 14/09/18
//}
if( invoiceId != null && invoiceId.trim().length() > 0)
{
break;
}
}
}
// Changes by Nandkumar Gadkari on 14/09/18--------[end]---------
}
if(pstmt != null)
......
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