Commit 9316f46f authored by ngadkari's avatar ngadkari

changes in sql for min_qty case of price list

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@188372 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7e27f3f5
......@@ -13564,16 +13564,16 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
double rate = 0;
try {
if (priceList != null && priceList.trim().length() > 0) {
sql = " select case when rate is null then 0 else rate end as rate from pricelist where price_list=? and item_code =? and unit= ? and list_type IN ('M','N') and case when min_qty is null then 0 else ? end <=? and ((case when max_qty is null then 0 else max_qty end >= ?) OR (case when max_qty is null then 0 else max_qty end=0)) and eff_from<= ? and valid_upto >= ?";
sql = " select case when rate is null then 0 else rate end as rate from pricelist where price_list=? and item_code =? and unit= ? and list_type IN ('M','N') and case when min_qty is null then 0 else min_qty end <=? and ((case when max_qty is null then 0 else max_qty end >= ?) OR (case when max_qty is null then 0 else max_qty end=0)) and eff_from<= ? and valid_upto >= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, priceList);
pstmt.setString(2, itemCode);
pstmt.setString(3, unit);
pstmt.setDouble(4, quantity);
pstmt.setDouble(5, quantity);
pstmt.setDouble(6, quantity);
/*pstmt.setDouble(6, quantity);*/ //commented by Nandkumar Gadkari on 30/07/18
pstmt.setTimestamp(6, orderDate);
pstmt.setTimestamp(7, orderDate);
pstmt.setTimestamp(8, orderDate);
// pstmt.setDate(7, (java.sql.Date) orderDate);
// pstmt.setDate(8, (java.sql.Date) orderDate);
rs = pstmt.executeQuery();
......
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