Implement [ 2015331 ] Financial Report Source with Type Combination

Organize imports in other report class sources
This commit is contained in:
Carlos Ruiz 2008-07-11 02:43:34 +00:00
parent d635e2b0c3
commit 1afbdc34d4
17 changed files with 4920 additions and 119 deletions

View File

@ -268,6 +268,149 @@ public interface I_PA_ReportColumn
*/
public boolean isAdhocConversion();
/** Column name IsIncludeNullsActivity */
public static final String COLUMNNAME_IsIncludeNullsActivity = "IsIncludeNullsActivity";
/** Set Include Nulls in Activity.
* Include nulls in the selection of the activity
*/
public void setIsIncludeNullsActivity (boolean IsIncludeNullsActivity);
/** Get Include Nulls in Activity.
* Include nulls in the selection of the activity
*/
public boolean isIncludeNullsActivity();
/** Column name IsIncludeNullsBPartner */
public static final String COLUMNNAME_IsIncludeNullsBPartner = "IsIncludeNullsBPartner";
/** Set Include Nulls in BPartner.
* Include nulls in the selection of the business partner
*/
public void setIsIncludeNullsBPartner (boolean IsIncludeNullsBPartner);
/** Get Include Nulls in BPartner.
* Include nulls in the selection of the business partner
*/
public boolean isIncludeNullsBPartner();
/** Column name IsIncludeNullsCampaign */
public static final String COLUMNNAME_IsIncludeNullsCampaign = "IsIncludeNullsCampaign";
/** Set Include Nulls in Campaign.
* Include nulls in the selection of the campaign
*/
public void setIsIncludeNullsCampaign (boolean IsIncludeNullsCampaign);
/** Get Include Nulls in Campaign.
* Include nulls in the selection of the campaign
*/
public boolean isIncludeNullsCampaign();
/** Column name IsIncludeNullsElementValue */
public static final String COLUMNNAME_IsIncludeNullsElementValue = "IsIncludeNullsElementValue";
/** Set Include Nulls in Account.
* Include nulls in the selection of the account
*/
public void setIsIncludeNullsElementValue (boolean IsIncludeNullsElementValue);
/** Get Include Nulls in Account.
* Include nulls in the selection of the account
*/
public boolean isIncludeNullsElementValue();
/** Column name IsIncludeNullsLocation */
public static final String COLUMNNAME_IsIncludeNullsLocation = "IsIncludeNullsLocation";
/** Set Include Nulls in Location.
* Include nulls in the selection of the location
*/
public void setIsIncludeNullsLocation (boolean IsIncludeNullsLocation);
/** Get Include Nulls in Location.
* Include nulls in the selection of the location
*/
public boolean isIncludeNullsLocation();
/** Column name IsIncludeNullsOrg */
public static final String COLUMNNAME_IsIncludeNullsOrg = "IsIncludeNullsOrg";
/** Set Include Nulls in Org.
* Include nulls in the selection of the organization
*/
public void setIsIncludeNullsOrg (boolean IsIncludeNullsOrg);
/** Get Include Nulls in Org.
* Include nulls in the selection of the organization
*/
public boolean isIncludeNullsOrg();
/** Column name IsIncludeNullsProduct */
public static final String COLUMNNAME_IsIncludeNullsProduct = "IsIncludeNullsProduct";
/** Set Include Nulls in Product.
* Include nulls in the selection of the product
*/
public void setIsIncludeNullsProduct (boolean IsIncludeNullsProduct);
/** Get Include Nulls in Product.
* Include nulls in the selection of the product
*/
public boolean isIncludeNullsProduct();
/** Column name IsIncludeNullsProject */
public static final String COLUMNNAME_IsIncludeNullsProject = "IsIncludeNullsProject";
/** Set Include Nulls in Project.
* Include nulls in the selection of the project
*/
public void setIsIncludeNullsProject (boolean IsIncludeNullsProject);
/** Get Include Nulls in Project.
* Include nulls in the selection of the project
*/
public boolean isIncludeNullsProject();
/** Column name IsIncludeNullsSalesRegion */
public static final String COLUMNNAME_IsIncludeNullsSalesRegion = "IsIncludeNullsSalesRegion";
/** Set Include Nulls in Sales Region.
* Include nulls in the selection of the sales region
*/
public void setIsIncludeNullsSalesRegion (boolean IsIncludeNullsSalesRegion);
/** Get Include Nulls in Sales Region.
* Include nulls in the selection of the sales region
*/
public boolean isIncludeNullsSalesRegion();
/** Column name IsIncludeNullsUserElement1 */
public static final String COLUMNNAME_IsIncludeNullsUserElement1 = "IsIncludeNullsUserElement1";
/** Set Include Nulls in User Element 1.
* Include nulls in the selection of the user element 1
*/
public void setIsIncludeNullsUserElement1 (boolean IsIncludeNullsUserElement1);
/** Get Include Nulls in User Element 1.
* Include nulls in the selection of the user element 1
*/
public boolean isIncludeNullsUserElement1();
/** Column name IsIncludeNullsUserElement2 */
public static final String COLUMNNAME_IsIncludeNullsUserElement2 = "IsIncludeNullsUserElement2";
/** Set Include Nulls in User Element 2.
* Include nulls in the selection of the user element 2
*/
public void setIsIncludeNullsUserElement2 (boolean IsIncludeNullsUserElement2);
/** Get Include Nulls in User Element 2.
* Include nulls in the selection of the user element 2
*/
public boolean isIncludeNullsUserElement2();
/** Column name IsPrinted */
public static final String COLUMNNAME_IsPrinted = "IsPrinted";
@ -416,4 +559,30 @@ public interface I_PA_ReportColumn
lowest number comes first
*/
public int getSeqNo();
/** Column name UserElement1_ID */
public static final String COLUMNNAME_UserElement1_ID = "UserElement1_ID";
/** Set User Element 1.
* User defined accounting Element
*/
public void setUserElement1_ID (int UserElement1_ID);
/** Get User Element 1.
* User defined accounting Element
*/
public int getUserElement1_ID();
/** Column name UserElement2_ID */
public static final String COLUMNNAME_UserElement2_ID = "UserElement2_ID";
/** Set User Element 2.
* User defined accounting Element
*/
public void setUserElement2_ID (int UserElement2_ID);
/** Get User Element 2.
* User defined accounting Element
*/
public int getUserElement2_ID();
}

View File

