Commit 82be818a authored by dpawar's avatar dpawar

added code for shelf life type


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95057 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6704149d
...@@ -1405,11 +1405,12 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus ...@@ -1405,11 +1405,12 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus
String lsLotsl="",lsTranType="",lsAcctcodehdr="",lsCctrcodehdr="",lsItemser="",lsUnit="",lsLineno=""; String lsLotsl="",lsTranType="",lsAcctcodehdr="",lsCctrcodehdr="",lsItemser="",lsUnit="",lsLineno="";
String lsItemcode="",lsGrade="",lsBatchNo="",lsAcctcodedet="",lsCctrcodedet="",lsSuppcodeMfg=""; String lsItemcode="",lsGrade="",lsBatchNo="",lsAcctcodedet="",lsCctrcodedet="",lsSuppcodeMfg="";
String lsItemStru="",lsAcctcodedr="",lsCctrcodedr="",lsAcctcodecr="",lsCctrcodecr="",lsUnitalt="",lsQcreqd=""; String lsItemStru="",lsAcctcodedr="",lsCctrcodedr="",lsAcctcodecr="",lsCctrcodecr="",lsUnitalt="",lsQcreqd="";
String lsSiteCodeMfg="",lsPackCode="",lsDimension=""; String lsSiteCodeMfg="",lsPackCode="",lsDimension="",lsItemCodeDet="",lsLotNoDet="",lsLocCodedet="",lsLotSlDet="",lsShelfLifeType="";
double lcQuantityHdr=0,lcDetamt=0,lcHdramt=0,lcQuantityDet=0,lcDetrate=0,lcAmount=0,lcGrossamount=0,lcInvValue=0,lcNoArt=0;; double lcQuantityHdr=0,lcDetamt=0,lcHdramt=0,lcQuantityDet=0,lcDetrate=0,lcAmount=0,lcGrossamount=0,lcInvValue=0,lcNoArt=0;;
double lcRate=0,lcGrossrate=0,lcPotencyPerc=0,lcConvqtystduom=0,lcGrossWeight=0, lcTareWeight=0,lcNetWeight=0,lcCapacity=0; double lcRate=0,lcGrossrate=0,lcPotencyPerc=0,lcConvqtystduom=0,lcGrossWeight=0, lcTareWeight=0,lcNetWeight=0,lcCapacity=0;
java.sql.Timestamp ldtTrandate=null,ldtRetestDate=null,ldtMfgDate=null,ldtExpiryDate=null; java.sql.Timestamp ldtTrandate=null,ldtRetestDate=null,ldtMfgDate=null,ldtExpiryDate=null;
boolean isRecordFound=false; boolean isRecordFound=false;
int countDet=0;
HashMap stkUpdstk=new HashMap(); HashMap stkUpdstk=new HashMap();
try try
{ {
...@@ -1961,6 +1962,82 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus ...@@ -1961,6 +1962,82 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus
stkUpdstk.put("gross_rate",lcGrossrate); stkUpdstk.put("gross_rate",lcGrossrate);
stkUpdstk.put("tare_weight",lcTareWeight); stkUpdstk.put("tare_weight",lcTareWeight);
stkUpdstk.put("net_weight",lcNetWeight); stkUpdstk.put("net_weight",lcNetWeight);
//Added by Dadaso pawar on 12/MAY/14 [Start]
System.out.println("lsBackflushtype in newadded----->>["+lsBackflushtype+"]");
if("C".equalsIgnoreCase(lsBackflushtype)){
sql="select item_code,lot_no,loc_code,lot_sl from receipt_backflush_det"
+ " where tran_id = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, tranID);
rs=pstmt.executeQuery();
if(rs.next()){
lsItemCodeDet=rs.getString(1);
lsLotNoDet=rs.getString(2);
lsLocCodedet=rs.getString(3);
lsLotSlDet=rs.getString(4);
}
lsItemCodeDet=lsItemCodeDet ==null ?"" :lsItemCodeDet.trim();
lsLotNoDet=lsLotNoDet ==null ?"" :lsLotNoDet.trim();
lsLocCodedet=lsLocCodedet ==null ?"" :lsLocCodedet.trim();
lsLotSlDet=lsLotSlDet ==null ?"" :lsLotSlDet.trim();
if(rs != null){
rs.close();
rs=null;
}
if(pstmt !=null){
pstmt.close();
pstmt=null;
}
sql="select count (*) from item_lot_info where item_code = ? and lot_no = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, lsItemCodeDet);
pstmt.setString(2, lsLotNoDet);
rs=pstmt.executeQuery();
if(rs.next()){
countDet=rs.getInt(1);
}
System.out.println("shelfLifeType count---->>["+countDet+"]");
if(rs != null){
rs.close();
rs=null;
}
if(pstmt !=null){
pstmt.close();
pstmt=null;
}
if(countDet > 0){
sql="select shelf_life_type from item_lot_info where item_code = ? and lot_no = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, lsItemCodeDet);
pstmt.setString(2, lsLotNoDet);
rs=pstmt.executeQuery();
if(rs.next()){
lsShelfLifeType=rs.getString(1);
}
if(rs != null){
rs.close();
rs=null;
}
if(pstmt !=null){
pstmt.close();
pstmt=null;
}
}
lsShelfLifeType=lsShelfLifeType ==null? "" :lsShelfLifeType.trim();
System.out.println("lsShelfLifeType12121--->>["+lsShelfLifeType+"]");
stkUpdstk.put("shelf_life_type", lsShelfLifeType);
}
//Added by Dadaso pawar on 12/MAY/14 [End]
if (lsBackflushtype.equalsIgnoreCase("S") || lsBackflushtype.equalsIgnoreCase("C")) if (lsBackflushtype.equalsIgnoreCase("S") || lsBackflushtype.equalsIgnoreCase("C"))
{ {
stkUpdstk.put("unit__alt",lsUnitalt); stkUpdstk.put("unit__alt",lsUnitalt);
......
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