Commit c52c94a0 authored by msharma's avatar msharma

no_art is updated correctly for Stock transfer


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95302 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 65d12c10
......@@ -160,7 +160,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
FinCommon finCommon = new FinCommon();
DistCommon discommon = new DistCommon();
String acctCode="",cctrCode="",invacct="",trfacct="",itemSer="",cctrCodeDr=""; //lotNoTo="",;
double qtyPerArt=0,stknoArt=0,partnoArt=0;//Added by manoj dtd 24/06/2014
try
{
......@@ -245,7 +245,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
//Changed by Rohan on 19-08-13 for getting atual rate
//+ "unit, grade, remarks, dimension, quantity ,hold_qty "
+ "unit, grade, remarks, dimension, quantity ,hold_qty,actual_rate ,partial_used "
+ ",potency_perc, inv_stat, gross_weight, tare_weight, net_weight, lot_sl__org " // added by cpatil on 20/11/13 compare with pb code and adding missing field
+ ",potency_perc, inv_stat, gross_weight, tare_weight, net_weight, lot_sl__org,qty_per_art,no_art " // added by cpatil on 20/11/13 compare with pb code and adding missing field
+ "from stock "
+ "where item_code = ? "
+ "and site_code = ? "
......@@ -436,6 +436,8 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
tareWeight = rsStock.getDouble("tare_weight");
netWeight = rsStock.getDouble("net_weight");
lotSlOrg = rsStock.getString("lot_sl__org");
qtyPerArt= rsStock.getDouble("qty_per_art");
stknoArt= rsStock.getDouble("no_art");
// added by cpatil on 20/11/13 end
......@@ -529,6 +531,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
/* Added by Ashish Sonawane on 07-sep-12 as per Manoharan Sir in case of partial GRL no_art to be set as 0 for issue [START] */
//Chnaged by Rohan on 29-07-13 for setting no art is 0 in case of location code to is PGRL.
//if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()))
/*Commented by Manoj dtd 24/06/2014
if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()) && invStatLocCodeTo.trim().equalsIgnoreCase(partialGrlLoc.trim()))
{
noArt = 0;
......@@ -537,7 +540,19 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
else
{
updateRowMap.put("no_art", noArt);
}*/
if((quantity%qtyPerArt)>0)
{
partnoArt=1;
}
else
{
partnoArt=0;
}
int calcnoArt=(int) (quantity/qtyPerArt);
System.out.println("quantity["+quantity+"]--qtyPerArt["+qtyPerArt+"]--calcnoArt["+calcnoArt+"]--partnoArt["+partnoArt+"]");
updateRowMap.put("no_art", calcnoArt);
/* Added by Ashish Sonawane on 07-sep-12 as per Manoharan Sir in case of partial GRL no_art to be set as 0 for issue [END] */
updateRowMap.put("tran_ser", "XFRX");
......@@ -659,7 +674,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
updateRowMap.put("no_art", quantity);
}
*/
if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()) && invStatLocCodeTo.trim().equalsIgnoreCase(partialGrlLoc.trim()))
/*if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()) && invStatLocCodeTo.trim().equalsIgnoreCase(partialGrlLoc.trim()))
{
updateRowMap.put("no_art", quantity);
}
......@@ -667,6 +682,8 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
{
updateRowMap.put("no_art", noArt);
}
*/
updateRowMap.put("no_art", calcnoArt+partnoArt);
//Chnaged by Rohan on 29-07-13 for setting no art as quantity in case of location code to is PGRL.end
/* Added by Ashish Sonawane on 07-sep-12 as per Manoharan Sir in case of partial GRL no_art to be set as quantity at the time of receipt [END] */
//Chnaged by Rohan on 19-08-13 for updating atual rate in transfered 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