@ -183,6 +183,149 @@ public interface I_PA_ReportSource
*/
public String getElementType();
/** Column name IsIncludeNullsActivity */
public static final String COLUMNNAME_IsIncludeNullsActivity = "IsIncludeNullsActivity";
/** Set Include Nulls in Activity.
* Include nulls in the selection of the activity
*/
public void setIsIncludeNullsActivity (boolean IsIncludeNullsActivity);
/** Get Include Nulls in Activity.
* Include nulls in the selection of the activity
*/
public boolean isIncludeNullsActivity();
/** Column name IsIncludeNullsBPartner */
public static final String COLUMNNAME_IsIncludeNullsBPartner = "IsIncludeNullsBPartner";
/** Set Include Nulls in BPartner.
* Include nulls in the selection of the business partner
*/
public void setIsIncludeNullsBPartner (boolean IsIncludeNullsBPartner);
/** Get Include Nulls in BPartner.
* Include nulls in the selection of the business partner
*/
public boolean isIncludeNullsBPartner();
/** Column name IsIncludeNullsCampaign */
public static final String COLUMNNAME_IsIncludeNullsCampaign = "IsIncludeNullsCampaign";
/** Set Include Nulls in Campaign.
* Include nulls in the selection of the campaign
*/
public void setIsIncludeNullsCampaign (boolean IsIncludeNullsCampaign);
/** Get Include Nulls in Campaign.
* Include nulls in the selection of the campaign
*/
public boolean isIncludeNullsCampaign();
/** Column name IsIncludeNullsElementValue */
public static final String COLUMNNAME_IsIncludeNullsElementValue = "IsIncludeNullsElementValue";
/** Set Include Nulls in Account.
* Include nulls in the selection of the account
*/
public void setIsIncludeNullsElementValue (boolean IsIncludeNullsElementValue);
/** Get Include Nulls in Account.
* Include nulls in the selection of the account
*/
public boolean isIncludeNullsElementValue();
/** Column name IsIncludeNullsLocation */
public static final String COLUMNNAME_IsIncludeNullsLocation = "IsIncludeNullsLocation";
/** Set Include Nulls in Location.
* Include nulls in the selection of the location
*/
public void setIsIncludeNullsLocation (boolean IsIncludeNullsLocation);
/** Get Include Nulls in Location.
* Include nulls in the selection of the location
*/
public boolean isIncludeNullsLocation();
/** Column name IsIncludeNullsOrg */
public static final String COLUMNNAME_IsIncludeNullsOrg = "IsIncludeNullsOrg";
/** Set Include Nulls in Org.
* Include nulls in the selection of the organization
*/
public void setIsIncludeNullsOrg (boolean IsIncludeNullsOrg);
/** Get Include Nulls in Org.
* Include nulls in the selection of the organization
*/
public boolean isIncludeNullsOrg();
/** Column name IsIncludeNullsProduct */
public static final String COLUMNNAME_IsIncludeNullsProduct = "IsIncludeNullsProduct";
/** Set Include Nulls in Product.
* Include nulls in the selection of the product
*/
public void setIsIncludeNullsProduct (boolean IsIncludeNullsProduct);
/** Get Include Nulls in Product.
* Include nulls in the selection of the product
*/
public boolean isIncludeNullsProduct();
/** Column name IsIncludeNullsProject */
public static final String COLUMNNAME_IsIncludeNullsProject = "IsIncludeNullsProject";
/** Set Include Nulls in Project.
* Include nulls in the selection of the project
*/
public void setIsIncludeNullsProject (boolean IsIncludeNullsProject);
/** Get Include Nulls in Project.
* Include nulls in the selection of the project
*/
public boolean isIncludeNullsProject();
/** Column name IsIncludeNullsSalesRegion */
public static final String COLUMNNAME_IsIncludeNullsSalesRegion = "IsIncludeNullsSalesRegion";
/** Set Include Nulls in Sales Region.
* Include nulls in the selection of the sales region
*/
public void setIsIncludeNullsSalesRegion (boolean IsIncludeNullsSalesRegion);
/** Get Include Nulls in Sales Region.
* Include nulls in the selection of the sales region
*/
public boolean isIncludeNullsSalesRegion();
/** Column name IsIncludeNullsUserElement1 */
public static final String COLUMNNAME_IsIncludeNullsUserElement1 = "IsIncludeNullsUserElement1";
/** Set Include Nulls in User Element 1.
* Include nulls in the selection of the user element 1
*/
public void setIsIncludeNullsUserElement1 (boolean IsIncludeNullsUserElement1);
/** Get Include Nulls in User Element 1.
* Include nulls in the selection of the user element 1
*/
public boolean isIncludeNullsUserElement1();
/** Column name IsIncludeNullsUserElement2 */
public static final String COLUMNNAME_IsIncludeNullsUserElement2 = "IsIncludeNullsUserElement2";
/** Set Include Nulls in User Element 2.
* Include nulls in the selection of the user element 2
*/
public void setIsIncludeNullsUserElement2 (boolean IsIncludeNullsUserElement2);
/** Get Include Nulls in User Element 2.
* Include nulls in the selection of the user element 2
*/
public boolean isIncludeNullsUserElement2();
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
@ -234,4 +377,30 @@ public interface I_PA_ReportSource
* Restriction of what will be shown in Report Line
*/
public int getPA_ReportSource_ID();
/** Column name UserElement1_ID */
public static final String COLUMNNAME_UserElement1_ID = "UserElement1_ID";
/** Set User Element 1.
* User defined accounting Element
*/
public void setUserElement1_ID (int UserElement1_ID);
/** Get User Element 1.
* User defined accounting Element
*/
public int getUserElement1_ID();
/** Column name UserElement2_ID */
public static final String COLUMNNAME_UserElement2_ID = "UserElement2_ID";
/** Set User Element 2.
* User defined accounting Element
*/
public void setUserElement2_ID (int UserElement2_ID);
/** Get User Element 2.
* User defined accounting Element
*/
public int getUserElement2_ID();
}

View File

