This commit is contained in:
armenrz 2009-09-22 05:21:36 +00:00
parent db1daa7922
commit 2589c481a2
2 changed files with 67 additions and 1 deletions

View File

@ -40,6 +40,9 @@ import org.compiere.util.TimeUtil;
* Financial Report Engine * Financial Report Engine
* *
* @author Jorg Janke * @author Jorg Janke
* @author Armen Rizal, Goodwill Consulting
* <li>FR [2857076] User Element 1 and 2 completion - https://sourceforge.net/tracker/?func=detail&aid=2857076&group_id=176962&atid=879335
*
* @version $Id: FinReport.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ * @version $Id: FinReport.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
*/ */
public class FinReport extends SvrProcess public class FinReport extends SvrProcess
@ -60,6 +63,14 @@ public class FinReport extends SvrProcess
private int p_C_SalesRegion_ID = 0; private int p_C_SalesRegion_ID = 0;
/** Campaign Parameter */ /** Campaign Parameter */
private int p_C_Campaign_ID = 0; private int p_C_Campaign_ID = 0;
/** User 1 Parameter */
private int p_User1_ID = 0;
/** User 2 Parameter */
private int p_User2_ID = 0;
/** User Element 1 Parameter */
private int p_UserElement1_ID = 0;
/** User Element 2 Parameter */
private int p_UserElement2_ID = 0;
/** Details before Lines */ /** Details before Lines */
private boolean p_DetailsSourceFirst = false; private boolean p_DetailsSourceFirst = false;
/** Hierarchy */ /** Hierarchy */
@ -116,6 +127,14 @@ public class FinReport extends SvrProcess
p_C_SalesRegion_ID = ((BigDecimal)para[i].getParameter()).intValue(); p_C_SalesRegion_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("C_Campaign_ID")) else if (name.equals("C_Campaign_ID"))
p_C_Campaign_ID = ((BigDecimal)para[i].getParameter()).intValue(); p_C_Campaign_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("User1_ID"))
p_User1_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("User2_ID"))
p_User2_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("UserElement1_ID"))
p_UserElement1_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("UserElement2_ID"))
p_UserElement2_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("DetailsSourceFirst")) else if (name.equals("DetailsSourceFirst"))
p_DetailsSourceFirst = "Y".equals(para[i].getParameter()); p_DetailsSourceFirst = "Y".equals(para[i].getParameter());
else if (name.equals("PA_ReportCube_ID")) else if (name.equals("PA_ReportCube_ID"))
@ -152,6 +171,20 @@ public class FinReport extends SvrProcess
if (p_C_SalesRegion_ID != 0) if (p_C_SalesRegion_ID != 0)
m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(), m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(),
p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_SalesRegion, p_C_SalesRegion_ID)); p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_SalesRegion, p_C_SalesRegion_ID));
// Optional User1_ID
if (p_User1_ID != 0)
m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(),
p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_UserList1, p_User1_ID));
// Optional User2_ID
if (p_User2_ID != 0)
m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(),
p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_UserList2, p_User2_ID));
// Optional UserElement1_ID
if (p_UserElement1_ID != 0)
m_parameterWhere.append(" AND UserElement1_ID=").append(p_UserElement1_ID);
// Optional UserElement2_ID
if (p_UserElement2_ID != 0)
m_parameterWhere.append(" AND UserElement2_ID=").append(p_UserElement2_ID);
// Load Report Definition // Load Report Definition
m_report = new MReport (getCtx(), getRecord_ID(), null); m_report = new MReport (getCtx(), getRecord_ID(), null);

View File

@ -48,6 +48,9 @@ import org.compiere.util.Msg;
* @author victor.perez@e-evolution.com, e-Evolution http://www.e-evolution.com * @author victor.perez@e-evolution.com, e-Evolution http://www.e-evolution.com
* <li> FR [ 2520591 ] Support multiples calendar for Org * <li> FR [ 2520591 ] Support multiples calendar for Org
* @see http://sourceforge.net/tracker2/?func=detail&atid=879335&aid=2520591&group_id=176962 * @see http://sourceforge.net/tracker2/?func=detail&atid=879335&aid=2520591&group_id=176962
* @author Armen Rizal, Goodwill Consulting
* <li>FR [2857076] User Element 1 and 2 completion - https://sourceforge.net/tracker/?func=detail&aid=2857076&group_id=176962&atid=879335
*
*/ */
public class FinStatement extends SvrProcess public class FinStatement extends SvrProcess
{ {
@ -75,6 +78,14 @@ public class FinStatement extends SvrProcess
private int p_C_SalesRegion_ID = 0; private int p_C_SalesRegion_ID = 0;
/** Campaign Parameter */ /** Campaign Parameter */
private int p_C_Campaign_ID = 0; private int p_C_Campaign_ID = 0;
/** User List 1 Parameter */
private int p_User1_ID = 0;
/** User List 2 Parameter */
private int p_User2_ID = 0;
/** User Element 1 Parameter */
private int p_UserElement1_ID = 0;
/** User Element 2 Parameter */
private int p_UserElement2_ID = 0;
/** Hierarchy */ /** Hierarchy */
private int p_PA_Hierarchy_ID = 0; private int p_PA_Hierarchy_ID = 0;
@ -129,6 +140,14 @@ public class FinStatement extends SvrProcess
p_C_SalesRegion_ID = ((BigDecimal)para[i].getParameter()).intValue(); p_C_SalesRegion_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("C_Campaign_ID")) else if (name.equals("C_Campaign_ID"))
p_C_Campaign_ID = ((BigDecimal)para[i].getParameter()).intValue(); p_C_Campaign_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("User1_ID"))
p_User1_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("User2_ID"))
p_User2_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("UserElement1_ID"))
p_UserElement1_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("UserElement2_ID"))
p_UserElement2_ID = ((BigDecimal)para[i].getParameter()).intValue();
else else
log.log(Level.SEVERE, "Unknown Parameter: " + name); log.log(Level.SEVERE, "Unknown Parameter: " + name);
} }
@ -168,6 +187,20 @@ public class FinStatement extends SvrProcess
if (p_C_SalesRegion_ID != 0) if (p_C_SalesRegion_ID != 0)
m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(), m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(),
p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_SalesRegion, p_C_SalesRegion_ID)); p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_SalesRegion, p_C_SalesRegion_ID));
// Optional User1_ID
if (p_User1_ID != 0)
m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(),
p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_UserList1, p_User1_ID));
// Optional User2_ID
if (p_User2_ID != 0)
m_parameterWhere.append(" AND ").append(MReportTree.getWhereClause(getCtx(),
p_PA_Hierarchy_ID, MAcctSchemaElement.ELEMENTTYPE_UserList2, p_User2_ID));
// Optional UserElement1_ID
if (p_UserElement1_ID != 0)
m_parameterWhere.append(" AND UserElement1_ID=").append(p_UserElement1_ID);
// Optional UserElement2_ID
if (p_UserElement2_ID != 0)
m_parameterWhere.append(" AND UserElement2_ID=").append(p_UserElement2_ID);
// //
setDateAcct(); setDateAcct();
sb.append(" - DateAcct ").append(p_DateAcct_From).append("-").append(p_DateAcct_To); sb.append(" - DateAcct ").append(p_DateAcct_From).append("-").append(p_DateAcct_To);