Commit ae8e33d1 authored by cpatil's avatar cpatil

modify to remove issues


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103615 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e3c0f9b8
......@@ -156,7 +156,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
sordNo = checkNull(genericUtility.getColumnValue("sord_no", dom));
despId = checkNull(genericUtility.getColumnValue("desp_id", dom));
if( isnull(despId) )
if( isnull(despId) || despId.trim().length() == 0 )
{
despId = "@@@@@@@@@@";
}
......@@ -262,7 +262,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
rs = null;
pstmt.close();
pstmt = null;
if (cnt == 0 || "N".equalsIgnoreCase(status))
if (cnt == 0 || "N".equalsIgnoreCase(status) || "N".equalsIgnoreCase(confirmed))
{
errCode = "VTSORD1";
errList.add(errCode);
......@@ -1011,7 +1011,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
}//end if
*/
//validate against Benefit Type.
ls_benefit_type = checkNull(genericUtility.getColumnValue("benefit_type", dom1));
ls_benefit_type = checkNull(genericUtility.getColumnValue("benefit_type", dom1)).trim();
mdate1Str = checkNull(genericUtility.getColumnValue("desp_date", dom1));
ls_site_code = checkNull(genericUtility.getColumnValue("site_code", dom1));
ls_item_code = getValue("item_parnt", "item", "item_code", mVal, conn);
......@@ -1021,7 +1021,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
{
mdate1 = Timestamp.valueOf(genericUtility.getValidDateString(mdate1Str,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())+" 00:00:00.0");
}
System.out.println("@@@@ ls_benefit_type["+ls_benefit_type+"]");
if("AL".equalsIgnoreCase(ls_benefit_type))
{
sql = " select count(1) " +
......@@ -3119,7 +3119,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
String lineNoSord="",reStr="",custItemRef="",SOalloc="",itemCodeOrd="",expLev="",unit="",lotSl="",lotNo="",unitStd="",packInstr="",noArt="";
String nature="",lineType="",itemcodeFree="",partNo="";
String siteCodeDet ="",taxClass="",taxChap="",taxEnv="",itemCode="",loc="",listType="",itemRef="",applyPrice="",priceVar="",_priceVar="";
String siteCodeDet ="",taxClass="",taxChap="",taxEnv="",itemCode="",packCode="",loc="",listType="",itemRef="",applyPrice="",priceVar="",_priceVar="";
double discount=0,rateStduom=0,rateClg=0,quantity=0,qtyAlloc=0,convQtyStduom=0,ordQty=0,quantityStduom=0,packQty=0,rate=0,totRate=0;
int pos=0;
double diffRate=0,itemRate=0,discAmt=0,effCost=0,offRate=0,bbRate=0;
......@@ -3433,7 +3433,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
gpSer = getValue("gp_ser", "sordertype", "order_type", orderType, conn);
System.out.println("@@@@ gpSer["+gpSer+"]");
if( isnull(gpSer) || lenTrim(gpSer) == 0 )
if(( isnull(gpSer) || lenTrim(gpSer) == 0 ) && ( orderType != null && lenTrim(orderType) > 0 ))
{
//ls_gp_ser = left(trim(ls_order_type),1)
gpSer = orderType.substring(0, 1);
......@@ -3499,6 +3499,18 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
valueXmlString.append("<dlv_to>").append("<![CDATA[" + dlvTo + "]]>").append("</dlv_to>");
}
else
{
valueXmlString.append("<cust_code__dlv>").append("<![CDATA[" + custCodeDlv + "]]>").append("</cust_code__dlv>");
valueXmlString.append("<dlv_add1>").append("<![CDATA[" + dlvAdd1 + "]]>").append("</dlv_add1>");
valueXmlString.append("<dlv_add2>").append("<![CDATA[" + dlvAdd2 + "]]>").append("</dlv_add2>");
valueXmlString.append("<dlv_add3>").append("<![CDATA[" + dlvAdd3 + "]]>").append("</dlv_add3>");
valueXmlString.append("<dlv_city>").append("<![CDATA[" + dlvCity + "]]>").append("</dlv_city>");
valueXmlString.append("<dlv_pin>").append("<![CDATA[" + dlvPin + "]]>").append("</dlv_pin>");
valueXmlString.append("<count_code__dlv>").append("<![CDATA[" + countCodeDlv + "]]>").append("</count_code__dlv>");
valueXmlString.append("<dlv_to>").append("<![CDATA[" + dlvTo + "]]>").append("</dlv_to>");
}
valueXmlString.append("<tran_code>").append("<![CDATA[" + tranCode + "]]>").append("</tran_code>");
tranName = getValue("tran_name", "transporter", "tran_code", tranCode, conn);
......@@ -3880,7 +3892,13 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
stationDescrDest = getValue("descr", "station", "stan_code", stanCodeDest, conn);
valueXmlString.append("<station_descr__dest>").append("<![CDATA[" + stationDescrDest + "]]>").append("</station_descr__dest>");
}
else if (currentColumn.trim().equalsIgnoreCase("gross_weight") || currentColumn.trim().equalsIgnoreCase("nett_weight"))
{
lc_gross_weight = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("gross_weight", dom)));
lc_nett_weight = Double.parseDouble(checkDoubleNull(genericUtility.getColumnValue("nett_weight", dom)));
lc_tare_weight = lc_gross_weight - lc_nett_weight;
valueXmlString.append("<tare_weight>").append("<![CDATA["+lc_tare_weight+"]]>").append("</tare_weight>");
}
// case 1 end
valueXmlString.append("</Detail1>");
......@@ -3949,7 +3967,8 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
setNodeValue(dom, "line_no__sord", getAbsString(lineNoSord));
sql = " select site_code,tax_class, tax_chap, tax_env, discount, rate__stduom," +
" rate__clg ,cust_item__ref,item_code "+
" rate__clg ,cust_item__ref,item_code " +
" ,pack_code"+
" from sorddet where sale_order = ? and line_no = ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, sordNo);
......@@ -3966,6 +3985,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
rateClg = rs.getDouble("rate__clg");
custItemRef = checkNull(rs.getString("cust_item__ref"));
itemCode = checkNull(rs.getString("item_code"));
packCode = checkNull(rs.getString("pack_code"));
}
rs.close();
rs = null;
......@@ -4049,7 +4069,7 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
pendingQty = orderQty - despatchedQty;
System.out.println("pendingQty["+pendingQty+"]orderQty["+orderQty+"]despatchedQty["+despatchedQty+"]");
despId = checkNull(genericUtility.getColumnValue("desp_id", dom1));
minusQty = 0;
......@@ -4072,10 +4092,13 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
pStmt.close();
pStmt = null;
valueXmlString.append("<tran_id__invpack>").append("<![CDATA["+packCode+"]]>").append("</tran_id__invpack>");
valueXmlString.append("<pending_qty>").append("<![CDATA["+(pendingQty - minusQty)+"]]>").append("</pending_qty>");
setNodeValue(dom, "pending_qty", (pendingQty - minusQty));
System.out.println("pendingQty["+pendingQty+"]minusQty["+minusQty+"]");
balQty = pendingQty - minusQty;
System.out.println("balQty["+balQty+"]");
if("Y".equalsIgnoreCase(SOalloc))
{
......@@ -4173,15 +4196,15 @@ public class DespatchManualIC extends ValidatorEJB implements DespatchManualICLo
isExistFlag = isExist("bom", "bom_code", itemCodeOrd, conn);
ordQty = quantity;
System.out.println("balQty["+balQty+"]quantity["+quantity+"]");
if( balQty != quantity )
{
quantity = balQty;
}
else
/*else
{
quantity = quantity;
}
}*/
if( isnull(lotNo) || lotNo.length() == 0 )
{
......
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