@ -44,6 +44,28 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
{
setColumnType (null);
// R
setIsIncludeNullsActivity (false);
// N
setIsIncludeNullsBPartner (false);
// N
setIsIncludeNullsCampaign (false);
// N
setIsIncludeNullsElementValue (false);
// N
setIsIncludeNullsLocation (false);
// N
setIsIncludeNullsOrg (false);
// N
setIsIncludeNullsProduct (false);
// N
setIsIncludeNullsProject (false);
// N
setIsIncludeNullsSalesRegion (false);
// N
setIsIncludeNullsUserElement1 (false);
// N
setIsIncludeNullsUserElement2 (false);
// N
setIsPrinted (true);
// Y
setName (null);
@ -540,40 +562,42 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
return (String)get_Value(COLUMNNAME_Description);
}
/** ElementType AD_Reference_ID=181 */
public static final int ELEMENTTYPE_AD_Reference_ID=181;
/** Organization = OO */
public static final String ELEMENTTYPE_Organization = "OO";
/** ElementType AD_Reference_ID=53280 */
public static final int ELEMENTTYPE_AD_Reference_ID=53280;
/** Account = AC */
public static final String ELEMENTTYPE_Account = "AC";
/** Product = PR */
public static final String ELEMENTTYPE_Product = "PR";
/** Activity = AY */
public static final String ELEMENTTYPE_Activity = "AY";
/** BPartner = BP */
public static final String ELEMENTTYPE_BPartner = "BP";
/** Org Trx = OT */
public static final String ELEMENTTYPE_OrgTrx = "OT";
/** Location From = LF */
public static final String ELEMENTTYPE_LocationFrom = "LF";
/** Location To = LT */
public static final String ELEMENTTYPE_LocationTo = "LT";
/** Sales Region = SR */
public static final String ELEMENTTYPE_SalesRegion = "SR";
/** Project = PJ */
public static final String ELEMENTTYPE_Project = "PJ";
/** Campaign = MC */
public static final String ELEMENTTYPE_Campaign = "MC";
/** Organization = OO */
public static final String ELEMENTTYPE_Organization = "OO";
/** Org Trx = OT */
public static final String ELEMENTTYPE_OrgTrx = "OT";
/** Project = PJ */
public static final String ELEMENTTYPE_Project = "PJ";
/** Product = PR */
public static final String ELEMENTTYPE_Product = "PR";
/** Sub Account = SA */
public static final String ELEMENTTYPE_SubAccount = "SA";
/** Sales Region = SR */
public static final String ELEMENTTYPE_SalesRegion = "SR";
/** User List 1 = U1 */
public static final String ELEMENTTYPE_UserList1 = "U1";
/** User List 2 = U2 */
public static final String ELEMENTTYPE_UserList2 = "U2";
/** Activity = AY */
public static final String ELEMENTTYPE_Activity = "AY";
/** Sub Account = SA */
public static final String ELEMENTTYPE_SubAccount = "SA";
/** User Element 1 = X1 */
public static final String ELEMENTTYPE_UserElement1 = "X1";
/** User Element 2 = X2 */
public static final String ELEMENTTYPE_UserElement2 = "X2";
/** Combination = CO */
public static final String ELEMENTTYPE_Combination = "CO";
/** Set Type.
@param ElementType
Element Type (account or user defined)
@ -581,7 +605,7 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
public void setElementType (String ElementType)
{
if (ElementType == null || ElementType.equals("OO") || ElementType.equals("AC") || ElementType.equals("PR") || ElementType.equals("BP") || ElementType.equals("OT") || ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("SR") || ElementType.equals("PJ") || ElementType.equals("MC") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("AY") || ElementType.equals("SA") || ElementType.equals("X1") || ElementType.equals("X2")); else throw new IllegalArgumentException ("ElementType Invalid value - " + ElementType + " - Reference_ID=181 - OO - AC - PR - BP - OT - LF - LT - SR - PJ - MC - U1 - U2 - AY - SA - X1 - X2");
if (ElementType == null || ElementType.equals("AC") || ElementType.equals("AY") || ElementType.equals("BP") || ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("MC") || ElementType.equals("OO") || ElementType.equals("OT") || ElementType.equals("PJ") || ElementType.equals("PR") || ElementType.equals("SA") || ElementType.equals("SR") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("X1") || ElementType.equals("X2") || ElementType.equals("CO")); else throw new IllegalArgumentException ("ElementType Invalid value - " + ElementType + " - Reference_ID=53280 - AC - AY - BP - LF - LT - MC - OO - OT - PJ - PR - SA - SR - U1 - U2 - X1 - X2 - CO");
if (ElementType != null && ElementType.length() > 2)
{
log.warning("Length > 2 - truncated");
@ -661,6 +685,270 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
return false;
}
/** Set Include Nulls in Activity.
@param IsIncludeNullsActivity
Include nulls in the selection of the activity
*/
public void setIsIncludeNullsActivity (boolean IsIncludeNullsActivity)
{
set_Value (COLUMNNAME_IsIncludeNullsActivity, Boolean.valueOf(IsIncludeNullsActivity));
}
/** Get Include Nulls in Activity.
@return Include nulls in the selection of the activity
*/
public boolean isIncludeNullsActivity ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsActivity);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in BPartner.
@param IsIncludeNullsBPartner
Include nulls in the selection of the business partner
*/
public void setIsIncludeNullsBPartner (boolean IsIncludeNullsBPartner)
{
set_Value (COLUMNNAME_IsIncludeNullsBPartner, Boolean.valueOf(IsIncludeNullsBPartner));
}
/** Get Include Nulls in BPartner.
@return Include nulls in the selection of the business partner
*/
public boolean isIncludeNullsBPartner ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsBPartner);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Campaign.
@param IsIncludeNullsCampaign
Include nulls in the selection of the campaign
*/
public void setIsIncludeNullsCampaign (boolean IsIncludeNullsCampaign)
{
set_Value (COLUMNNAME_IsIncludeNullsCampaign, Boolean.valueOf(IsIncludeNullsCampaign));
}
/** Get Include Nulls in Campaign.
@return Include nulls in the selection of the campaign
*/
public boolean isIncludeNullsCampaign ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsCampaign);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Account.
@param IsIncludeNullsElementValue
Include nulls in the selection of the account
*/
public void setIsIncludeNullsElementValue (boolean IsIncludeNullsElementValue)
{
set_Value (COLUMNNAME_IsIncludeNullsElementValue, Boolean.valueOf(IsIncludeNullsElementValue));
}
/** Get Include Nulls in Account.
@return Include nulls in the selection of the account
*/
public boolean isIncludeNullsElementValue ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsElementValue);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Location.
@param IsIncludeNullsLocation
Include nulls in the selection of the location
*/
public void setIsIncludeNullsLocation (boolean IsIncludeNullsLocation)
{
set_Value (COLUMNNAME_IsIncludeNullsLocation, Boolean.valueOf(IsIncludeNullsLocation));
}
/** Get Include Nulls in Location.
@return Include nulls in the selection of the location
*/
public boolean isIncludeNullsLocation ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsLocation);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Org.
@param IsIncludeNullsOrg
Include nulls in the selection of the organization
*/
public void setIsIncludeNullsOrg (boolean IsIncludeNullsOrg)
{
set_Value (COLUMNNAME_IsIncludeNullsOrg, Boolean.valueOf(IsIncludeNullsOrg));
}
/** Get Include Nulls in Org.
@return Include nulls in the selection of the organization
*/
public boolean isIncludeNullsOrg ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsOrg);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Product.
@param IsIncludeNullsProduct
Include nulls in the selection of the product
*/
public void setIsIncludeNullsProduct (boolean IsIncludeNullsProduct)
{
set_Value (COLUMNNAME_IsIncludeNullsProduct, Boolean.valueOf(IsIncludeNullsProduct));
}
/** Get Include Nulls in Product.
@return Include nulls in the selection of the product
*/
public boolean isIncludeNullsProduct ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsProduct);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Project.
@param IsIncludeNullsProject
Include nulls in the selection of the project
*/
public void setIsIncludeNullsProject (boolean IsIncludeNullsProject)
{
set_Value (COLUMNNAME_IsIncludeNullsProject, Boolean.valueOf(IsIncludeNullsProject));
}
/** Get Include Nulls in Project.
@return Include nulls in the selection of the project
*/
public boolean isIncludeNullsProject ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsProject);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Sales Region.
@param IsIncludeNullsSalesRegion
Include nulls in the selection of the sales region
*/
public void setIsIncludeNullsSalesRegion (boolean IsIncludeNullsSalesRegion)
{
set_Value (COLUMNNAME_IsIncludeNullsSalesRegion, Boolean.valueOf(IsIncludeNullsSalesRegion));
}
/** Get Include Nulls in Sales Region.
@return Include nulls in the selection of the sales region
*/
public boolean isIncludeNullsSalesRegion ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsSalesRegion);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in User Element 1.
@param IsIncludeNullsUserElement1
Include nulls in the selection of the user element 1
*/
public void setIsIncludeNullsUserElement1 (boolean IsIncludeNullsUserElement1)
{
set_Value (COLUMNNAME_IsIncludeNullsUserElement1, Boolean.valueOf(IsIncludeNullsUserElement1));
}
/** Get Include Nulls in User Element 1.
@return Include nulls in the selection of the user element 1
*/
public boolean isIncludeNullsUserElement1 ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsUserElement1);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in User Element 2.
@param IsIncludeNullsUserElement2
Include nulls in the selection of the user element 2
*/
public void setIsIncludeNullsUserElement2 (boolean IsIncludeNullsUserElement2)
{
set_Value (COLUMNNAME_IsIncludeNullsUserElement2, Boolean.valueOf(IsIncludeNullsUserElement2));
}
/** Get Include Nulls in User Element 2.
@return Include nulls in the selection of the user element 2
*/
public boolean isIncludeNullsUserElement2 ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsUserElement2);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Printed.
@param IsPrinted
Indicates if this document / line is printed
@ -967,4 +1255,50 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis
return 0;
return ii.intValue();
}
/** Set User Element 1.
@param UserElement1_ID
User defined accounting Element
*/
public void setUserElement1_ID (int UserElement1_ID)
{
if (UserElement1_ID < 1)
set_Value (COLUMNNAME_UserElement1_ID, null);
else
set_Value (COLUMNNAME_UserElement1_ID, Integer.valueOf(UserElement1_ID));
}
/** Get User Element 1.
@return User defined accounting Element
*/
public int getUserElement1_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UserElement1_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set User Element 2.
@param UserElement2_ID
User defined accounting Element
*/
public void setUserElement2_ID (int UserElement2_ID)
{
if (UserElement2_ID < 1)
set_Value (COLUMNNAME_UserElement2_ID, null);
else
set_Value (COLUMNNAME_UserElement2_ID, Integer.valueOf(UserElement2_ID));
}
/** Get User Element 2.
@return User defined accounting Element
*/
public int getUserElement2_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UserElement2_ID);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -41,6 +41,28 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis
/** if (PA_ReportSource_ID == 0)
{
setElementType (null);
setIsIncludeNullsActivity (false);
// N
setIsIncludeNullsBPartner (false);
// N
setIsIncludeNullsCampaign (false);
// N
setIsIncludeNullsElementValue (false);
// N
setIsIncludeNullsLocation (false);
// N
setIsIncludeNullsOrg (false);
// N
setIsIncludeNullsProduct (false);
// N
setIsIncludeNullsProject (false);
// N
setIsIncludeNullsSalesRegion (false);
// N
setIsIncludeNullsUserElement1 (false);
// N
setIsIncludeNullsUserElement2 (false);
// N
setPA_ReportLine_ID (0);
setPA_ReportSource_ID (0);
} */
@ -340,40 +362,42 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis
return (String)get_Value(COLUMNNAME_Description);
}
/** ElementType AD_Reference_ID=181 */
public static final int ELEMENTTYPE_AD_Reference_ID=181;
/** Organization = OO */
public static final String ELEMENTTYPE_Organization = "OO";
/** ElementType AD_Reference_ID=53280 */
public static final int ELEMENTTYPE_AD_Reference_ID=53280;
/** Account = AC */
public static final String ELEMENTTYPE_Account = "AC";
/** Product = PR */
public static final String ELEMENTTYPE_Product = "PR";
/** Activity = AY */
public static final String ELEMENTTYPE_Activity = "AY";
/** BPartner = BP */
public static final String ELEMENTTYPE_BPartner = "BP";
/** Org Trx = OT */
public static final String ELEMENTTYPE_OrgTrx = "OT";
/** Location From = LF */
public static final String ELEMENTTYPE_LocationFrom = "LF";
/** Location To = LT */
public static final String ELEMENTTYPE_LocationTo = "LT";
/** Sales Region = SR */
public static final String ELEMENTTYPE_SalesRegion = "SR";
/** Project = PJ */
public static final String ELEMENTTYPE_Project = "PJ";
/** Campaign = MC */
public static final String ELEMENTTYPE_Campaign = "MC";
/** Organization = OO */
public static final String ELEMENTTYPE_Organization = "OO";
/** Org Trx = OT */
public static final String ELEMENTTYPE_OrgTrx = "OT";
/** Project = PJ */
public static final String ELEMENTTYPE_Project = "PJ";
/** Product = PR */
public static final String ELEMENTTYPE_Product = "PR";
/** Sub Account = SA */
public static final String ELEMENTTYPE_SubAccount = "SA";
/** Sales Region = SR */
public static final String ELEMENTTYPE_SalesRegion = "SR";
/** User List 1 = U1 */
public static final String ELEMENTTYPE_UserList1 = "U1";
/** User List 2 = U2 */
public static final String ELEMENTTYPE_UserList2 = "U2";
/** Activity = AY */
public static final String ELEMENTTYPE_Activity = "AY";
/** Sub Account = SA */
public static final String ELEMENTTYPE_SubAccount = "SA";
/** User Element 1 = X1 */
public static final String ELEMENTTYPE_UserElement1 = "X1";
/** User Element 2 = X2 */
public static final String ELEMENTTYPE_UserElement2 = "X2";
/** Combination = CO */
public static final String ELEMENTTYPE_Combination = "CO";
/** Set Type.
@param ElementType
Element Type (account or user defined)
@ -381,7 +405,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis
public void setElementType (String ElementType)
{
if (ElementType == null) throw new IllegalArgumentException ("ElementType is mandatory");
if (ElementType.equals("OO") || ElementType.equals("AC") || ElementType.equals("PR") || ElementType.equals("BP") || ElementType.equals("OT") || ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("SR") || ElementType.equals("PJ") || ElementType.equals("MC") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("AY") || ElementType.equals("SA") || ElementType.equals("X1") || ElementType.equals("X2")); else throw new IllegalArgumentException ("ElementType Invalid value - " + ElementType + " - Reference_ID=181 - OO - AC - PR - BP - OT - LF - LT - SR - PJ - MC - U1 - U2 - AY - SA - X1 - X2");
if (ElementType.equals("AC") || ElementType.equals("AY") || ElementType.equals("BP") || ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("MC") || ElementType.equals("OO") || ElementType.equals("OT") || ElementType.equals("PJ") || ElementType.equals("PR") || ElementType.equals("SA") || ElementType.equals("SR") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("X1") || ElementType.equals("X2") || ElementType.equals("CO")); else throw new IllegalArgumentException ("ElementType Invalid value - " + ElementType + " - Reference_ID=53280 - AC - AY - BP - LF - LT - MC - OO - OT - PJ - PR - SA - SR - U1 - U2 - X1 - X2 - CO");
if (ElementType.length() > 2)
{
log.warning("Length > 2 - truncated");
@ -406,6 +430,270 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis
return new KeyNamePair(get_ID(), String.valueOf(getElementType()));
}
/** Set Include Nulls in Activity.
@param IsIncludeNullsActivity
Include nulls in the selection of the activity
*/
public void setIsIncludeNullsActivity (boolean IsIncludeNullsActivity)
{
set_Value (COLUMNNAME_IsIncludeNullsActivity, Boolean.valueOf(IsIncludeNullsActivity));
}
/** Get Include Nulls in Activity.
@return Include nulls in the selection of the activity
*/
public boolean isIncludeNullsActivity ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsActivity);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in BPartner.
@param IsIncludeNullsBPartner
Include nulls in the selection of the business partner
*/
public void setIsIncludeNullsBPartner (boolean IsIncludeNullsBPartner)
{
set_Value (COLUMNNAME_IsIncludeNullsBPartner, Boolean.valueOf(IsIncludeNullsBPartner));
}
/** Get Include Nulls in BPartner.
@return Include nulls in the selection of the business partner
*/
public boolean isIncludeNullsBPartner ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsBPartner);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Campaign.
@param IsIncludeNullsCampaign
Include nulls in the selection of the campaign
*/
public void setIsIncludeNullsCampaign (boolean IsIncludeNullsCampaign)
{
set_Value (COLUMNNAME_IsIncludeNullsCampaign, Boolean.valueOf(IsIncludeNullsCampaign));
}
/** Get Include Nulls in Campaign.
@return Include nulls in the selection of the campaign
*/
public boolean isIncludeNullsCampaign ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsCampaign);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Account.
@param IsIncludeNullsElementValue
Include nulls in the selection of the account
*/
public void setIsIncludeNullsElementValue (boolean IsIncludeNullsElementValue)
{
set_Value (COLUMNNAME_IsIncludeNullsElementValue, Boolean.valueOf(IsIncludeNullsElementValue));
}
/** Get Include Nulls in Account.
@return Include nulls in the selection of the account
*/
public boolean isIncludeNullsElementValue ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsElementValue);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Location.
@param IsIncludeNullsLocation
Include nulls in the selection of the location
*/
public void setIsIncludeNullsLocation (boolean IsIncludeNullsLocation)
{
set_Value (COLUMNNAME_IsIncludeNullsLocation, Boolean.valueOf(IsIncludeNullsLocation));
}
/** Get Include Nulls in Location.
@return Include nulls in the selection of the location
*/
public boolean isIncludeNullsLocation ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsLocation);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Org.
@param IsIncludeNullsOrg
Include nulls in the selection of the organization
*/
public void setIsIncludeNullsOrg (boolean IsIncludeNullsOrg)
{
set_Value (COLUMNNAME_IsIncludeNullsOrg, Boolean.valueOf(IsIncludeNullsOrg));
}
/** Get Include Nulls in Org.
@return Include nulls in the selection of the organization
*/
public boolean isIncludeNullsOrg ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsOrg);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Product.
@param IsIncludeNullsProduct
Include nulls in the selection of the product
*/
public void setIsIncludeNullsProduct (boolean IsIncludeNullsProduct)
{
set_Value (COLUMNNAME_IsIncludeNullsProduct, Boolean.valueOf(IsIncludeNullsProduct));
}
/** Get Include Nulls in Product.
@return Include nulls in the selection of the product
*/
public boolean isIncludeNullsProduct ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsProduct);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Project.
@param IsIncludeNullsProject
Include nulls in the selection of the project
*/
public void setIsIncludeNullsProject (boolean IsIncludeNullsProject)
{
set_Value (COLUMNNAME_IsIncludeNullsProject, Boolean.valueOf(IsIncludeNullsProject));
}
/** Get Include Nulls in Project.
@return Include nulls in the selection of the project
*/
public boolean isIncludeNullsProject ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsProject);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in Sales Region.
@param IsIncludeNullsSalesRegion
Include nulls in the selection of the sales region
*/
public void setIsIncludeNullsSalesRegion (boolean IsIncludeNullsSalesRegion)
{
set_Value (COLUMNNAME_IsIncludeNullsSalesRegion, Boolean.valueOf(IsIncludeNullsSalesRegion));
}
/** Get Include Nulls in Sales Region.
@return Include nulls in the selection of the sales region
*/
public boolean isIncludeNullsSalesRegion ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsSalesRegion);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in User Element 1.
@param IsIncludeNullsUserElement1
Include nulls in the selection of the user element 1
*/
public void setIsIncludeNullsUserElement1 (boolean IsIncludeNullsUserElement1)
{
set_Value (COLUMNNAME_IsIncludeNullsUserElement1, Boolean.valueOf(IsIncludeNullsUserElement1));
}
/** Get Include Nulls in User Element 1.
@return Include nulls in the selection of the user element 1
*/
public boolean isIncludeNullsUserElement1 ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsUserElement1);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Include Nulls in User Element 2.
@param IsIncludeNullsUserElement2
Include nulls in the selection of the user element 2
*/
public void setIsIncludeNullsUserElement2 (boolean IsIncludeNullsUserElement2)
{
set_Value (COLUMNNAME_IsIncludeNullsUserElement2, Boolean.valueOf(IsIncludeNullsUserElement2));
}
/** Get Include Nulls in User Element 2.
@return Include nulls in the selection of the user element 2
*/
public boolean isIncludeNullsUserElement2 ()
{
Object oo = get_Value(COLUMNNAME_IsIncludeNullsUserElement2);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_M_Product getM_Product() throws Exception
{
Class<?> clazz = MTable.getClass(I_M_Product.Table_Name);
@ -526,4 +814,50 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis
return 0;
return ii.intValue();
}
/** Set User Element 1.
@param UserElement1_ID
User defined accounting Element
*/
public void setUserElement1_ID (int UserElement1_ID)
{
if (UserElement1_ID < 1)
set_Value (COLUMNNAME_UserElement1_ID, null);
else
set_Value (COLUMNNAME_UserElement1_ID, Integer.valueOf(UserElement1_ID));
}
/** Get User Element 1.
@return User defined accounting Element
*/
public int getUserElement1_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UserElement1_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set User Element 2.
@param UserElement2_ID
User defined accounting Element
*/
public void setUserElement2_ID (int UserElement2_ID)
{
if (UserElement2_ID < 1)
set_Value (COLUMNNAME_UserElement2_ID, null);
else
set_Value (COLUMNNAME_UserElement2_ID, Integer.valueOf(UserElement2_ID));
}
/** Get User Element 2.
@return User defined accounting Element
*/
public int getUserElement2_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UserElement2_ID);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -124,13 +124,13 @@ public class FinBalance extends SvrProcess
+ "(AD_Client_ID, AD_Org_ID, C_AcctSchema_ID, DateAcct,"
+ " Account_ID, PostingType, M_Product_ID, C_BPartner_ID,"
+ " C_Project_ID, AD_OrgTrx_ID, C_SalesRegion_ID,C_Activity_ID,"
+ " C_Campaign_ID, C_LocTo_ID, C_LocFrom_ID, User1_ID, User2_ID, GL_Budget_ID,"
+ " C_Campaign_ID, C_LocTo_ID, C_LocFrom_ID, User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, GL_Budget_ID,"
+ " AmtAcctDr, AmtAcctCr, Qty) "
//
+ "SELECT AD_Client_ID, AD_Org_ID, C_AcctSchema_ID, TRUNC(DateAcct),"
+ " Account_ID, PostingType, M_Product_ID, C_BPartner_ID,"
+ " C_Project_ID, AD_OrgTrx_ID, C_SalesRegion_ID,C_Activity_ID,"
+ " C_Campaign_ID, C_LocTo_ID, C_LocFrom_ID, User1_ID, User2_ID, GL_Budget_ID,"
+ " C_Campaign_ID, C_LocTo_ID, C_LocFrom_ID, User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, GL_Budget_ID,"
+ " COALESCE(SUM(AmtAcctDr),0), COALESCE(SUM(AmtAcctCr),0), COALESCE(SUM(Qty),0) "
+ "FROM Fact_Acct a "
+ "WHERE C_AcctSchema_ID=" + C_AcctSchema_ID;
@ -138,7 +138,7 @@ public class FinBalance extends SvrProcess
sql += " GROUP BY AD_Client_ID,AD_Org_ID, C_AcctSchema_ID, TRUNC(DateAcct),"
+ " Account_ID, PostingType, M_Product_ID, C_BPartner_ID,"
+ " C_Project_ID, AD_OrgTrx_ID, C_SalesRegion_ID, C_Activity_ID,"
+ " C_Campaign_ID, C_LocTo_ID, C_LocFrom_ID, User1_ID, User2_ID, GL_Budget_ID";
+ " C_Campaign_ID, C_LocTo_ID, C_LocFrom_ID, User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, GL_Budget_ID";
no = DB.executeUpdate(sql, null);
s_log.fine("Inserts=" + no);

