Commit 9840171b authored by agaikwad's avatar agaikwad

set conv__rtuom_stduom


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105098 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 61047fbb
...@@ -10384,48 +10384,46 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote, ...@@ -10384,48 +10384,46 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
convQtystduomLc, conn); convQtystduomLc, conn);
} }
} }
if (currentColumn.trim().equals("rate")) { if (currentColumn.trim().equals("rate"))
{
double lcrtconv=0,inputQty=0;
rate = checkNull(genericUtility.getColumnValue("rate", dom)); rate = checkNull(genericUtility.getColumnValue("rate", dom));
mVal = checkNull(genericUtility.getColumnValue( mVal = checkNull(genericUtility.getColumnValue("unit__rate", dom));
"unit__rate", dom)); mVal1 = checkNull(genericUtility.getColumnValue("unit__std", dom));
mVal1 = checkNull(genericUtility.getColumnValue( itemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
"unit__std", dom)); lcConv = checkNull(genericUtility.getColumnValue("conv__rtuom_stduom", dom));
itemCode = checkNull(genericUtility.getColumnValue( lc_convtemp = Double.parseDouble(lcConv == "" ? "0": lcConv);
"item_code", dom)); System.out.println("@@@@@@@@@8511 mVal1[" + mVal1+ "]lc_convtemp[" + lc_convtemp + "]rate[" + rate+ "]");
lcConv = checkNull(genericUtility.getColumnValue(
"conv__rtuom_stduom", dom));
lc_convtemp = Double.parseDouble(lcConv == "" ? "0"
: lcConv);
System.out.println("@@@@@@@@@8511 mVal1[" + mVal1
+ "]lc_convtemp[" + lc_convtemp + "]rate[" + rate
+ "]");
if(rate != null && rate.trim().length() > 0) if(rate != null && rate.trim().length() > 0)
{ {
rateLc = Double.parseDouble(rate) ; rateLc = Double.parseDouble(rate) ;
} }
if (mVal1 == null || mVal1.trim().length() == 0) { if (mVal1 == null || mVal1.trim().length() == 0)
{
sql = "Select unit from item where item_code = ? "; sql = "Select unit from item where item_code = ? ";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
pStmt.setString(1, itemCode); pStmt.setString(1, itemCode);
rs = pStmt.executeQuery(); rs = pStmt.executeQuery();
if (rs.next()) { if (rs.next())
{
mVal1 = rs.getString("unit"); mVal1 = rs.getString("unit");
} }
rs.close(); rs.close();
rs = null; rs = null;
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
valueXmlString.append("<unit__std>").append(mVal1) valueXmlString.append("<unit__std>").append(mVal1).append("</unit__std>");
.append("</unit__std>");
} }
System.out.println("@@@@@@@@@8528 mVal[" + mVal + "]"); System.out.println("@@@@@@@@@8528 mVal[" + mVal + "]");
if (mVal == null || mVal.trim().length() == 0) {
if (mVal == null || mVal.trim().length() == 0)
{
sql = "Select unit from item where item_code = ? "; sql = "Select unit from item where item_code = ? ";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
pStmt.setString(1, itemCode); pStmt.setString(1, itemCode);
rs = pStmt.executeQuery(); rs = pStmt.executeQuery();
if (rs.next()) { if (rs.next())
{
mVal = rs.getString("unit"); mVal = rs.getString("unit");
} }
rs.close(); rs.close();
...@@ -10433,91 +10431,64 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote, ...@@ -10433,91 +10431,64 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
convQtystdDob = Double.parseDouble(lcConv); convQtystdDob = Double.parseDouble(lcConv);//conv__rtuom_stduom
if ("R".equalsIgnoreCase(lsValue) ratestduomArr = null;
|| "B".equalsIgnoreCase(lsValue)) { ratestduomArr = new ArrayList();
// lc_ratestduom = gf_conv_qty_fact1(mVal1, mVal, ratestduomArr =distComm.getConvQuantityFact(mVal1, mVal, itemCode, rateLc, convQtystdDob, conn);
// itemCode, lc_rate, lc_conv,'Y') if(ratestduomArr != null)
ratestduomArr = distComm.getConvQuantityFact(mVal1, {
mVal, itemCode, rateLc, inputQty = Double.parseDouble(ratestduomArr.get(1).toString());
convQtystdDob, conn); lcrtconv = Double.parseDouble(ratestduomArr.get(0).toString());
System.out.println("inputQty["+inputQty+"]");
} else { System.out.println("lcrtconv["+lcrtconv+"]");
// lc_ratestduom = gf_conv_qty_fact1(mVal1, mVal,
// itemCode, rate, convQty,'N')
ratestduomArr = distComm.getConvQuantityFact(mVal1,
mVal, itemCode,rateLc,
convQtystdDob, conn);
} }
valueXmlString.append("<unit__rate>").append(mVal) valueXmlString.append("<unit__rate>").append(mVal).append("</unit__rate>");
.append("</unit__rate>"); }
} else { else
if ("R".equalsIgnoreCase(lsValue) {
|| "B".equalsIgnoreCase(lsValue)) { ratestduomArr = null;
// lc_ratestduom = gf_conv_qty_fact1(mVal1, mVal, ratestduomArr = new ArrayList();
// itemCode, lc_rate, lc_conv,'Y') ratestduomArr =distComm.getConvQuantityFact(mVal1, mVal, itemCode, rateLc, convQtystdDob, conn);
ratestduomArr = distComm.getConvQuantityFact(mVal1, if(ratestduomArr != null)
mVal, itemCode, rateLc, {
convQtystdDob, conn); inputQty = Double.parseDouble(ratestduomArr.get(1).toString());
} else { lcrtconv = Double.parseDouble(ratestduomArr.get(0).toString());
// lc_ratestduom = gf_conv_qty_fact1(mVal1, mVal, System.out.println("inputQty["+inputQty+"]");
// itemCode, rate, convQty,'N') System.out.println("lcrtconv["+lcrtconv+"]");
ratestduomArr = distComm.getConvQuantityFact(mVal1,
mVal, itemCode, rateLc,
convQtystdDob, conn);
} }
} }
System.out.println("@@@@@@@@@@@8573 ratestduomArr[" System.out.println("@@@@@@@@@@@8573 inputQty["+ inputQty + "]lcrtconv[" + lcrtconv+ "] ");
+ ratestduomArr + "]lc_convtemp[" + lc_convtemp if (lc_convtemp == 0)
+ "] "); {
if (lc_convtemp == 0) { valueXmlString.append("<conv__rtuom_stduom>").append(lcrtconv).append("</conv__rtuom_stduom>");
// dw_detedit[ii_currformno].SetItem(1,"conv__rtuom_stduom", }
// lc_conv) valueXmlString.append("<rate__stduom>").append(inputQty).append("</rate__stduom>");
valueXmlString.append("<conv__rtuom_stduom>") mrate = checkNull(genericUtility.getColumnValue("rate__clg", dom));
.append(lc_conv) System.out.println("@@@@@@8583 rate[" + rate + "]mrate["+ mrate + "]");
.append("</conv__rtuom_stduom>");
} // end if
// dw_detedit[ii_currformno].SetItem(1,"rate__stduom",
// lc_ratestduom)
valueXmlString.append("<rate__stduom>")
.append(ratestduomArr.get(1))
.append("</rate__stduom>");
// mrate = dw_detedit[ii_currformno].GetItemNumber(1,
// "rate__clg")
mrate = checkNull(genericUtility.getColumnValue(
"rate__clg", dom));
System.out.println("@@@@@@8583 rate[" + rate + "]mrate["
+ mrate + "]");
if(mrate != null && mrate.trim().length() > 0) if(mrate != null && mrate.trim().length() > 0)
{ {
mrateLc = Double.parseDouble(mrate) ; mrateLc = Double.parseDouble(mrate) ;
} }
if (mrate == null || mrate.trim().length() == 0 if (mrate == null || mrate.trim().length() == 0 || mrateLc <= 0)
|| mrateLc <= 0) { {
// dw_detedit[ii_currformno].setitem(1,"rate__clg",lc_rate) valueXmlString.append("<rate__clg>").append(rate).append("</rate__clg>");
valueXmlString.append("<rate__clg>").append(rate) }
.append("</rate__clg>"); else
} else { // price_list__clg {
// ls_price_list__clg=dw_header.getitemstring(1,"price_list__clg") ls_price_list__clg = checkNull(genericUtility.getColumnValue("price_list__clg", dom1));
ls_price_list__clg = checkNull(genericUtility
.getColumnValue("price_list__clg", dom1)); System.out.println("@@@@@@8593 ls_price_list__clg["+ ls_price_list__clg + "]rate[" + rate + "]");
System.out.println("@@@@@@8593 ls_price_list__clg[" if (ls_price_list__clg == null|| ls_price_list__clg.trim().length() == 0)
+ ls_price_list__clg + "]rate[" + rate + "]"); {
if (ls_price_list__clg == null
|| ls_price_list__clg.trim().length() == 0) { valueXmlString.append("<rate__clg>").append(rate).append("</rate__clg>");
// dw_detedit[ii_currformno].setitem(1,"rate__clg",lc_rate)
valueXmlString.append("<rate__clg>").append(rate)
.append("</rate__clg>");
} }
// end if
}// end if }// end if
// gbf_itemchangeddet("adj_variance") // gbf_itemchangeddet("adj_variance")
reStr = itemChanged(dom, dom1, dom2, objContext, reStr = itemChanged(dom, dom1, dom2, objContext,"adj_variance", editFlag, xtraParams);
"adj_variance", editFlag, xtraParams);
pos = reStr.indexOf("<Detail2>"); pos = reStr.indexOf("<Detail2>");
reStr = reStr.substring(pos + 9); reStr = reStr.substring(pos + 9);
pos = reStr.indexOf("</Detail2>"); pos = reStr.indexOf("</Detail2>");
...@@ -10525,7 +10496,8 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote, ...@@ -10525,7 +10496,8 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
valueXmlString.append(reStr); valueXmlString.append(reStr);
} }
if (currentColumn.trim().equals("unit__rate")) { if (currentColumn.trim().equals("unit__rate"))
{
mcode = checkNull(genericUtility.getColumnValue( mcode = checkNull(genericUtility.getColumnValue(
"unit__rate", dom)); "unit__rate", dom));
mVal1 = checkNull(genericUtility.getColumnValue( mVal1 = checkNull(genericUtility.getColumnValue(
......
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