Commit ef0966de authored by caluka's avatar caluka

customer code validation added and item detail screen site code condition is removed


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99501 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 11481f01
......@@ -118,6 +118,8 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
String custType="",custType1="";
String fromDateStr ="",toDateStr="",custTypeDom="";
String loginSiteCode="",periodStatus="",editSatus="";
String salePer="",countryCode1="";
int pohelpCnt=0;
int ctr = 0,currentFormNo=0,cnt=0,countCustRef=0,refSerCnt=0,childNodeListLength=0,invCnt=0,clStockInteger=0;
int custstockCnt=0,custstockCnt1=0;
double clStock=0.0,opStockDom=0.0,purRcpDom=0.0;
......@@ -359,6 +361,13 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
itemSer = this.genericUtility.getColumnValue("item_ser", dom);
System.out.println("itemSer :"+itemSer);
salePer = this.genericUtility.getColumnValue("sale_per", dom);
System.out.println("salePer :"+salePer);
countryCode1 = this.genericUtility.getColumnValue("country_code", dom);
System.out.println("countryCode1 :"+countryCode1);
tranId = this.genericUtility.getColumnValue("tran_id", dom);
System.out.println("tranId@@@@@@@"+tranId);
editSatus = this.genericUtility.getColumnValue("edit_status", dom);
......@@ -453,6 +462,44 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
errCode = "VMINVPRDCU";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}else
{
sql="select count(*) " +
"from org_structure_cust orgcust,customer cust ,station stn,customer_series custser," +
"state state where orgcust.cust_code=cust.cust_code and cust.stan_code=stn.stan_code" +
" and custser.cust_code=cust.cust_code and custser.black_listed !='Y' " +
"and custser.item_ser=(select item_ser from department where dept_code in " +
"(select dept_code from employee where emp_code=?)) " +
"and orgcust.table_no=(select item_ser from department where dept_code in " +
"(select dept_code from employee where emp_code=?)) " +
"AND orgcust.pos_code in(SELECT pos_code FROM employee WHERE emp_code= ?) " +
" and state.count_code=? and cust.cust_code=? " +
"and state.state_code=stn.state_code ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,salePer);
pstmt.setString(2,salePer);
pstmt.setString(3,salePer);
//pstmt.setString(4,salePer);
//pstmt.setTimestamp(4,FromDate);
//pstmt.setTimestamp(5,ToDate);
pstmt.setString(4,countryCode1);
pstmt.setString(5,custCode);
rs = pstmt.executeQuery();
if (rs.next())
{
pohelpCnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (pohelpCnt == 0)
{
System.out.println("customer is not exist in org customer");
errCode = "VMINVORGCU";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
......@@ -5770,8 +5817,9 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
" from invdet invdet,item item where " +
" invoice_id in( SELECT distinct invoice.invoice_id invoice_id " +
" FROM invoice invoice ,invoice_trace itrace WHERE" +
" invoice.invoice_id=itrace.invoice_id and ( invoice.cust_code = ? )" +
" and invoice.site_code =? and invoice.inv_type=? and " +
" invoice.invoice_id=itrace.invoice_id and ( invoice.cust_code = ? ) " +
//" and invoice.site_code =? " +
"and invoice.inv_type=? and " +
" itrace.item_ser__prom=? and ( invoice.confirmed = 'Y' ) and" +
" ( (invoice.tran_date >=?) and (invoice.tran_date <= ? ) " +
"or ((invoice.tran_date >=? ) and (invoice.tran_date <= ? ) ) " +
......@@ -5790,7 +5838,8 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
"from sreturn srn,sreturndet sdet ,item item " +
"where srn.tran_id=sdet.tran_id " +
"and item.item_code=sdet.item_code " +
"and srn.site_code= ? and srn.item_ser=? " +
//"and srn.site_code= ? " +
" and srn.item_ser=? " +
"and srn.tran_date >= ? and srn.tran_date <= ? " +
"and sdet.ret_rep_flag in('P') " +
"and srn.cust_code=? order by descr ";
......@@ -5799,21 +5848,21 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
pstmt = conn.prepareStatement( sql );
pstmt.setString(1, custCode);
pstmt.setString(2, siteCode);
pstmt.setString(3, orderType);
pstmt.setString(4, itemSer);
pstmt.setTimestamp(5, frmDateTstmp);
pstmt.setTimestamp(6, toDateTstmp);
pstmt.setTimestamp(7, prdFrDateTstmp);
pstmt.setTimestamp(8, prdToDateTstmp);
pstmt.setString(9, custCode);
pstmt.setString(10, orderType);
//pstmt.setString(2, siteCode);
pstmt.setString(2, orderType);
pstmt.setString(3, itemSer);
pstmt.setTimestamp(4, frmDateTstmp);
pstmt.setTimestamp(5, toDateTstmp);
pstmt.setTimestamp(6, prdFrDateTstmp);
pstmt.setTimestamp(7, prdToDateTstmp);
pstmt.setString(8, custCode);
pstmt.setString(9, orderType);
pstmt.setString(10, itemSer);
//pstmt.setString(12, siteCode);//start added by chandrashekar
pstmt.setString(11, itemSer);
pstmt.setString(12, siteCode);//start added by chandrashekar
pstmt.setString(13, itemSer);
pstmt.setTimestamp(14, frmDateTstmp);
pstmt.setTimestamp(15, toDateTstmp);
pstmt.setString(16, custCode);
pstmt.setTimestamp(12, frmDateTstmp);
pstmt.setTimestamp(13, toDateTstmp);
pstmt.setString(14, custCode);
rs = pstmt.executeQuery();
while( rs.next() )
......
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