Commit 4c517bc5 authored by msharma's avatar msharma

Check list type from pricelist_mst


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92993 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f272153e
...@@ -1084,7 +1084,8 @@ public class DistCommon ...@@ -1084,7 +1084,8 @@ public class DistCommon
ResultSet rs = null; ResultSet rs = null;
try try
{ {
sql = "SELECT LIST_TYPE FROM PRICELIST WHERE PRICE_LIST = '"+priceList+"'"; sql = "SELECT LIST_TYPE FROM PRICELIST_MST WHERE PRICE_LIST = '"+priceList+"'";
System.out.println(sql);
stmt = conn.createStatement(); stmt = conn.createStatement();
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
//System.out.println("LIST_TYPE... sql..."+sql); //System.out.println("LIST_TYPE... sql..."+sql);
...@@ -3276,6 +3277,7 @@ public class DistCommon ...@@ -3276,6 +3277,7 @@ public class DistCommon
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
System.out.println("type----"+type);
if(type.trim().equals("L")) //LIST PRICE if(type.trim().equals("L")) //LIST PRICE
{ {
rate = 0; rate = 0;
...@@ -3297,6 +3299,7 @@ public class DistCommon ...@@ -3297,6 +3299,7 @@ public class DistCommon
//System.out.println("Rate sql ..."+sql); //System.out.println("Rate sql ..."+sql);
if(rs.next()) if(rs.next())
{ {
System.out.println("Pricelist found in pricelist master");
rate = rs.getDouble(1); rate = rs.getDouble(1);
rs.close(); rs.close();
pstmt.close(); pstmt.close();
...@@ -3314,11 +3317,13 @@ public class DistCommon ...@@ -3314,11 +3317,13 @@ public class DistCommon
sql = "SELECT (CASE WHEN PRICE_LIST__PARENT IS NULL THEN '' ELSE PRICE_LIST__PARENT END) " sql = "SELECT (CASE WHEN PRICE_LIST__PARENT IS NULL THEN '' ELSE PRICE_LIST__PARENT END) "
+ "FROM pricelist_mst WHERE PRICE_LIST = '"+priceList+"' "; + "FROM pricelist_mst WHERE PRICE_LIST = '"+priceList+"' ";
//+ "AND LIST_TYPE = 'L'"; //+ "AND LIST_TYPE = 'L'";
System.out.println("priceList_mst----"+priceList);
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
priceListParent = rs.getString(1); priceListParent = rs.getString(1);
System.out.println("priceListParent----"+priceListParent);
} }
rs.close(); rs.close();
pstmt.close(); pstmt.close();
...@@ -3350,11 +3355,13 @@ public class DistCommon ...@@ -3350,11 +3355,13 @@ public class DistCommon
//System.out.println("The priceListParent sql .. "+sql); //System.out.println("The priceListParent sql .. "+sql);
if(rs2.next()) if(rs2.next())
{ {
rate = rs2.getDouble(1); rate = rs2.getDouble(1);
rs2.close(); rs2.close();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs2 = null; rs2 = null;
System.out.println("get rate for priceListParent----"+rate);
} }
else else
{ {
......
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