View File

@ -16,14 +16,24 @@
*****************************************************************************/
package org.compiere.report;
import java.math.*;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.print.*;
import org.compiere.process.*;
import org.compiere.util.*;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.MAcctSchemaElement;
import org.compiere.print.MPrintFormat;
import org.compiere.print.MPrintFormatItem;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.CLogMgt;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Ini;
import org.compiere.util.TimeUtil;
/**
* Financial Report Engine
@ -428,9 +438,12 @@ public class FinReport extends SvrProcess
else if (MReportColumn.ELEMENTTYPE_UserList2.equals(elementType))
select.append(" AND User2_ID=").append(m_columns[col].getC_ElementValue_ID());
else if (MReportColumn.ELEMENTTYPE_UserElement1.equals(elementType))
select.append(" AND UserElement1_ID=").append(m_columns[col].getC_ElementValue_ID());
select.append(" AND UserElement1_ID=").append(m_columns[col].getUserElement1_ID());
else if (MReportColumn.ELEMENTTYPE_UserElement2.equals(elementType))
select.append(" AND UserElement2_ID=").append(m_columns[col].getC_ElementValue_ID());
select.append(" AND UserElement2_ID=").append(m_columns[col].getUserElement2_ID());
// Financial Report Source with Type Combination
else if (MReportColumn.ELEMENTTYPE_Combination.equals(elementType))
select.append(getWhereCombination(m_columns[col]));
}
// Parameter Where
@ -459,6 +472,116 @@ public class FinReport extends SvrProcess
}
} // insertLine
/**************************************************************************
* Returns where clause for combination type
* @param reportColumn
* @return where clause for the combination
*/
private String getWhereCombination(MReportColumn reportColumn) {
StringBuffer whcomb = new StringBuffer();
// Just one org - selected owning - OrgTrx not supported in combination
if (reportColumn.isIncludeNullsOrg())
if (reportColumn.getOrg_ID() > 0)
whcomb.append(" AND (AD_Org_ID IS NULL OR AD_Org_ID=").append(reportColumn.getOrg_ID()).append(")");
else
whcomb.append(" AND AD_Org_ID IS NULL");
else
if (reportColumn.getOrg_ID() > 0)
whcomb.append(" AND AD_Org_ID=").append(reportColumn.getOrg_ID());
if (reportColumn.isIncludeNullsBPartner())
if (reportColumn.getC_BPartner_ID() > 0)
whcomb.append(" AND (C_BPartner_ID IS NULL OR C_BPartner_ID=").append(reportColumn.getC_BPartner_ID()).append(")");
else
whcomb.append(" AND C_BPartner_ID IS NULL");
else
if (reportColumn.getC_BPartner_ID() > 0)
whcomb.append(" AND C_BPartner_ID=").append(reportColumn.getC_BPartner_ID());
if (reportColumn.isIncludeNullsProduct())
if (reportColumn.getM_Product_ID() > 0)
whcomb.append(" AND (M_Product_ID IS NULL OR M_Product_ID=").append(reportColumn.getM_Product_ID()).append(")");
else
whcomb.append(" AND M_Product_ID IS NULL");
else
if (reportColumn.getM_Product_ID() > 0)
whcomb.append(" AND M_Product_ID=").append(reportColumn.getM_Product_ID());
if (reportColumn.isIncludeNullsProject())
if (reportColumn.getC_Project_ID() > 0)
whcomb.append(" AND (C_Project_ID IS NULL OR C_Project_ID=").append(reportColumn.getC_Project_ID()).append(")");
else
whcomb.append(" AND C_Project_ID IS NULL");
else
if (reportColumn.getC_Project_ID() > 0)
whcomb.append(" AND C_Project_ID=").append(reportColumn.getC_Project_ID());
if (reportColumn.isIncludeNullsActivity())
if (reportColumn.getC_Activity_ID() > 0)
whcomb.append(" AND (C_Activity_ID IS NULL OR C_Activity_ID=").append(reportColumn.getC_Activity_ID()).append(")");
else
whcomb.append(" AND C_Activity_ID IS NULL");
else
if (reportColumn.getC_Activity_ID() > 0)
whcomb.append(" AND C_Activity_ID=").append(reportColumn.getC_Activity_ID());
if (reportColumn.isIncludeNullsCampaign())
if (reportColumn.getC_Campaign_ID() > 0)
whcomb.append(" AND (C_Campaign_ID IS NULL OR C_Campaign_ID=").append(reportColumn.getC_Campaign_ID()).append(")");
else
whcomb.append(" AND C_Campaign_ID IS NULL");
else
if (reportColumn.getC_Campaign_ID() > 0)
whcomb.append(" AND C_Campaign_ID=").append(reportColumn.getC_Campaign_ID());
// Just one Location - selected From - LocTo not supported in combination
if (reportColumn.isIncludeNullsLocation())
if (reportColumn.getC_Location_ID() > 0)
whcomb.append(" AND (C_LocFrom_ID IS NULL OR C_LocFrom_ID=").append(reportColumn.getC_Location_ID()).append(")");
else
whcomb.append(" AND C_LocFrom_ID IS NULL");
else
if (reportColumn.getC_Location_ID() > 0)
whcomb.append(" AND C_LocFrom_ID=").append(reportColumn.getC_Location_ID());
if (reportColumn.isIncludeNullsSalesRegion())
if (reportColumn.getC_SalesRegion_ID() > 0)
whcomb.append(" AND (C_SalesRegion_ID IS NULL OR C_SalesRegion_ID=").append(reportColumn.getC_SalesRegion_ID()).append(")");
else
whcomb.append(" AND C_SalesRegion_ID IS NULL");
else
if (reportColumn.getC_SalesRegion_ID() > 0)
whcomb.append(" AND C_SalesRegion_ID=").append(reportColumn.getC_SalesRegion_ID());
// Just account - neither UserList1/2 supported in combination
if (reportColumn.isIncludeNullsElementValue())
if (reportColumn.getC_ElementValue_ID() > 0)
whcomb.append(" AND (Account_ID IS NULL OR Account_ID=").append(reportColumn.getC_ElementValue_ID()).append(")");
else
whcomb.append(" AND Account_ID IS NULL");
else
if (reportColumn.getC_ElementValue_ID() > 0)
whcomb.append(" AND Account_ID=").append(reportColumn.getC_ElementValue_ID());
if (reportColumn.isIncludeNullsUserElement1())
if (reportColumn.getUserElement1_ID() > 0)
whcomb.append(" AND (UserElement1_ID IS NULL OR UserElement1_ID=").append(reportColumn.getUserElement1_ID()).append(")");
else
whcomb.append(" AND UserElement1_ID IS NULL");
else
if (reportColumn.getUserElement1_ID() > 0)
whcomb.append(" AND UserElement1_ID=").append(reportColumn.getUserElement1_ID());
if (reportColumn.isIncludeNullsUserElement2())
if (reportColumn.getUserElement2_ID() > 0)
whcomb.append(" AND (UserElement2_ID IS NULL OR UserElement2_ID=").append(reportColumn.getUserElement2_ID()).append(")");
else
whcomb.append(" AND UserElement2_ID IS NULL");
else
if (reportColumn.getUserElement2_ID() > 0)
whcomb.append(" AND UserElement2_ID=").append(reportColumn.getUserElement2_ID());
return whcomb.toString();
}
/**************************************************************************
* Line + Column calculation
@ -967,9 +1090,12 @@ public class FinReport extends SvrProcess
else if (MReportColumn.ELEMENTTYPE_UserList2.equals(elementType))
select.append(" AND User2_ID=").append(m_columns[col].getC_ElementValue_ID());
else if (MReportColumn.ELEMENTTYPE_UserElement1.equals(elementType))
select.append(" AND UserElement1_ID=").append(m_columns[col].getC_ElementValue_ID());
select.append(" AND UserElement1_ID=").append(m_columns[col].getUserElement1_ID());
else if (MReportColumn.ELEMENTTYPE_UserElement2.equals(elementType))
select.append(" AND UserElement2_ID=").append(m_columns[col].getC_ElementValue_ID());
select.append(" AND UserElement2_ID=").append(m_columns[col].getUserElement2_ID());
// Financial Report Source with Type Combination
else if (MReportColumn.ELEMENTTYPE_Combination.equals(elementType))
select.append(getWhereCombination(m_columns[col]));
}
// Parameter Where
select.append(m_parameterWhere);

View File

@ -16,8 +16,9 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import org.compiere.util.*;
import java.sql.Timestamp;
import org.compiere.util.DB;
/**
* Financial Report Periods

View File

@ -16,9 +16,10 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import java.util.*;
import org.compiere.model.*;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.X_PA_Report;
/**

View File

@ -16,11 +16,12 @@
*****************************************************************************/
package org.compiere.report;
import java.math.*;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.*;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.X_PA_ReportColumn;
/**
* Report Column Model

View File

@ -16,11 +16,14 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.X_PA_ReportColumnSet;
import org.compiere.util.DB;
/**

View File

@ -16,11 +16,15 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.MAcctSchemaElement;
import org.compiere.model.X_PA_ReportLine;
import org.compiere.util.DB;
/**

View File

@ -16,11 +16,14 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.X_PA_ReportLineSet;
import org.compiere.util.DB;
/**

View File

@ -16,9 +16,10 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import java.util.*;
import org.compiere.model.*;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.X_PA_ReportSource;
/**
@ -66,40 +67,168 @@ public class MReportSource extends X_PA_ReportSource
// ID for Tree Leaf Value
int ID = 0;
//
if (MAcctSchemaElement.ELEMENTTYPE_Account.equals(et))
ID = getC_ElementValue_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_Activity.equals(et))
ID = getC_Activity_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_BPartner.equals(et))
ID = getC_BPartner_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_Campaign.equals(et))
ID = getC_Campaign_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_LocationFrom.equals(et))
ID = getC_Location_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_LocationTo.equals(et))
ID = getC_Location_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_Organization.equals(et))
ID = getOrg_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_Product.equals(et))
ID = getM_Product_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_Project.equals(et))
ID = getC_Project_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_SalesRegion.equals(et))
ID = getC_SalesRegion_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_OrgTrx.equals(et))
ID = getOrg_ID (); // (re)uses Org_ID
else if (MAcctSchemaElement.ELEMENTTYPE_UserList1.equals(et))
ID = getC_ElementValue_ID ();
else if (MAcctSchemaElement.ELEMENTTYPE_UserList2.equals(et))
ID = getC_ElementValue_ID ();
// else if (MAcctSchemaElement.ELEMENTTYPE_UserElement1.equals(et))
// ID = getUserElement1_ID ();
// else if (MAcctSchemaElement.ELEMENTTYPE_UserElement2.equals(et))
// ID = getUserElement2_ID ();
if (MReportSource.ELEMENTTYPE_Account.equals(et))
ID = getC_ElementValue_ID();
else if (MReportSource.ELEMENTTYPE_Activity.equals(et))
ID = getC_Activity_ID();
else if (MReportSource.ELEMENTTYPE_BPartner.equals(et))
ID = getC_BPartner_ID();
else if (MReportSource.ELEMENTTYPE_Campaign.equals(et))
ID = getC_Campaign_ID();
else if (MReportSource.ELEMENTTYPE_LocationFrom.equals(et))
ID = getC_Location_ID();
else if (MReportSource.ELEMENTTYPE_LocationTo.equals(et))
ID = getC_Location_ID();
else if (MReportSource.ELEMENTTYPE_Organization.equals(et))
ID = getOrg_ID();
else if (MReportSource.ELEMENTTYPE_Product.equals(et))
ID = getM_Product_ID();
else if (MReportSource.ELEMENTTYPE_Project.equals(et))
ID = getC_Project_ID();
else if (MReportSource.ELEMENTTYPE_SalesRegion.equals(et))
ID = getC_SalesRegion_ID();
else if (MReportSource.ELEMENTTYPE_OrgTrx.equals(et))
ID = getOrg_ID(); // (re)uses Org_ID
else if (MReportSource.ELEMENTTYPE_UserList1.equals(et))
ID = getC_ElementValue_ID();
else if (MReportSource.ELEMENTTYPE_UserList2.equals(et))
ID = getC_ElementValue_ID();
else if (MReportSource.ELEMENTTYPE_UserElement1.equals(et))
return "UserElement1_ID="+getUserElement1_ID(); // Not Tree
else if (MReportSource.ELEMENTTYPE_UserElement2.equals(et))
return "UserElement2_ID="+getUserElement2_ID(); // Not Tree
// Financial Report Source with Type Combination
else if (MReportSource.ELEMENTTYPE_Combination.equals(et))
return getWhereCombination(PA_Hierarchy_ID);
//
return MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, et, ID);
} // getWhereClause
/**
* Obtain where clause for the combination type
* @param PA_Hierarchy_ID
* @return
*/
private String getWhereCombination(int PA_Hierarchy_ID) {
StringBuffer whcomb = new StringBuffer();
if (getC_ElementValue_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Account, getC_ElementValue_ID());
if (isIncludeNullsElementValue())
whcomb.append(" AND (Account_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsElementValue())
whcomb.append(" AND Account_ID IS NULL");
if (getC_Activity_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Activity, getC_Activity_ID());
if (isIncludeNullsActivity())
whcomb.append(" AND (C_Activity_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsActivity())
whcomb.append(" AND C_Activity_ID IS NULL");
if (getC_BPartner_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_BPartner, getC_BPartner_ID());
if (isIncludeNullsBPartner())
whcomb.append(" AND (C_BPartner_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsBPartner())
whcomb.append(" AND C_BPartner_ID IS NULL");
if (getC_Campaign_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Campaign, getC_Campaign_ID());
if (isIncludeNullsCampaign())
whcomb.append(" AND (C_Campaign_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsCampaign())
whcomb.append(" AND C_Campaign_ID IS NULL");
if (getC_Location_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_LocationFrom, getC_Location_ID());
if (isIncludeNullsLocation())
whcomb.append(" AND (C_LocFrom_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsLocation())
whcomb.append(" AND C_LocFrom_ID IS NULL");
if (getOrg_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Organization, getOrg_ID());
if (isIncludeNullsOrg())
whcomb.append(" AND (AD_Org_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsOrg())
whcomb.append(" AND AD_Org_ID IS NULL");
if (getM_Product_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Product, getM_Product_ID());
if (isIncludeNullsProduct())
whcomb.append(" AND (M_Product_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsProduct())
whcomb.append(" AND M_Product_ID IS NULL");
if (getC_Project_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Project, getC_Project_ID());
if (isIncludeNullsProject())
whcomb.append(" AND (C_Project_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsProject())
whcomb.append(" AND C_Project_ID IS NULL");
if (getC_SalesRegion_ID() > 0) {
String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_SalesRegion, getC_SalesRegion_ID());
if (isIncludeNullsSalesRegion())
whcomb.append(" AND (C_SalesRegion_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsSalesRegion())
whcomb.append(" AND C_SalesRegion_ID IS NULL");
if (getUserElement1_ID() > 0) {
String whtree = "UserElement1_ID=" + getUserElement1_ID(); // No Tree
if (isIncludeNullsUserElement1())
whcomb.append(" AND (UserElement1_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsUserElement1())
whcomb.append(" AND UserElement1_ID IS NULL");
if (getUserElement2_ID() > 0) {
String whtree = "UserElement2_ID=" + getUserElement2_ID(); // No Tree
if (isIncludeNullsUserElement2())
whcomb.append(" AND (UserElement2_ID IS NULL OR ").append(whtree).append(")");
else
whcomb.append(" AND ").append(whtree);
} else
if (isIncludeNullsUserElement2())
whcomb.append(" AND UserElement2_ID IS NULL");
// drop the first " AND "
if (whcomb.length() > 5 && whcomb.toString().startsWith(" AND "))
whcomb.delete(0, 5);
return whcomb.toString();
}
/**
* String Representation

View File

@ -16,12 +16,22 @@
*****************************************************************************/
package org.compiere.report;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.*;
import org.compiere.util.*;
import org.compiere.model.MAcctSchemaElement;
import org.compiere.model.MHierarchy;
import org.compiere.model.MTree;
import org.compiere.model.MTreeNode;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
/**
* Report Tree Model

View File

@ -16,13 +16,21 @@
*****************************************************************************/
package org.compiere.report;
import java.math.*;
import java.sql.*;
import java.util.*;
import org.compiere.model.*;
import org.compiere.process.*;
import java.util.logging.*;
import org.compiere.util.*;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import org.compiere.model.MAcctSchemaElement;
import org.compiere.model.MElementValue;
import org.compiere.model.MPeriod;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Language;
/**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff