Commit 008ce5d1 authored by mchaudhari's avatar mchaudhari

Code Changes add Tax Amount


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95571 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ae954984
......@@ -37,7 +37,7 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
double diffAmtExch = 0, adjAmt = 0, netAmt = 0, netAmtBc = 0, vouchAmt = 0, billAmt = 0, taxAmt = 0, totAmt = 0;
double netAmtRcp = 0, advAmt = 0, netAmtDet = 0, netAmtBcRcp = 0, taxAmtDet = 0, totAmtDet = 0, netAmtBcDet = 0 ;
double advAmtAdj = 0, taxedAdjAmt = 0, advAmtDet = 0;
double advAmtAdj = 0, taxedAdjAmt = 0, advAmtDet = 0, taxAmtAdv = 0;
int cnt=0;
try
......@@ -62,7 +62,7 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
pstmt.close();
pstmt = null;
sql="select coalesce(sum(adj_amt),0), coalesce(sum(taxed_adj_amt),0) from misc_vouchadv WHERE tran_id = ? " ;
sql="select coalesce(sum(adj_amt),0), coalesce(sum(taxed_adj_amt),0), coalesce(sum(tax_amt),0) from misc_vouchadv WHERE tran_id = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId );
rs = pstmt.executeQuery();
......@@ -70,6 +70,7 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
{
advAmtAdj = rs.getDouble(1);
taxedAdjAmt = rs.getDouble(2);
taxAmtAdv = rs.getDouble(3);
}
rs.close();
rs = null;
......@@ -159,7 +160,7 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
pstmt.close();
pstmt = null;
totAmt = billAmt + taxAmt;
totAmt = billAmt + (taxAmt + taxAmtAdv);
netAmt = advAmt + totAmt;
......@@ -177,13 +178,14 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
pstmt.close();
pstmt = null;
System.out.println("Taxy Amt = "+ taxAmt + " totAmt = "+ totAmt);
sql="UPDATE misc_voucher set adv_amt__det = ?, bill_amt = ?, adv_amt = ?, tax_amt = ?, tot_amt = ?, net_amt = ?, net_amt__bc = ? WHERE tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,advAmtDet );
pstmt.setDouble(2,billAmt);
pstmt.setDouble(3,advAmt);
pstmt.setDouble(4,taxAmt);
pstmt.setDouble(4,(taxAmt + taxAmtAdv));
pstmt.setDouble(5,totAmt);
pstmt.setDouble(6,netAmt);
pstmt.setDouble(7,netAmtBc);
......
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