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.*;
import java.io.File;
import java.io.PrintWriter;
import java.io.FileOutputStream;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.ejb.dis.DistCommon;
import ibase.utility.CommonConstants;
import ibase.webitm.ejb.ITMDBAccessEJB;
......@@ -49,8 +49,10 @@ public class StockUpdate
double holdQty=0;
String quarLockCode="",genratedTranId="";
String holdLock="";//addad by priyanka
String noArtStr = "";
DistCommon distCommon = new DistCommon();// added by priyanka
/**
* Updates stock return error if fails
*
......@@ -82,6 +84,9 @@ public class StockUpdate
double qtyPerArtStk = 0d,qtyStk=0d;
String quarantineLock="",lockCode="";
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
{
DistCommon distCommon = new DistCommon();
......@@ -115,6 +120,7 @@ public class StockUpdate
this.noArt = 1;
}
}
//Changed by wasim on 16-03-2015 to close Prepared Statement/Result Set [START]
if(rs!=null)
{
......@@ -342,6 +348,7 @@ public class StockUpdate
}
this.qtyStduom = meffQty;
}
if(this.lotNo == null || this.lotNo.trim().length() == 0)
{
......@@ -426,6 +433,7 @@ public class StockUpdate
}
pstmt.close();
rs.close();
///////////////////
errString = calcWeights(conn);
if(errString != null && errString.trim().length() >0){
......@@ -465,6 +473,7 @@ public class StockUpdate
}
pstmt.close();
rs.close();
if (this.tranType.equalsIgnoreCase("R"))
{
mafterQty = mbefQty + this.qtyStduom;
......@@ -475,6 +484,7 @@ public class StockUpdate
mafterQty = mbefQty - this.qtyStduom;
effQty = this.qtyStduom * -1;
}
//****************added by priyanka
if((this.tranType.equalsIgnoreCase("R")))
{
......@@ -717,6 +727,11 @@ public class StockUpdate
minvtraceNo= generateTranId("T_INVTRACE",xmlValues,conn);
System.out.println("Generated Tran id ::- ["+minvtraceNo+"]");
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,"
+" 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,"
......@@ -812,6 +827,10 @@ public class StockUpdate
//End
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;
// *********xxxxxxxxxxxxxxxx********************
//changes by Dadaso pawar on 25/02/15 [start] (Pragyan sir suggestion)
......@@ -898,6 +917,7 @@ public class StockUpdate
this.rate = (totalValue)/(oldQty+Math.abs(this.qtyStduom));
this.grossRate = totalGrossValue / (oldQty + Math.abs(qtyStduom));
}
}
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),"
......@@ -1104,6 +1124,19 @@ public class StockUpdate
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,"
+" 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,"
......@@ -1196,6 +1229,7 @@ public class StockUpdate
}//end of tranType (L)
else if(this.tranType.equalsIgnoreCase("A")){
mallocQty = mallocQty + meffQty;
if (count != 0){
sql =" update stock set alloc_qty = ? ,"
+" ltran_date = ? "
......@@ -1215,6 +1249,7 @@ public class StockUpdate
}//end of tranType (A)
else if(this.tranType.equalsIgnoreCase("D")){
mallocQty = mallocQty - meffQty;
if (count != 0){
sql =" update stock set alloc_qty = ? ,"
+" ltran_date = ? "
......@@ -1581,6 +1616,17 @@ public class StockUpdate
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 "
......
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