Commit 80909ed9 authored by ngadkari's avatar ngadkari

changes to set proper quantity in min_rate_history when scheme is apply

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205179 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 41e3d12a
...@@ -3805,6 +3805,8 @@ public class PostOrderActivity { ...@@ -3805,6 +3805,8 @@ public class PostOrderActivity {
String prevRefNo = ""; String prevRefNo = "";
//Added by Santosh on 04/01/17 //Added by Santosh on 04/01/17
double invQty = 0.0; double invQty = 0.0;
int lotCnt=0;
String sqlCnt="";
//added by nandkumar gadkari on 04/07/19 //added by nandkumar gadkari on 04/07/19
int schemeCnt=0; int schemeCnt=0;
try try
...@@ -4226,6 +4228,25 @@ public class PostOrderActivity { ...@@ -4226,6 +4228,25 @@ public class PostOrderActivity {
//added by nandkumar gadkari on 04/07/19--------end------------------for not to update average effective cost //added by nandkumar gadkari on 04/07/19--------end------------------for not to update average effective cost
sql = "select distinct lot_no ,quantity from invoice_trace where invoice_id = ? and sord_no = ?"//,quantity COLUMN ADDED BY NANDKUMAR GADKARI ON 10/07/19 sql = "select distinct lot_no ,quantity from invoice_trace where invoice_id = ? and sord_no = ?"//,quantity COLUMN ADDED BY NANDKUMAR GADKARI ON 10/07/19
+ " and sord_line_no = ? and item_code = ? order by lot_no"; + " and sord_line_no = ? and item_code = ? order by lot_no";
//added by nandkumar gadkari on 14/08/19--------start---------
lotCnt =0;
sqlCnt = "select count(distinct lot_no) from invoice_trace where invoice_id = ? and sord_no = ? and sord_line_no = ? and item_code = ? ";
pstmt2 = conn.prepareStatement(sqlCnt);
pstmt2.setString(1, invoiceId);
pstmt2.setString(2, refNo);
pstmt2.setString(3, refLineNo);
pstmt2.setString(4, itemCode);
rs2 = pstmt2.executeQuery();
if (rs2.next())
{
lotCnt = rs2.getInt(1);
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
//added by nandkumar gadkari on 14/08/19--------end---------
} }
} }
...@@ -4262,6 +4283,12 @@ public class PostOrderActivity { ...@@ -4262,6 +4283,12 @@ public class PostOrderActivity {
invQty =rsLot.getDouble(2); invQty =rsLot.getDouble(2);
//added by nandkumar gadkari on 04/07/19--------end------------------for not to update average effective cost //added by nandkumar gadkari on 04/07/19--------end------------------for not to update average effective cost
// 13-jan-17 manoharan moved from above as lot_no not available // 13-jan-17 manoharan moved from above as lot_no not available
//added by nandkumar gadkari on 14/08/19--------Start---------
if(lotCnt == 1)
{
invQty=totQty;
}
//added by nandkumar gadkari on 14/08/19--------end---------
if ((priceList.trim()).length() > 0) if ((priceList.trim()).length() > 0)
{ {
rate = distCommon.pickRate(priceList, sdf.format(sysdate), itemCode, lotNo, "B", conn); rate = distCommon.pickRate(priceList, sdf.format(sysdate), itemCode, lotNo, "B", 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