From e835ba8ee59b1950dc293dff2013e25cdcefb41e Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Wed, 17 Dec 2008 01:52:26 +0000 Subject: [PATCH] Financial Report Source with Type Combination https://sourceforge.net/tracker2/?func=detail&aid=2015331&group_id=176962&atid=879335 Implementing Organization transaction --- .../org/compiere/model/I_PA_ReportColumn.java | 86 ++-- .../org/compiere/model/I_PA_ReportSource.java | 100 +++-- .../org/compiere/model/X_PA_ReportColumn.java | 55 ++- .../org/compiere/model/X_PA_ReportSource.java | 81 +++- .../org/compiere/report/MReportColumn.java | 11 + .../org/compiere/report/MReportSource.java | 10 + .../352a-trunk/363_FR2015331_OrgTrx.sql | 401 ++++++++++++++++++ .../352a-trunk/363_FR2015331_OrgTrx.sql | 400 +++++++++++++++++ 8 files changed, 1057 insertions(+), 87 deletions(-) create mode 100644 migration/oracle/352a-trunk/363_FR2015331_OrgTrx.sql create mode 100644 migration/postgresql/352a-trunk/363_FR2015331_OrgTrx.sql diff --git a/base/src/org/compiere/model/I_PA_ReportColumn.java b/base/src/org/compiere/model/I_PA_ReportColumn.java index 61a29ca675..f6c9270dc8 100644 --- a/base/src/org/compiere/model/I_PA_ReportColumn.java +++ b/base/src/org/compiere/model/I_PA_ReportColumn.java @@ -1,31 +1,22 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software, you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation, either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY, without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program, if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software; + you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; + if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ package org.compiere.model; import java.math.BigDecimal; @@ -52,6 +43,32 @@ public interface I_PA_ReportColumn /** Load Meta Data */ + /** Column name AD_OrgTrx_ID */ + public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; + + /** Set Trx Organization. + * Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); + + /** Get Trx Organization. + * Performing or initiating organization + */ + public int getAD_OrgTrx_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + /** Column name AmountType */ public static final String COLUMNNAME_AmountType = "AmountType"; @@ -368,6 +385,19 @@ public interface I_PA_ReportColumn */ public boolean isIncludeNullsOrg(); + /** Column name IsIncludeNullsOrgTrx */ + public static final String COLUMNNAME_IsIncludeNullsOrgTrx = "IsIncludeNullsOrgTrx"; + + /** Set Include Nulls in Org Trx. + * Include nulls in the selection of the organization transaction + */ + public void setIsIncludeNullsOrgTrx (boolean IsIncludeNullsOrgTrx); + + /** Get Include Nulls in Org Trx. + * Include nulls in the selection of the organization transaction + */ + public boolean isIncludeNullsOrgTrx(); + /** Column name IsIncludeNullsProduct */ public static final String COLUMNNAME_IsIncludeNullsProduct = "IsIncludeNullsProduct"; diff --git a/base/src/org/compiere/model/I_PA_ReportSource.java b/base/src/org/compiere/model/I_PA_ReportSource.java index 538e89929b..dd35d30bb6 100644 --- a/base/src/org/compiere/model/I_PA_ReportSource.java +++ b/base/src/org/compiere/model/I_PA_ReportSource.java @@ -1,31 +1,22 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software, you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation, either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY, without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program, if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software; + you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; + if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ package org.compiere.model; import java.math.BigDecimal; @@ -52,6 +43,32 @@ public interface I_PA_ReportSource /** Load Meta Data */ + /** Column name AD_OrgTrx_ID */ + public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; + + /** Set Trx Organization. + * Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); + + /** Get Trx Organization. + * Performing or initiating organization + */ + public int getAD_OrgTrx_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + /** Column name C_Activity_ID */ public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; @@ -65,7 +82,7 @@ public interface I_PA_ReportSource */ public int getC_Activity_ID(); - public I_C_Activity getC_Activity() throws Exception; + public I_C_Activity getC_Activity() throws RuntimeException; /** Column name C_BPartner_ID */ public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; @@ -80,7 +97,7 @@ public interface I_PA_ReportSource */ public int getC_BPartner_ID(); - public I_C_BPartner getC_BPartner() throws Exception; + public I_C_BPartner getC_BPartner() throws RuntimeException; /** Column name C_Campaign_ID */ public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; @@ -95,7 +112,7 @@ public interface I_PA_ReportSource */ public int getC_Campaign_ID(); - public I_C_Campaign getC_Campaign() throws Exception; + public I_C_Campaign getC_Campaign() throws RuntimeException; /** Column name C_ElementValue_ID */ public static final String COLUMNNAME_C_ElementValue_ID = "C_ElementValue_ID"; @@ -136,7 +153,7 @@ public interface I_PA_ReportSource */ public int getC_Project_ID(); - public I_C_Project getC_Project() throws Exception; + public I_C_Project getC_Project() throws RuntimeException; /** Column name C_SalesRegion_ID */ public static final String COLUMNNAME_C_SalesRegion_ID = "C_SalesRegion_ID"; @@ -151,7 +168,7 @@ public interface I_PA_ReportSource */ public int getC_SalesRegion_ID(); - public I_C_SalesRegion getC_SalesRegion() throws Exception; + public I_C_SalesRegion getC_SalesRegion() throws RuntimeException; /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -257,6 +274,19 @@ public interface I_PA_ReportSource */ public boolean isIncludeNullsOrg(); + /** Column name IsIncludeNullsOrgTrx */ + public static final String COLUMNNAME_IsIncludeNullsOrgTrx = "IsIncludeNullsOrgTrx"; + + /** Set Include Nulls in Org Trx. + * Include nulls in the selection of the organization transaction + */ + public void setIsIncludeNullsOrgTrx (boolean IsIncludeNullsOrgTrx); + + /** Get Include Nulls in Org Trx. + * Include nulls in the selection of the organization transaction + */ + public boolean isIncludeNullsOrgTrx(); + /** Column name IsIncludeNullsProduct */ public static final String COLUMNNAME_IsIncludeNullsProduct = "IsIncludeNullsProduct"; @@ -335,7 +365,7 @@ public interface I_PA_ReportSource */ public int getM_Product_ID(); - public I_M_Product getM_Product() throws Exception; + public I_M_Product getM_Product() throws RuntimeException; /** Column name Org_ID */ public static final String COLUMNNAME_Org_ID = "Org_ID"; @@ -359,7 +389,7 @@ public interface I_PA_ReportSource /** Get Report Line */ public int getPA_ReportLine_ID(); - public I_PA_ReportLine getPA_ReportLine() throws Exception; + public I_PA_ReportLine getPA_ReportLine() throws RuntimeException; /** Column name PA_ReportSource_ID */ public static final String COLUMNNAME_PA_ReportSource_ID = "PA_ReportSource_ID"; diff --git a/base/src/org/compiere/model/X_PA_ReportColumn.java b/base/src/org/compiere/model/X_PA_ReportColumn.java index e31fd76d90..5a2ae1d50f 100644 --- a/base/src/org/compiere/model/X_PA_ReportColumn.java +++ b/base/src/org/compiere/model/X_PA_ReportColumn.java @@ -55,6 +55,8 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis setIsIncludeNullsLocation (false); // N setIsIncludeNullsOrg (false); +// N + setIsIncludeNullsOrgTrx (false); // N setIsIncludeNullsProduct (false); // N @@ -106,6 +108,29 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return sb.toString(); } + /** Set Trx Organization. + @param AD_OrgTrx_ID + Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) + { + if (AD_OrgTrx_ID < 1) + set_Value (COLUMNNAME_AD_OrgTrx_ID, null); + else + set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); + } + + /** Get Trx Organization. + @return Performing or initiating organization + */ + public int getAD_OrgTrx_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + /** AmountType AD_Reference_ID=235 */ public static final int AMOUNTTYPE_AD_Reference_ID=235; /** Total Debit Only = DT */ @@ -836,6 +861,30 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return false; } + /** Set Include Nulls in Org Trx. + @param IsIncludeNullsOrgTrx + Include nulls in the selection of the organization transaction + */ + public void setIsIncludeNullsOrgTrx (boolean IsIncludeNullsOrgTrx) + { + set_Value (COLUMNNAME_IsIncludeNullsOrgTrx, Boolean.valueOf(IsIncludeNullsOrgTrx)); + } + + /** Get Include Nulls in Org Trx. + @return Include nulls in the selection of the organization transaction + */ + public boolean isIncludeNullsOrgTrx () + { + Object oo = get_Value(COLUMNNAME_IsIncludeNullsOrgTrx); + 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 @@ -1046,8 +1095,6 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return new KeyNamePair(get_ID(), getName()); } - /** Oper_1_ID AD_Reference_ID=239 */ - public static final int OPER_1_ID_AD_Reference_ID=239; /** Set Operand 1. @param Oper_1_ID First operand for calculation @@ -1071,8 +1118,6 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return ii.intValue(); } - /** Oper_2_ID AD_Reference_ID=239 */ - public static final int OPER_2_ID_AD_Reference_ID=239; /** Set Operand 2. @param Oper_2_ID Second operand for calculation @@ -1096,8 +1141,6 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return ii.intValue(); } - /** Org_ID AD_Reference_ID=130 */ - public static final int ORG_ID_AD_Reference_ID=130; /** Set Organization. @param Org_ID Organizational entity within client diff --git a/base/src/org/compiere/model/X_PA_ReportSource.java b/base/src/org/compiere/model/X_PA_ReportSource.java index 073074623b..43fd64414f 100644 --- a/base/src/org/compiere/model/X_PA_ReportSource.java +++ b/base/src/org/compiere/model/X_PA_ReportSource.java @@ -52,6 +52,8 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis setIsIncludeNullsLocation (false); // N setIsIncludeNullsOrg (false); +// N + setIsIncludeNullsOrgTrx (false); // N setIsIncludeNullsProduct (false); // N @@ -96,7 +98,30 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return sb.toString(); } - public I_C_Activity getC_Activity() throws Exception + /** Set Trx Organization. + @param AD_OrgTrx_ID + Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) + { + if (AD_OrgTrx_ID < 1) + set_Value (COLUMNNAME_AD_OrgTrx_ID, null); + else + set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); + } + + /** Get Trx Organization. + @return Performing or initiating organization + */ + public int getAD_OrgTrx_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Activity getC_Activity() throws RuntimeException { Class clazz = MTable.getClass(I_C_Activity.Table_Name); I_C_Activity result = null; @@ -107,7 +132,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } @@ -135,7 +160,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - public I_C_BPartner getC_BPartner() throws Exception + public I_C_BPartner getC_BPartner() throws RuntimeException { Class clazz = MTable.getClass(I_C_BPartner.Table_Name); I_C_BPartner result = null; @@ -146,7 +171,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } @@ -174,7 +199,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - public I_C_Campaign getC_Campaign() throws Exception + public I_C_Campaign getC_Campaign() throws RuntimeException { Class clazz = MTable.getClass(I_C_Campaign.Table_Name); I_C_Campaign result = null; @@ -185,7 +210,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } @@ -213,8 +238,6 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - /** C_ElementValue_ID AD_Reference_ID=182 */ - public static final int C_ELEMENTVALUE_ID_AD_Reference_ID=182; /** Set Account Element. @param C_ElementValue_ID Account Element @@ -261,7 +284,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - public I_C_Project getC_Project() throws Exception + public I_C_Project getC_Project() throws RuntimeException { Class clazz = MTable.getClass(I_C_Project.Table_Name); I_C_Project result = null; @@ -272,7 +295,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } @@ -300,7 +323,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - public I_C_SalesRegion getC_SalesRegion() throws Exception + public I_C_SalesRegion getC_SalesRegion() throws RuntimeException { Class clazz = MTable.getClass(I_C_SalesRegion.Table_Name); I_C_SalesRegion result = null; @@ -311,7 +334,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } @@ -562,6 +585,30 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return false; } + /** Set Include Nulls in Org Trx. + @param IsIncludeNullsOrgTrx + Include nulls in the selection of the organization transaction + */ + public void setIsIncludeNullsOrgTrx (boolean IsIncludeNullsOrgTrx) + { + set_Value (COLUMNNAME_IsIncludeNullsOrgTrx, Boolean.valueOf(IsIncludeNullsOrgTrx)); + } + + /** Get Include Nulls in Org Trx. + @return Include nulls in the selection of the organization transaction + */ + public boolean isIncludeNullsOrgTrx () + { + Object oo = get_Value(COLUMNNAME_IsIncludeNullsOrgTrx); + 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 @@ -682,7 +729,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return false; } - public I_M_Product getM_Product() throws Exception + public I_M_Product getM_Product() throws RuntimeException { Class clazz = MTable.getClass(I_M_Product.Table_Name); I_M_Product result = null; @@ -693,7 +740,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } @@ -721,8 +768,6 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - /** Org_ID AD_Reference_ID=322 */ - public static final int ORG_ID_AD_Reference_ID=322; /** Set Organization. @param Org_ID Organizational entity within client @@ -746,7 +791,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis return ii.intValue(); } - public I_PA_ReportLine getPA_ReportLine() throws Exception + public I_PA_ReportLine getPA_ReportLine() throws RuntimeException { Class clazz = MTable.getClass(I_PA_ReportLine.Table_Name); I_PA_ReportLine result = null; @@ -757,7 +802,7 @@ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persis } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; + throw new RuntimeException( e ); } return result; } diff --git a/base/src/org/compiere/report/MReportColumn.java b/base/src/org/compiere/report/MReportColumn.java index 756436b99c..73cacb2283 100644 --- a/base/src/org/compiere/report/MReportColumn.java +++ b/base/src/org/compiere/report/MReportColumn.java @@ -272,6 +272,17 @@ public class MReportColumn extends X_PA_ReportColumn } else if (isIncludeNullsOrg()) whcomb.append(" AND AD_Org_ID IS NULL"); + + if (getAD_OrgTrx_ID() > 0) { + String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_OrgTrx, getAD_OrgTrx_ID()); + if (isIncludeNullsOrgTrx()) + whcomb.append(" AND (AD_OrgTrx_ID IS NULL OR ").append(whtree).append(")"); + else + whcomb.append(" AND ").append(whtree); + } else + if (isIncludeNullsOrgTrx()) + whcomb.append(" AND AD_OrgTrx_ID IS NULL"); + if (getM_Product_ID() > 0) { String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Product, getM_Product_ID()); diff --git a/base/src/org/compiere/report/MReportSource.java b/base/src/org/compiere/report/MReportSource.java index 6e90cc3bcd..987decd104 100644 --- a/base/src/org/compiere/report/MReportSource.java +++ b/base/src/org/compiere/report/MReportSource.java @@ -171,6 +171,16 @@ public class MReportSource extends X_PA_ReportSource } else if (isIncludeNullsOrg()) whcomb.append(" AND AD_Org_ID IS NULL"); + + if (getAD_OrgTrx_ID() > 0) { + String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_OrgTrx, getAD_OrgTrx_ID()); + if (isIncludeNullsOrgTrx()) + whcomb.append(" AND (AD_OrgTrx_ID IS NULL OR ").append(whtree).append(")"); + else + whcomb.append(" AND ").append(whtree); + } else + if (isIncludeNullsOrgTrx()) + whcomb.append(" AND AD_OrgTrx_ID IS NULL"); if (getM_Product_ID() > 0) { String whtree = MReportTree.getWhereClause (getCtx(), PA_Hierarchy_ID, MReportSource.ELEMENTTYPE_Product, getM_Product_ID()); diff --git a/migration/oracle/352a-trunk/363_FR2015331_OrgTrx.sql b/migration/oracle/352a-trunk/363_FR2015331_OrgTrx.sql new file mode 100644 index 0000000000..f1e22527f9 --- /dev/null +++ b/migration/oracle/352a-trunk/363_FR2015331_OrgTrx.sql @@ -0,0 +1,401 @@ +-- Dec 16, 2008 5:51:46 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53716,0,'IsIncludeNullsOrgTrx',TO_DATE('2008-12-16 17:51:45','YYYY-MM-DD HH24:MI:SS'),0,'Include nulls in the selection of the organization transaction','D','Y','Include Nulls in Org Trx','Include Nulls in Org Trx',TO_DATE('2008-12-16 17:51:45','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:51:46 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53716 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- Dec 16, 2008 5:52:08 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56533,53716,0,20,446,'IsIncludeNullsOrgTrx',TO_DATE('2008-12-16 17:52:07','YYYY-MM-DD HH24:MI:SS'),0,'N','Include nulls in the selection of the organization transaction','D',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Include Nulls in Org Trx',0,TO_DATE('2008-12-16 17:52:07','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Dec 16, 2008 5:52:08 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56533 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:52:12 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportColumn ADD IsIncludeNullsOrgTrx CHAR(1) DEFAULT 'N' CHECK (IsIncludeNullsOrgTrx IN ('Y','N')) NOT NULL +; + +-- Dec 16, 2008 5:53:01 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56534,112,0,19,446,104,'AD_OrgTrx_ID',TO_DATE('2008-12-16 17:53:00','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Org_ID@','Performing or initiating organization','D',22,'The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','N','N','N','N','N','Y','N','N','N','N','N','Trx Organization',0,TO_DATE('2008-12-16 17:53:00','YYYY-MM-DD HH24:MI:SS'),0,1) +; + +-- Dec 16, 2008 5:53:01 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56534 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:53:12 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Val_Rule_ID=130, DefaultValue=NULL,Updated=TO_DATE('2008-12-16 17:53:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + + +-- Dec 16, 2008 5:53:31 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2008-12-16 17:53:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 5:53:33 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportColumn ADD AD_OrgTrx_ID NUMBER(10) +; + +-- Dec 16, 2008 5:55:16 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56535,53716,0,20,450,'IsIncludeNullsOrgTrx',TO_DATE('2008-12-16 17:55:16','YYYY-MM-DD HH24:MI:SS'),0,'N','Include nulls in the selection of the organization transaction','D',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Include Nulls in Org Trx',0,TO_DATE('2008-12-16 17:55:16','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Dec 16, 2008 5:55:16 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56535 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:55:19 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportSource ADD IsIncludeNullsOrgTrx CHAR(1) DEFAULT 'N' CHECK (IsIncludeNullsOrgTrx IN ('Y','N')) NOT NULL +; + +-- Dec 16, 2008 5:55:54 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56536,112,0,19,450,130,'AD_OrgTrx_ID',TO_DATE('2008-12-16 17:55:54','YYYY-MM-DD HH24:MI:SS'),0,NULL,'Performing or initiating organization','D',22,'The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Trx Organization',0,TO_DATE('2008-12-16 17:55:54','YYYY-MM-DD HH24:MI:SS'),0,1) +; + +-- Dec 16, 2008 5:55:54 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56536 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:55:58 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportSource ADD AD_OrgTrx_ID NUMBER(10) +; + +-- Dec 16, 2008 5:56:42 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56535,56515,0,377,TO_DATE('2008-12-16 17:56:41','YYYY-MM-DD HH24:MI:SS'),0,'Include nulls in the selection of the organization transaction',1,'D','Y','Y','Y','N','N','N','N','N','Include Nulls in Org Trx',TO_DATE('2008-12-16 17:56:41','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:56:42 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56515 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:56:43 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56536,56516,0,377,TO_DATE('2008-12-16 17:56:42','YYYY-MM-DD HH24:MI:SS'),0,'Performing or initiating organization',22,'D','The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','Y','N','N','N','N','N','Trx Organization',TO_DATE('2008-12-16 17:56:42','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:56:43 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56516 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=56516 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=56515 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=4805 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=56285 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=4816 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=56287 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=4807 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=56291 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=4808 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=56289 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=4806 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56292 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=4809 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56293 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=4810 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56286 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=4817 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56288 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56283 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56294 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=56284 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56295 +; + +-- Dec 16, 2008 5:57:42 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=OO | @ElementType@=OT | @ElementType@=CO',Updated=TO_DATE('2008-12-16 17:57:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56516 +; + +-- Dec 16, 2008 5:57:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=CO', IsSameLine='Y',Updated=TO_DATE('2008-12-16 17:57:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56515 +; + +-- Dec 16, 2008 5:58:32 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56533,56517,0,374,TO_DATE('2008-12-16 17:58:29','YYYY-MM-DD HH24:MI:SS'),0,'Include nulls in the selection of the organization transaction',1,'D','Y','Y','Y','N','N','N','N','N','Include Nulls in Org Trx',TO_DATE('2008-12-16 17:58:29','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:58:32 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56517 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:58:34 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56534,56518,0,374,TO_DATE('2008-12-16 17:58:32','YYYY-MM-DD HH24:MI:SS'),0,'Performing or initiating organization',22,'D','The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','Y','N','N','N','N','N','Trx Organization',TO_DATE('2008-12-16 17:58:32','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:58:34 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56518 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56518 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56517 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=4765 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56296 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=4766 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56302 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=4777 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56299 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=4776 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=56298 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=4775 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=56303 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=4767 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=56300 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=4768 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=56304 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=4769 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56297 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=56281 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56305 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56282 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56306 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=56375 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=56376 +; + +-- Dec 16, 2008 5:59:23 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=OO | @ElementType@=OT | @ElementType@=CO',Updated=TO_DATE('2008-12-16 17:59:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56518 +; + +-- Dec 16, 2008 5:59:33 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=CO', IsSameLine='Y',Updated=TO_DATE('2008-12-16 17:59:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56517 +; + +-- Dec 16, 2008 6:02:22 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Reference_ID=18, AD_Reference_Value_ID=130,Updated=TO_DATE('2008-12-16 18:02:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56536 +; + +-- Dec 16, 2008 6:02:57 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Reference_ID=18, AD_Reference_Value_ID=130,Updated=TO_DATE('2008-12-16 18:02:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 6:06:27 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Val_Rule_ID=NULL,Updated=TO_DATE('2008-12-16 18:06:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 6:06:44 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Val_Rule_ID=NULL,Updated=TO_DATE('2008-12-16 18:06:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56536 +; + +-- Dec 16, 2008 6:19:23 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2008-12-16 18:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56536 +; + +-- Dec 16, 2008 6:19:56 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2008-12-16 18:19:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + diff --git a/migration/postgresql/352a-trunk/363_FR2015331_OrgTrx.sql b/migration/postgresql/352a-trunk/363_FR2015331_OrgTrx.sql new file mode 100644 index 0000000000..adba306467 --- /dev/null +++ b/migration/postgresql/352a-trunk/363_FR2015331_OrgTrx.sql @@ -0,0 +1,400 @@ +-- Dec 16, 2008 5:51:46 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53716,0,'IsIncludeNullsOrgTrx',TO_TIMESTAMP('2008-12-16 17:51:45','YYYY-MM-DD HH24:MI:SS'),0,'Include nulls in the selection of the organization transaction','D','Y','Include Nulls in Org Trx','Include Nulls in Org Trx',TO_TIMESTAMP('2008-12-16 17:51:45','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:51:46 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53716 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- Dec 16, 2008 5:52:08 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56533,53716,0,20,446,'IsIncludeNullsOrgTrx',TO_TIMESTAMP('2008-12-16 17:52:07','YYYY-MM-DD HH24:MI:SS'),0,'N','Include nulls in the selection of the organization transaction','D',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Include Nulls in Org Trx',0,TO_TIMESTAMP('2008-12-16 17:52:07','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Dec 16, 2008 5:52:08 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56533 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:52:12 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportColumn ADD COLUMN IsIncludeNullsOrgTrx CHAR(1) DEFAULT 'N' CHECK (IsIncludeNullsOrgTrx IN ('Y','N')) NOT NULL +; + +-- Dec 16, 2008 5:53:01 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56534,112,0,19,446,104,'AD_OrgTrx_ID',TO_TIMESTAMP('2008-12-16 17:53:00','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Org_ID@','Performing or initiating organization','D',22,'The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','N','N','N','N','N','Y','N','N','N','N','N','Trx Organization',0,TO_TIMESTAMP('2008-12-16 17:53:00','YYYY-MM-DD HH24:MI:SS'),0,1) +; + +-- Dec 16, 2008 5:53:01 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56534 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:53:12 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Val_Rule_ID=130, DefaultValue=NULL,Updated=TO_TIMESTAMP('2008-12-16 17:53:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 5:53:31 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2008-12-16 17:53:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 5:53:33 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportColumn ADD COLUMN AD_OrgTrx_ID NUMERIC(10) +; + +-- Dec 16, 2008 5:55:16 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56535,53716,0,20,450,'IsIncludeNullsOrgTrx',TO_TIMESTAMP('2008-12-16 17:55:16','YYYY-MM-DD HH24:MI:SS'),0,'N','Include nulls in the selection of the organization transaction','D',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Include Nulls in Org Trx',0,TO_TIMESTAMP('2008-12-16 17:55:16','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Dec 16, 2008 5:55:16 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56535 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:55:19 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportSource ADD COLUMN IsIncludeNullsOrgTrx CHAR(1) DEFAULT 'N' CHECK (IsIncludeNullsOrgTrx IN ('Y','N')) NOT NULL +; + +-- Dec 16, 2008 5:55:54 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56536,112,0,19,450,130,'AD_OrgTrx_ID',TO_TIMESTAMP('2008-12-16 17:55:54','YYYY-MM-DD HH24:MI:SS'),0,NULL,'Performing or initiating organization','D',22,'The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Trx Organization',0,TO_TIMESTAMP('2008-12-16 17:55:54','YYYY-MM-DD HH24:MI:SS'),0,1) +; + +-- Dec 16, 2008 5:55:54 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56536 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- Dec 16, 2008 5:55:58 PM ECT +-- Financial Report Source with Type Combination +ALTER TABLE PA_ReportSource ADD COLUMN AD_OrgTrx_ID NUMERIC(10) +; + +-- Dec 16, 2008 5:56:42 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56535,56515,0,377,TO_TIMESTAMP('2008-12-16 17:56:41','YYYY-MM-DD HH24:MI:SS'),0,'Include nulls in the selection of the organization transaction',1,'D','Y','Y','Y','N','N','N','N','N','Include Nulls in Org Trx',TO_TIMESTAMP('2008-12-16 17:56:41','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:56:42 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56515 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:56:43 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56536,56516,0,377,TO_TIMESTAMP('2008-12-16 17:56:42','YYYY-MM-DD HH24:MI:SS'),0,'Performing or initiating organization',22,'D','The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','Y','N','N','N','N','N','Trx Organization',TO_TIMESTAMP('2008-12-16 17:56:42','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:56:43 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56516 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=56516 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=56515 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=4805 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=56285 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=4816 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=56287 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=4807 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=56291 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=4808 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=56289 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=4806 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56292 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=4809 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56293 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=4810 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56286 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=4817 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56288 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56283 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56294 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=56284 +; + +-- Dec 16, 2008 5:57:13 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56295 +; + +-- Dec 16, 2008 5:57:42 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=OO | @ElementType@=OT | @ElementType@=CO',Updated=TO_TIMESTAMP('2008-12-16 17:57:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56516 +; + +-- Dec 16, 2008 5:57:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=CO', IsSameLine='Y',Updated=TO_TIMESTAMP('2008-12-16 17:57:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56515 +; + +-- Dec 16, 2008 5:58:32 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56533,56517,0,374,TO_TIMESTAMP('2008-12-16 17:58:29','YYYY-MM-DD HH24:MI:SS'),0,'Include nulls in the selection of the organization transaction',1,'D','Y','Y','Y','N','N','N','N','N','Include Nulls in Org Trx',TO_TIMESTAMP('2008-12-16 17:58:29','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:58:32 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56517 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:58:34 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56534,56518,0,374,TO_TIMESTAMP('2008-12-16 17:58:32','YYYY-MM-DD HH24:MI:SS'),0,'Performing or initiating organization',22,'D','The organization which performs or initiates this transaction (for another organization). The owning Organization may not be the transaction organization in a service bureau environment, with centralized services, and inter-organization transactions.','Y','Y','Y','N','N','N','N','N','Trx Organization',TO_TIMESTAMP('2008-12-16 17:58:32','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Dec 16, 2008 5:58:34 PM ECT +-- Financial Report Source with Type Combination +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56518 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56518 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56517 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=4765 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56296 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=4766 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56302 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=4777 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56299 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=4776 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=56298 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=4775 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=56303 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=4767 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=56300 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=4768 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=56304 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=4769 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56297 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=56281 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56305 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56282 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56306 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=56375 +; + +-- Dec 16, 2008 5:58:54 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=56376 +; + +-- Dec 16, 2008 5:59:23 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=OO | @ElementType@=OT | @ElementType@=CO',Updated=TO_TIMESTAMP('2008-12-16 17:59:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56518 +; + +-- Dec 16, 2008 5:59:33 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Field SET DisplayLogic='@ElementType@=CO', IsSameLine='Y',Updated=TO_TIMESTAMP('2008-12-16 17:59:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=56517 +; + +-- Dec 16, 2008 6:02:22 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Reference_ID=18, AD_Reference_Value_ID=130,Updated=TO_TIMESTAMP('2008-12-16 18:02:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56536 +; + +-- Dec 16, 2008 6:02:57 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Reference_ID=18, AD_Reference_Value_ID=130,Updated=TO_TIMESTAMP('2008-12-16 18:02:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 6:06:27 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Val_Rule_ID=NULL,Updated=TO_TIMESTAMP('2008-12-16 18:06:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; + +-- Dec 16, 2008 6:06:44 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET AD_Val_Rule_ID=NULL,Updated=TO_TIMESTAMP('2008-12-16 18:06:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56536 +; + +-- Dec 16, 2008 6:19:23 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2008-12-16 18:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56536 +; + +-- Dec 16, 2008 6:19:56 PM ECT +-- Financial Report Source with Type Combination +UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2008-12-16 18:19:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=56534 +; +