Commit ed65de0d authored by agaikwad's avatar agaikwad

Added asset class and asset source column in insert table(assetinstall)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101756 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 75f34970
...@@ -714,7 +714,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements ...@@ -714,7 +714,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
String refSerL = ""; String refSerL = "";
String empCodeL = ""; String empCodeL = "";
String acctPrdProcL = ""; String acctPrdProcL = "";
String assetCodeParL = ""; String assetCodeParL = "",assetCodeFrom="",tranIdAssetinst="",assetClass="";;
Timestamp tranDate = null; Timestamp tranDate = null;
String lineNo ="",locCode ="",lotNo ="",lotSl =""; String lineNo ="",locCode ="",lotNo ="",lotSl ="";
int assinstDet = 0; int assinstDet = 0;
...@@ -822,7 +822,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements ...@@ -822,7 +822,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
+ "depr_type__from,depr_perc_1,depr_method_1,depr_amt_1,wdv_amt_1," + "depr_type__from,depr_perc_1,depr_method_1,depr_amt_1,wdv_amt_1,"
+ "depr_perc_2,depr_method_2,depr_amt_2,wdv_amt_2,asset_code__from,profit_loss," + "depr_perc_2,depr_method_2,depr_amt_2,wdv_amt_2,asset_code__from,profit_loss,"
+ "total_value__bc,acct_prd__proc,verified_on,emp_code__verify,cctr_code__to," + "total_value__bc,acct_prd__proc,verified_on,emp_code__verify,cctr_code__to,"
+ "wdv_amt_revl_2,depr_amt_revl_2,aloc_code__to,line_no,loc_code,lot_no,lot_sl from asset_transfer_det where tran_id = ?"; + "wdv_amt_revl_2,depr_amt_revl_2,aloc_code__to,line_no,loc_code,lot_no,lot_sl,asset_code__from from asset_transfer_det where tran_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId); pstmt.setString(1, tranId);
...@@ -897,9 +897,10 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements ...@@ -897,9 +897,10 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
deprAmtRevl2L = rs.getDouble("depr_amt_revl_2"); deprAmtRevl2L = rs.getDouble("depr_amt_revl_2");
alocCodeToL = rs.getString("aloc_code__to") == null ? "" alocCodeToL = rs.getString("aloc_code__to") == null ? ""
: rs.getString("aloc_code__to").trim(); : rs.getString("aloc_code__to").trim();
lineNo = rs.getString("line_no") == null ? "" lineNo = rs.getString("line_no") == null ? "": rs.getString("line_no").trim();
: rs.getString("line_no").trim(); assetCodeFrom = rs.getString("asset_code__from") == null ? "": rs.getString("asset_code__from").trim();
/*xmlValues = new StringBuffer( /*xmlValues = new StringBuffer(
"<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"); "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>");
xmlValues = xmlValues.append("<Header></Header>"); xmlValues = xmlValues.append("<Header></Header>");
...@@ -959,6 +960,44 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements ...@@ -959,6 +960,44 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
rs3.close(); rs3.close();
rs3 = null; rs3 = null;
} }
sql2 ="select tran_id__assetinst from asset_register where asset_code=? ";
pstmt3 = conn.prepareStatement(sql2);
pstmt3.setString(1, assetCodeFrom);
rs3 = pstmt3.executeQuery();
if(rs3.next())
{
tranIdAssetinst= rs3.getString("tran_id__assetinst");
}
if(pstmt3 != null)
{
pstmt3.close();
pstmt3 = null;
}
if(rs3 != null)
{
rs3.close();
rs3 = null;
}
sql2 ="select asset_class from asset_install where tran_id=? ";
pstmt3 = conn.prepareStatement(sql2);
pstmt3.setString(1, tranIdAssetinst);
rs3 = pstmt3.executeQuery();
if(rs3.next())
{
assetClass = rs3.getString(1) == null ? "" : rs3.getString(1);
}
if(pstmt3 != null)
{
pstmt3.close();
pstmt3 = null;
}
if(rs3 != null)
{
rs3.close();
rs3 = null;
}
String cctrCodeInst ="",acctCodeInst =""; String cctrCodeInst ="",acctCodeInst ="";
cctrCodeInst = getNameOrDescrForCode(conn, "finparm", "var_value", cctrCodeInst = getNameOrDescrForCode(conn, "finparm", "var_value",
"var_name", "ACCT_CWIP"); "var_name", "ACCT_CWIP");
...@@ -991,7 +1030,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements ...@@ -991,7 +1030,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
remarksL = "Received " + assetCodeLinkL remarksL = "Received " + assetCodeLinkL
+ " asset from site: " + getSiteCodeG(); + " asset from site: " + getSiteCodeG();
double installChgsBc = installChgsL * exchRateL; double installChgsBc = installChgsL * exchRateL;
sql1 = "insert into asset_install (tran_id,asset_code,grp_code,site_code,asset_type,remarks,item_code,inst_date,curr_code,exch_rate,original_value,original_value__bc,octroi_chgs,comm_chgs,install_chgs,use_date,emp_code,chg_date,chg_user,chg_term,cctr_code,aloc_code,useful_life,acct_code__inst,cctr_code__inst,exch_rate__inst,curr_code__inst,inst_chgs__bc,confirmed,asset_sale_type,tran_date,asset_code__par,depr_amt_op_co) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; sql1 = "insert into asset_install (tran_id,asset_code,grp_code,site_code,asset_type,remarks,item_code,inst_date,curr_code,exch_rate,original_value,original_value__bc,octroi_chgs,comm_chgs,install_chgs,use_date,emp_code,chg_date,chg_user,chg_term,cctr_code,aloc_code,useful_life,acct_code__inst,cctr_code__inst,exch_rate__inst,curr_code__inst,inst_chgs__bc,confirmed,asset_sale_type,tran_date,asset_code__par,depr_amt_op_co,asset_source,asset_class) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt2 = conn.prepareStatement(sql1); pstmt2 = conn.prepareStatement(sql1);
pstmt2.setString(1, assetCodePK); pstmt2.setString(1, assetCodePK);
pstmt2.setString(2, assetCodeToL); pstmt2.setString(2, assetCodeToL);
...@@ -1027,6 +1066,8 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements ...@@ -1027,6 +1066,8 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
pstmt2.setString(32, assetCodeToL); pstmt2.setString(32, assetCodeToL);
System.out.println("wdvamt????"+wdvAmt2L); System.out.println("wdvamt????"+wdvAmt2L);
pstmt2.setDouble(33, wdvAmt2L); pstmt2.setDouble(33, wdvAmt2L);
pstmt2.setString(34,"T");
pstmt2.setString(35,assetClass);
/* //pstmt2.setDouble(26, exciseAmtL); /* //pstmt2.setDouble(26, exciseAmtL);
//pstmt2.setDouble(16, exchRateL); //pstmt2.setDouble(16, exchRateL);
//pstmt2.setDouble(17, orginalValueL); //pstmt2.setDouble(17, orginalValueL);
......
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