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
......@@ -183,10 +183,9 @@ public String process(Document dom, Document dom2, String windowName, String xtr
}
if(custCodeFrm.length() > 0 && custCodeTo.length() > 0 && siteCode.length() > 0){
siteCodeG=siteCode;
invTypeG=invType;
inv45dayList.add("618ID00008");
invTypeG=invType;
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.setString(1, custCodeFrm);
pstmt.setString(2, custCodeTo);
......@@ -234,46 +233,36 @@ public String process(Document dom, Document dom2, String windowName, String xtr
podProcessInvIDList.remove(id);
}
}
}
//Need to be discussion. ------------------------------------------@@@@@@@@@@@@@@
/*podProcessInvIDList.clear();
podProcessInvIDList.add("618ID00036");
podProcessInvIDList.add("618ID00037");
podProcessInvIDList.add("618ID00038");
podProcessInvIDList.add("618ID00039");*/
}
podTraceInvList=getDoneInvoiceIDFromPodTrace(conn);
System.out.println("podTraceInvList---->>["+podTraceInvList+"]");
Iterator<String> it = podProcessInvIDList.iterator();
if(podTraceInvList.size() > 0){
for(String podPrcId : podProcessInvIDList){
while (it.hasNext()) {
String podPrcId=it.next();
if(podTraceInvList.contains(podPrcId)){
podProcessInvIDList.remove(podPrcId);
}
it.remove();
podProcessInvIDList.remove(podPrcId);
}
}
}
System.out.println("podProcessInvIDList-->>["+podProcessInvIDList+"]");
miscDrCrInvList=getDoneInvoiceIDFromMiscDrCrRcp(conn);
System.out.println("miscDrCrInvList---->>["+miscDrCrInvList+"]");
Iterator<String> it = podProcessInvIDList.iterator();
System.out.println("miscDrCrInvList---->>["+miscDrCrInvList+"]");
Iterator<String> it1 = podProcessInvIDList.iterator();
if(miscDrCrInvList.size() > 0){
while (it.hasNext()) {
String podPrcId=it.next();
while (it1.hasNext()) {
String podPrcId=it1.next();
if(miscDrCrInvList.contains(podPrcId)){
System.out.println("---in misc arrayList------");
it.remove();
it1.remove();
podProcessInvIDList.remove(podPrcId);
}
}
}
//podProcessInvIDList.clear(); //remove on final----------------------------7826464876----------------
//podProcessInvIDList.add("618ID00044");
//podProcessInvIDList.clear();
System.out.println("Final invoice Id ready for debit note---->>["+podProcessInvIDList+"]");
......@@ -371,7 +360,7 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv
itemCodeOrd=itemCodeOrd==null ? "" :itemCodeOrd.trim();
//Discount need discussion -----------------@@@@@--------
//Discount need discussion
if(discount > 0)
{
invRate=invRate - (invRate * discount/100);
......@@ -425,13 +414,7 @@ private String generateDebitNote(Connection conn,ArrayList<String> podProcessInv
errString = itmdbAccess1.getErrorString("", errCode, "", "", conn);
errString=newErrorMessage(errString, invoiceId);
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){
scheme="Y";
schemeMap.put(invoiceId+","+itemCode, scheme);
......@@ -762,21 +745,20 @@ private boolean isSchemeApply(Connection conn,String itemCodeL)
PreparedStatement pstmtL=null;
int countL=0;
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.setString(1, itemCodeL);
rsL=pstmtL.executeQuery();
if(rsL.next()){
countL=rsL.getInt(1);
}
System.out.println("count in isSchemeApply-->>["+countL+"] itemCode--->>["+itemCodeL+"]");
}
rsL.close();
rsL=null;
pstmtL.close();
pstmtL=null;
if(countL > 0)
return true;
return true;
}
......@@ -800,27 +782,11 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i
int count=0;
double quantity=0;
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){
try{
sql="select qty_per,nature from bomdet where item_code= ? and eff_from <= sysdate and "
+ "valid_upto >= sysdate order by nature";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(1, itemCode);
rs=pstmt.executeQuery();
while(rs.next()){
quantity=rs.getDouble(1);
......@@ -838,11 +804,12 @@ private Map<String,Double> schemeApply(Connection conn,String invoiceID,String i
rs=null;
pstmt.close();
pstmt=null;
}else{
/*else{
System.out.println("----data not found in bomdet---------");
schemeQtyMap.put("success", new Double(0));
return schemeQtyMap;
}
}*/
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