Commit 4bdfc7c7 authored by prane's avatar prane

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@178540 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4869d47e
...@@ -1063,41 +1063,41 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1063,41 +1063,41 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
+ " 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=conn.prepareStatement("select sord_no,line_no,tax_class,tax_chap,tax_env,sum(tax_amt),sum(net_amt)" /*pstmt=conn.prepareStatement("select sord_no,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,line_no,tax_class,tax_chap,tax_env"); + " group by sord_no,line_no,tax_class,tax_chap,tax_env");*/
/*pstmt=conn.prepareStatement("select sord_no,sord_line_no,item_code,tax_class,tax_chap,tax_env,sum(tax_amt),sum(net_amt)" pstmt=conn.prepareStatement("select sord_no,sord_line_no,item_code,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,item_code,tax_class,tax_chap,tax_env");*/ + " group by sord_no,sord_line_no,item_code,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())
{ {
sordNo=rs.getString(1); sordNo=rs.getString(1);
soLineNo=rs.getString(2); soLineNo=rs.getString(2);
//itemCode=rs.getString(3); itemCode=rs.getString(3);
taxClass=rs.getString(3); taxClass=rs.getString(4);
taxChap=rs.getString(4); taxChap=rs.getString(5);
taxEnv=rs.getString(5); taxEnv=rs.getString(6);
taxAmt=rs.getDouble(6); taxAmt=rs.getDouble(7);
netAmt=rs.getDouble(7); netAmt=rs.getDouble(8);
totTaxAmt+=taxAmt; totTaxAmt+=taxAmt;
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 invoice_id=? " + " where invoice_id=? "
+ " and sord_no=? " + " and sord_no=? "
//+ " and sord_line_no=?"; //+ " and sord_line_no=?";
+ " and line_no=?"; + " and line_no=?";*/
/*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 invoice_id=? " + " where invoice_id=? "
+ " and sord_no=? " + " and sord_no=? "
+ " and sord_line_no=?" + " and sord_line_no=?"
//+ " and line_no=?"; //+ " and line_no=?";
+ " and item_code=?";*/ + " and item_code=?";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,taxClass); pstmt1.setString(1,taxClass);
pstmt1.setString(2,taxChap); pstmt1.setString(2,taxChap);
...@@ -1108,7 +1108,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1108,7 +1108,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt1.setString(7,tranId); pstmt1.setString(7,tranId);
pstmt1.setString(8,sordNo); pstmt1.setString(8,sordNo);
pstmt1.setString(9,soLineNo); pstmt1.setString(9,soLineNo);
//pstmt1.setString(10,itemCode); pstmt1.setString(10,itemCode);
pstmt1.executeUpdate(); pstmt1.executeUpdate();
} }
rs.close(); rs.close();
...@@ -1116,12 +1116,14 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1116,12 +1116,14 @@ 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=?,inv_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(2, totNetAmt); pstmt.setDouble(2, totNetAmt);
pstmt.setString(3,tranId); pstmt.setDouble(3, ((totNetAmt+discAmt)-totTaxAmt));
pstmt.setString(4,tranId);
pstmt.executeUpdate(); pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
...@@ -1947,8 +1949,8 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -1947,8 +1949,8 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
//beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no__sord").trim(); //beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no__sord").trim();
//Changes done by Pavan R on 09/JAN/18 Start to sort desp line and sord line wise //Changes done by Pavan R on 09/JAN/18 Start to sort desp line and sord line wise
//beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no__sord").trim()+"@".trim()+rs.getString("item_code").trim(); beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no__sord").trim()+"@".trim()+rs.getString("item_code").trim();
beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no").trim(); //beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no").trim();
//beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no").trim()+"@".trim()+rs.getString("line_no__sord").trim(); //beanMapKey=rs.getString("sord_no").trim()+"@".trim()+rs.getString("line_no").trim()+"@".trim()+rs.getString("line_no__sord").trim();
//Changes done by Pavan R on 09/JAN/18 End //Changes done by Pavan R on 09/JAN/18 End
System.out.println("beanMapKey>>>>["+beanMapKey+"]"); System.out.println("beanMapKey>>>>["+beanMapKey+"]");
...@@ -2023,11 +2025,11 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -2023,11 +2025,11 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
mRealQty=(Double.parseDouble(quantity_real==null?"0.00":quantity_real)+invoiceDetBean.getmRealQty()); mRealQty=(Double.parseDouble(quantity_real==null?"0.00":quantity_real)+invoiceDetBean.getmRealQty());
System.out.println("mTotDespQty:["+mTotDespQty+"]mTotStdQty:["+mTotStdQty+"]mNoArt:["+mNoArt+"]mRealQty:["+mRealQty+"]"); System.out.println("mTotDespQty:["+mTotDespQty+"]mTotStdQty:["+mTotStdQty+"]mNoArt:["+mNoArt+"]mRealQty:["+mRealQty+"]");
/*invoiceDetBean.setmTotDespQty(mTotDespQty);//==null?"0.00":mTotDespQty); invoiceDetBean.setmTotDespQty(mTotDespQty);//==null?"0.00":mTotDespQty);
invoiceDetBean.setmTotStdQty(mTotStdQty); invoiceDetBean.setmTotStdQty(mTotStdQty);
invoiceDetBean.setmNoArt(mNoArt); invoiceDetBean.setmNoArt(mNoArt);
invoiceDetBean.setmRealQty(mRealQty); invoiceDetBean.setmRealQty(mRealQty);
*/
invDetBeanMap.put(beanMapKey, invoiceDetBean); invDetBeanMap.put(beanMapKey, invoiceDetBean);
} }
}// DESP_DET while loop END }// DESP_DET while loop END
......
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