Commit a7c15a6c authored by kshinde's avatar kshinde

tax chap, tax class carry forward from sorder detail and sorditem to despatch.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177638 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c5c39658
...@@ -4790,6 +4790,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -4790,6 +4790,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
} // end wf } // end wf
else if (currentColumn.trim().equalsIgnoreCase("exp_lev")) else if (currentColumn.trim().equalsIgnoreCase("exp_lev"))
{ {
String taxChapFr=null;
mVal1 = checkNull(genericUtility.getColumnValue("exp_lev", dom)); mVal1 = checkNull(genericUtility.getColumnValue("exp_lev", dom));
mcode = checkNull(genericUtility.getColumnValue("line_no__sord", dom)); mcode = checkNull(genericUtility.getColumnValue("line_no__sord", dom));
mVal = checkNull(genericUtility.getColumnValue("sord_no", dom)); mVal = checkNull(genericUtility.getColumnValue("sord_no", dom));
...@@ -4816,7 +4817,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -4816,7 +4817,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
sql = " Select item_code__ord, quantity, item_code, qty_alloc "+ sql = " Select item_code__ord, quantity, item_code, qty_alloc ,tax_chap"+
" from sorditem where sale_order = ? and line_no = ? and "+ " from sorditem where sale_order = ? and line_no = ? and "+
" site_code = ? and exp_lev = ? "; " site_code = ? and exp_lev = ? ";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
...@@ -4831,6 +4832,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -4831,6 +4832,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
mNum = rs.getDouble("quantity"); mNum = rs.getDouble("quantity");
mdescr1 = checkNull( rs.getString("item_code")); mdescr1 = checkNull( rs.getString("item_code"));
mNum1 = rs.getDouble("qty_alloc"); mNum1 = rs.getDouble("qty_alloc");
taxChapFr=rs.getString("tax_chap");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -4853,6 +4855,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -4853,6 +4855,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
valueXmlString.append("<conv__qty_stduom>").append("<![CDATA["+mNum2+"]]>").append("</conv__qty_stduom>"); valueXmlString.append("<conv__qty_stduom>").append("<![CDATA["+mNum2+"]]>").append("</conv__qty_stduom>");
valueXmlString.append("<item_descr>").append("<![CDATA["+mitemdesc+"]]>").append("</item_descr>"); valueXmlString.append("<item_descr>").append("<![CDATA["+mitemdesc+"]]>").append("</item_descr>");
valueXmlString.append("<unit>").append("<![CDATA["+mUnit+"]]>").append("</unit>"); valueXmlString.append("<unit>").append("<![CDATA["+mUnit+"]]>").append("</unit>");
valueXmlString.append("<tax_chap>").append("<![CDATA["+taxChapFr+"]]>").append("</tax_chap>");
//mNum3 = gf_conv_qty_fact(mUnit, mstunit, mdescr1, mNum, mNum2); //mNum3 = gf_conv_qty_fact(mUnit, mstunit, mdescr1, mNum, mNum2);
mNumList = distCommon.convQtyFactor(mUnit, mstunit, mdescr1, mNum,mNum2, conn); mNumList = distCommon.convQtyFactor(mUnit, mstunit, mdescr1, mNum,mNum2, conn);
......
...@@ -255,6 +255,10 @@ public class PostOrdDespatchGen ...@@ -255,6 +255,10 @@ public class PostOrdDespatchGen
rateStd = rs.getDouble("RATE__STD"); rateStd = rs.getDouble("RATE__STD");
unitRateSord = rs.getString("UNIT__RATE"); unitRateSord = rs.getString("UNIT__RATE");
unitSord = rs.getString("UNIT"); unitSord = rs.getString("UNIT");
taxClass=rs.getString("TAX_CLASS");
taxChap=rs.getString("TAX_CHAP");
taxEnv=rs.getString("TAX_ENV");
/*System.out.println("saleOrder=====" + saleOrder); /*System.out.println("saleOrder=====" + saleOrder);
......
...@@ -923,13 +923,14 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -923,13 +923,14 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
double quantityStduom=0.0,rate=0.0,convQtyStduom=0.0; double quantityStduom=0.0,rate=0.0,convQtyStduom=0.0;
Timestamp dspDate=null; Timestamp dspDate=null;
String loginEmpCode="",projCode=""; String loginEmpCode="",projCode="";
String taxChap=null,taxChapFr=null,taxClass=null,siteCodeCr=null;
Timestamp sysDate = null,dueDate=null,orderDate=null; Timestamp sysDate = null,dueDate=null,orderDate=null;
DistCommon distCommom = new DistCommon(); DistCommon distCommom = new DistCommon();
try try
{ {
//Get consume_fc from Sale Order header. //Get consume_fc from Sale Order header.
sql="SELECT consume_fc, cust_code, item_ser, price_list__disc, proj_code,due_date, " + sql="SELECT consume_fc, cust_code, item_ser, price_list__disc, proj_code,due_date, " +
" order_date, order_type FROM sorder WHERE sale_order = ?"; " order_date, order_type ,site_code__ship FROM sorder WHERE sale_order = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, saleOrder); pstmt.setString(1, saleOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -944,6 +945,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -944,6 +945,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
projCode=rs.getString("proj_code"); projCode=rs.getString("proj_code");
dueDate=rs.getTimestamp("due_date"); dueDate=rs.getTimestamp("due_date");
orderDate=rs.getTimestamp("order_date"); orderDate=rs.getTimestamp("order_date");
siteCodeCr=rs.getString("site_code__ship");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -953,7 +955,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -953,7 +955,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
// get from sorddet // get from sorddet
sql="SELECT sale_order, line_no, site_code, item_code, item_code__ord, item_flg, " + sql="SELECT sale_order, line_no, site_code, item_code, item_code__ord, item_flg, " +
"quantity, unit, line_no__contr, unit__std, quantity__stduom, dsp_date, rate, " + "quantity, unit, line_no__contr, unit__std, quantity__stduom, dsp_date, rate, " +
"min_shelf_life, max_shelf_life, cust_item__ref, nature, conv__qty_stduom FROM" + "min_shelf_life, max_shelf_life, cust_item__ref, nature, conv__qty_stduom,tax_chap FROM" +
" sorddet WHERE sale_order = ? ORDER BY line_no"; " sorddet WHERE sale_order = ? ORDER BY line_no";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, saleOrder); pstmt.setString(1, saleOrder);
...@@ -977,6 +979,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -977,6 +979,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
convQtyStduom= rs.getDouble("conv__qty_stduom"); convQtyStduom= rs.getDouble("conv__qty_stduom");
rate= rs.getDouble("rate"); rate= rs.getDouble("rate");
dspDate= rs.getTimestamp("dsp_date"); dspDate= rs.getTimestamp("dsp_date");
taxChap= rs.getString("tax_chap");
if(minShelfLife==0) if(minShelfLife==0)
{ {
...@@ -1157,6 +1160,12 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -1157,6 +1160,12 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
{ {
maxLife = maxShelfLife; maxLife = maxShelfLife;
} }
//Changed by Kunal on 4/01/18 for adding tax chapter in sorditem[Start]
taxChapFr = disCommon.getTaxChap(itemCode, itemSer, "C", custCode, siteCodeCr,conn);
System.out.println("taxChapFr["+taxChapFr+"]");
sql="insert into sorditem " sql="insert into sorditem "
+ " (sale_order, line_no, site_code, item_code__ord, item_code__ref," + " (sale_order, line_no, site_code, item_code__ord, item_code__ref,"
+ " item_code,item_flag,line_type,unit__ord,unit__ref,unit,qty_ord,qty_ref," + " item_code,item_flag,line_type,unit__ord,unit__ref,unit,qty_ord,qty_ref,"
...@@ -1164,10 +1173,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -1164,10 +1173,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
"cust_item__ref,order_date,order_type,dsp_date,rate,status,nature," + "cust_item__ref,order_date,order_type,dsp_date,rate,status,nature," +
"conv__qty_stdqty,cust_code__dlv, " "conv__qty_stdqty,cust_code__dlv, "
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start] //Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start]
+" qty_alloc, qty_desp )" +" qty_alloc, qty_desp ,tax_chap )"
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end] //Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end]
+ " values " + " values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,saleOrder); pstmt1.setString(1,saleOrder);
pstmt1.setString(2,lineNo); pstmt1.setString(2,lineNo);
...@@ -1201,6 +1210,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -1201,6 +1210,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt1.setString(29,"0"); pstmt1.setString(29,"0");
pstmt1.setString(30,"0"); pstmt1.setString(30,"0");
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end] //Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end]
pstmt1.setString(31,taxChap);
pstmt1.executeUpdate(); pstmt1.executeUpdate();
pstmt1.close(); pstmt1.close();
...@@ -1278,7 +1288,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -1278,7 +1288,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
lineNo = rs1.getString("line_no"); lineNo = rs1.getString("line_no");
if(!"I".equalsIgnoreCase(lineType)) if(!"I".equalsIgnoreCase(lineType))
{ {
if(explodeBomDs(saleOrder,itemCode,expLev,lineNo,lineType,conn) !=1) if(explodeBomDs(saleOrder,itemCode,expLev,lineNo,lineType,taxChapFr,conn) !=1)
{ {
errString = itmDBAccessLocal.getErrorString("","DS000",""); errString = itmDBAccessLocal.getErrorString("","DS000","");
return errString; return errString;
...@@ -2380,7 +2390,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2380,7 +2390,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
//need to return error code.... //need to return error code....
return commPercSalesMap; return commPercSalesMap;
} }
public int explodeBomDs(String saleOrder, String itemCode, String expLev, String lineNo, String lineType,Connection conn) throws ITMException public int explodeBomDs(String saleOrder, String itemCode, String expLev, String lineNo, String lineType,String taxChapFr,Connection conn) throws ITMException
{ {
String sql="",sql1="",sql2="",mapplicable = "Y",mitemCode="" ,mitemRef=""; String sql="",sql1="",sql2="",mapplicable = "Y",mitemCode="" ,mitemRef="";
String itemRef=""; String itemRef="";
...@@ -2703,10 +2713,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2703,10 +2713,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
+ "quantity,unit, line_type,min_shelf_life,max_shelf_life,nature," + + "quantity,unit, line_type,min_shelf_life,max_shelf_life,nature," +
"order_date,order_type,dsp_date,rate , " "order_date,order_type,dsp_date,rate , "
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start] //Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start]
+" qty_alloc, qty_desp )" +" qty_alloc, qty_desp,tax_chap )"
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start] //Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start]
+ " values " + " values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt2=conn.prepareStatement(sql); pstmt2=conn.prepareStatement(sql);
pstmt2.setString(1,expLev+mlevel); pstmt2.setString(1,expLev+mlevel);
pstmt2.setString(2,saleOrder); pstmt2.setString(2,saleOrder);
...@@ -2735,6 +2745,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2735,6 +2745,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt2.setString(24,"0"); pstmt2.setString(24,"0");
pstmt2.setString(25,"0"); pstmt2.setString(25,"0");
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end] //Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end]
pstmt2.setString(26,taxChapFr);
insertCnt= pstmt2.executeUpdate(); insertCnt= pstmt2.executeUpdate();
pstmt2.close(); pstmt2.close();
pstmt2=null; pstmt2=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