Commit 963af0b4 authored by msingh's avatar msingh

Changed by Manish on 05/04/16 for PostOrdInvoiceGen.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101135 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ba47c132
...@@ -330,7 +330,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -330,7 +330,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
ResultSet rs=null; ResultSet rs=null;
String xtraParams = null; String xtraParams = null;
String lc_ratestd="",lc_cstrate=""; String lc_ratestd="0",lc_cstrate="0";
double lc_disc_amt=0.00,ld_discount=0.00; double lc_disc_amt=0.00,ld_discount=0.00;
String despIdKey="",despId="",sysDate="",salesInvPstHdr="",despLineNo="",userId="",termId="",loginSite="",tranId=""; String despIdKey="",despId="",sysDate="",salesInvPstHdr="",despLineNo="",userId="",termId="",loginSite="",tranId="";
...@@ -647,8 +647,8 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -647,8 +647,8 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
* *
* */ * */
sql="select (case when rate__std is null then 0 else rate__std end ) as lc_ratestd," sql="select (case when rate__std is null then 0 else rate__std end ) as lc_ratestd,"
+ "(case when cost_rate is null then 0 else cost_rate end )as lc_cstrate" + "(case when cost_rate is null then 0 else cost_rate end )as lc_cstrate "
+ "from despatchdet " + " from despatchdet "
+ "where desp_id = ? " + "where desp_id = ? "
+ " and line_no = ? " + " and line_no = ? "
+ " and item_code = ?"; + " and item_code = ?";
...@@ -830,7 +830,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -830,7 +830,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
sql="update invdet set tax_class=?,tax_chap=?,tax_env=?,tax_amt=0,net_amt=0 where tran_id=?"; sql="update invdet set tax_class=?,tax_chap=?,tax_env=?,tax_amt=0,net_amt=0 where invoice_id=?";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,""); pstmt1.setString(1,"");
pstmt1.setString(2,""); pstmt1.setString(2,"");
...@@ -843,7 +843,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -843,7 +843,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
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"
+ " where invoice_id=? " + " where invoice_id=? "
+ " group by sord_no,sord_line_no,tax_class,tax_chap,tax_env,"); + " group by sord_no,sord_line_no,tax_class,tax_chap,tax_env");
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
while(rs.next()) while(rs.next())
...@@ -859,7 +859,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -859,7 +859,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
totNetAmt+=netAmt; totNetAmt+=netAmt;
sql="update invdet set tax_class=?,tax_chap=?,tax_env=?,tax_amt=tax_amt+?,net_amt=net_amt+?+?" sql="update invdet set tax_class=?,tax_chap=?,tax_env=?,tax_amt=tax_amt+?,net_amt=net_amt+?+?"
+ " where tran_id=? " + " where invoice_id=? "
+ " and sord_no=? " + " and sord_no=? "
+ " and sord_line_no=?"; + " and sord_line_no=?";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
...@@ -879,10 +879,12 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -879,10 +879,12 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
sql="update invoice set tax_amt=?,net_amt=? where tran_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, totNetAmt); pstmt.setDouble(2, totTaxAmt);
pstmt.setDouble(3, totNetAmt);
pstmt.setString(4,tranId);
pstmt.executeUpdate(); 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