Commit a3b46e3f authored by prane's avatar prane

If sales contract qty is fully released then system should exclude closed the...

If sales contract qty is fully released then system should exclude closed the contract even if contract validy is exists.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@207218 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ebb680cb
...@@ -15792,7 +15792,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -15792,7 +15792,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
if (itemCode.trim().length() == 0) { if (itemCode.trim().length() == 0) {
System.out.println("====getContract TRY11="); System.out.println("====getContract TRY11=");
sql = "select contract_no from scontract where site_code = ? and cust_code = ? and eff_from <= ? and valid_upto >= ? and (case when confirmed is null then 'N' else confirmed end) = 'Y' and (case when status is null then 'N' else status end) <> 'X' order by eff_from"; //Pavan Rane 13sep19 start[to validate closed contract if contract validy is exists.]
//sql = "select contract_no from scontract where site_code = ? and cust_code = ? and eff_from <= ? and valid_upto >= ? and (case when confirmed is null then 'N' else confirmed end) = 'Y' and (case when status is null then 'N' else status end) <> 'X' order by eff_from";
sql = "select contract_no from scontract where site_code = ? and cust_code = ? and eff_from <= ? and valid_upto >= ? and (case when confirmed is null then 'N' else confirmed end) = 'Y' and (case when status is null then 'N' else status end) not in('X','C') order by eff_from";
//Pavan Rane 13sep19 end
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode); pstmt.setString(1, siteCode);
pstmt.setString(2, custCode); pstmt.setString(2, custCode);
...@@ -15811,7 +15814,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -15811,7 +15814,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
contractLineNo = ""; contractLineNo = "";
} else { } else {
System.out.println("====getContract TRY22="); System.out.println("====getContract TRY22=");
sql = "select SC.contract_no, SC.line_no from scontract S, scontractdet SC where S.contract_no = SC.contract_no and S.site_code = ? and S.cust_code = ? and S.eff_from <= ? and S.valid_upto >= ? and (case when S.confirmed is null then 'N' else S.confirmed end) = 'Y' and (case when S.status is null then 'N' else S.status end) <> 'X' and SC.item_code= ? order by S.eff_from"; //Pavan Rane 13sep19 start[to validate closed contract if contract validy is exists.]
//sql = "select SC.contract_no, SC.line_no from scontract S, scontractdet SC where S.contract_no = SC.contract_no and S.site_code = ? and S.cust_code = ? and S.eff_from <= ? and S.valid_upto >= ? and (case when S.confirmed is null then 'N' else S.confirmed end) = 'Y' and (case when S.status is null then 'N' else S.status end) <> 'X' and SC.item_code= ? order by S.eff_from";
sql = "select SC.contract_no, SC.line_no from scontract S, scontractdet SC where S.contract_no = SC.contract_no and S.site_code = ? and S.cust_code = ? and S.eff_from <= ? and S.valid_upto >= ? and (case when S.confirmed is null then 'N' else S.confirmed end) = 'Y' and (case when S.status is null then 'N' else S.status end) not in ('X','C') and SC.item_code= ? order by S.eff_from";
//Pavan Rane 13sep19 end
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode); pstmt.setString(1, siteCode);
pstmt.setString(2, custCode); pstmt.setString(2, custCode);
...@@ -15858,7 +15864,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal ...@@ -15858,7 +15864,10 @@ public class SalesOrderIC extends ValidatorEJB implements SalesOrderICLocal, Sal
sql = "select contract_no from scontract where site_code = ? and cust_code = ? and item_ser = ? and ? " sql = "select contract_no from scontract where site_code = ? and cust_code = ? and item_ser = ? and ? "
+ " between eff_from and valid_upto and confirmed = 'Y' and " + " between eff_from and valid_upto and confirmed = 'Y' and "
+ "(case when status is null then ' ' else status end) <> 'X' " + " order by contract_no"; //Pavan Rane 13sep19 start[to validate closed contract if contract validy is exists.]
//+ "(case when status is null then ' ' else status end) <> 'X' " + " order by contract_no";
+ "(case when status is null then ' ' else status end) not in ('X','C') " + " order by contract_no";
//Pavan Rane 13sep19 start[to validate closed contract if contract validy is exists.]
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode); pstmt.setString(1, siteCode);
pstmt.setString(2, custCode); pstmt.setString(2, custCode);
......
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