Commit 1d69fd2b authored by wansari's avatar wansari

D16JSUN0002 updated source on HEAD in item change of cust_code for strategic...

D16JSUN0002 updated source on HEAD in item change of cust_code for strategic and regular customer type.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105514 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2d87117b
......@@ -575,7 +575,7 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
}
if(effFrom.length() == 0 || ValidUpto.length() == 0)
/*if(effFrom.length() == 0 || ValidUpto.length() == 0)
{
return getError(" \n Line Number: "+lineNo+", Division: "+division+" ", "VMEFFUPTO", conn);
}
......@@ -610,7 +610,7 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
else if(date1.before(date3))
{
return getError(" \n Line Number: "+lineNo+", Division: "+division+" ", "VVDTERR", conn);
}
}*/
try
......@@ -1492,6 +1492,7 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
valueXmlString.append("<cust_type__descr>").append("<![CDATA["+custTypeDescr+"]]>").append("</cust_type__descr>");
valueXmlString.append("<confirmed>").append("<![CDATA[N]]>").append("</confirmed>");
valueXmlString.append("<edit_status>").append("<![CDATA["+editFlag+"]]>").append("</edit_status>");
valueXmlString.append("<site_code>").append("<![CDATA["+siteCode+"]]>").append("</site_code>");
valueXmlString.append("<contract_type>").append("<![CDATA["+contractType+"]]>").append("</contract_type>");
}
else if(currentColumn.trim().equalsIgnoreCase("cust_code") || currentColumn.trim().equalsIgnoreCase("cust_type"))
......@@ -1511,6 +1512,8 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");
valueXmlString.append("<Detail1 domID='1' objContext='1'>");
System.out.println("Inside customer item change CustCode["+custCode+"] CustType["+custType+"] ContractDate["+contractDate+"]");
if("S".equalsIgnoreCase(custType))
{
......@@ -1549,7 +1552,7 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
pstmt.close();pstmt = null;
}
valueXmlString.append("<Detail1 domID='1' objContext='1'>");
//valueXmlString.append("<Detail1 domID='1' objContext='1'>");
valueXmlString.append("<cust_code>").append("<![CDATA[" + custCode + "]]>").append("</cust_code>");
valueXmlString.append("<cust_code__bil >").append("<![CDATA[" + custCode + "]]>").append("</cust_code__bil>");
valueXmlString.append("<cust_code__dlv >").append("<![CDATA[" + custCode + "]]>").append("</cust_code__dlv>");
......@@ -1573,7 +1576,7 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
valueXmlString.append("<tel3__dlv >").append("<![CDATA[" + tele3 + "]]>").append("</tel3__dlv>");
valueXmlString.append("<fax__dlv >").append("<![CDATA[" + fax + "]]>").append("</fax__dlv>");
valueXmlString.append("<curr_code >").append("<![CDATA[" + curr + "]]>").append("</curr_code>");
valueXmlString.append("<dlv_term >").append("<![CDATA[" + dlvTerm + "]]>").append("</dlv_term>");
valueXmlString.append("<dlv_term >").append("<![CDATA[NA]]>").append("</dlv_term>");
valueXmlString.append("<confirmed>").append("<![CDATA[N]]>").append("</confirmed>");
valueXmlString.append("<trans_mode >").append("<![CDATA[R]]>").append("</trans_mode>");
......@@ -1593,7 +1596,8 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
valueXmlString.append("<edit_status>").append("<![CDATA["+editFlag+"]]>").append("</edit_status>");
valueXmlString.append("<site_code>").append("<![CDATA["+siteCode+"]]>").append("</site_code>");
}
else //Regulat customer
//else //Regular customer
else if("R".equalsIgnoreCase(custType))
{
sql = " select price_list__clg from site_customer where cust_code = ? and site_code = ?";
......@@ -1725,7 +1729,7 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
priceList = pList;
}
valueXmlString.append("<Detail1 domID='1' objContext='1'>");
//valueXmlString.append("<Detail1 domID='1' objContext='1'>");
valueXmlString.append("<cust_code>").append("<![CDATA[" + custCode + "]]>").append("</cust_code>");
valueXmlString.append("<cust_code__bil >").append("<![CDATA[" + custCode + "]]>").append("</cust_code__bil>");
valueXmlString.append("<cr_term >").append("<![CDATA[" + crTerm + "]]>").append("</cr_term>");
......@@ -1812,11 +1816,11 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
valueXmlString.append("<exch_rate >").append("<![CDATA[" + num + "]]>").append("</exch_rate>");
valueXmlString.append("<currency_descr >").append("<![CDATA[" + currDescr + "]]>").append("</currency_descr>");
descr = " ";
descr1 = " ";
num = 0;
//descr = " ";
//descr1 = " ";
//num = 0;
sql = "select descr from station where stan_code = ?";
/*sql = "select descr from station where stan_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, stanCode);
rs = pstmt.executeQuery();
......@@ -1831,12 +1835,12 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
if(pstmt!=null)
{
pstmt.close();pstmt = null;
}
}*/
valueXmlString.append("<station_descr>").append("<![CDATA[" + descr + "]]>").append("</station_descr>");
//valueXmlString.append("<station_descr>").append("<![CDATA[" + descr + "]]>").append("</station_descr>");
descr = " ";
descr1 = " ";
descr = "";
descr1 = "";
num = 0;
sql = "select tran_name, frt_term, curr_code from transporter where tran_code = ?";
......@@ -1865,12 +1869,12 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
valueXmlString.append("<exch_rate__frt >").append("<![CDATA[" + num + "]]>").append("</exch_rate__frt>");
valueXmlString.append("<exch_rate__ins >").append("<![CDATA[" + num + "]]>").append("</exch_rate__ins>");
descr = " ";
descr1 = " ";
num = 0;
currCode = " ";
//descr = " ";
//descr1 = " ";
//num = 0;
//currCode = " ";
sql = "select sp_name, comm_perc, comm_perc__on,curr_code from sales_pers where sales_pers = ?";
/*sql = "select sp_name, comm_perc, comm_perc__on,curr_code from sales_pers where sales_pers = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, salesPers);
rs = pstmt.executeQuery();
......@@ -1888,29 +1892,29 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
if(pstmt!=null)
{
pstmt.close();pstmt = null;
}
}*/
valueXmlString.append("<sales_pers >").append("<![CDATA[" + salesPers + "]]>").append("</sales_pers>");
/*valueXmlString.append("<sales_pers >").append("<![CDATA[" + salesPers + "]]>").append("</sales_pers>");
valueXmlString.append("<sp_name >").append("<![CDATA[" + descr + "]]>").append("</sp_name>");
valueXmlString.append("<comm_perc >").append("<![CDATA[" + num + "]]>").append("</comm_perc>");
valueXmlString.append("<curr_code__comm >").append("<![CDATA[" + currCode + "]]>").append("</curr_code__comm>");
valueXmlString.append("<curr_code__comm >").append("<![CDATA[" + currCode + "]]>").append("</curr_code__comm>");*/
if(descr1 != null)
/*if(descr1 != null)
{
valueXmlString.append("<comm_perc__on >").append("<![CDATA[" + descr1 + "]]>").append("</comm_perc__on>");
}
siteCode = genericUtility.getColumnValue("site_code", dom);
contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");
}*/
//siteCode = genericUtility.getColumnValue("site_code", dom);
/*contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");*/
//num = getDailyExchRate(curr , "",siteCode , contractDate , "S" , conn);
valueXmlString.append("<exch_rate__comm >").append("<![CDATA[" + num + "]]>").append("</exch_rate__comm>");
//valueXmlString.append("<exch_rate__comm >").append("<![CDATA[" + num + "]]>").append("</exch_rate__comm>");
descr = " ";
descr1 = " ";
num = 0;
currCode = " ";
//descr = " ";
//descr1 = " ";
//num = 0;
//currCode = " ";
sql = "select sp_name, comm_perc, comm_perc__on ,curr_code from sales_pers where sales_pers = ?";
/*sql = "select sp_name, comm_perc, comm_perc__on ,curr_code from sales_pers where sales_pers = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, salesPers1);
rs = pstmt.executeQuery();
......@@ -1928,9 +1932,9 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
if(pstmt!=null)
{
pstmt.close();pstmt = null;
}
}*/
valueXmlString.append("<sales_pers__1 >").append("<![CDATA[" + salesPers1 + "]]>").append("</sales_pers__1>");
/*valueXmlString.append("<sales_pers__1 >").append("<![CDATA[" + salesPers1 + "]]>").append("</sales_pers__1>");
valueXmlString.append("<sp_name_1 >").append("<![CDATA[" + descr + "]]>").append("</sp_name_1>");
valueXmlString.append("<comm_perc_1 >").append("<![CDATA[" + num + "]]>").append("</comm_perc_1>");
valueXmlString.append("<curr_code__comm_1 >").append("<![CDATA[" + checkNullAndTrim(currCode) + "]]>").append("</curr_code__comm_1>");
......@@ -1938,20 +1942,20 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
if(descr1 != null)
{
valueXmlString.append("<comm_perc_on_1 >").append("<![CDATA[" + checkNullAndTrim(descr1) + "]]>").append("</comm_perc_on_1>");
}
}*/
siteCode = genericUtility.getColumnValue("site_code", dom);
contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");
//siteCode = genericUtility.getColumnValue("site_code", dom);
//contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
//contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");
//num = getDailyExchRate(curr , "",siteCode , contractDate , "S" , conn);
valueXmlString.append("<exch_rate__comm_1 >").append("<![CDATA[" + num + "]]>").append("</exch_rate__comm_1>");
//valueXmlString.append("<exch_rate__comm_1 >").append("<![CDATA[" + num + "]]>").append("</exch_rate__comm_1>");
descr = " ";
descr1 = " ";
num = 0;
currCode = " ";
//descr = " ";
//descr1 = " ";
//num = 0;
//currCode = " ";
sql = "select sp_name, comm_perc, comm_perc__on ,curr_code from sales_pers where sales_pers = ?";
/*sql = "select sp_name, comm_perc, comm_perc__on ,curr_code from sales_pers where sales_pers = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, salesPers2);
rs = pstmt.executeQuery();
......@@ -1969,9 +1973,9 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
if(pstmt!=null)
{
pstmt.close();pstmt = null;
}
}*/
valueXmlString.append("<sales_pers__2 >").append("<![CDATA[" + salesPers2 + "]]>").append("</sales_pers__2>");
/*valueXmlString.append("<sales_pers__2 >").append("<![CDATA[" + salesPers2 + "]]>").append("</sales_pers__2>");
valueXmlString.append("<sp_name_2 >").append("<![CDATA[" + descr + "]]>").append("</sp_name_2>");
valueXmlString.append("<comm_perc_2 >").append("<![CDATA[" + num + "]]>").append("</comm_perc_2>");
valueXmlString.append("<curr_code__comm_2 >").append("<![CDATA[" + checkNullAndTrim(currCode) + "]]>").append("</curr_code__comm_2>");
......@@ -1979,14 +1983,14 @@ public class ScontractGwtIC extends ValidatorEJB implements ScontractGwtICLocal,
if(descr1 != null)
{
valueXmlString.append("<comm_perc_on_2 >").append("<![CDATA[" + checkNullAndTrim(descr1) + "]]>").append("</comm_perc_on_2>");
}
}*/
siteCode = genericUtility.getColumnValue("site_code", dom);
itemSer = genericUtility.getColumnValue("item_ser", dom);
contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");
//contractDateStr = genericUtility.getValidDateString(genericUtility.getColumnValue("contract_date", dom1) , genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
//contractDate = Timestamp.valueOf(contractDateStr + " 00:00:00.0");
//num = getDailyExchRate(curr , "",siteCode , contractDate , "S" , conn);
valueXmlString.append("<exch_rate__comm_2 >").append("<![CDATA[" + num + "]]>").append("</exch_rate__comm_2>");
//valueXmlString.append("<exch_rate__comm_2 >").append("<![CDATA[" + num + "]]>").append("</exch_rate__comm_2>");
sql = "select dlv_term from customer_series where cust_code = ? and item_ser = ?";
......
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