Commit 20b2f5c7 authored by prane's avatar prane

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177003 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fdc320f3
...@@ -12828,7 +12828,23 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12828,7 +12828,23 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
break; break;
} }
} }
String prodSh = "N";
String sql22 = "SELECT CASE WHEN PROD_SCH IS NULL THEN 'N' ELSE PROD_SCH END AS PROD_SCH FROM SCHEME_APPLICABILITY WHERE SCHEME_CODE = ? ";
pstmt = conn.prepareStatement(sql22);
pstmt.setString(1, lsCurscheme);
rs = pstmt.executeQuery();
if (rs.next())
{
prodSh = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if("N".equalsIgnoreCase(prodSh))
{
sql = "Select count(1) as cnt From scheme_applicability A, bom b Where A.scheme_code = b.bom_code And B.bom_code= ?" + " And(? between case when b.min_qty is null then 0 else b.min_qty end" + " And case when b.max_qty is null then 0 else b.max_qty end) and B.promo_term is null"; sql = "Select count(1) as cnt From scheme_applicability A, bom b Where A.scheme_code = b.bom_code And B.bom_code= ?" + " And(? between case when b.min_qty is null then 0 else b.min_qty end" + " And case when b.max_qty is null then 0 else b.max_qty end) and B.promo_term is null";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsCurscheme); pstmt.setString(1, lsCurscheme);
...@@ -12843,7 +12859,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -12843,7 +12859,7 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(cnt == 0)continue; if(cnt == 0)continue;
}
/* if (cnt == 0) /* if (cnt == 0)
{ {
// Goto Nextrec // Goto Nextrec
......
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