Commit 78d4b8f7 authored by nkhan's avatar nkhan

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103991 ce508802-f39f-4f6c-b175-0d175dae99d5
parent de516ecc
...@@ -7,7 +7,7 @@ import java.util.*; ...@@ -7,7 +7,7 @@ import java.util.*;
import java.io.File; import java.io.File;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.ejb.dis.DistCommon; import ibase.webitm.ejb.dis.DistCommon;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
...@@ -49,7 +49,9 @@ public class StockUpdate ...@@ -49,7 +49,9 @@ public class StockUpdate
double holdQty=0; double holdQty=0;
String quarLockCode="",genratedTranId=""; String quarLockCode="",genratedTranId="";
String holdLock="";//addad by priyanka String holdLock="";//addad by priyanka
DistCommon distCommon = new DistCommon();// added by priyanka String noArtStr = "";
DistCommon distCommon = new DistCommon();// added by priyanka
/** /**
* Updates stock return error if fails * Updates stock return error if fails
...@@ -82,6 +84,9 @@ public class StockUpdate ...@@ -82,6 +84,9 @@ public class StockUpdate
double qtyPerArtStk = 0d,qtyStk=0d; double qtyPerArtStk = 0d,qtyStk=0d;
String quarantineLock="",lockCode=""; String quarantineLock="",lockCode="";
ArrayList< String> lockCodeList= new ArrayList<String>(); ArrayList< String> lockCodeList= new ArrayList<String>();
//Added By Nasruddin Start 21/11/6 bug fix
UtilMethods utilMethods = UtilMethods.getInstance();
String mamountStr="", qtyPerArtStr ="", grosswtPerArtStr ="",tarewtPerArtStr ="";
try try
{ {
DistCommon distCommon = new DistCommon(); DistCommon distCommon = new DistCommon();
...@@ -115,6 +120,7 @@ public class StockUpdate ...@@ -115,6 +120,7 @@ public class StockUpdate
this.noArt = 1; this.noArt = 1;
} }
} }
//Changed by wasim on 16-03-2015 to close Prepared Statement/Result Set [START] //Changed by wasim on 16-03-2015 to close Prepared Statement/Result Set [START]
if(rs!=null) if(rs!=null)
{ {
...@@ -342,6 +348,7 @@ public class StockUpdate ...@@ -342,6 +348,7 @@ public class StockUpdate
} }
this.qtyStduom = meffQty; this.qtyStduom = meffQty;
} }
if(this.lotNo == null || this.lotNo.trim().length() == 0) if(this.lotNo == null || this.lotNo.trim().length() == 0)
{ {
...@@ -426,6 +433,7 @@ public class StockUpdate ...@@ -426,6 +433,7 @@ public class StockUpdate
} }
pstmt.close(); pstmt.close();
rs.close(); rs.close();
/////////////////// ///////////////////
errString = calcWeights(conn); errString = calcWeights(conn);
if(errString != null && errString.trim().length() >0){ if(errString != null && errString.trim().length() >0){
...@@ -465,6 +473,7 @@ public class StockUpdate ...@@ -465,6 +473,7 @@ public class StockUpdate
} }
pstmt.close(); pstmt.close();
rs.close(); rs.close();
if (this.tranType.equalsIgnoreCase("R")) if (this.tranType.equalsIgnoreCase("R"))
{ {
mafterQty = mbefQty + this.qtyStduom; mafterQty = mbefQty + this.qtyStduom;
...@@ -475,6 +484,7 @@ public class StockUpdate ...@@ -475,6 +484,7 @@ public class StockUpdate
mafterQty = mbefQty - this.qtyStduom; mafterQty = mbefQty - this.qtyStduom;
effQty = this.qtyStduom * -1; effQty = this.qtyStduom * -1;
} }
//****************added by priyanka //****************added by priyanka
if((this.tranType.equalsIgnoreCase("R"))) if((this.tranType.equalsIgnoreCase("R")))
{ {
...@@ -717,6 +727,11 @@ public class StockUpdate ...@@ -717,6 +727,11 @@ public class StockUpdate
minvtraceNo= generateTranId("T_INVTRACE",xmlValues,conn); minvtraceNo= generateTranId("T_INVTRACE",xmlValues,conn);
System.out.println("Generated Tran id ::- ["+minvtraceNo+"]"); System.out.println("Generated Tran id ::- ["+minvtraceNo+"]");
mamount = effQty * this.rate; mamount = effQty * this.rate;
// Changed By Nasruddin 21-11-16 Start bug Fix
mamountStr = utilMethods.getReqDecString(mamount,3);
mamount = Double.parseDouble(mamountStr);
System.out.println("mamount @@@@@@@@ ::"+mamount);
// Changed By Nasruddin 21-11-16 END
sql = "Insert into invtrace (tran_id, tran_date, ref_ser, ref_id, ref_line, order_id, item_code, site_code, loc_code, unit," sql = "Insert into invtrace (tran_id, tran_date, ref_ser, ref_id, ref_line, order_id, item_code, site_code, loc_code, unit,"
+" lot_no, quantity, eff_qty, eff_date, chg_win, chg_user, chg_term, lot_sl, qty_before, qty_after," +" lot_no, quantity, eff_qty, eff_date, chg_win, chg_user, chg_term, lot_sl, qty_before, qty_after,"
+" reas_code,sundry_type,sundry_code, ref_date, rate, gross_rate, grade, acct_code__dr, cctr_code__dr, acct_code__cr, cctr_code__cr,no_art, amount,remarks," +" reas_code,sundry_type,sundry_code, ref_date, rate, gross_rate, grade, acct_code__dr, cctr_code__dr, acct_code__cr, cctr_code__cr,no_art, amount,remarks,"
...@@ -812,6 +827,10 @@ public class StockUpdate ...@@ -812,6 +827,10 @@ public class StockUpdate
//End //End
mamount = this.quantity * this.rate; mamount = this.quantity * this.rate;
// Changed By Nasruddin 21-11-16 Start bug Fix
mamountStr = utilMethods.getReqDecString(mamount,3);
mamount = Double.parseDouble(mamountStr);
// Changed By Nasruddin 21-11-16 END
count=0; count=0;
// *********xxxxxxxxxxxxxxxx******************** // *********xxxxxxxxxxxxxxxx********************
//changes by Dadaso pawar on 25/02/15 [start] (Pragyan sir suggestion) //changes by Dadaso pawar on 25/02/15 [start] (Pragyan sir suggestion)
...@@ -898,6 +917,7 @@ public class StockUpdate ...@@ -898,6 +917,7 @@ public class StockUpdate
this.rate = (totalValue)/(oldQty+Math.abs(this.qtyStduom)); this.rate = (totalValue)/(oldQty+Math.abs(this.qtyStduom));
this.grossRate = totalGrossValue / (oldQty + Math.abs(qtyStduom)); this.grossRate = totalGrossValue / (oldQty + Math.abs(qtyStduom));
} }
} }
else if(stockValuation.equalsIgnoreCase("C")){ else if(stockValuation.equalsIgnoreCase("C")){
sql =" Select (Case when (sum(Case When quantity IS NULL Then 0 Else quantity End)) is null Then 0 else (sum(Case When quantity IS NULL Then 0 Else quantity End)) end)," sql =" Select (Case when (sum(Case When quantity IS NULL Then 0 Else quantity End)) is null Then 0 else (sum(Case When quantity IS NULL Then 0 Else quantity End)) end),"
...@@ -1104,6 +1124,19 @@ public class StockUpdate ...@@ -1104,6 +1124,19 @@ public class StockUpdate
grosswtPerArt = this.grossWeight/this.noArt; grosswtPerArt = this.grossWeight/this.noArt;
} }
// Changed By Nasruddin 21-11-16 Start bug Fix
qtyPerArtStr = utilMethods.getReqDecString(qtyPerArt,3);
qtyPerArt = Double.parseDouble(qtyPerArtStr);
tarewtPerArtStr = utilMethods.getReqDecString(qtyPerArt,3);
tarewtPerArt = Double.parseDouble(tarewtPerArtStr);
grosswtPerArtStr = utilMethods.getReqDecString(qtyPerArt,3);
grosswtPerArt = Double.parseDouble(grosswtPerArtStr);
// Changed By Nasruddin 21-11-16 END
sql = "insert into stock (item_code,site_code,loc_code, lot_no,lot_sl,unit, quantity,crea_date,chg_user," sql = "insert into stock (item_code,site_code,loc_code, lot_no,lot_sl,unit, quantity,crea_date,chg_user,"
+" chg_date,chg_term,exp_date, alloc_qty,item_ser,mfg_date, site_code__mfg,potency_perc,pack_code," +" chg_date,chg_term,exp_date, alloc_qty,item_ser,mfg_date, site_code__mfg,potency_perc,pack_code,"
+" inv_stat,ltran_date,last_iss_date,gross_weight,tare_weight,net_weight,pack_instr,dimension,retest_date," +" inv_stat,ltran_date,last_iss_date,gross_weight,tare_weight,net_weight,pack_instr,dimension,retest_date,"
...@@ -1196,6 +1229,7 @@ public class StockUpdate ...@@ -1196,6 +1229,7 @@ public class StockUpdate
}//end of tranType (L) }//end of tranType (L)
else if(this.tranType.equalsIgnoreCase("A")){ else if(this.tranType.equalsIgnoreCase("A")){
mallocQty = mallocQty + meffQty; mallocQty = mallocQty + meffQty;
if (count != 0){ if (count != 0){
sql =" update stock set alloc_qty = ? ," sql =" update stock set alloc_qty = ? ,"
+" ltran_date = ? " +" ltran_date = ? "
...@@ -1215,6 +1249,7 @@ public class StockUpdate ...@@ -1215,6 +1249,7 @@ public class StockUpdate
}//end of tranType (A) }//end of tranType (A)
else if(this.tranType.equalsIgnoreCase("D")){ else if(this.tranType.equalsIgnoreCase("D")){
mallocQty = mallocQty - meffQty; mallocQty = mallocQty - meffQty;
if (count != 0){ if (count != 0){
sql =" update stock set alloc_qty = ? ," sql =" update stock set alloc_qty = ? ,"
+" ltran_date = ? " +" ltran_date = ? "
...@@ -1581,6 +1616,17 @@ public class StockUpdate ...@@ -1581,6 +1616,17 @@ public class StockUpdate
grosswtPerArt = this.grossWeight / this.noArt; grosswtPerArt = this.grossWeight / this.noArt;
} }
} }
// Changed By Nasruddin 21-11-16 Start bug Fix
qtyPerArtStr = utilMethods.getReqDecString(qtyPerArt,3);
qtyPerArt = Double.parseDouble(qtyPerArtStr);
tarewtPerArtStr = utilMethods.getReqDecString(qtyPerArt,3);
tarewtPerArt = Double.parseDouble(tarewtPerArtStr);
grosswtPerArtStr = utilMethods.getReqDecString(qtyPerArt,3);
grosswtPerArt = Double.parseDouble(grosswtPerArtStr);
// Changed By Nasruddin 21-11-16 END
sql="insert into stock " sql="insert into stock "
......
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