Commit bd9c8f12 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@190860 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 71bfc693
......@@ -3367,16 +3367,17 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
dokkeyList = generateDocKey(dom1, dom, invoiceId, conn);
int size = dokkeyList.size();
System.out.println("dokkk key size: " +size);
for(int i=size-1;i>=0;i--)
for(int i=0;i<=size-1;i++)
{
minRateDocKey = dokkeyList.get(i);
/*if(lineNo > 1)
{
*/ //Changed by Santosh on 16/05/2017 as invoiceId is not set on itemchange
//invoiceId = getAvailableInvId(dom2, curFormItemLotHMap, curRecordItemLotHMap, invoiceId, adjQty);
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";
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())
......@@ -3397,12 +3398,17 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
{
invoiceId = getAvailableInvId(dom,dom2, curFormItemLotHMap, curRecordItemLotHMap, invoiceId, minRateDocKey, adjQty);// current dom added to parameters by Nandkumar Gadkari on 14/09/18
//}
tempInvoiceId=invoiceId;
if( invoiceId != null && invoiceId.trim().length() > 0)
{
break;
}
}
}
if (tempInvoiceId != null && tempInvoiceId.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