Commit d07befec authored by manohar's avatar manohar

Bug fix


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91280 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e17711c9
...@@ -820,6 +820,9 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -820,6 +820,9 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
if (currentColumn.trim().equals( "cust_code" )) if (currentColumn.trim().equals( "cust_code" ))
{ {
custCode = genericUtility.getColumnValue( "cust_code", dom ); custCode = genericUtility.getColumnValue( "cust_code", dom );
// 15/05/10 manoharan site code should be credit site code
siteCode = genericUtility.getColumnValue( "site_code__cr", dom );
// end 15/05/10 manoharan site code should be credit site code
if( custCode != null && custCode.trim().length() > 0 ) if( custCode != null && custCode.trim().length() > 0 )
{ {
sql = "select cust_name from customer " sql = "select cust_name from customer "
...@@ -839,7 +842,10 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -839,7 +842,10 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
sql = "select price_list from site_customer where site_code = ? and cust_code = ?"; sql = "select price_list from site_customer where site_code = ? and cust_code = ?";
pStmt = conn.prepareStatement( sql ); pStmt = conn.prepareStatement( sql );
pStmt.setString(1,loginSite.trim()); // 15/05/10 manoharan site code should be credit site code
//pStmt.setString(1,loginSite.trim());
pStmt.setString(1,siteCode.trim());
// end 15/05/10 manoharan site code should be credit site code
pStmt.setString(2,custCode.trim()); pStmt.setString(2,custCode.trim());
rs = pStmt.executeQuery(); rs = pStmt.executeQuery();
if( rs.next() ) if( rs.next() )
...@@ -969,6 +975,44 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -969,6 +975,44 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
} }
valueXmlString.append("<site_cr_descr>").append("<![CDATA[" + ( siteDescr )+ "]]>").append("</site_cr_descr>"); valueXmlString.append("<site_cr_descr>").append("<![CDATA[" + ( siteDescr )+ "]]>").append("</site_cr_descr>");
// 15/05/10 manoharan site code should be credit site code
custCode = genericUtility.getColumnValue( "cust_code", dom );
// end 15/05/10 manoharan site code should be credit site code
if( custCode != null && custCode.trim().length() > 0 )
{
sql = "select price_list from site_customer where site_code = ? and cust_code = ?";
pStmt = conn.prepareStatement( sql );
// 15/05/10 manoharan site code should be credit site code
pStmt.setString(1,siteCode.trim());
pStmt.setString(2,custCode.trim());
rs = pStmt.executeQuery();
if( rs.next() )
{
priceList = rs.getString( "price_list" );
}
rs.close();
rs = null;
pStmt.close();
pStmt = null;
if( priceList == null || priceList.trim().length() == 0 )
{
sql = "Select price_list from customer where cust_code = ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, custCode.trim() );
rs = pStmt.executeQuery();
if( rs.next() )
{
priceList = rs.getString("price_list");
}
rs.close();
rs = null;
pStmt.close();
pStmt = null;
}
valueXmlString.append("<price_list>").append("<![CDATA[" + ( priceList )+ "]]>").append("</price_list>");
}
// end 15/05/10 manoharan site code should be credit site code
} }
if (currentColumn.trim().equals( "cust_code__credit" )) if (currentColumn.trim().equals( "cust_code__credit" ))
{ {
......
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