Commit cdeb70de authored by ngadkari's avatar ngadkari

changes for set invoice trace quantity in min_rate_history

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@203178 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cd22184b
......@@ -4185,7 +4185,7 @@ public class PostOrderActivity {
if ("R".equalsIgnoreCase(tranType))
{
sql = "select distinct lot_no from sreturndet where tran_id = ? and line_no = ? and item_code = ? order by lot_no";
sql = "select distinct lot_no ,quantity from sreturndet where tran_id = ? and line_no = ? and item_code = ? order by lot_no";//,quantity COLUMN ADDED BY NANDKUMAR GADKARI ON 10/07/19
}
else if ("I".equalsIgnoreCase(tranType))
{
......@@ -4209,14 +4209,14 @@ public class PostOrderActivity {
if(schemeCnt == 1)
{
sql = "select lot_no,Round(sum((quantity * rate) - ( ((quantity * rate)*discount)/100)) / sum(quantity),2) as inv_rate from invoice_trace "
sql = "select lot_no,sum(quantity),Round(sum((quantity * rate) - ( ((quantity * rate)*discount)/100)) / sum(quantity),2) as inv_rate from invoice_trace "
+ " where invoice_id = ? and SORD_NO = ? and SORD_LINE_NO = ? and item_code = ? group by lot_no";
}
else
{
//added by nandkumar gadkari on 04/07/19--------end------------------for not to update average effective cost
sql = "select distinct lot_no from invoice_trace where invoice_id = ? and sord_no = ?"
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";
}
......@@ -4251,6 +4251,7 @@ public class PostOrderActivity {
{
ldEffCost = rsLot.getDouble("inv_rate");
}
invQty =rsLot.getDouble(2);
//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
if ((priceList.trim()).length() > 0)
......@@ -4519,7 +4520,7 @@ public class PostOrderActivity {
}
}
//Added by Santosh on 04/01/17 to get invoice qty from invoice[Start]
sql = "SELECT SUM(QUANTITY) AS QUANTITY FROM INVDET WHERE INVOICE_ID = ? AND ITEM_CODE = ? GROUP BY ITEM_CODE";
/*sql = "SELECT SUM(QUANTITY) AS QUANTITY FROM INVDET WHERE INVOICE_ID = ? AND ITEM_CODE = ? GROUP BY ITEM_CODE";
pstmt2 = conn.prepareStatement(sql);
pstmt2.setString(1, invoiceId);
pstmt2.setString(2, itemCode);
......@@ -4537,7 +4538,7 @@ public class PostOrderActivity {
{
rs2.close();
rs2 = null;
}
}*/// commented by nandkumar gadkari on 10/07/19
//Added by NANDKUMAR GADKARI on 01/10/18 to get invoice dATE from invoice[START]
sql = "SELECT TRAN_DATE FROM INVOICE WHERE INVOICE_ID = ?";
pstmt2 = conn.prepareStatement(sql);
......
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