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
} // end wf
else if (currentColumn.trim().equalsIgnoreCase("exp_lev"))
{
String taxChapFr=null;
mVal1 = checkNull(genericUtility.getColumnValue("exp_lev", dom));
mcode = checkNull(genericUtility.getColumnValue("line_no__sord", dom));
mVal = checkNull(genericUtility.getColumnValue("sord_no", dom));
......@@ -4816,7 +4817,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
pStmt.close();
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 "+
" site_code = ? and exp_lev = ? ";
pStmt = conn.prepareStatement(sql);
......@@ -4831,6 +4832,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
mNum = rs.getDouble("quantity");
mdescr1 = checkNull( rs.getString("item_code"));
mNum1 = rs.getDouble("qty_alloc");
taxChapFr=rs.getString("tax_chap");
}
rs.close();
rs = null;
......@@ -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("<item_descr>").append("<![CDATA["+mitemdesc+"]]>").append("</item_descr>");
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);
mNumList = distCommon.convQtyFactor(mUnit, mstunit, mdescr1, mNum,mNum2, conn);
......
......@@ -256,6 +256,10 @@ public class PostOrdDespatchGen
unitRateSord = rs.getString("UNIT__RATE");
unitSord = rs.getString("UNIT");
taxClass=rs.getString("TAX_CLASS");
taxChap=rs.getString("TAX_CHAP");
taxEnv=rs.getString("TAX_ENV");
/*System.out.println("saleOrder=====" + saleOrder);
......
......@@ -923,13 +923,14 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
double quantityStduom=0.0,rate=0.0,convQtyStduom=0.0;
Timestamp dspDate=null;
String loginEmpCode="",projCode="";
String taxChap=null,taxChapFr=null,taxClass=null,siteCodeCr=null;
Timestamp sysDate = null,dueDate=null,orderDate=null;
DistCommon distCommom = new DistCommon();
try
{
//Get consume_fc from Sale Order header.
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.setString(1, saleOrder);
rs = pstmt.executeQuery();
......@@ -944,6 +945,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
projCode=rs.getString("proj_code");
dueDate=rs.getTimestamp("due_date");
orderDate=rs.getTimestamp("order_date");
siteCodeCr=rs.getString("site_code__ship");
}
rs.close();
rs = null;
......@@ -953,7 +955,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
// get from sorddet
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, " +
"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";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, saleOrder);
......@@ -977,6 +979,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
convQtyStduom= rs.getDouble("conv__qty_stduom");
rate= rs.getDouble("rate");
dspDate= rs.getTimestamp("dsp_date");
taxChap= rs.getString("tax_chap");
if(minShelfLife==0)
{
......@@ -1157,6 +1160,12 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
{
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 "
+ " (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,"
......@@ -1164,10 +1173,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
"cust_item__ref,order_date,order_type,dsp_date,rate,status,nature," +
"conv__qty_stdqty,cust_code__dlv, "
//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]
+ " values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,saleOrder);
pstmt1.setString(2,lineNo);
......@@ -1201,6 +1210,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt1.setString(29,"0");
pstmt1.setString(30,"0");
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end]
pstmt1.setString(31,taxChap);
pstmt1.executeUpdate();
pstmt1.close();
......@@ -1278,7 +1288,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
lineNo = rs1.getString("line_no");
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","");
return errString;
......@@ -2380,7 +2390,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
//need to return error code....
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 itemRef="";
......@@ -2703,10 +2713,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
+ "quantity,unit, line_type,min_shelf_life,max_shelf_life,nature," +
"order_date,order_type,dsp_date,rate , "
//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]
+ " values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt2=conn.prepareStatement(sql);
pstmt2.setString(1,expLev+mlevel);
pstmt2.setString(2,saleOrder);
......@@ -2735,6 +2745,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt2.setString(24,"0");
pstmt2.setString(25,"0");
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end]
pstmt2.setString(26,taxChapFr);
insertCnt= pstmt2.executeUpdate();
pstmt2.close();
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