Commit 8a97dae6 authored by smane's avatar smane

Code changed by Sagar on 17/Nov/15 for flat booking cancellation(DI3HDOS006) of dosti project


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99165 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 47c63eb3
...@@ -652,7 +652,8 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf ...@@ -652,7 +652,8 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) //if(rs.next()) // Comment Added by Sagar on 17/Nov/15
while(rs.next()) //Condition changed by Sagar on 17/Nov/15 for flat booking cancellation(DI3HDOS006) of dosti project
{ {
adjLineNo = rs.getString("line_no"); adjLineNo = rs.getString("line_no");
adjRefSer = rs.getString("ref_ser"); adjRefSer = rs.getString("ref_ser");
...@@ -661,6 +662,9 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf ...@@ -661,6 +662,9 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
refBalAmt = rs.getDouble("ref_bal_amt"); refBalAmt = rs.getDouble("ref_bal_amt");
mrpValueAdj = rs.getDouble("mrp_value__adj"); mrpValueAdj = rs.getDouble("mrp_value__adj");
System.out.println(">>>>>>>>>>>>>>>>>in while misc_drcr_rcpinv adjLineNo:"+adjLineNo);
System.out.println(">>>>>>>>>>>>>>>>>in while misc_drcr_rcpinv adjAmt:"+adjAmt);
miscRcpInvMap = new HashMap(); miscRcpInvMap = new HashMap();
miscRcpInvMap.put("line_no",adjLineNo); miscRcpInvMap.put("line_no",adjLineNo);
miscRcpInvMap.put("ref_ser",adjRefSer); miscRcpInvMap.put("ref_ser",adjRefSer);
...@@ -2120,10 +2124,12 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf ...@@ -2120,10 +2124,12 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
String errString = "" ; String errString = "" ;
int upd=0; int upd=0;
HashMap advListMap =null; HashMap advListMap =null;
String refSerHdr="",cust="",refSer="",refNo=""; String refSerHdr="",cust="",refSer="",refNo="";
double totAdjAmt=0,amount=0,mrpValueAdj=0,adjAmt=0,totAmt=0; double totAdjAmt=0,amount=0,mrpValueAdj=0,adjAmt=0,totAmt=0;
double totAdjAmtDet=0.0;
try try
{ {
System.out.println("<!@#> In gbfPostMiscDrcrAdjdet :::::::::::::::::::::::::::::::"); System.out.println("<!@#> In gbfPostMiscDrcrAdjdet :::::::::::::::::::::::::::::::");
...@@ -2143,6 +2149,9 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf ...@@ -2143,6 +2149,9 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
totAdjAmt = amount; totAdjAmt = amount;
totAdjAmtDet= totAdjAmtDet + amount; //Code Added by Sagar on 17/Nov/15 for flat booking cancellation(DI3HDOS006) of dosti project
System.out.println(">>>>>>In gbfPostMiscDrcrAdjdet amount:"+amount);
sql =" update receivables " sql =" update receivables "
+" set adj_amt = case when adj_amt is null then 0 else adj_amt end + ? , " +" set adj_amt = case when adj_amt is null then 0 else adj_amt end + ? , "
+" mrp_value = case when mrp_value is null then 0 else mrp_value end - ? " +" mrp_value = case when mrp_value is null then 0 else mrp_value end - ? "
...@@ -2196,11 +2205,14 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf ...@@ -2196,11 +2205,14 @@ public class MiscDrCrRcpConf extends ActionHandlerEJB implements MiscDrCrRcpConf
} }
}//end of for }//end of for
System.out.println(">>>>>In MiscDrCrRcpConf fianl totAdjAmtDet:"+totAdjAmtDet);
sql =" update receivables set adj_amt = case when adj_amt is null then 0 else adj_amt end + -1 * ? " sql =" update receivables set adj_amt = case when adj_amt is null then 0 else adj_amt end + -1 * ? "
+" where tran_ser = ? and ref_no = ? "; +" where tran_ser = ? and ref_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,totAdjAmt); //pstmt.setDouble(1,totAdjAmt); // Comment added by sagar on 17/Nov/15 for flat booking cancellation(DI3HDOS006) of dosti project
pstmt.setDouble(1,totAdjAmtDet); // Code changed by sagar on 17/Nov/15 for flat booking cancellation(DI3HDOS006) of dosti project
pstmt.setString(2,refSerHdr); pstmt.setString(2,refSerHdr);
pstmt.setString(3,tranId); pstmt.setString(3,tranId);
upd = pstmt.executeUpdate(); upd = pstmt.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