details: https://code.openbravo.com/erp/devel/pi/rev/cafefe0b3587 changeset: 16456:cafefe0b3587 user: David Miguelez <david.miguelez <at> openbravo.com> date: Fri May 04 12:40:39 2012 +0200 summary: Fixes issue 0010729: Now it displays only tables with information inside.
details: https://code.openbravo.com/erp/devel/pi/rev/1ac6a16a51d7 changeset: 16457:1ac6a16a51d7 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Wed May 09 09:57:57 2012 +0200 summary: Related to issue 10729: update license text year diffstat: src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java | 14 +++++++-- 1 files changed, 11 insertions(+), 3 deletions(-) diffs (50 lines): diff -r 14fa9e4fa73f -r 1ac6a16a51d7 src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java --- a/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java Wed Apr 25 16:40:40 2012 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports.java Wed May 09 09:57:57 2012 +0200 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2012 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.ArrayUtils; import org.openbravo.base.secureApp.HttpSecureAppServlet; import org.openbravo.base.secureApp.VariablesSecureApp; import org.openbravo.erpCommon.businessUtility.WindowTabs; @@ -171,11 +172,17 @@ private MInOutTraceReportsData[] processData(VariablesSecureApp vars, MInOutTraceReportsData[] data, String strIn, String strmProductIdGlobal, Hashtable<String, Integer> calculated, Vector<Integer> count) throws ServletException { - if (data == null || data.length == 0) + if (data == null || data.length == 0) { return data; + } for (int i = 0; i < data.length; i++) { data[i].html = processChilds(vars, data[i].mAttributesetinstanceId, data[i].mProductId, data[i].mLocatorId, strIn, true, strmProductIdGlobal, calculated, count); + if ("".equals(data[i].html)) { + // Delete data[i] from array + data = (MInOutTraceReportsData[]) ArrayUtils.removeElement(data, data[i]); + i--; + } } return data; } @@ -233,8 +240,9 @@ MInOutTraceReportsData[] dataChild = MInOutTraceReportsData.selectChilds(this, vars .getLanguage(), mAttributesetinstanceId, mProductId, mLocatorId, strIn.equals("Y") ? "plusQty" : "minusQty", strIn.equals("N") ? "minusQty" : "plusQty"); - if (dataChild == null || dataChild.length == 0) + if (dataChild == null || dataChild.length == 0) { return ""; + } boolean colorbg = true; strHtml.append(insertHeaderHtml(false, "0")); ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
