Commit 70a80604 authored by kmandhre's avatar kmandhre

bug fix for account code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92952 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 13f9d52c
......@@ -618,9 +618,9 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
rs = pstmt.executeQuery();
if (rs.next())
{
empFname = checkNull(rs.getString("emp_fname"));
empMname = checkNull(rs.getString("emp_mname"));
empLname = checkNull(rs.getString("emp_lname"));
empFname = rs.getString("emp_fname") == null ?" ":rs.getString("emp_fname");
empMname = rs.getString("emp_mname") == null ?" ":rs.getString("emp_mname");
empLname = rs.getString("emp_lname") == null ?" ":rs.getString("emp_lname");
}
rs.close();
rs = null;
......@@ -659,6 +659,11 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
}
XmlString.append("<std_rate>").append("<![CDATA[").append(stdrate).append("]]>").append("</std_rate>\r\n");
if(empCodeQcaprv == null || empCodeQcaprv.trim().length() == 0)
{
empCodeQcaprv = " ";
}
XmlString.append("<emp_code__qcaprv>").append("<![CDATA[").append(empCodeQcaprv).append("]]>").append("</emp_code__qcaprv>\r\n");
......@@ -712,9 +717,12 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
{
Dr = acctDet.split(",");
System.out.println(Dr.toString()+" "+Dr.length);
if(Dr.length > 1)
if(Dr.length > 0)
{
acctDr = Dr[0];
}
if(Dr.length > 1)//change done by kunal on 13/04/13 for set cctr code
{
cctrDr = Dr[1];
}
System.out.println("acctCode::"+acctDr);
......@@ -896,9 +904,12 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
System.out.println("acctDet=="+acctDet);
Dr = acctDet.split(",");
System.out.println(Dr.toString()+" "+Dr.length);
if(Dr.length > 1)
if(Dr.length > 0)
{
acctDr = Dr[0];
}
if(Dr.length > 1)
{
cctrDr = Dr[1];
}
}
......@@ -928,20 +939,27 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
acctDet = finCommon.getAcctDetrTtype(ditemCode, itemSer, "PORCP", pordType, conn);
System.out.println("cctrCr for PORCP="+acctDet);
Cr = acctDet.split(",");
if(Cr.length > 1)
if(Cr.length > 0)
{
acctCr = Cr[0];
}
if(Cr.length > 1)
{
cctrCr = Cr[1];
}
}
else
{
acctDet = finCommon.getAcctDetrTtype(ditemCode, itemSer, "PO", pordType, conn);
System.out.println("cctrCr FOR PO ="+acctDet);
Cr = acctDet.split(",");
if(Cr.length > 1)
if(Cr.length > 0)
{
acctCr = Cr[0];
}
if(Cr.length > 1)
{
cctrCr = Cr[1];
}
if(acctCr == null || acctCr.trim().length() == 0)
......@@ -959,6 +977,23 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
}
}
if (acctDr == null || acctDr.trim().length() == 0 )
{
acctDr = " ";
}
if (cctrDr == null || cctrDr.trim().length() == 0 )
{
cctrDr = " ";
}
if (acctCr == null || acctCr.trim().length() == 0 )
{
acctCr = " ";
}
if (cctrCr == null || cctrCr.trim().length() == 0 )
{
cctrCr = " ";
}
XmlString.append("<acct_code__dr>").append("<![CDATA[").append(acctDr).append("]]>").append("</acct_code__dr>\r\n");
XmlString.append("<cctr_code__dr>").append("<![CDATA[").append(cctrDr).append("]]>").append("</cctr_code__dr>\r\n");
XmlString.append("<acct_code__cr>").append("<![CDATA[").append(acctCr).append("]]>").append("</acct_code__cr>\r\n");
......@@ -1097,7 +1132,7 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
rs = pstmt.executeQuery();
if (rs.next())
{
itemCodeRef = checkNull(rs.getString(1));
itemCodeRef = rs.getString(1) == null ?" ":rs.getString(1) ;
}
rs.close();
rs = null;
......@@ -1265,10 +1300,10 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
valueXmlString.append("<discount>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("discount", currDetail1)).append("]]>").append("</discount>\r\n");
valueXmlString.append("<bom_code>").append("<![CDATA[").append(bomCode).append("]]>").append("</bom_code>\r\n");
valueXmlString.append("<contract_detail>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("contract_detail", currDetail1)).append("]]>").append("</contract_detail>\r\n");
valueXmlString.append("<cctr_code__cr>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("cctr_code__cr", currDetail1)).append("]]>").append("</cctr_code__cr>\r\n");
valueXmlString.append("<acct_code__cr>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("acct_code__cr", currDetail1)).append("]]>").append("</acct_code__cr>\r\n");
valueXmlString.append("<cctr_code__dr>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("cctr_code__dr", currDetail1)).append("]]>").append("</cctr_code__dr>\r\n");
valueXmlString.append("<acct_code__dr>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("acct_code__dr", currDetail1)).append("]]>").append("</acct_code__dr>\r\n");
valueXmlString.append("<cctr_code__cr>").append("<![CDATA[").append( checkNull( genericUtility.getColumnValueFromNode("cctr_code__cr", currDetail1)).trim()).append("]]>").append("</cctr_code__cr>\r\n");
valueXmlString.append("<acct_code__cr>").append("<![CDATA[").append(checkNull( genericUtility.getColumnValueFromNode("acct_code__cr", currDetail1)).trim()).append("]]>").append("</acct_code__cr>\r\n");
valueXmlString.append("<cctr_code__dr>").append("<![CDATA[").append(checkNull( genericUtility.getColumnValueFromNode("cctr_code__dr", currDetail1)).trim()).append("]]>").append("</cctr_code__dr>\r\n");
valueXmlString.append("<acct_code__dr>").append("<![CDATA[").append(checkNull( genericUtility.getColumnValueFromNode("acct_code__dr", currDetail1)).trim()).append("]]>").append("</acct_code__dr>\r\n");
valueXmlString.append("<loc_code>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("loc_code", currDetail1)).append("]]>").append("</loc_code>\r\n");
valueXmlString.append("<rate__clg>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("rate__clg", currDetail1)).append("]]>").append("</rate__clg>\r\n");
valueXmlString.append("<supp_item__ref>").append("<![CDATA[").append( checkNull(genericUtility.getColumnValueFromNode("supp_item__ref", currDetail1)).trim() ).append("]]>").append("</supp_item__ref>\r\n");
......@@ -1276,6 +1311,12 @@ implements BillofQuantityActLocal, BillofQuantityActRemote
valueXmlString.append("<std_cost>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("std_cost", currDetail1)).append("]]>").append("</std_cost>\r\n");
valueXmlString.append("<varience>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("varience", currDetail1)).append("]]>").append("</varience>\r\n");
valueXmlString.append("<emp_code__qcaprv>").append("<![CDATA[").append( checkNull(genericUtility.getColumnValueFromNode("emp_code__qcaprv", currDetail1)).trim()).append("]]>").append("</emp_code__qcaprv>\r\n");
valueXmlString.append("<emp_fname>").append("<![CDATA[").append( checkNull(genericUtility.getColumnValueFromNode("emp_fname", currDetail1)).trim()).append("]]>").append("</emp_fname>\r\n");
valueXmlString.append("<emp_mname>").append("<![CDATA[").append( checkNull(genericUtility.getColumnValueFromNode("emp_mname", currDetail1)).trim()).append("]]>").append("</emp_mname>\r\n");
valueXmlString.append("<emp_lname>").append("<![CDATA[").append( checkNull(genericUtility.getColumnValueFromNode("emp_lname", currDetail1)).trim()).append("]]>").append("</emp_lname>\r\n");
//added by kunal on 05/04/13 set request date and dlv date
valueXmlString.append("<req_date>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("req_date", currDetail1)).append("]]>").append("</req_date>\r\n");
valueXmlString.append("<dlv_date>").append("<![CDATA[").append(genericUtility.getColumnValueFromNode("dlv_date", currDetail1)).append("]]>").append("</dlv_date>\r\n");
......
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