Commit b28168d4 authored by manohar's avatar manohar

While setting pending quantity In edit mode old quantity not considered


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97291 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 77b32dca
......@@ -27,6 +27,7 @@ import javax.ejb.Stateless;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Element;
@Stateless
public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLocal, ProofOfDeliveryRemote
......@@ -944,11 +945,12 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver();
int currentFormNo = 0;
String columnValue = null;
double reSaleQty = 0;
String columnValue = null,updateStatus = "", tranId = "",lineNo = "";
NodeList parentNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
Node childNode = null;
Node childNode = null,currDetail = null;
int ctr = 0;
try
{
......@@ -1207,6 +1209,43 @@ public class ProofOfDelivery extends ValidatorEJB implements ProofOfDeliveryLoca
domDetail.put("item_code", itemCode == null ? "" : itemCode.trim());
domDetail.put("loc_code", locCode);
pendQty = (ProofOfDeliveryDefault.getInstance()).getPendingQty(conn, domDetail);
// 16/02/15 manoharan in edit mode not to consider the old quantity
NodeList links = dom.getElementsByTagName( "attribute" );
for( int i = 0; i < links.getLength(); i++ )
{
Element link = (Element) links.item( i );
updateStatus = link.getAttribute( "updateFlag" );
System.out.println( "attribute value = " + updateStatus);
}
if("E".equalsIgnoreCase(editFlag) && "E".equalsIgnoreCase(updateStatus))
{
tranId = checkNull(genericUtility.getColumnValue("tran_id", dom));
if (tranId == null || "null".equals(tranId) || tranId.trim().length() == 0)
{
tranId = "@@@@@@@@@@";
}
lineNo = checkNull(genericUtility.getColumnValue("line_no", dom));
if (lineNo == null || "null".equals(lineNo) || lineNo.trim().length() == 0)
{
lineNo = "0";
}
sql1 = "select quantity__resale from spl_sales_por_det where tran_id = ? and line_no = ?";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, tranId);
pstmt1.setInt(2, Integer.parseInt(lineNo));
rs1 = pstmt1.executeQuery();
System.out.println("-----query executed12345-----");
if (rs1.next())
{
reSaleQty = rs1.getDouble(1);
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
pendQty = pendQty + reSaleQty;
}
System.out.println("Pending quantity----->>[" + pendQty + "]");
valueXmlString.append("<pend_qty>").append("<![CDATA[" + pendQty + "]]>").append("</pend_qty>");
valueXmlString.append("<pend_temp>").append("<![CDATA[" + pendQty + "]]>").append("</pend_temp>");
......
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