Commit abb3af23 authored by kmandhre's avatar kmandhre

change for net amount calculation minus bill_disc_amt


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94194 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7c671754
...@@ -212,17 +212,19 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa ...@@ -212,17 +212,19 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa
// - (case when bill_disc_amt is null then 0 else bill_disc_amt end) removed on 21/01/14 // - (case when bill_disc_amt is null then 0 else bill_disc_amt end) removed on 21/01/14
//change on 01/feb/14 minus bill_disc_amt //change done by kunal on 01/feb/14 minus bill_disc_amt
sql="UPDATE receipt SET DIFF_AMT__EXCH = ? + ? + ?, net_amt = ((case when adv_amt is null then 0 else adv_amt end)+ (case when bill_amt is null then 0 else bill_amt end)+ (case when advadj_amt is null then 0 else advadj_amt end) - (case when bill_disc_amt is null then 0 else bill_disc_amt end) + (case when oth_amt is null then 0 else oth_amt end) + (case when fin_chg is null then 0 else fin_chg end) + tax_amt) , " sql="UPDATE receipt SET DIFF_AMT__EXCH = ? + ? + ?, net_amt = ((case when adv_amt is null then 0 else adv_amt end)+ (case when bill_amt is null then 0 else bill_amt end)+ (case when advadj_amt is null then 0 else advadj_amt end) - ? + (case when oth_amt is null then 0 else oth_amt end) + (case when fin_chg is null then 0 else fin_chg end) + tax_amt) , "
+" net_amt__bc = ((case when adv_amt is null then 0 else adv_amt end)+ (case when bill_amt is null then 0 else bill_amt end)+ (case when advadj_amt is null then 0 else advadj_amt end) - (case when bill_disc_amt is null then 0 else bill_disc_amt end) + (case when oth_amt is null then 0 else oth_amt end) + (case when fin_chg is null then 0 else fin_chg end) + tax_amt) * exch_rate, " +" net_amt__bc = ((case when adv_amt is null then 0 else adv_amt end)+ (case when bill_amt is null then 0 else bill_amt end)+ (case when advadj_amt is null then 0 else advadj_amt end) - ? + (case when oth_amt is null then 0 else oth_amt end) + (case when fin_chg is null then 0 else fin_chg end) + tax_amt) * exch_rate, "
+" bill_disc_amt = ? WHERE tran_id = ? " ; +" bill_disc_amt = ? WHERE tran_id = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,diffAmtExchDet ); pstmt.setDouble(1,diffAmtExchDet );
pstmt.setDouble(2,diffAmtExchAdv ); pstmt.setDouble(2,diffAmtExchAdv );
pstmt.setDouble(3,diffAmtExchEpc ); pstmt.setDouble(3,diffAmtExchEpc );
pstmt.setDouble(4,bdAmt ); pstmt.setDouble(4,bdAmt );//added by kunal on 03/feb/14
pstmt.setString(5,tranId ); pstmt.setDouble(5,bdAmt ); //added by kunal on 03/feb/14
pstmt.setDouble(6,bdAmt );
pstmt.setString(7,tranId );
cnt = pstmt.executeUpdate(); cnt = pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt = null; 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