Commit 0ac98683 authored by ngadkari's avatar ngadkari

In min_rate_history update added sum quantity of same item lot in invoice trace

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208038 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b7d5799d
...@@ -3809,6 +3809,7 @@ public class PostOrderActivity { ...@@ -3809,6 +3809,7 @@ public class PostOrderActivity {
String sqlCnt=""; String sqlCnt="";
//added by nandkumar gadkari on 04/07/19 //added by nandkumar gadkari on 04/07/19
int schemeCnt=0; int schemeCnt=0;
double totItemLotQuantity=0;
try try
{ {
// 06-Dec-16 manoharan moved from inside loop // 06-Dec-16 manoharan moved from inside loop
...@@ -4199,7 +4200,8 @@ public class PostOrderActivity { ...@@ -4199,7 +4200,8 @@ public class PostOrderActivity {
} }
else if ("I".equalsIgnoreCase(tranType)) else if ("I".equalsIgnoreCase(tranType))
{ {
//added by nandkumar gadkari on 04/07/19--------start------------------for not to update average effective cost //added by nandkumar gadkari on 04/07/19--------start------------------for not to update average effective cost +
lotCnt =0;
sql = "select count(distinct EXP_LEV) as ll_scheme from invoice_trace where invoice_id = ? " sql = "select count(distinct EXP_LEV) as ll_scheme from invoice_trace where invoice_id = ? "
+ " and SORD_NO =? and SORD_LINE_NO = ? and item_code = ? "; + " and SORD_NO =? and SORD_LINE_NO = ? and item_code = ? ";
pstmt2 = conn.prepareStatement(sql); pstmt2 = conn.prepareStatement(sql);
...@@ -4276,11 +4278,37 @@ public class PostOrderActivity { ...@@ -4276,11 +4278,37 @@ public class PostOrderActivity {
{ {
lotNo = rsLot.getString("lot_no"); lotNo = rsLot.getString("lot_no");
//added by nandkumar gadkari on 04/07/19--------start------------------for not to update average effective cost //added by nandkumar gadkari on 04/07/19--------start------------------for not to update average effective cost
invQty =rsLot.getDouble(2);
if(schemeCnt == 1) if(schemeCnt == 1)
{ {
ldEffCost = rsLot.getDouble("inv_rate"); ldEffCost = rsLot.getDouble("inv_rate");
//added by nandkumar gadkari on 20/09/19--------start------------------for total quantity update
sql = " select SUM(quantity) from invoice_trace where "
+ " invoice_id = ? and sord_no = ? and item_code = ? and lot_no = ? and line_type not in ('I','V','P') ";
pstmt2 = conn.prepareStatement(sql);
pstmt2.setString(1, invoiceId);
pstmt2.setString(2, refNo);
pstmt2.setString(3, itemCode);
pstmt2.setString(4, lotNo);
rs2 = pstmt2.executeQuery();
if (rs2.next())
{
totItemLotQuantity = rs2.getDouble(1);
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
if(totItemLotQuantity > invQty)
{
invQty=totItemLotQuantity;
}
//added by nandkumar gadkari on 20/09/19--------end------------------for total quantity update
} }
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--------- //added by nandkumar gadkari on 14/08/19--------Start---------
......
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