Commit 783d7333 authored by ngadkari's avatar ngadkari

In min_rate_history table update invoice id and invoice date added

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191436 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cffcb63c
...@@ -3487,11 +3487,11 @@ public class PostOrderActivity { ...@@ -3487,11 +3487,11 @@ public class PostOrderActivity {
public String schemeHistoryUpd(String invoiceId, String siteCode, String tranType, Connection conn) throws ITMException, Exception public String schemeHistoryUpd(String invoiceId, String siteCode, String tranType, Connection conn) throws ITMException, Exception
{ {
String retString = "", sql = "", sqlDetData = "", lsScheme = "", lsDocValue = "", lsSchemeCode = ""; String retString = "", sql = "", sqlDetData = "", lsScheme = "", lsDocValue = "", lsSchemeCode = "",sinvoiceDate="";
PreparedStatement pstmt = null, pstmt1 = null, pstmt2 = null,pstmtLot = null; PreparedStatement pstmt = null, pstmt1 = null, pstmt2 = null,pstmtLot = null;
ResultSet rs = null, rs1 = null, rs2 = null,rsLot = null; ResultSet rs = null, rs1 = null, rs2 = null,rsLot = null;
String custCode = "", xFldValue = "", lsItemCodeparent = "", lsOriginalItemCodeOrd = ""; String custCode = "", xFldValue = "", lsItemCodeparent = "", lsOriginalItemCodeOrd = "";
Timestamp tranDate = null; Timestamp tranDate = null,invoiceDate=null;
String itemCodeOld = "",itemCode = "", itemCodeOrd = "", refNo = "", refLineNo = "", priceList = "", nature = "", lsOrderType = "", lsReturnable = "", lsReasCode = "", lotNo = "", lsVarValue = ""; String itemCodeOld = "",itemCode = "", itemCodeOrd = "", refNo = "", refLineNo = "", priceList = "", nature = "", lsOrderType = "", lsReturnable = "", lsReasCode = "", lotNo = "", lsVarValue = "";
double totAmt = 0, totQty = 0, rate = 0, lcDiscount = 0.00, lcTotChargeQty = 0.00, lcTotFreeQty = 0.00, lcEffNetAmount = 0.00, ldSchCost = 0.00; double totAmt = 0, totQty = 0, rate = 0, lcDiscount = 0.00, lcTotChargeQty = 0.00, lcTotFreeQty = 0.00, lcEffNetAmount = 0.00, ldSchCost = 0.00;
String custCodeBill = "", lsStateCode = "", lsCountCode = ""; String custCodeBill = "", lsStateCode = "", lsCountCode = "";
...@@ -4226,6 +4226,26 @@ public class PostOrderActivity { ...@@ -4226,6 +4226,26 @@ public class PostOrderActivity {
rs2.close(); rs2.close();
rs2 = null; rs2 = null;
} }
//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);
pstmt2.setString(1, invoiceId);
rs2 = pstmt2.executeQuery();
if (rs2.next())
{
invoiceDate = rs2.getTimestamp("TRAN_DATE");
}
if(pstmt2!=null)
{
pstmt2.close();
pstmt2 = null;
}
if(rs2 != null)
{
rs2.close();
rs2 = null;
}
//Added by NANDKUMAR GADKARI on 01/10/18 to get invoice dATE from invoice[END]
//Added by Santosh on 04/01/17 to get invoice qty from invoice[End] //Added by Santosh on 04/01/17 to get invoice qty from invoice[End]
if (ldEffCost < rate && ldEffCost != 0) if (ldEffCost < rate && ldEffCost != 0)
{ {
...@@ -4288,7 +4308,7 @@ public class PostOrderActivity { ...@@ -4288,7 +4308,7 @@ public class PostOrderActivity {
if (ldEffCost < ldSchCost && ldEffCost != 0) if (ldEffCost < ldSchCost && ldEffCost != 0)
{ {
sql = "update min_rate_history set eff_cost =?, scheme_code =?, chg_date =?, chg_user =?,chg_term =?," sql = "update min_rate_history set eff_cost =?, scheme_code =?, chg_date =?, chg_user =?,chg_term =?,"
+ "returnable = ?,reas_code =? where doc_key =?"; + "returnable = ?,reas_code =? , invoice_id= ?, invoice_date = ? where doc_key =?";//invoice_id and invoice_date Added by NANDKUMAR GADKARI on 01/10/18
pstmt2 = conn.prepareStatement(sql); pstmt2 = conn.prepareStatement(sql);
pstmt2.setDouble(1, ldEffCost); pstmt2.setDouble(1, ldEffCost);
pstmt2.setString(2, itemCodeOrd); pstmt2.setString(2, itemCodeOrd);
...@@ -4297,7 +4317,9 @@ public class PostOrderActivity { ...@@ -4297,7 +4317,9 @@ public class PostOrderActivity {
pstmt2.setString(5, termId); pstmt2.setString(5, termId);
pstmt2.setString(6, lsReturnable); pstmt2.setString(6, lsReturnable);
pstmt2.setString(7, lsReasCode); pstmt2.setString(7, lsReasCode);
pstmt2.setString(8, lsDocValue); pstmt2.setString(8, invoiceId);
pstmt2.setTimestamp(9, invoiceDate);
pstmt2.setString(10, lsDocValue);
cnt = pstmt2.executeUpdate(); cnt = pstmt2.executeUpdate();
...@@ -4369,7 +4391,7 @@ public class PostOrderActivity { ...@@ -4369,7 +4391,7 @@ public class PostOrderActivity {
if (ldEffCost < ldSchCost && ldEffCost != 0) if (ldEffCost < ldSchCost && ldEffCost != 0)
{ {
sql = "update min_rate_history set eff_cost =?, scheme_code =?, chg_date =?, chg_user =?,chg_term =?," sql = "update min_rate_history set eff_cost =?, scheme_code =?, chg_date =?, chg_user =?,chg_term =?,"
+ "returnable = ?,reas_code =? where doc_key =?"; + "returnable = ?,reas_code =? invoice_id= ?, invoice_date = ? where doc_key =?";//invoice_id and invoice_date Added by NANDKUMAR GADKARI on 01/10/18
pstmt2 = conn.prepareStatement(sql); pstmt2 = conn.prepareStatement(sql);
pstmt2.setDouble(1, ldEffCost); pstmt2.setDouble(1, ldEffCost);
pstmt2.setString(2, itemCodeOrd); pstmt2.setString(2, itemCodeOrd);
...@@ -4378,7 +4400,9 @@ public class PostOrderActivity { ...@@ -4378,7 +4400,9 @@ public class PostOrderActivity {
pstmt2.setString(5, termId); pstmt2.setString(5, termId);
pstmt2.setString(6, lsReturnable); pstmt2.setString(6, lsReturnable);
pstmt2.setString(7, lsReasCode); pstmt2.setString(7, lsReasCode);
pstmt2.setString(8, lsDocValue); pstmt2.setString(8, invoiceId);
pstmt2.setTimestamp(9, invoiceDate);
pstmt2.setString(10, lsDocValue);
cnt = pstmt2.executeUpdate(); cnt = pstmt2.executeUpdate();
......
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