Commit 48ffa261 authored by smanohar's avatar smanohar

In case of return rate and gross_rate taken from workorder_issdet table instead of stock table

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@209068 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9a927c45
......@@ -82,7 +82,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
double quantity=0,shortQty=0,grossWeight=0,tareWeight=0,netWeight=0,potencyAdj=0;
int lineNo=0,noArt=0;
String itemSer="",itemunit="",trackShelfLife="", itemCodedet = "";
double stkQty=0,stkRate=0,grossRate=0,qtystduom=0;
double stkQty=0,stkRate=0,grossRate=0,qtystduom=0, rate =0;
String issCriteria ="";
String stkGrade="",suppCodeMfg="",acct_code__inv="",cctr_code__inv="",acct_code__oh="",cctr_code__oh="";
HashMap stkUpdMap =null;
......@@ -102,14 +102,14 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
{
if ( conn == null )
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
//ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//Changed by Poonam Gole for changing connection object :Start
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection() ;
//Changed by Poonam Gole for changing connection object :End
conn.setAutoCommit(false);
connDriver = null;
//connDriver = null;
localConnection = true;
}
errString = preConfirmChk(tranID, issType, xtraParams, conn);
......@@ -226,7 +226,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
+" quantity , unit , line_no , exp_lev , "
+" qc_reqd , nvl(potency_adj,0) as potency_adj , reas_code , gross_weight, "
+" tare_weight , net_weight , no_art , short_qty , "
+" case when calc_potency is null then 'N' else calc_potency end calc_potency "
+" case when calc_potency is null then 'N' else calc_potency end calc_potency, rate, gross_rate " // 09-oct-2019 Manoharan rate, gross_rate added in case of return to take from detail instead of stock table
+" from "+detTable+" where tran_id ='"+tranID+"' ";
pstmtDet = conn.prepareStatement(sql);
rsDet = pstmtDet.executeQuery();
......@@ -249,6 +249,10 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
noArt = rsDet.getInt("no_art");
shortQty = rsDet.getDouble("short_qty");
calcPotency = rsDet.getString("calc_potency");
// 09-oct-2019 manoharan in case of return take rate,gros_rate from detail table instead of stock table
rate = rsDet.getDouble("rate");
grossRate =rsDet.getDouble("gross_rate");
// end 09-oct-2019 manoharan in case of return take rate,gros_rate from detail table instead of stock table
stkOpt = null;
if("T".equalsIgnoreCase(orderType))
{
......@@ -566,7 +570,12 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
cctr_code__inv = "";
acct_code__oh = "";
cctr_code__oh = "";
grossRate = 0.0;
// 09-oct-2019 manoharan in case of return take rate,gros_rate from detail table instead of stock table
if(!"R".equalsIgnoreCase(tranType))
{
grossRate = 0.0;
}
qtyPerArt = 0.0;
//Modified by Anjali R. on[26/09/2018][End]
rs = pstmt.executeQuery();
......@@ -581,7 +590,11 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
cctr_code__inv = rs.getString(6);
acct_code__oh = rs.getString(7);
cctr_code__oh = rs.getString(8);
grossRate = rs.getDouble(9);
// 09-oct-2019 manoharan in case of return take rate,gros_rate from detail table instead of stock table
if(!"R".equalsIgnoreCase(tranType))
{
grossRate = rs.getDouble(9);
}
qtyPerArt = rs.getDouble(10);
}
......@@ -689,7 +702,16 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
stkUpdMap.put("grade",stkGrade);
stkUpdMap.put("gross_rate",Double.toString(grossRate));
stkUpdMap.put("rate",Double.toString(stkRate));//Added by Poonam for rate
// 09-oct-2019 manoharan in case of return take rate,gros_rate from detail table instead of stock table
if(!"R".equalsIgnoreCase(tranType))
{
stkUpdMap.put("rate",Double.toString(stkRate));//Added by Poonam for rate
}
else
{
stkUpdMap.put("rate",Double.toString(rate));
}
// end 09-oct-2019 manoharan in case of return take rate,gros_rate from detail table instead of stock table
stkUpdMap.put("supp_code__mfg",suppCodeMfg);
stkUpdMap.put("acct_code_inv",acct_code__inv);
stkUpdMap.put("cctr_code_inv",cctr_code__inv);
......
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