Commit 6bc93130 authored by vkadam's avatar vkadam

While selection of voucher id respectively; the condition of (PORCP site code)...

While selection of voucher id respectively; the condition of (PORCP site code) is removed [F15LSUN004].


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101197 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2ee6d354
...@@ -120,7 +120,6 @@ public class ConfVouchChPartnerSch implements Schedule ...@@ -120,7 +120,6 @@ public class ConfVouchChPartnerSch implements Schedule
catch(Exception e) catch(Exception e)
{ {
System.out.println( "@V@ Exception"+e.getMessage()); System.out.println( "@V@ Exception"+e.getMessage());
} }
} }
return ""; return "";
...@@ -205,46 +204,59 @@ public class ConfVouchChPartnerSch implements Schedule ...@@ -205,46 +204,59 @@ public class ConfVouchChPartnerSch implements Schedule
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
connDriver = null; connDriver = null;
/**
* VALLABH KADAM [08/APR/16]
* The selection of 'DEFT_EXC_SITE_PORCPV'
* from table 'FINPARM'
* is removed
* [F15LSUN004]
* */
// sql = "SELECT case when var_value is null then ' ' else var_value END as var_value"
// + " from finparm where var_name='DEFT_EXC_SITE_PORCPV' and prd_code='999999'";
// pstmt=conn.prepareStatement(sql);
// rs=pstmt.executeQuery();
//
// if(rs.next())
// {
// deftExcSitePORCPV=rs.getString("var_value");
// }
//
// rs.close();
// rs=null;
// pstmt.close();
// pstmt=null;
sql = "SELECT case when var_value is null then ' ' else var_value END as var_value" // System.out.println("deftExcSitePORCPV :- ["+deftExcSitePORCPV+"]");
+ " from finparm where var_name='DEFT_EXC_SITE_PORCPV' and prd_code='999999'"; //
pstmt=conn.prepareStatement(sql); // String tempArray[]=deftExcSitePORCPV.split(",");
rs=pstmt.executeQuery(); // System.out.println("tempArray[].length :-["+tempArray.length+"]");
if(rs.next())
{
deftExcSitePORCPV=rs.getString("var_value");
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
System.out.println("deftExcSitePORCPV :- ["+deftExcSitePORCPV+"]");
String tempArray[]=deftExcSitePORCPV.split(","); // if(tempArray.length>0)
System.out.println("tempArray[].length :-["+tempArray.length+"]"); // {
// for(int itrArr=0;itrArr<tempArray.length;itrArr++)
// {
// tempSiteCode=tempSiteCode+"'"+tempArray[itrArr]+"',";
// }
// System.out.println("tempSiteCode before sunStr:- ["+tempSiteCode+"]");
// tempSiteCode=tempSiteCode.substring(0, tempSiteCode.length()-1);
//
//
// }
// System.out.println("tempSiteCode New:- ["+tempSiteCode+"]");
if(tempArray.length>0) /**
{ * VALLABH KADAM [08/APR/16]
for(int itrArr=0;itrArr<tempArray.length;itrArr++) * The condition of 'AND A.SITE_CODE NOT IN( "+ tempSiteCode +")'
{ * is removed from SQL
tempSiteCode=tempSiteCode+"'"+tempArray[itrArr]+"',"; * [F15LSUN004]
} * */
System.out.println("tempSiteCode before sunStr:- ["+tempSiteCode+"]");
tempSiteCode=tempSiteCode.substring(0, tempSiteCode.length()-1);
}
System.out.println("tempSiteCode New:- ["+tempSiteCode+"]");
sql="SELECT DISTINCT A.TRAN_ID FROM VOUCHER A,VOUCHRCP B,PORCP C,SUPPLIER D" sql="SELECT DISTINCT A.TRAN_ID FROM VOUCHER A,VOUCHRCP B,PORCP C,SUPPLIER D"
+ " WHERE A.TRAN_ID=B.TRAN_ID AND B.PRCP_ID=C.TRAN_ID" + " WHERE A.TRAN_ID=B.TRAN_ID AND B.PRCP_ID=C.TRAN_ID"
+ " AND A.TRAN_DATE >= ?" + " AND A.TRAN_DATE >= ?"
+ " AND A.SUPP_CODE=D.SUPP_CODE" + " AND A.SUPP_CODE=D.SUPP_CODE"
+ " AND A.SITE_CODE IN (select site_code from site where site_code__cons LIKE '%__600')" + " AND A.SITE_CODE IN (select site_code from site where site_code__cons LIKE '%__600')"
+ " AND A.SITE_CODE NOT IN( "+ tempSiteCode +")" // + " AND A.SITE_CODE NOT IN( "+ tempSiteCode +")"
+ " AND CASE WHEN A.CONFIRMED IS NULL THEN 'N' ELSE A.CONFIRMED END='N'" + " AND CASE WHEN A.CONFIRMED IS NULL THEN 'N' ELSE A.CONFIRMED END='N'"
+ " AND( ( C.reciept_type ='F' and C.tran_ser='P-RCP' ) or ( C.ret_opt ='C' and C.tran_ser='P-RET') )" + " AND( ( C.reciept_type ='F' and C.tran_ser='P-RCP' ) or ( C.ret_opt ='C' and C.tran_ser='P-RET') )"
+ " AND D.CHANNEL_PARTNER='Y'"; + " AND D.CHANNEL_PARTNER='Y'";
......
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