Commit 3fad09eb authored by manohar's avatar manohar

Bug fixing, update of net_amt in invoice_trace done


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104882 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ce0aa69d
...@@ -1028,6 +1028,15 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1028,6 +1028,15 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
sql="update invoice_trace set net_amt = ( (QUANTITY__STDUOM * RATE__STDUOM) - (QUANTITY__STDUOM * RATE__STDUOM * DISCOUNT / 100 ) + TAX_AMT - DISC_SCHEM_OFFINV_AMT), chg_term = ?,chg_user=? ,chg_date=? where invoice_id = ? ";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,termId);
pstmt.setString(2,userId);
pstmt.setTimestamp(3, sysDateTs);
pstmt.setString(4,tranId);
pstmt.executeUpdate();
pstmt.close();
pstmt=null;
/*pstmt=conn.prepareStatement("select sord_no,sord_line_no,tax_class,tax_chap,tax_env,sum(tax_amt),sum(net_amt)" /*pstmt=conn.prepareStatement("select sord_no,sord_line_no,tax_class,tax_chap,tax_env,sum(tax_amt),sum(net_amt)"
+ " from invoice_trace" + " from invoice_trace"
...@@ -1073,12 +1082,12 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1073,12 +1082,12 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
sql="update invoice set tax_amt=?,net_amt=?+? where invoice_id=? "; sql="update invoice set tax_amt=?,net_amt=? where invoice_id=? ";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setDouble(1, totTaxAmt); pstmt.setDouble(1, totTaxAmt);
pstmt.setDouble(2, totTaxAmt); //pstmt.setDouble(2, totTaxAmt);
pstmt.setDouble(3, totNetAmt); pstmt.setDouble(2, totNetAmt);
pstmt.setString(4,tranId); pstmt.setString(3,tranId);
pstmt.executeUpdate(); pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
...@@ -1096,7 +1105,10 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1096,7 +1105,10 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
{ {
sysDateTs = java.sql.Timestamp.valueOf(genericUtility.getValidDateString(sysDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); sysDateTs = java.sql.Timestamp.valueOf(genericUtility.getValidDateString(sysDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
} }
sql="update invoice_trace set chg_term = ?,chg_user=? ,chg_date=? where invoice_id = ? ";
/*
sql="update invoice_trace set net_amt = ( (QUANTITY__STDUOM * RATE__STDUOM) - (QUANTITY__STDUOM * RATE__STDUOM * DISCOUNT / 100 ) + TAX_AMT - DISC_SCHEM_OFFINV_AMT), chg_term = ?,chg_user=? ,chg_date=? where invoice_id = ? ";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,termId); pstmt.setString(1,termId);
pstmt.setString(2,userId); pstmt.setString(2,userId);
...@@ -1105,6 +1117,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1105,6 +1117,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt.executeUpdate(); pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
*/
sql="update invdet set chg_term = ?,chg_user=? ,chg_date=? where invoice_id = ? "; sql="update invdet set chg_term = ?,chg_user=? ,chg_date=? where invoice_id = ? ";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,termId); pstmt.setString(1,termId);
......
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