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 ...@@ -160,7 +160,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
FinCommon finCommon = new FinCommon(); FinCommon finCommon = new FinCommon();
DistCommon discommon = new DistCommon(); DistCommon discommon = new DistCommon();
String acctCode="",cctrCode="",invacct="",trfacct="",itemSer="",cctrCodeDr=""; //lotNoTo="",; String acctCode="",cctrCode="",invacct="",trfacct="",itemSer="",cctrCodeDr=""; //lotNoTo="",;
double qtyPerArt=0,stknoArt=0,partnoArt=0;//Added by manoj dtd 24/06/2014
try try
{ {
...@@ -245,7 +245,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -245,7 +245,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
//Changed by Rohan on 19-08-13 for getting atual rate //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 "
+ "unit, grade, remarks, dimension, quantity ,hold_qty,actual_rate ,partial_used " + "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 " + "from stock "
+ "where item_code = ? " + "where item_code = ? "
+ "and site_code = ? " + "and site_code = ? "
...@@ -435,7 +435,9 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -435,7 +435,9 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
grossWeight = rsStock.getDouble("gross_weight"); grossWeight = rsStock.getDouble("gross_weight");
tareWeight = rsStock.getDouble("tare_weight"); tareWeight = rsStock.getDouble("tare_weight");
netWeight = rsStock.getDouble("net_weight"); netWeight = rsStock.getDouble("net_weight");
lotSlOrg = rsStock.getString("lot_sl__org"); 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 // added by cpatil on 20/11/13 end
...@@ -529,7 +531,8 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -529,7 +531,8 @@ 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] */ /* 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. //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())) //if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()))
if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()) && invStatLocCodeTo.trim().equalsIgnoreCase(partialGrlLoc.trim())) /*Commented by Manoj dtd 24/06/2014
if(invStatLocCodeTo.trim().equalsIgnoreCase(locCodeTo.trim()) && invStatLocCodeTo.trim().equalsIgnoreCase(partialGrlLoc.trim()))
{ {
noArt = 0; noArt = 0;
updateRowMap.put("no_art", noArt); updateRowMap.put("no_art", noArt);
...@@ -537,7 +540,19 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -537,7 +540,19 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
else else
{ {
updateRowMap.put("no_art", noArt); 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] */ /* 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"); updateRowMap.put("tran_ser", "XFRX");
...@@ -659,7 +674,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -659,7 +674,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
updateRowMap.put("no_art", quantity); 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); updateRowMap.put("no_art", quantity);
} }
...@@ -667,6 +682,8 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -667,6 +682,8 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
{ {
updateRowMap.put("no_art", noArt); 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 //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] */ /* 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. //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