Commit 79de4410 authored by dpawar's avatar dpawar

Remove scheme expired msg and releated source.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94310 ce508802-f39f-4f6c-b175-0d175dae99d5
parent de38d326
...@@ -184,9 +184,8 @@ public String process(Document dom, Document dom2, String windowName, String xtr ...@@ -184,9 +184,8 @@ public String process(Document dom, Document dom2, String windowName, String xtr
if(custCodeFrm.length() > 0 && custCodeTo.length() > 0 && siteCode.length() > 0){ if(custCodeFrm.length() > 0 && custCodeTo.length() > 0 && siteCode.length() > 0){
siteCodeG=siteCode; siteCodeG=siteCode;
invTypeG=invType; invTypeG=invType;
inv45dayList.add("618ID00008");
sql="select invoice_id from invoice where cust_code__bil between ? and ? and site_code = ? " sql="select invoice_id from invoice where cust_code__bil between ? and ? and site_code = ? "
+ "and sysdate - conf_date > 600"; + "and sysdate - conf_date > 45";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1, custCodeFrm); pstmt.setString(1, custCodeFrm);
pstmt.setString(2, custCodeTo); pstmt.setString(2, custCodeTo);
...@@ -235,45 +234,35 @@ public String process(Document dom, Document dom2, String windowName, String xtr ...@@ -235,45 +234,35 @@ public String process(Document dom, Document dom2, String windowName, String xtr
} }
} }
} }
//Need to be discussion. ------------------------------------------@@@@@@@@@@@@@@
/*podProcessInvIDList.clear();
podProcessInvIDList.add("618ID00036");
podProcessInvIDList.add("618ID00037");
podProcessInvIDList.add("618ID00038");
podProcessInvIDList.add("618ID00039");*/
podTraceInvList=getDoneInvoiceIDFromPodTrace(conn); podTraceInvList=getDoneInvoiceIDFromPodTrace(conn);
System.out.println("podTraceInvList---->>["+podTraceInvList+"]"); System.out.println("podTraceInvList---->>["+podTraceInvList+"]");
Iterator<String> it = podProcessInvIDList.iterator();
if(podTraceInvList.size() > 0){ if(podTraceInvList.size() > 0){
while (it.hasNext()) {
for(String podPrcId : podProcessInvIDList){ String podPrcId=it.next();
if(podTraceInvList.contains(podPrcId)){ if(podTraceInvList.contains(podPrcId)){
it.remove();
podProcessInvIDList.remove(podPrcId); podProcessInvIDList.remove(podPrcId);
} }
} }
} }
System.out.println("podProcessInvIDList-->>["+podProcessInvIDList+"]"); System.out.println("podProcessInvIDList-->>["+podProcessInvIDList+"]");
miscDrCrInvList=getDoneInvoiceIDFromMiscDrCrRcp(conn); miscDrCrInvList=getDoneInvoiceIDFromMiscDrCrRcp(conn);
System.out.println("miscDrCrInvList---->>["+miscDrCrInvList+"]"); System.out.println("miscDrCrInvList---->>["+miscDrCrInvList+"]");
Iterator<String> it = podProcessInvIDList.iterator(); Iterator<String> it1 = podProcessInvIDList.iterator();
if(miscDrCrInvList.size() > 0){ if(miscDrCrInvList.size() > 0){
while (it.hasNext()) { while (it1.hasNext()) {
String podPrcId=it.next(); String podPrcId=it1.next();
if(miscDrCrInvList.contains(podPrcId)){ if(miscDrCrInvList.contains(podPrcId)){
System.out.println("---in misc arrayList------"); System.out.println("---in misc arrayList------");
it.remove(); it1.remove();
podProcessInvIDList.remove(podPrcId); podProcessInvIDList.remove(podPrcId);
} }
} }
} }
//podProcessInvIDList.clear(); //remove on final----------------------------7826464876---------------- //podProcessInvIDList.clear();
//podProcessInvIDList.add("618ID00044");
System.out.println("Final invoice Id ready for debit note---->>["+podProcessInvIDList+"]"); System.out.println("Final invoice Id ready for debit note---->>["+podProcessInvIDList+"]");
...@@ -371,7 +360,7 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv ...@@ -371,7 +360,7 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv
itemCodeOrd=itemCodeOrd==null ? "" :itemCodeOrd.trim(); itemCodeOrd=itemCodeOrd==null ? "" :itemCodeOrd.trim();
//Discount need discussion -----------------@@@@@-------- //Discount need discussion
if(discount > 0) if(discount > 0)
{ {
invRate=invRate - (invRate * discount/100); invRate=invRate - (invRate * discount/100);
...@@ -426,12 +415,6 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv ...@@ -426,12 +415,6 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv
errString=newErrorMessage(errString, invoiceId); errString=newErrorMessage(errString, invoiceId);
return errString; return errString;
} }
else if(schemeQty.get("success") == 0){
errCode="VTSCHME"; //scheme is expired for particular item,please check in bomdet
errString = itmdbAccess1.getErrorString("", errCode, "", "", conn);
errString=newErrorMessage(errString, invoiceId);
return errString;
}
else if(schemeQty.get("success") == 1){ else if(schemeQty.get("success") == 1){
scheme="Y"; scheme="Y";
schemeMap.put(invoiceId+","+itemCode, scheme); schemeMap.put(invoiceId+","+itemCode, scheme);
...@@ -762,14 +745,14 @@ private boolean isSchemeApply(Connection conn,String itemCodeL) ...@@ -762,14 +745,14 @@ private boolean isSchemeApply(Connection conn,String itemCodeL)
PreparedStatement pstmtL=null; PreparedStatement pstmtL=null;
int countL=0; int countL=0;
try{ try{
sql="select count(*) from bomdet where item_Code = ? "; sql="select count(*) from bomdet where item_code= ? and eff_from <= sysdate and "
+ "valid_upto >= sysdate order by nature";
pstmtL=conn.prepareStatement(sql); pstmtL=conn.prepareStatement(sql);
pstmtL.setString(1, itemCodeL); pstmtL.setString(1, itemCodeL);
rsL=pstmtL.executeQuery(); rsL=pstmtL.executeQuery();
if(rsL.next()){ if(rsL.next()){
countL=rsL.getInt(1); countL=rsL.getInt(1);
} }
System.out.println("count in isSchemeApply-->>["+countL+"] itemCode--->>["+itemCodeL+"]");
rsL.close(); rsL.close();
rsL=null; rsL=null;
pstmtL.close(); pstmtL.close();
...@@ -778,7 +761,6 @@ private boolean isSchemeApply(Connection conn,String itemCodeL) ...@@ -778,7 +761,6 @@ private boolean isSchemeApply(Connection conn,String itemCodeL)
return true; return true;
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -801,26 +783,10 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i ...@@ -801,26 +783,10 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i
double quantity=0; double quantity=0;
try{ try{
sql="select count(*) from bomdet where item_code= ? and eff_from <= sysdate and "
+ "valid_upto >= sysdate order by nature";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs=pstmt.executeQuery();
if(rs.next()){
count=rs.getInt(1);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
if(count > 0){
sql="select qty_per,nature from bomdet where item_code= ? and eff_from <= sysdate and " sql="select qty_per,nature from bomdet where item_code= ? and eff_from <= sysdate and "
+ "valid_upto >= sysdate order by nature"; + "valid_upto >= sysdate order by nature";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
while(rs.next()){ while(rs.next()){
quantity=rs.getDouble(1); quantity=rs.getDouble(1);
...@@ -838,11 +804,12 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i ...@@ -838,11 +804,12 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i
rs=null; rs=null;
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
}else{
/*else{
System.out.println("----data not found in bomdet---------"); System.out.println("----data not found in bomdet---------");
schemeQtyMap.put("success", new Double(0)); schemeQtyMap.put("success", new Double(0));
return schemeQtyMap; return schemeQtyMap;
} }*/
schemeQtyMap.put("success", new Double(1)); schemeQtyMap.put("success", new Double(1));
} }
......
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