Commit e18cf75c authored by dpawar's avatar dpawar

confirmed transaction saved in podtrace table


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94209 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 061e3de2
......@@ -4,6 +4,7 @@ import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.fin.MiscDrCrRcpConf;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
......@@ -15,9 +16,15 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.ejb.Stateless;
import org.w3c.dom.Document;
import com.sun.jmx.snmp.Timestamp;
@Stateless
public class PODProcess extends ProcessEJB implements PODProcessLocal,PODProcessRemote
{
......@@ -75,7 +82,7 @@ public String process(Document dom, Document dom2, String windowName, String xtr
ConnDriver connDriver = null;
GenericUtility genericUtility = null;
ProofOfDelivery podObject=null;
ITMDBAccessEJB itmDBAccessEJB = null;
ITMDBAccessEJB itmdbAccess = null;
ValidatorEJB vdt=null;
PreparedStatement pstmt=null;
ResultSet rs=null;
......@@ -85,7 +92,7 @@ public String process(Document dom, Document dom2, String windowName, String xtr
String sql="",invoiceId="",priceList="",currCode="";
try{
genericUtility = GenericUtility.getInstance();
itmDBAccessEJB = new ITMDBAccessEJB();
itmdbAccess=new ITMDBAccessEJB();
podObject=ProofOfDelivery.getInstance();
vdt=new ValidatorEJB();
connDriver = new ConnDriver();
......@@ -107,64 +114,64 @@ public String process(Document dom, Document dom2, String windowName, String xtr
System.out.println("invType--->>["+invType+"]");
//Validation for Site code
if (siteCode.length() == 0 )
{
if (siteCode.length() == 0 ){
errCode = "VTSITECNE";
errorString = vdt.getErrorString("site_code",errCode,userId);
return errorString;
}else
{
}else{
cnt=podObject.getDBRowCount(conn,"site","site_code",siteCode);
if(cnt == 0)
{
if(cnt == 0){
System.out.println("site_code not exist validation fire");
errCode = "VTSITENEX";
errorString = vdt.getErrorString("site_code",errCode,userId);
return errorString;
}
}
//Validation for Customer Code From
if (custCodeFrm.length() == 0 )
{
if (custCodeFrm.length() == 0 ){
errCode = "VTCUSTCNE";
errorString = vdt.getErrorString("cust_code_from",errCode,userId);
return errorString;
}else
{
}else{
cnt=podObject.getDBRowCount(conn,"customer","cust_code",custCodeFrm);
if(cnt == 0)
{
if(cnt == 0){
System.out.println("custCodeFrom not exist validation fire");
errCode = "VTCUSTNEX";
errorString = vdt.getErrorString("cust_code_from",errCode,userId);
return errorString;
}
}
//Validation for Customer Code To
if (custCodeTo.length() == 0 )
{
if (custCodeTo.length() == 0 ){
errCode = "VTCUSTCNE";
errorString = vdt.getErrorString("cust_code_to",errCode,userId);
return errorString;
}else
{
}else{
cnt=podObject.getDBRowCount(conn,"customer","cust_code",custCodeTo);
if(cnt == 0)
{
if(cnt == 0){
System.out.println("custCodeTo not exist validation fire");
errCode = "VTCUSTNEX";
errorString = vdt.getErrorString("cust_code_to",errCode,userId);
return errorString;
}
}
//Validation for invoice type. only DM or IS invoice type allowed.
if(invType.length() == 0){
errCode = "VTINVTNN";
errorString = vdt.getErrorString("inv_type",errCode,userId);
return errorString;
}else{
if(!("DM".equalsIgnoreCase(invType) || "IS".equalsIgnoreCase(invType))){
errCode = "VTINVTI";
errorString = vdt.getErrorString("inv_type",errCode,userId);
return errorString;
}
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(custCodeFrm.length() > 0 && custCodeTo.length() > 0 && siteCode.length() > 0){
sql="select invoice_id from invoice where cust_code__bil between ? and ? and site_code = ? "
+ "and sysdate - conf_date > 517";
......@@ -174,12 +181,10 @@ public String process(Document dom, Document dom2, String windowName, String xtr
pstmt.setString(3, siteCode);
rs=pstmt.executeQuery();
while(rs.next())
{
while(rs.next()){
invoiceId=rs.getString(1);
invoiceId=invoiceId==null ? "" :invoiceId.trim();
inv45dayList.add(invoiceId);
}
rs.close();
rs=null;
......@@ -188,19 +193,23 @@ public String process(Document dom, Document dom2, String windowName, String xtr
System.out.println("Size of arrayList inv45dayList----->>["+inv45dayList.size()+"]");
podProcessInvIDList=getDoneInvoiceIdHDR( conn, inv45dayList);
if(podProcessInvIDList.contains("Error"))
{
if(podProcessInvIDList.contains("Error")){
//handle error if array list contain error.
errCode="VTPRCNCP";
errorString =itmdbAccess.getErrorString("", errCode, "", "", conn);
return errorString;
}
System.out.println("podProcessInvIDList---->>["+podProcessInvIDList+"]");
System.out.println("Size of podProcessInvIDList---->>["+podProcessInvIDList.size()+"]");
podNotConfList=getNotConfirmedInvIdFromHdr(conn);
if(podNotConfList.contains("Error"))
{
//handle error if array list contain error.
if(podNotConfList.contains("Error")){
errCode="VTPRCNCP";
errorString =itmdbAccess.getErrorString("", errCode, "", "", conn);
return errorString;
}
System.out.println("podNotConfList---->>["+podNotConfList+"]");
System.out.println("Size of podNotConfList---->>["+podNotConfList.size()+"]");
//check in podNotConfList if invoice id in podProcessInvIDList present or not.
//if present then remove from podProcessInvIDList.
if(podNotConfList.size() > 0 && podProcessInvIDList.size() > 0)
......@@ -215,21 +224,52 @@ public String process(Document dom, Document dom2, String windowName, String xtr
}
}
podProcessInvIDList.clear();
podProcessInvIDList.add("618ID00040");
podProcessInvIDList.clear(); //remove on final----------------------------7826464876----------------
podProcessInvIDList.add("618ID00032");
podProcessInvIDList.add("618ID00033");
podProcessInvIDList.add("618ID00044");
System.out.println("Final invoice Id ready for debit note---->>["+podProcessInvIDList+"]");
priceList=podObject.getNameOrDescrForCode(conn, "site", "price_list", "site_code", siteCode);
priceList=priceList==null ? "" :priceList.trim();
System.out.println("priceList----->>["+priceList+"]");
if(priceList.length() <= 0){
errCode="VTPRCLND"; //Price list not define in site master.
errorString = itmdbAccess.getErrorString("", errCode, "", "", conn);
return errorString;
}
//Check in invoice_trace if item_code_ord (scheme_code) is available or not.
//if yes then checked in bomdet.if scheme code found then for that particular item scheme is apply.
String str=schemeApply(conn, podProcessInvIDList,priceList,xtraParams,siteCode);
errorString=generateDebitNote(conn, podProcessInvIDList,priceList,xtraParams,siteCode,invType);
System.out.println("Return string from generateDebitNote----->>["+errorString+"]");
if("ITEMNOTACTIVE".equalsIgnoreCase(errorString)){
conn.rollback();
errCode="VTITMCNAC"; //Item code not active
errorString = itmdbAccess.getErrorString("", errCode, "", "", conn);
}
else if("Error".equalsIgnoreCase(errorString)){
conn.rollback();
errCode="VTPRCNCP";
errorString =itmdbAccess.getErrorString("", errCode, "", "", conn);
}
else if("Success".equalsIgnoreCase(errorString)){
conn.commit();
errCode="VTPRCCSF";
errorString = itmdbAccess.getErrorString("", errCode, "", "", conn);
}
else if("PRICELIST".equalsIgnoreCase(errorString)){
conn.rollback();
errCode="VTPRCLNE";
errorString = itmdbAccess.getErrorString("", errCode, "", "", conn);
}
else if("SCHEME".equalsIgnoreCase(errorString)){
conn.rollback();
errCode="VTSCHME";//scheme is expired for particular item,please check in bomdet
errorString = itmdbAccess.getErrorString("", errCode, "", "", conn);
}
}
}//end try
......@@ -255,24 +295,33 @@ public String process(Document dom, Document dom2, String windowName, String xtr
}
private String schemeApply(Connection conn,ArrayList<String> podProcessInvIDListL,String priceListL,String xtraParams,String siteCode)
private String generateDebitNote(Connection conn,ArrayList<String> podProcessInvIDListL,String priceListL,String xtraParams,String siteCode,String invType)
{
ResultSet rs=null;
PreparedStatement pstmt=null;
ProofOfDelivery pod=null;
ProofOfDeliveryConf podC=null;
String sql="",lotNo="",lotSl="",itemCode="",itemCodeOrd="",itemActive="",detail2xmlString="";
Map<String,String> invoiceDetailsMap=null;
HashMap<String,String> podTraceMap=new HashMap();
Map<String,Double> schemeQty=null;
ArrayList<String> confList=new ArrayList();
String sql="",lotNo="",lotSl="",itemCode="",itemCodeOrd="",itemActive="",detail2xmlString="",errString="";
String custCode="",currCode="",partial="N",QtyInvTrace="",scheme="N";
double invRate=0,invQty=0,discount=0,priceListRate=0,detail3Amt=0,detail3AmtT=0,debitNoteAmtDetail=0;
double debitNoteAmtHdr=0;
int lineNotrace=0,lineNo=0;
double debitNoteAmtHdr=0,ExchRate=0,actualRate=0,chargQty=0,freeQty=0,netPTS=0;
int lineNotrace=0,lineNo=0,noOfInvoicePrc=0,totalInvoice=0;
pod=ProofOfDelivery.getInstance();
podC=ProofOfDeliveryConf.getInstance();
try{
System.out.println("priceListL------>>["+priceListL+"]");
System.out.println("priceListL123------>>["+priceListL+"]");
totalInvoice=podProcessInvIDListL.size();
System.out.println("total invoice for process------>>["+totalInvoice+"]");
for(String invoiceId :podProcessInvIDListL)
{
sql="select rate,quantity,lot_no,lot_sl,item_code,inv_line_no,discount,item_code__ord " +
detail2xmlString="";
lineNo=0;
System.out.println("invoice ID in for loop------->>["+invoiceId+"]");
sql="select rate,quantity,lot_no,lot_sl,item_code,inv_line_no,discount,item_code__ord,invoice_id " +
"from invoice_trace where invoice_id = ? order by inv_line_no";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, invoiceId);
......@@ -293,7 +342,7 @@ private String schemeApply(Connection conn,ArrayList<String> podProcessInvIDList
lotSl=lotSl==null ? "" :lotSl.trim();
itemCode=itemCode==null ? "" :itemCode.trim();
itemCodeOrd=itemCodeOrd==null ? "" :itemCodeOrd.trim();
QtyInvTrace=Double.toHexString(invQty);
//Discount need discussion -----------------@@@@@--------
if(discount > 0)
......@@ -301,6 +350,20 @@ private String schemeApply(Connection conn,ArrayList<String> podProcessInvIDList
invRate=invRate - (invRate * discount/100);
System.out.println("Discount for invoice id--->>["+invoiceId+"]"+"inv Rate-->>["+invRate+"]");
}
//check if any partially entry exist in POD HDR or not.
//if yes then minus from actual invoice qty.
partial="N";
scheme="N";
if(pod.isPartialyInvoiceChk(conn, invoiceId,"PRC")){
System.out.println("@#@#partial condition found for invoice id----->>["+invoiceId+"]");
System.out.println("Actual inv qty in inv trace---->>["+invQty+"]");
System.out.println("inv. qty done in POD screen---->>["+pod.partialQty+"]");
invQty = invQty - pod.partialQty;
partial="Y";
System.out.println("Actual inv qty---->>["+invQty+"]");
}
//------------Mehod-----------------------------//
//Check if item code Active or not."N" or null then return error message.
itemActive=pod.getColumnDescr(conn,"active","item","item_code",itemCode);
......@@ -309,59 +372,161 @@ private String schemeApply(Connection conn,ArrayList<String> podProcessInvIDList
{
return "ITEMNOTACTIVE"; // item code not active
}
java.util.Date tranDate=new Date();
priceListRate=getPriceListRate(priceListL, tranDate,itemCode,lotNo,"", conn);
System.out.println("priceListRate----->>["+priceListRate+"]");
if(priceListRate <= 0)
{
return "PRICELIST";
}
//check if scheme is apply or not
if(isSchemeApply(conn,itemCode))
{
if(isSchemeApply(conn,itemCode)){
//java code if scheme is apply
System.out.println("-------Scheme is apply -----------");
schemeQty=schemeApply(conn,invoiceId,itemCode);
System.out.println("schemeQty map---->>["+schemeQty+"]");
if(schemeQty.size() > 0){
if(schemeQty.get("success") < 0){
return "Error"; // Scheme related error or sql error.
}
else{
System.out.println("-------Scheme not apply -----------");
if(priceListL.length() <=0)
{
return "PRICELIST"; //priceList not define or zero in site master.
else if(schemeQty.get("success") == 0){
return "SCHEME";
}
else{
java.util.Date tranDate=new Date();
priceListRate=getPriceListRate(priceListL, tranDate,itemCode,lotNo,"", conn);
System.out.println("priceListRate----->>["+priceListRate+"]");
if(priceListRate < 0)
{
// return error messages
else if(schemeQty.get("success") == 1){
scheme="Y";
chargQty=schemeQty.get("charge_qty");
freeQty=schemeQty.get("free_qty");
netPTS=chargQty / (chargQty - freeQty) * priceListRate;
System.out.println("Net PTS rate----->>["+netPTS+"]");
actualRate=netPTS - invRate;
detail3Amt= actualRate * invQty;
lineNo++;
detail2xmlString=detail2xmlString + podC.getDetailsXmlString(conn,invoiceId,lineNotrace,lineNo,actualRate,invQty,lotNo,lotSl,itemCode, detail3Amt);
}
else
{
debitNoteAmtDetail=podC.getDebitNoteAmount(invRate,invQty);
debitNoteAmtHdr=debitNoteAmtHdr+debitNoteAmtDetail;
detail3Amt= (priceListRate - invRate) * invQty;
}
}else{
System.out.println("-------Scheme not apply -----------");
//debitNoteAmtDetail=podC.getDebitNoteAmount(invRate,invQty);
//debitNoteAmtHdr=debitNoteAmtHdr+debitNoteAmtDetail;
actualRate=priceListRate - invRate;
detail3Amt= actualRate * invQty;
System.out.println("Debit note amount-------->>["+detail3Amt+"]");
System.out.println("Actual rate after deducting inv rate-------->>["+detail3Amt+"]");
detail3AmtT=detail3AmtT + detail3Amt;
lineNo++;
//detail2xmlString=detail2xmlString + podC.getDetailsXmlString(invoiceId,lineNotrace,lineNo,invRate,invQty,lotNo,lotSl,itemCode, detail3Amt);
detail2xmlString=detail2xmlString + podC.getDetailsXmlString(conn,invoiceId,lineNotrace,lineNo,actualRate,invQty,lotNo,lotSl,itemCode, detail3Amt);
} //end isSchemeApply
}
} //end priceListL if
//insert into podTrace table entry....
podTraceMap.put("line_no", Integer.toString(lineNo));
podTraceMap.put("inv_id", invoiceId);
podTraceMap.put("site_code", siteCode);
podTraceMap.put("item_code", itemCode);
podTraceMap.put("inv_type", invType);
podTraceMap.put("db_qty", Double.toString(invQty));
podTraceMap.put("db_rate", Double.toString(actualRate));
podTraceMap.put("db_amount", Double.toString(detail3AmtT));
podTraceMap.put("partial",partial);
podTraceMap.put("scheme",scheme);
} //end isSchemeApply
int podTrace=insertDataInPodTrace(conn, podTraceMap);
System.out.println("Return podTrace from insert---->>["+podTrace+"]");
if(podTrace < 0){
return "Error";
}
} //end while invoice trace
rs.close();
rs=null;
pstmt.close();
pstmt=null;
System.out.println("Detail2 xml-------->>[["+detail2xmlString+"]");
invoiceDetailsMap=pod.getDetailsFromInvoice(conn, invoiceId);
custCode=invoiceDetailsMap.get("cust_code").toString();
currCode =pod.checkNull(invoiceDetailsMap.get("curr_code"));
ExchRate=Double.parseDouble(invoiceDetailsMap.get("exch_rate"));
errString=podC.genDebitNote("PRC",invoiceId,custCode,siteCode,xtraParams,currCode,ExchRate,detail2xmlString,detail3AmtT,conn);
System.out.println("------Error string after DN save--->>["+errString+"]");
if (errString.indexOf("Success") > -1)
{
System.out.println("Tran id for Misc. debit note------->>["+(podC.debitNoteTranID).trim()+"]");
MiscDrCrRcpConf confDebitNote=new MiscDrCrRcpConf();
errString=confDebitNote.confirm((podC.debitNoteTranID).trim(),xtraParams,"",conn);
System.out.println("Error String on DB Confirmation: "+errString);
if((errString != null ) && errString.indexOf("CONFSUCCES") > -1)
{
int count=checkPODDoneAlready(conn,invoiceId);
if(count > 0){
continue;
}else if(count < 0){
return "Error";
}
noOfInvoicePrc++;
confList.add(invoiceId);
System.out.println("noOfInvoicePrc----------------"+noOfInvoicePrc);
if(noOfInvoicePrc==totalInvoice)
return "Success";
else{
System.out.println("in continue----------------");
continue;
}
//return "Success";
}else
return "Error";
}else{
//itmdbAccess.getErrorString("", "VTNCONFT", "", "", conn);
return "Error";
}
System.out.println("Final detail2xmlString----->>["+detail2xmlString+"]");
System.out.println("Final debitNoteAmtHdr---------->> : "+debitNoteAmtHdr);
System.out.println("Final detail3AmtT in debit note table---------->> : "+detail3AmtT);
//errString=genDebitNote(tranId,invoiceId,custCode,siteCode,xtraParams,0,currCode,ExchRate,detail2xmlString,debitNoteAmtHdr,detail3AmtT,conn);
} //end invoice id for loop
System.out.println("invoice id confirmed-------->>"+confList);
}catch(Exception e)
{
System.out.println("Exception : ");
e.printStackTrace();
return "Error";
}
return "";
return errString;
}
private int checkPODDoneAlready (Connection conn,String invoiceIdL)
{
ResultSet rs=null;
PreparedStatement pstmt=null;
String sql="";
int count=0;
try{
sql="select count(*) from podtrace where invoice_id = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, invoiceIdL);
rs=pstmt.executeQuery();
if(rs.next()){
count=rs.getInt(1);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
}
catch(Exception e){
System.out.println("----Exception in checkPODDoneAlready----");
e.printStackTrace();
return -1;
}
return count;
}
// Return array list whoes invoice id not confirmed in spl_sales_por_hdr table.
private ArrayList<String> getNotConfirmedInvIdFromHdr(Connection conn)
......@@ -416,6 +581,7 @@ private ArrayList<String> getDoneInvoiceIdHDR(Connection conn,ArrayList<String>
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "Y");
rs=pstmt.executeQuery();
while(rs.next())
{
tranIdL=rs.getString(1);
......@@ -433,7 +599,7 @@ private ArrayList<String> getDoneInvoiceIdHDR(Connection conn,ArrayList<String>
pstmt=null;
if(inv45dayListL.size() > 0 && podDoneInvIDList.size() > 0){
System.out.println("---both arraylist contains elements-----------");
for (String invId : inv45dayListL) {
for (String invId : inv45dayListL) { //required to check if invoice id partially done in POD HDR
if(!(podDoneInvIDList.contains(invId))){
podProcessInvIDListL.add(invId);
......@@ -511,6 +677,125 @@ private boolean isSchemeApply(Connection conn,String itemCodeL)
return false;
}
private Map<String,Double> schemeApply(Connection conn,String invoiceID,String itemCode)
{
ResultSet rs=null;
PreparedStatement pstmt=null;
HashMap <String,Double>schemeQtyMap=new HashMap<String,Double>();
String sql="",nature="";
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){
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);
rs=pstmt.executeQuery();
while(rs.next()){
quantity=rs.getDouble(1);
nature=rs.getString(2);
if("C".equalsIgnoreCase(nature.trim())){
schemeQtyMap.put("charge_qty", quantity);
System.out.println("charge qty added in map------>>["+schemeQtyMap.get("charge_qty")+"]");
}
if("F".equalsIgnoreCase(nature.trim())){
schemeQtyMap.put("free_qty", quantity);
System.out.println("free qty added in map------>>["+schemeQtyMap.get("free_qty")+"]");
}
} //end while
rs.close();
rs=null;
pstmt.close();
pstmt=null;
}else{
System.out.println("----data not found in bomdet---------");
schemeQtyMap.put("success", new Double(0));
}
schemeQtyMap.put("success", new Double(1));
}
catch(Exception e)
{
System.out.println("Exception in scheme apply ---------");
e.printStackTrace();
schemeQtyMap.put("success", new Double(-1));
return schemeQtyMap;
}
return schemeQtyMap;
}
private int insertDataInPodTrace(Connection conn,Map<String,String>podTraceMapL)
{
PreparedStatement pstmt=null;
ResultSet rs=null;
String sql="";
int count=0;
long tranID=0;
try{
sql="select tran_id from podtrace order by tran_id DESC";
pstmt=conn.prepareStatement(sql);
rs=pstmt.executeQuery();
if(rs.next()){
tranID=Long.parseLong(rs.getString(1).trim());
}else{
tranID=10000;
}
rs.close();rs=null;
pstmt.close();
pstmt=null;
sql="insert into podtrace (tran_id,line_no,tran_date,invoice_id,site_code,item_code,inv_type,db_qty,"
+ "db_rate,debit_note_amt,partial,scheme,chg_date,chg_user,chg_term) "
+ "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, Long.toString(++tranID));
pstmt.setInt(2, Integer.parseInt(podTraceMapL.get("line_no")));
pstmt.setTimestamp(3, new java.sql.Timestamp(new java.util.Date().getTime()) );
pstmt.setString(4, podTraceMapL.get("inv_id"));
pstmt.setString(5, podTraceMapL.get("site_code"));
pstmt.setString(6, podTraceMapL.get("item_code"));
pstmt.setString(7, podTraceMapL.get("inv_type"));
pstmt.setDouble(8, Double.parseDouble(podTraceMapL.get("db_qty")));
pstmt.setDouble(9, Double.parseDouble(podTraceMapL.get("db_rate")));
pstmt.setDouble(10, Double.parseDouble(podTraceMapL.get("db_amount")));
pstmt.setString(11, podTraceMapL.get("partial"));
pstmt.setString(12, podTraceMapL.get("scheme"));
pstmt.setTimestamp(13, new java.sql.Timestamp(new java.util.Date().getTime()) );
pstmt.setString(14, "BASE");
pstmt.setString(15, "System");
count=pstmt.executeUpdate();
pstmt.close();
}
catch(Exception e)
{
e.printStackTrace();
System.out.println("Exception in insertDataInPodTrace method----");
return -1;
}
return count;
}
public double getPriceListRate(String priceList, java.util.Date tranDate, String itemCode, String lotNo, String type, Connection connectionObject) throws RemoteException,ITMException
{
double rate = 0;
......@@ -579,7 +864,7 @@ public double getPriceListRate(String priceList, java.util.Date tranDate, String
}
catch(SQLException ie)
{
System.out.println("Exception: DistDiscountEJB: pickRate: type D: ==>"+ie);
System.out.println("Exception: PODProcess: getPriceListRate: type D: ==>"+ie);
ie.printStackTrace();
return -1;
}
......@@ -615,12 +900,7 @@ public double getPriceListRate(String priceList, java.util.Date tranDate, String
}
else if (type.equalsIgnoreCase("I")) // Inventory
{
/* ------------------Code not transferred, it's calling an external function
siteCode =
locCode =
lotNo =
lotSl =
-------------------*/
rate = 0;
// To check is lot no is null or not and fetch accordingly
if (lotSl.trim().length() == 0 || lotSl.length() == 0)
......
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