Commit 0c06bdad authored by cpatil's avatar cpatil

and case when sorder.alloc_flag is null then 'N' else sorder.alloc_flag end <> 'Y'

 added this condition again


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95308 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0a0fb02f
...@@ -393,7 +393,7 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz ...@@ -393,7 +393,7 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz
//sDateTo = genericUtility.getValidDateString(genericUtility.getColumnValue("date_from",dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()); //sDateTo = genericUtility.getValidDateString(genericUtility.getColumnValue("date_from",dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
dateFr = java.sql.Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("date_from",dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00"); dateFr = java.sql.Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("date_from",dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00");
dateTo = java.sql.Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("date_to",dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00"); dateTo = java.sql.Timestamp.valueOf(genericUtility.getValidDateString(genericUtility.getColumnValue("date_to",dom1), genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00");
/*
sql = " SELECT sorditem.sale_order,sorditem.line_no, sorditem.site_code, item.item_code__plan as item_code,sorditem.due_date as due_date, " sql = " SELECT sorditem.sale_order,sorditem.line_no, sorditem.site_code, item.item_code__plan as item_code,sorditem.due_date as due_date, "
+" ((case when sorditem.quantity is null then 0 else sorditem.quantity end - case when sorditem.qty_alloc is null then 0 else sorditem.qty_alloc end - case when sorditem.qty_desp is null then 0 else sorditem.qty_desp end ) * case when sorditem.conv__qty_stdqty is null then 1 else sorditem.conv__qty_stdqty end ) as demand," +" ((case when sorditem.quantity is null then 0 else sorditem.quantity end - case when sorditem.qty_alloc is null then 0 else sorditem.qty_alloc end - case when sorditem.qty_desp is null then 0 else sorditem.qty_desp end ) * case when sorditem.conv__qty_stdqty is null then 1 else sorditem.conv__qty_stdqty end ) as demand,"
+" 0 as supply, 0 as stock_qty, 0 as oth_supply , sorder.cust_code, customer.cust_name ,sorditem.quantity,sorditem.unit " +" 0 as supply, 0 as stock_qty, 0 as oth_supply , sorder.cust_code, customer.cust_name ,sorditem.quantity,sorditem.unit "
...@@ -407,6 +407,7 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz ...@@ -407,6 +407,7 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz
//+" and item.mfg_type = 'O' " //+" and item.mfg_type = 'O' "
+" and (sorder.cust_code = customer.cust_code ) " +" and (sorder.cust_code = customer.cust_code ) "
+" and case when sorder.alloc_flag is null then 'N' else sorder.alloc_flag end <> 'Y' "; +" and case when sorder.alloc_flag is null then 'N' else sorder.alloc_flag end <> 'Y' ";
*/
sql=" SELECT sorditem.sale_order as sale_order,sorditem.line_no as line_no," + sql=" SELECT sorditem.sale_order as sale_order,sorditem.line_no as line_no," +
"sorditem.site_code as site_code," + "sorditem.site_code as site_code," +
...@@ -424,6 +425,7 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz ...@@ -424,6 +425,7 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz
" and (sorditem.due_date >= ? ) and (sorditem.due_date <= ? )" + " and (sorditem.due_date >= ? ) and (sorditem.due_date <= ? )" +
" and ( case when sorder.status is null then 'P' else sorder.status end = 'P')" + " and ( case when sorder.status is null then 'P' else sorder.status end = 'P')" +
" and (sorder.cust_code = customer.cust_code )" + " and (sorder.cust_code = customer.cust_code )" +
" and case when sorder.alloc_flag is null then 'N' else sorder.alloc_flag end <> 'Y' " +
" UNION ALL" + " UNION ALL" +
" select mps_order.tran_id as sale_order,'1' as" + " select mps_order.tran_id as sale_order,'1' as" +
" line_no,mps_order.site_code as site_code," + " line_no,mps_order.site_code as site_code," +
...@@ -1108,4 +1110,4 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz ...@@ -1108,4 +1110,4 @@ public class RunMRPWiz extends ValidatorEJB implements RunMRPWizLocal, RunMRPWiz
//} //}
//} //}
//} //}
} }
\ No newline at end of file
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