Commit 898f953d authored by manohar's avatar manohar

adv_amt added to net_amt and net_amt__bc


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93979 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 91a7ee70
......@@ -168,12 +168,12 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa
pstmt.close();
pstmt = null;
chqAmt = billAmtDet + bdAmt + advAmtHdr + adjAmtAdv;
chqAmt = billAmtDet + bdAmt + adjAmtAdv;
if (chqAmt != 0)
{
sql="UPDATE receipt SET bill_amt = ? WHERE tran_id = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,chqAmt - advAmtHdr );
pstmt.setDouble(1,chqAmt );
pstmt.setString(2,tranId );
cnt = pstmt.executeUpdate();
pstmt.close();
......@@ -182,7 +182,7 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa
sql="UPDATE receipt SET DIFF_AMT__EXCH = ? + ? + ?, net_amt = ( (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 bill_disc_amt is null then 0 else bill_disc_amt end) + (case when fin_chg is null then 0 else fin_chg end)) ,net_amt__bc = ( (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 bill_disc_amt is null then 0 else bill_disc_amt end) + (case when fin_chg is null then 0 else fin_chg end)) * exch_rate WHERE tran_id = ? " ;
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 bill_disc_amt is null then 0 else bill_disc_amt end) + (case when fin_chg is null then 0 else fin_chg end)) ,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 bill_disc_amt is null then 0 else bill_disc_amt end) + (case when fin_chg is null then 0 else fin_chg end)) * exch_rate WHERE tran_id = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,diffAmtExchDet );
......
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