Commit fb4d23b4 authored by ngadkari's avatar ngadkari

Changes for Charge Back new replacement module

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210806 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c64f5e15
......@@ -3628,7 +3628,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
valueXmlString.append("<item_code protect =\"1\"><![CDATA[").append(itemCode).append("]]></item_code>");
valueXmlString.append("<item_descr><![CDATA[").append(itemDescr).append("]]></item_descr>");
valueXmlString.append("<quantity protect =\"1\"><![CDATA[").append(quantity).append("]]></quantity>");
valueXmlString.append("<quantity protect =\"0\"><![CDATA[").append(quantity).append("]]></quantity>");
valueXmlString.append("<item_code__repl><![CDATA[").append(itemCodeRepl).append("]]></item_code__repl>");
valueXmlString.append("<item_repl_descr><![CDATA[").append(itemReplDescr).append("]]></item_repl_descr>");
valueXmlString.append("<rate><![CDATA[").append(0).append("]]></rate>");
......
......@@ -148,7 +148,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
PreparedStatement preparedStatement = null, preparedStatement1 = null;
ResultSet resultSet = null;
String schItemCodeRepl="",itemCode="",tranId="",schItemCode="",custCodeCredit="";
double schFreeValue=0,freeValue=0,schQty=0,schFreeQty=0;
double schFreeValue=0,freeValue=0,schQty=0,schFreeQty=0,quantity=0;
try
{
//Changes and Commented By Bhushan on 09-06-2016 :START
......@@ -252,7 +252,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
// added by nandkumar gadkari on 01/10/19--------------------start------------------
if ("V".equalsIgnoreCase(settleMethod) || "Q".equalsIgnoreCase(settleMethod))
{
secondarySchSql = "SELECT ITEM_CODE__REPL,FREE_QTY,FREE_VALUE,OFFER ,ITEM_CODE,FREE_VALUE FROM CHARGE_BACK_REPL WHERE TRAN_ID=?";
secondarySchSql = "SELECT ITEM_CODE__REPL,FREE_QTY,FREE_VALUE,OFFER ,ITEM_CODE,FREE_VALUE,QUANTITY FROM CHARGE_BACK_REPL WHERE TRAN_ID=?";
preparedStatement1 = conn.prepareStatement(secondarySchSql);
preparedStatement1.setString(1, tranID);
rs = preparedStatement1.executeQuery();
......@@ -262,6 +262,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
freeQty = rs.getDouble("FREE_QTY");
freeVaule = rs.getDouble("FREE_VALUE");
offer = E12GenericUtility.checkNull(rs.getString("OFFER"));
quantity = rs.getDouble("QUANTITY");
if (offer.length() <= 0)
{
......@@ -366,13 +367,14 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
{
if(failQty )
{
sql = "UPDATE SCHEME_APPRV_DET SET ITEM_CODE__REPL =? , FREE_QTY = ? WHERE TRAN_ID = ? AND ITEM_CODE= ? ";
sql = "UPDATE SCHEME_APPRV_DET SET ITEM_CODE__REPL =? , FREE_QTY = ?,QUANTITY= ? WHERE TRAN_ID = ? AND ITEM_CODE= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCodeRepl);
pstmt.setDouble(2, freeQty);
pstmt.setString(3, tranID);
pstmt.setString(4, itemCode);
pstmt.setDouble(3, quantity);
pstmt.setString(4, tranId);
pstmt.setString(5, itemCode);
updCnt=pstmt.executeUpdate();
pstmt.close();
pstmt=null;
......@@ -383,7 +385,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, freeVaule);
pstmt.setString(2, tranID);
pstmt.setString(2, tranId);
updCnt=pstmt.executeUpdate();
pstmt.close();
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