From 3f19ecb88b3989eec3849026b67a99933df71aa7 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 11 Oct 2007 22:57:31 +0000 Subject: [PATCH] Fix Bug [ 1811885 ] Financial Reports are not managing multi-budget --- base/src/org/compiere/report/FinReport.java | 18 ++++++++++++++++++ base/src/org/compiere/report/MReportLine.java | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/base/src/org/compiere/report/FinReport.java b/base/src/org/compiere/report/FinReport.java index 8f64504b55..66af035c95 100644 --- a/base/src/org/compiere/report/FinReport.java +++ b/base/src/org/compiere/report/FinReport.java @@ -398,6 +398,12 @@ public class FinReport extends SvrProcess String PostingType = m_columns[col].getPostingType(); if (PostingType != null && PostingType.length() > 0) select.append(" AND PostingType='").append(PostingType).append("'"); + // globalqss - CarlosRuiz + if (PostingType.equals(MReportColumn.POSTINGTYPE_Budget)) { + if (m_columns[col].getGL_Budget_ID() > 0) + select.append(" AND GL_Budget_ID=" + m_columns[col].getGL_Budget_ID()); + } + // end globalqss } if (m_columns[col].isColumnTypeSegmentValue()) @@ -908,6 +914,12 @@ public class FinReport extends SvrProcess String PostingType = m_columns[col].getPostingType(); if (PostingType != null && PostingType.length() > 0) select.append(" AND fb.PostingType='").append(PostingType).append("'"); + // globalqss - CarlosRuiz + if (PostingType.equals(MReportColumn.POSTINGTYPE_Budget)) { + if (m_columns[col].getGL_Budget_ID() > 0) + select.append(" AND GL_Budget_ID=" + m_columns[col].getGL_Budget_ID()); + } + // end globalqss } // Report Where String s = m_report.getWhereClause(); @@ -1049,6 +1061,12 @@ public class FinReport extends SvrProcess // String PostingType = m_columns[col].getPostingType(); // if (PostingType != null && PostingType.length() > 0) // insert.append(" AND PostingType='").append(PostingType).append("'"); +// // globalqss - CarlosRuiz +// if (PostingType.equals(MReportColumn.POSTINGTYPE_Budget)) { +// if (m_columns[col].getGL_Budget_ID() > 0) +// select.append(" AND GL_Budget_ID=" + m_columns[col].getGL_Budget_ID()); +// } +// // end globalqss // } int no = DB.executeUpdate(insert.toString(), get_TrxName()); diff --git a/base/src/org/compiere/report/MReportLine.java b/base/src/org/compiere/report/MReportLine.java index 9347d756fd..ac9e562991 100644 --- a/base/src/org/compiere/report/MReportLine.java +++ b/base/src/org/compiere/report/MReportLine.java @@ -274,6 +274,12 @@ public class MReportLine extends X_PA_ReportLine if (m_whereClause.length() > 0) m_whereClause += " AND "; m_whereClause += "PostingType='" + PostingType + "'"; + // globalqss - CarlosRuiz + if (PostingType.equals(MReportLine.POSTINGTYPE_Budget)) { + if (getGL_Budget_ID() > 0) + m_whereClause += " AND GL_Budget_ID=" + getGL_Budget_ID(); + } + // end globalqss } log.fine(m_whereClause); }