diff --git a/migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql b/migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql new file mode 100644 index 0000000000..c873017c3d --- /dev/null +++ b/migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql @@ -0,0 +1,22 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-1052: Improve Performance using Search instead of Table/Table Direct +-- Jul 30, 2018 4:01:01 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200590 +; + +-- Jul 30, 2018 4:01:07 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2018-07-30 16:01:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Jul 30, 2018 4:01:21 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200593 +; + +-- Jul 30, 2018 4:01:33 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200595 +; + +SELECT register_migration_script('201807301600_IDEMPIERE-1052.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql b/migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql new file mode 100644 index 0000000000..64e28e1857 --- /dev/null +++ b/migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql @@ -0,0 +1,10 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3770: Translation : export only centralized data +-- Aug 2, 2018 3:36:33 PM CEST +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Only centralized data',0,0,'Y',TO_DATE('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,200481,'OnlyCentralizedData','D','f43c0cce-0462-4247-baf6-e7da842152ab') +; + +SELECT register_migration_script('201808021530_IDEMPIERE-3770.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql b/migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..bf60f99760 --- /dev/null +++ b/migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql @@ -0,0 +1,26 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3780 : AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY +-- Aug 31, 2018 11:49:36 AM CEST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203266,0,0,'Y',TO_DATE('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,'IsNoExpire','No Expire','No Expire','D','86e9d8d5-35c5-4ba1-85d3-d674d8f48a2f') +; + +-- Aug 31, 2018 11:50:17 AM CEST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213690,0,'No Expire',114,'IsNoExpire','N',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_DATE('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,203266,'Y','N','D','N','N','N','Y','27a982d2-604b-4efe-982c-6e5004e62072','N',0,'N','Y','N') +; + +-- Aug 31, 2018 11:50:19 AM CEST +ALTER TABLE AD_User ADD IsNoExpire CHAR(1) DEFAULT 'N' CHECK (IsNoExpire IN ('Y','N')) NOT NULL +; + +-- Aug 31, 2018 11:50:38 AM CEST +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (205827,'No Expire',118,213690,'Y',1,440,'N','N','N','N',0,0,'Y',TO_DATE('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','f96b4141-f3b9-45da-917f-23f9ddc80071','Y',3220,2,2) +; + +-- Aug 31, 2018 11:51:05 AM CEST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-08-31 11:51:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201808311200_IDEMPIERE-3780.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql b/migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql new file mode 100644 index 0000000000..27b174ee52 --- /dev/null +++ b/migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql @@ -0,0 +1,10 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded +-- Sep 11, 2018 4:29:18 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644') +; + +SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual +; diff --git a/migration/i6.1/oracle/201811271750_RevenueRecognitionAdaxa.sql b/migration/i6.1/oracle/201811271750_RevenueRecognitionAdaxa.sql new file mode 100644 index 0000000000..3e35409b22 --- /dev/null +++ b/migration/i6.1/oracle/201811271750_RevenueRecognitionAdaxa.sql @@ -0,0 +1,322 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- File = 3820_Revenue_recognition.xml +-- Migration Revenue recognition, SeqNo=3820 +-- Step SeqNo = 10, StepType = AD +INSERT INTO AD_Table(AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AccessLevel,Created,CreatedBy,Description,EntityType,IsActive,IsCentrallyMaintained,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy,AD_Table_UU) VALUES (0,0,53888,174,'1',TO_DATE('2014-10-28 11:39:41','YYYY-MM-DD HH24:MI:SS'),100,'Plan for recognizing or recording revenue based on service','D','Y','Y','N','Y','N','N','N','135','Revenue Recognition Service','L','C_RevenueRecognition_Service',TO_DATE('2014-10-28 11:39:41','YYYY-MM-DD HH24:MI:SS'),100,'833c94dc-3df8-4105-99a6-e224969e01f7'); + +-- Step SeqNo = 20, StepType = AD +INSERT INTO AD_Sequence(AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy,AD_Sequence_UU) VALUES (0,0,54047,TO_DATE('2014-10-28 11:39:46','YYYY-MM-DD HH24:MI:SS'),100,'1000000','50000','Table C_RevenueRecognition_Service','1','Y','N','Y','Y','C_RevenueRecognition_Service','N','1000000',TO_DATE('2014-10-28 11:39:46','YYYY-MM-DD HH24:MI:SS'),100,'3681cc25-0bec-40f0-943a-560503ad9e3e'); + +-- Step SeqNo = 30, StepType = AD +INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Client_ID@',74644,53888,'D','1','Y','N','N','0',100,TO_DATE('2014-10-28 11:40:47','YYYY-MM-DD HH24:MI:SS'),'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',0,'N','Y','22','N',19,TO_DATE('2014-10-28 11:40:47','YYYY-MM-DD HH24:MI:SS'),129,'N',102,100,'N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client','N',0,'162ba895-dbf1-415a-8263-7afd1698ed42'); + +-- Step SeqNo = 40, StepType = AD +INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Org_ID@',74645,53888,'D','1','Y','N','N','0',100,TO_DATE('2014-10-28 11:40:51','YYYY-MM-DD HH24:MI:SS'),'An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.',0,'N','Y','22','N',19,TO_DATE('2014-10-28 11:40:51','YYYY-MM-DD HH24:MI:SS'),130,'N',113,100,'N','N','N','AD_Org_ID','Organisational entity within client','Organisation','N',0,'a0cc2c33-4222-48f5-b976-a1a3aba834ea'); + +-- Step SeqNo = 80, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74649,53888,'D','1','Y','N','Y','1',100,TO_DATE('2014-10-28 11:41:06','YYYY-MM-DD HH24:MI:SS'),'The Revenue Recognition indicates how revenue will be recognized for this product',0,'Y','Y','22','N',19,TO_DATE('2014-10-28 11:41:06','YYYY-MM-DD HH24:MI:SS'),'N',1078,100,'N','N','N','C_RevenueRecognition_ID','Method for recording revenue','Revenue Recognition','N',0,'4678f5ff-a1cb-4cd4-8803-b1b3e38ad2fc'); + +-- Step SeqNo = 90, StepType = AD +INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57527,0,'C_RevenueRecognition_Service_I',TO_DATE('2014-10-28 11:41:10','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Revenue Recognition Service','Revenue Recognition Service',TO_DATE('2014-10-28 11:41:10','YYYY-MM-DD HH24:MI:SS'),100,'11df9ee7-d5b8-44a5-88f2-dedaa9cd44df'); + +-- Step SeqNo = 100, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74650,53888,'D','1','Y','N','N','0',100,TO_DATE('2014-10-28 11:41:09','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','22','N',13,TO_DATE('2014-10-28 11:41:09','YYYY-MM-DD HH24:MI:SS'),'Y',57527,100,'N','N','N','C_RevenueRecognition_Service_I','Revenue Recognition Service','N',0,'ddada063-14b9-4a03-8f4b-6d57a5dd1ce2'); + +-- Step SeqNo = 110, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74651,53888,'D','1','Y','N','N','0',100,TO_DATE('2014-10-28 11:41:16','YYYY-MM-DD HH24:MI:SS'),'The Created field indicates the date that this record was created.',0,'N','Y','7','N',16,TO_DATE('2014-10-28 11:41:16','YYYY-MM-DD HH24:MI:SS'),'N',245,100,'N','N','N','Created','Date this record was created','Created','N',0,'0ed8bf8e-ea79-4233-a370-f51af2839fbb'); + +-- Step SeqNo = 120, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74652,53888,'D','1',110,'Y','N','N','0',100,TO_DATE('2014-10-28 11:41:20','YYYY-MM-DD HH24:MI:SS'),'The Created By field indicates the user who created this record.',0,'N','Y','22','N',18,TO_DATE('2014-10-28 11:41:20','YYYY-MM-DD HH24:MI:SS'),'N',246,100,'N','N','N','CreatedBy','User who created this records','Created By','N',0,'f5eabfcf-d99f-4cee-b0e6-f0fc0ce73e0a'); + +-- Step SeqNo = 130, StepType = AD +INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('Y',74653,53888,'D','1','Y','N','N','0',100,TO_DATE('2014-10-28 11:41:24','YYYY-MM-DD HH24:MI:SS'),'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',0,'N','Y','1','N',20,TO_DATE('2014-10-28 11:41:24','YYYY-MM-DD HH24:MI:SS'),'N',348,100,'N','Y','N','IsActive','The record is active in the system','Active','N',0,'4496768c-7a55-4d49-9294-45edb4528ff6'); + +-- Step SeqNo = 180, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74658,53888,'D','1','Y','N','N','0',100,TO_DATE('2014-10-28 11:41:43','YYYY-MM-DD HH24:MI:SS'),'The Updated field indicates the date that this record was updated.',0,'N','Y','7','N',16,TO_DATE('2014-10-28 11:41:43','YYYY-MM-DD HH24:MI:SS'),'N',607,100,'N','N','N','Updated','Date this record was updated','Updated','N',0,'9384d25d-e719-4db4-b640-0b14c4ae3e58'); + +-- Step SeqNo = 190, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74659,53888,'D','1',110,'Y','N','N','0',100,TO_DATE('2014-10-28 11:41:47','YYYY-MM-DD HH24:MI:SS'),'The Updated By field indicates the user who updated this record.',0,'N','Y','22','N',18,TO_DATE('2014-10-28 11:41:47','YYYY-MM-DD HH24:MI:SS'),'N',608,100,'N','N','N','UpdatedBy','User who updated this records','Updated By','N',0,'6a938db8-5b02-45a6-a64a-cb3af8e74352'); + +-- Step SeqNo = 200, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74660,53888,'D','0','N','N','N','0',100,TO_DATE('2014-10-28 11:47:05','YYYY-MM-DD HH24:MI:SS'),'A description is limited to 255 characters.',0,'N','Y','255','Y',10,TO_DATE('2014-10-28 11:47:05','YYYY-MM-DD HH24:MI:SS'),'N',275,100,'N','Y','N','Y','N','Description','Optional short description of the record','Description','N',0,'N','f4c5aef9-310c-4c84-8f23-397c1c185dc2'); + +-- Step SeqNo = 210, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74661,53888,'D','0','N','N','N','0',100,TO_DATE('2014-10-28 11:48:18','YYYY-MM-DD HH24:MI:SS'),'The Percent indicates the percentage used.',0,'N','Y','10','N',12,TO_DATE('2014-10-28 11:48:18','YYYY-MM-DD HH24:MI:SS'),'N',951,100,'N','Y','N','Y','N','Percent','Percentage','Percent','N',0,'N','82a993ff-84fc-48d1-90cf-278d8932d3d9'); + +-- Step SeqNo = 220, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74662,53888,'D','0','N','N','N','0',100,TO_DATE('2014-10-28 11:48:54','YYYY-MM-DD HH24:MI:SS'),'Indicates the unique line for a document. It will also control the display order of the lines within a document.',0,'N','Y','10','N',11,TO_DATE('2014-10-28 11:48:54','YYYY-MM-DD HH24:MI:SS'),'N',439,100,'N','Y','N','Y','N','Line','Unique line for this document','Line No','N',0,'N','cec34917-4f48-4420-beb5-1fc18e678ff5'); + +-- Step SeqNo = 230, StepType = AD +INSERT INTO AD_Tab(AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy,AD_Tab_UU) VALUES (0,74649,0,54010,53888,174,TO_DATE('2014-10-28 11:51:07','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Service','N','15','1',TO_DATE('2014-10-28 11:51:07','YYYY-MM-DD HH24:MI:SS'),100,'1318769d-126e-4dff-845a-91986295d34f'); + +-- Step SeqNo = 240, StepType = AD +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,AD_Field_UU) VALUES (0,74653,74741,0,54010,TO_DATE('2014-10-28 11:51:16','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system','1','D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2014-10-28 11:51:16','YYYY-MM-DD HH24:MI:SS'),100,'a9be764b-77e8-43ab-aca6-3d7ebf3a431c'); + +-- Step SeqNo = 250, StepType = AD +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,AD_Field_UU) VALUES (0,74644,74742,0,54010,TO_DATE('2014-10-28 11:51:19','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','22','D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2014-10-28 11:51:19','YYYY-MM-DD HH24:MI:SS'),100,'89c58d7c-c56a-4325-a7e5-00d6b9993867'); + +-- Step SeqNo = 260, StepType = AD +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,AD_Field_UU) VALUES (0,74660,74743,0,54010,TO_DATE('2014-10-28 11:51:23','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','255','D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2014-10-28 11:51:23','YYYY-MM-DD HH24:MI:SS'),100,'61a18e8d-1a14-4335-abca-d055ec25f634'); + +-- Step SeqNo = 270, StepType = AD +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,AD_Field_UU) VALUES (0,74662,74744,0,54010,TO_DATE('2014-10-28 11:51:26','YYYY-MM-DD HH24:MI:SS'),100,'Unique line for this document','10','D','Indicates the unique line for a document. It will also control the display order of the lines within a document.','Y','Y','Y','N','N','N','N','N','Line No',TO_DATE('2014-10-28 11:51:26','YYYY-MM-DD HH24:MI:SS'),100,'30b213d1-479a-41dd-beb3-11ab483119df'); + +-- Step SeqNo = 280, StepType = AD +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,AD_Field_UU) VALUES (0,74645,74745,0,54010,TO_DATE('2014-10-28 11:51:29','YYYY-MM-DD HH24:MI:SS'),100,'Organisational entity within client','22','D','An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.','Y','Y','Y','N','N','N','N','N','Organisation',TO_DATE('2014-10-28 11:51:29','YYYY-MM-DD HH24:MI:SS'),100,'769dcd46-ed5e-462e-9c53-cc8ce1761e8c'); + +-- Step SeqNo = 290, StepType = AD +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,AD_Field_UU) VALUES (0,74661,74746,0,54010,TO_DATE('2014-10-28 11:51:31','YYYY-MM-DD HH24:MI:SS'),100,'Percentage','10','D','The Percent indicates the percentage used.','Y','Y','Y','N','N','N','N','N','Percent',TO_DATE('2014-10-28 11:51:31','YYYY-MM-DD HH24:MI:SS'),100,'ccfd985b-8d28-4fe7-ad04-b10a331014fe'); + +-- Step SeqNo = 300, StepType = AD +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,AD_Field_UU) VALUES (0,74649,74747,0,54010,TO_DATE('2014-10-28 11:51:35','YYYY-MM-DD HH24:MI:SS'),100,'Method for recording revenue','22','D','The Revenue Recognition indicates how revenue will be recognized for this product','Y','Y','Y','N','N','N','N','N','Revenue Recognition',TO_DATE('2014-10-28 11:51:35','YYYY-MM-DD HH24:MI:SS'),100,'335a8b7b-90bf-4436-8c69-cf5225b95be7'); + +-- Step SeqNo = 310, StepType = AD +INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74650,74748,0,54010,TO_DATE('2014-10-28 11:51:38','YYYY-MM-DD HH24:MI:SS'),100,'22','D','Y','Y','N','N','N','N','N','N','Revenue Recognition Service',TO_DATE('2014-10-28 11:51:38','YYYY-MM-DD HH24:MI:SS'),100,'df66a794-719b-426e-82a7-e67bf0b636b5'); + +-- Step SeqNo = 320, StepType = AD +UPDATE AD_Field SET IsDisplayed='N',SeqNo='0' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 330, StepType = AD +UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=74742; + +-- Step SeqNo = 340, StepType = AD +UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 350, StepType = AD +UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=74747; + +-- Step SeqNo = 360, StepType = AD +UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=74744; + +-- Step SeqNo = 370, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 380, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74743; + +-- Step SeqNo = 390, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 400, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 410, StepType = AD +UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74742; + +-- Step SeqNo = 420, StepType = AD +UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 430, StepType = AD +UPDATE AD_Tab SET Parent_Column_ID=3918 WHERE AD_Tab_ID=54010; + +-- Step SeqNo = 440, StepType = AD +UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(Line),0)+10 FROM C_RevenueRecognition_Service WHERE C_RevenueRecognition_ID=@C_RevenueRecognition_ID@' WHERE AD_Column_ID=74662; + +-- Step SeqNo = 450, StepType = AD +UPDATE AD_Tab SET DisplayLogic='@IsTimeBased@=''N''' WHERE AD_Tab_ID=54010; + +-- Step SeqNo = 460, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4834; + +-- Step SeqNo = 470, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4832; + +-- Step SeqNo = 480, StepType = AD +UPDATE AD_Window SET WinHeight='500',WinWidth='1000' WHERE AD_Window_ID=174; + +-- Step SeqNo = 490, StepType = AD +UPDATE AD_Element SET ColumnName='C_RevenueRecog_Service_ID' WHERE AD_Element_ID=57527; + +-- Step SeqNo = 500, StepType = AD +UPDATE AD_Table SET TableName='C_RevenueRecog_Service' WHERE AD_Table_ID=53888; + +-- Step SeqNo = 520, StepType = AD +INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57528,0,'DateRecognized',TO_DATE('2014-10-28 12:14:14','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Recognition Date','Recognition Date',TO_DATE('2014-10-28 12:14:14','YYYY-MM-DD HH24:MI:SS'),100,'1af0f323-b3d0-4750-9da9-fc96cc248aa6'); + +-- Step SeqNo = 530, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74663,444,'D','0','N','N','N','0',100,TO_DATE('2014-10-28 12:14:41','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','7','N',15,TO_DATE('2014-10-28 12:14:41','YYYY-MM-DD HH24:MI:SS'),'N',57528,100,'N','Y','N','Y','N','DateRecognized','Recognition Date','N',0,'N','a2a2f66a-e6da-4858-bdae-68f8b3f6798c'); + +-- Step SeqNo = 540, StepType = AD +INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74663,74749,0,379,TO_DATE('2014-10-28 12:47:32','YYYY-MM-DD HH24:MI:SS'),100,'7','D','Y','Y','Y','N','N','N','N','N','Recognition Date',TO_DATE('2014-10-28 12:47:32','YYYY-MM-DD HH24:MI:SS'),100,'a27b2876-5b35-4325-9013-6553458347a8'); + +-- Step SeqNo = 550, StepType = AD +UPDATE AD_Field SET SeqNo='0' WHERE AD_Field_ID=4829; + +-- Step SeqNo = 560, StepType = AD +UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=4830; + +-- Step SeqNo = 570, StepType = AD +UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=4834; + +-- Step SeqNo = 580, StepType = AD +UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=4831; + +-- Step SeqNo = 590, StepType = AD +UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=4835; + +-- Step SeqNo = 600, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74749; + +-- Step SeqNo = 610, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=4832; + +-- Step SeqNo = 620, StepType = AD +UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4833; + +-- Step SeqNo = 630, StepType = AD +UPDATE AD_Tab SET IsReadOnly='N' WHERE AD_Tab_ID=379; + +-- Step SeqNo = 640, StepType = AD +INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_DATE('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_DATE('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'C_RevenueRecognition','48c2742a-be9f-40fb-94eb-85297a7fca49'); + +-- Step SeqNo = 650, StepType = AD +INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_DATE('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_DATE('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'b21af721-dab7-4632-a49c-a9f3cbef22b1'); + +-- Step SeqNo = 660, StepType = AD +INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct',TO_DATE('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'D','0','Y','Y','Y','N','Date','20',TO_DATE('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'9d9daf55-fe52-4b7d-896e-6d45880e6566'); + +-- Step SeqNo = 670, StepType = AD +UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003; + +-- Step SeqNo = 680, StepType = AD +INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_DATE('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_DATE('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'c5723c3d-419a-406c-a33f-b5edf481e652'); + +-- Step SeqNo = 690, StepType = AD +INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_DATE('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_DATE('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'7e9b6837-4f50-4fb7-b7ae-78bbb2a77ba0'); + +-- Step SeqNo = 700, StepType = AD +UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710; + +-- Step SeqNo = 710, StepType = AD +UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885; + +-- Step SeqNo = 720, StepType = AD +UPDATE AD_Tab SET OrderByClause='C_RevenueRecognition_Run.C_RevenueRecognition_Run_ID' WHERE AD_Tab_ID=379; + +-- Step SeqNo = 730, StepType = AD +UPDATE AD_Tab SET AD_Column_ID=5983 WHERE AD_Tab_ID=379; + +-- Step SeqNo = 740, StepType = SQL +--ALTER TABLE c_revenuerecognition_run ALTER COLUMN gl_journal_id DROP NOT NULL; + + +-- File = 3830_revenue_recognition_process.xml +-- Migration Revenue recognition process, SeqNo=3830 +-- Step SeqNo = 10, StepType = AD +--INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_DATE('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_DATE('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'C_RevenueRecognition','6b4adee2-46d2-422e-9dc7-4ab88b4caacb'); + +-- Step SeqNo = 20, StepType = AD +--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_DATE('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_DATE('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'e96484b3-b7de-4217-9337-be9ff72da09b'); + +-- Step SeqNo = 30, StepType = AD +--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct',TO_DATE('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'D','0','Y','Y','Y','N','Date','20',TO_DATE('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'c0f66c1a-59b6-4e54-a09e-cd9fc6acf4bc'); + +-- Step SeqNo = 40, StepType = AD +--UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003; + +-- Step SeqNo = 50, StepType = AD +--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_DATE('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_DATE('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'ef1332d8-a888-43fb-b0d8-99ff37e05ac0'); + +-- Step SeqNo = 60, StepType = AD +--INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_DATE('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_DATE('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'63ae1179-1642-4529-ad26-0cfa0f4226c6'); + +-- Step SeqNo = 70, StepType = AD +UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710; + +-- Step SeqNo = 80, StepType = AD +UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885; + +-- File = 4760_Rev_recog_update.xml +-- Migration Revenue recognition changes, SeqNo=4760 +-- Step SeqNo = 10, StepType = AD +UPDATE AD_Column SET IsMandatory='N' WHERE AD_Column_ID=5984; + +-- Step SeqNo = 20, StepType = AD +UPDATE AD_Field SET IsDisplayed='Y',SeqNo='40' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 30, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74744; + +-- Step SeqNo = 40, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 50, StepType = AD +UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=74743; + +-- Step SeqNo = 60, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 70, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74742; + +-- Step SeqNo = 80, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 90, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74747; + +-- Step SeqNo = 100, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 110, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74744; + +-- Step SeqNo = 120, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 130, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74743; + +-- Step SeqNo = 140, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74749; + +-- Step SeqNo = 150, StepType = AD +INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (444,'D','0','N','N','N','0','N','10','N',19,'N','N','N',57527,'N','Y','N','Y','N','C_RevenueRecog_Service_ID','Revenue Recognition Service','Y',100,TO_DATE('2015-08-26 00:38:16','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2015-08-26 00:38:16','YYYY-MM-DD HH24:MI:SS'),100,77928,0,'e3f17477-6545-4694-bac4-6280147344f3'); + +-- Step SeqNo = 160, StepType = AD +INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,EntityType,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_DATE('2015-08-26 00:38:27','YYYY-MM-DD HH24:MI:SS'),'10','Y','N','N',77928,'N','Y',379,'N','D','Revenue Recognition Service',100,'Y',0,100,TO_DATE('2015-08-26 00:38:27','YYYY-MM-DD HH24:MI:SS'),77047,0,'a186c69e-44d7-45dc-a461-98dfd8238f1c'); + +-- Step SeqNo = 170, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=77047; + +-- Step SeqNo = 180, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74749; + +-- Step SeqNo = 190, StepType = AD +UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4832; + +-- Step SeqNo = 200, StepType = AD +UPDATE AD_Field SET SeqNo='80' WHERE AD_Field_ID=4833; + +-- Step SeqNo = 210, StepType = AD +UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=77047; + +-- Step SeqNo = 220, StepType = AD +UPDATE AD_Column SET IsIdentifier='Y',SeqNo='2' WHERE AD_Column_ID=74662; + +-- Step SeqNo = 230, StepType = AD +UPDATE AD_Column SET IsIdentifier='Y',SeqNo='3' WHERE AD_Column_ID=74660; + +-- Step SeqNo = 240, StepType = AD +INSERT INTO AD_Element(ColumnName,AD_Client_ID,Help,EntityType,Name,Description,PrintName,Created,Updated,IsActive,CreatedBy,UpdatedBy,AD_Element_ID,AD_Org_ID,AD_Element_UU) VALUES ('FixedRecogDay',0,'The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Fixed recognition day','Day of the period recognition occurs','Fixed recognition day',TO_DATE('2015-08-26 11:13:46','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2015-08-26 11:13:46','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,58294,0,'06ed8fd6-89bf-4596-9a7a-6040bf80cebf'); + +-- Step SeqNo = 250, StepType = AD +INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (336,'D','0','N','N','N','0','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','N','22','N',11,'N','N','N',58294,'N','Y','N','Y','N','FixedRecogDay','Day of the period recognition occurs','Fixed recognition day','Y',100,TO_DATE('2015-08-26 11:14:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2015-08-26 11:14:02','YYYY-MM-DD HH24:MI:SS'),100,77929,0,'8ec4b7bc-4426-44c1-b42c-6f4be1ee02bd'); + +-- Step SeqNo = 260, StepType = AD +INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_DATE('2015-08-26 11:14:16','YYYY-MM-DD HH24:MI:SS'),'22','Y','N','N',77929,'N','Y',272,'N','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Day of the period recognition occurs','Fixed recognition day',100,'Y',0,100,TO_DATE('2015-08-26 11:14:16','YYYY-MM-DD HH24:MI:SS'),77048,0,'d361f6e4-0597-4ab6-b511-cfdda309ed36'); + +-- Step SeqNo = 270, StepType = AD +UPDATE AD_Field SET DisplayLogic='@IsTimeBased@=Y' WHERE AD_Field_ID=77048; + +SELECT register_migration_script('201811271750_RevenueRecognitionAdaxa.sql') FROM dual +; + diff --git a/migration/i6.1/oracle/201811271928_RevenueRecognitionPR.sql b/migration/i6.1/oracle/201811271928_RevenueRecognitionPR.sql new file mode 100644 index 0000000000..3184c403ca --- /dev/null +++ b/migration/i6.1/oracle/201811271928_RevenueRecognitionPR.sql @@ -0,0 +1,680 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3837 Revenue Recognition +-- Nov 27, 2018, 7:19:23 PM CET +UPDATE AD_Window SET IsActive='Y',Updated=TO_DATE('2018-11-27 19:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=174 +; + +-- Nov 27, 2018, 7:19:23 PM CET +UPDATE AD_Menu SET Name='Revenue Recognition', Description='Revenue Recognition Rules', IsActive='Y',Updated=TO_DATE('2018-11-27 19:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=186 +; + +-- Nov 27, 2018, 7:19:23 PM CET +UPDATE AD_WF_Node SET Name='Revenue Recognition', Description='Revenue Recognition Rules', IsActive='Y',Updated=TO_DATE('2018-11-27 19:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_WF_Node_ID=50098 +; + +-- Nov 27, 2018, 7:20:09 PM CET +ALTER TABLE C_RevenueRecognition ADD FixedRecogDay NUMBER(10) DEFAULT NULL +; + +-- Nov 27, 2018, 7:20:45 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='ADClient_CRevenueRecogService', FKConstraintType='N',Updated=TO_DATE('2018-11-27 19:20:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74644 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='ADOrg_CRevenueRecogService', FKConstraintType='N',Updated=TO_DATE('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74645 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='CreatedBy_CRevenueRecogService', FKConstraintType='N',Updated=TO_DATE('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74652 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsUpdateable='N', IsToolbarButton='N', FKConstraintName='CRevenueRecognition_CRevenueRe', FKConstraintType='N',Updated=TO_DATE('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74649 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='UpdatedBy_CRevenueRecogService', FKConstraintType='N',Updated=TO_DATE('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74659 +; + +-- Nov 27, 2018, 7:20:46 PM CET +CREATE TABLE C_RevenueRecog_Service (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, C_RevenueRecognition_ID NUMBER(10) NOT NULL, C_RevenueRecog_Service_ID NUMBER(10) NOT NULL, Description VARCHAR2(255) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Line NUMBER(10) DEFAULT NULL , Percent NUMBER DEFAULT NULL , Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT C_RevenueRecog_Service_Key PRIMARY KEY (C_RevenueRecog_Service_ID)) +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT ADClient_CRevenueRecogService FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT ADOrg_CRevenueRecogService FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT CreatedBy_CRevenueRecogService FOREIGN KEY (CreatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT CRevenueRecognition_CRevenueRe FOREIGN KEY (C_RevenueRecognition_ID) REFERENCES c_revenuerecognition(c_revenuerecognition_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT UpdatedBy_CRevenueRecogService FOREIGN KEY (UpdatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:21:11 PM CET +ALTER TABLE C_RevenueRecognition_Run MODIFY GL_Journal_ID NUMBER(10) DEFAULT NULL +; + +-- Nov 27, 2018, 7:21:27 PM CET +ALTER TABLE C_RevenueRecognition_Run ADD DateRecognized DATE DEFAULT NULL +; + +-- Nov 27, 2018, 7:21:35 PM CET +UPDATE AD_Column SET IsToolbarButton='N', FKConstraintName='CRevenueRecogService_CRevenueR', FKConstraintType='N',Updated=TO_DATE('2018-11-27 19:21:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=77928 +; + +-- Nov 27, 2018, 7:21:35 PM CET +ALTER TABLE C_RevenueRecognition_Run ADD C_RevenueRecog_Service_ID NUMBER(10) DEFAULT NULL +; + +-- Nov 27, 2018, 7:21:35 PM CET +ALTER TABLE C_RevenueRecognition_Run ADD CONSTRAINT CRevenueRecogService_CRevenueR FOREIGN KEY (C_RevenueRecog_Service_ID) REFERENCES c_revenuerecog_service(c_revenuerecog_service_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:22:22 PM CET +UPDATE AD_Sequence SET Name='C_RevenueRecog_Service', Description='Table C_RevenueRecog_Service',Updated=TO_DATE('2018-11-27 19:22:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Sequence_ID=54047 +; + +-- Nov 27, 2018, 7:26:38 PM CET +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203286,0,0,'Y',TO_DATE('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,'C_RevenueRecog_Service_UU','C_RevenueRecog_Service_UU','C_RevenueRecog_Service_UU','U','ec9dbc11-467b-45c4-912b-cab4291bdd60') +; + +-- Nov 27, 2018, 7:26:39 PM CET +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (213821,1.0,'C_RevenueRecog_Service_UU',53888,'C_RevenueRecog_Service_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_DATE('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,203286,'Y','N','U','N','f9c7c4a1-a23e-46a4-b9c8-3fd103fb31bf','N') +; + +-- Nov 27, 2018, 7:26:39 PM CET +ALTER TABLE C_RevenueRecog_Service ADD C_RevenueRecog_Service_UU VARCHAR2(36) DEFAULT NULL +; + +-- Nov 27, 2018, 7:26:39 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT C_RevenueRecog_Service_UU_idx UNIQUE (C_RevenueRecog_Service_UU) +; + +-- Nov 27, 2018, 10:46:24 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:46:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4834 +; + +-- Nov 27, 2018, 10:46:24 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:46:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4832 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4830 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4829 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4834 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4831 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4835 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4833 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74749 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4832 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=77047 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsAllowCopy='Y', XPosition=3, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74745 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74741 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74746 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=3, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74743 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74748 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74745 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74747 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74748 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74742 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74744 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74746 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74743 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74741 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4820 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4819 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4821 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4818 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4857 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4822 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4827 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4825 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4828 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4826 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4823 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4824 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=77047 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4831 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4834 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=74749 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4832 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4833 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=sysdate, UpdatedBy=100 WHERE AD_Field_ID=4835 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11767 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5529 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5431 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3079 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53577 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4821 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_DATE('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53875 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3079 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1025 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2587 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5888 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6129 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1032 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1031 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201343 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6841 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10411 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1026 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200294 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200295 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200296 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200297 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7646 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1319 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1320 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1321 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1322 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3743 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3746 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3747 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3744 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3745 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1027 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1028 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1568 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1569 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5381 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=460, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5383 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=470, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12418 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=480, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5910 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=490, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5911 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=500, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6130 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=510, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8307 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=520, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6343 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=530, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6344 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=540, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58973 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=550, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8608 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=560, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8613 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=570, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52015 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=580, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52016 +; + +-- Nov 28, 2018, 12:27:46 AM CET +UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(Line),0)+10 FROM C_RevenueRecog_Service WHERE C_RevenueRecognition_ID=@C_RevenueRecognition_ID@', IsToolbarButton='N',Updated=TO_DATE('2018-11-28 00:27:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74662 +; + +-- Nov 28, 2018, 12:30:11 AM CET +UPDATE AD_Field SET IsActive='Y', IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:30:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3927 +; + +-- Nov 28, 2018, 12:30:32 AM CET +UPDATE AD_Field SET IsActive='Y', IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:30:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3853 +; + +UPDATE c_bp_group_acct +SET unearnedrevenue_acct=(SELECT unearnedrevenue_acct FROM c_acctschema_default WHERE c_acctschema_default.c_acctschema_id=c_bp_group_acct.c_acctschema_id) +WHERE unearnedrevenue_acct IS NULL; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=10, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3007 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3008 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3013 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3010 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3012 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3011 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3015 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3014 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=77048 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3009 +; + +-- Nov 28, 2018, 12:39:51 AM CET +ALTER TABLE C_RevenueRecognition_Run MODIFY GL_Journal_ID NUMBER(10) DEFAULT NULL +; + +-- Nov 28, 2018, 12:39:51 AM CET +ALTER TABLE C_RevenueRecognition_Run MODIFY GL_Journal_ID NULL +; + +-- Nov 28, 2018, 12:57:53 AM CET +INSERT INTO AD_TreeNodeMM (AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,SeqNo,AD_Tree_ID,Node_ID,AD_Client_ID,AD_TreeNodeMM_UU) VALUES (0,'Y',TO_DATE('2018-11-28 00:57:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-11-28 00:57:53','YYYY-MM-DD HH24:MI:SS'),100,0,10,53885,0,'4a31b4dd-998f-48e4-ab69-0129052f5a04') +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53242 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53296 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53014 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53108 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=164 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=280 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=158 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=522 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200008 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=118 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53288 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=169 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53289 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=433 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53290 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=352 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=434 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=435 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200045 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200046 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=16, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200019 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=17, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53885 +; + +-- Nov 28, 2018, 1:29:56 AM CET +UPDATE AD_Process_Para SET AD_Val_Rule_ID=102,Updated=TO_DATE('2018-11-28 01:29:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=55002 +; + +-- Nov 28, 2018, 1:43:02 AM CET +UPDATE AD_Column SET AD_Val_Rule_ID=104,Updated=TO_DATE('2018-11-28 01:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74645 +; + +-- Nov 28, 2018, 1:46:54 AM CET +UPDATE AD_Table SET AccessLevel='3',Updated=TO_DATE('2018-11-28 01:46:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53888 +; + +SELECT register_migration_script('201811271928_RevenueRecognitionPR.sql') FROM dual +; + diff --git a/migration/i6.1/oracle/201811282152_IDEMPIERE-2933.sql b/migration/i6.1/oracle/201811282152_IDEMPIERE-2933.sql new file mode 100644 index 0000000000..a9a06f5a69 --- /dev/null +++ b/migration/i6.1/oracle/201811282152_IDEMPIERE-2933.sql @@ -0,0 +1,23 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-2933 +-- Nov 28, 2018, 9:51:40 PM CET +UPDATE AD_Column SET FKConstraintType='C',Updated=TO_DATE('2018-11-28 21:51:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200258 +; + +-- Nov 28, 2018, 9:51:42 PM CET +ALTER TABLE AD_Tab_Customization MODIFY AD_User_ID NUMBER(10) +; + +-- Nov 28, 2018, 9:51:42 PM CET +ALTER TABLE AD_Tab_Customization DROP CONSTRAINT aduser_adtabcustomization +; + +-- Nov 28, 2018, 9:51:42 PM CET +ALTER TABLE AD_Tab_Customization ADD CONSTRAINT aduser_adtabcustomization FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED +; + +SELECT register_migration_script('201811282152_IDEMPIERE-2933.sql') FROM dual +; + diff --git a/migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql b/migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..a64e1040a4 --- /dev/null +++ b/migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3780 +-- Dec 15, 2018, 4:51:29 PM CET +UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL, IsAdvancedField='Y',Updated=TO_DATE('2018-12-15 16:51:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201812151653_IDEMPIERE-3780.sql') FROM dual +; + diff --git a/migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql b/migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql new file mode 100644 index 0000000000..10e1cc6a21 --- /dev/null +++ b/migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql @@ -0,0 +1,19 @@ +-- IDEMPIERE-1052: Improve Performance using Search instead of Table/Table Direct +-- Jul 30, 2018 4:01:01 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200590 +; + +-- Jul 30, 2018 4:01:07 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2018-07-30 16:01:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Jul 30, 2018 4:01:21 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200593 +; + +-- Jul 30, 2018 4:01:33 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200595 +; + +SELECT register_migration_script('201807301600_IDEMPIERE-1052.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql b/migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql new file mode 100644 index 0000000000..9ab00fe7c6 --- /dev/null +++ b/migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-3770: Translation : export only centralized data +-- Aug 2, 2018 3:36:33 PM CEST +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Only centralized data',0,0,'Y',TO_TIMESTAMP('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,200481,'OnlyCentralizedData','D','f43c0cce-0462-4247-baf6-e7da842152ab') +; + +SELECT register_migration_script('201808021530_IDEMPIERE-3770.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql b/migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..c3457b487f --- /dev/null +++ b/migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql @@ -0,0 +1,23 @@ +-- IDEMPIERE-3780 : AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY +-- Aug 31, 2018 11:49:36 AM CEST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203266,0,0,'Y',TO_TIMESTAMP('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,'IsNoExpire','No Expire','No Expire','D','86e9d8d5-35c5-4ba1-85d3-d674d8f48a2f') +; + +-- Aug 31, 2018 11:50:17 AM CEST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213690,0,'No Expire',114,'IsNoExpire','N',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,203266,'Y','N','D','N','N','N','Y','27a982d2-604b-4efe-982c-6e5004e62072','N',0,'N','Y','N') +; + +-- Aug 31, 2018 11:50:19 AM CEST +ALTER TABLE AD_User ADD COLUMN IsNoExpire CHAR(1) DEFAULT 'N' CHECK (IsNoExpire IN ('Y','N')) NOT NULL +; + +-- Aug 31, 2018 11:50:38 AM CEST +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (205827,'No Expire',118,213690,'Y',1,440,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','f96b4141-f3b9-45da-917f-23f9ddc80071','Y',3220,2,2) +; + +-- Aug 31, 2018 11:51:05 AM CEST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-08-31 11:51:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201808311200_IDEMPIERE-3780.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql b/migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql new file mode 100644 index 0000000000..d5f4e72c36 --- /dev/null +++ b/migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded +-- Sep 11, 2018 4:29:18 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644') +; + +SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual +; diff --git a/migration/i6.1/postgresql/201811271750_RevenueRecognitionAdaxa.sql b/migration/i6.1/postgresql/201811271750_RevenueRecognitionAdaxa.sql new file mode 100644 index 0000000000..35d96d69ee --- /dev/null +++ b/migration/i6.1/postgresql/201811271750_RevenueRecognitionAdaxa.sql @@ -0,0 +1,319 @@ +-- File = 3820_Revenue_recognition.xml +-- Migration Revenue recognition, SeqNo=3820 +-- Step SeqNo = 10, StepType = AD +INSERT INTO AD_Table(AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AccessLevel,Created,CreatedBy,Description,EntityType,IsActive,IsCentrallyMaintained,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy,AD_Table_UU) VALUES (0,0,53888,174,'1',TO_TIMESTAMP('2014-10-28 11:39:41','YYYY-MM-DD HH24:MI:SS'),100,'Plan for recognizing or recording revenue based on service','D','Y','Y','N','Y','N','N','N','135','Revenue Recognition Service','L','C_RevenueRecognition_Service',TO_TIMESTAMP('2014-10-28 11:39:41','YYYY-MM-DD HH24:MI:SS'),100,'833c94dc-3df8-4105-99a6-e224969e01f7'); + +-- Step SeqNo = 20, StepType = AD +INSERT INTO AD_Sequence(AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy,AD_Sequence_UU) VALUES (0,0,54047,TO_TIMESTAMP('2014-10-28 11:39:46','YYYY-MM-DD HH24:MI:SS'),100,'1000000','50000','Table C_RevenueRecognition_Service','1','Y','N','Y','Y','C_RevenueRecognition_Service','N','1000000',TO_TIMESTAMP('2014-10-28 11:39:46','YYYY-MM-DD HH24:MI:SS'),100,'3681cc25-0bec-40f0-943a-560503ad9e3e'); + +-- Step SeqNo = 30, StepType = AD +INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Client_ID@',74644,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:40:47','YYYY-MM-DD HH24:MI:SS'),'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',0,'N','Y','22','N',19,TO_TIMESTAMP('2014-10-28 11:40:47','YYYY-MM-DD HH24:MI:SS'),129,'N',102,100,'N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client','N',0,'162ba895-dbf1-415a-8263-7afd1698ed42'); + +-- Step SeqNo = 40, StepType = AD +INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,AD_Val_Rule_ID,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('@AD_Org_ID@',74645,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:40:51','YYYY-MM-DD HH24:MI:SS'),'An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.',0,'N','Y','22','N',19,TO_TIMESTAMP('2014-10-28 11:40:51','YYYY-MM-DD HH24:MI:SS'),130,'N',113,100,'N','N','N','AD_Org_ID','Organisational entity within client','Organisation','N',0,'a0cc2c33-4222-48f5-b976-a1a3aba834ea'); + +-- Step SeqNo = 80, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74649,53888,'D','1','Y','N','Y','1',100,TO_TIMESTAMP('2014-10-28 11:41:06','YYYY-MM-DD HH24:MI:SS'),'The Revenue Recognition indicates how revenue will be recognized for this product',0,'Y','Y','22','N',19,TO_TIMESTAMP('2014-10-28 11:41:06','YYYY-MM-DD HH24:MI:SS'),'N',1078,100,'N','N','N','C_RevenueRecognition_ID','Method for recording revenue','Revenue Recognition','N',0,'4678f5ff-a1cb-4cd4-8803-b1b3e38ad2fc'); + +-- Step SeqNo = 90, StepType = AD +INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57527,0,'C_RevenueRecognition_Service_I',TO_TIMESTAMP('2014-10-28 11:41:10','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Revenue Recognition Service','Revenue Recognition Service',TO_TIMESTAMP('2014-10-28 11:41:10','YYYY-MM-DD HH24:MI:SS'),100,'11df9ee7-d5b8-44a5-88f2-dedaa9cd44df'); + +-- Step SeqNo = 100, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74650,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:41:09','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','22','N',13,TO_TIMESTAMP('2014-10-28 11:41:09','YYYY-MM-DD HH24:MI:SS'),'Y',57527,100,'N','N','N','C_RevenueRecognition_Service_I','Revenue Recognition Service','N',0,'ddada063-14b9-4a03-8f4b-6d57a5dd1ce2'); + +-- Step SeqNo = 110, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74651,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:41:16','YYYY-MM-DD HH24:MI:SS'),'The Created field indicates the date that this record was created.',0,'N','Y','7','N',16,TO_TIMESTAMP('2014-10-28 11:41:16','YYYY-MM-DD HH24:MI:SS'),'N',245,100,'N','N','N','Created','Date this record was created','Created','N',0,'0ed8bf8e-ea79-4233-a370-f51af2839fbb'); + +-- Step SeqNo = 120, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74652,53888,'D','1',110,'Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:41:20','YYYY-MM-DD HH24:MI:SS'),'The Created By field indicates the user who created this record.',0,'N','Y','22','N',18,TO_TIMESTAMP('2014-10-28 11:41:20','YYYY-MM-DD HH24:MI:SS'),'N',246,100,'N','N','N','CreatedBy','User who created this records','Created By','N',0,'f5eabfcf-d99f-4cee-b0e6-f0fc0ce73e0a'); + +-- Step SeqNo = 130, StepType = AD +INSERT INTO AD_Column(DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES ('Y',74653,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:41:24','YYYY-MM-DD HH24:MI:SS'),'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',0,'N','Y','1','N',20,TO_TIMESTAMP('2014-10-28 11:41:24','YYYY-MM-DD HH24:MI:SS'),'N',348,100,'N','Y','N','IsActive','The record is active in the system','Active','N',0,'4496768c-7a55-4d49-9294-45edb4528ff6'); + +-- Step SeqNo = 180, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74658,53888,'D','1','Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:41:43','YYYY-MM-DD HH24:MI:SS'),'The Updated field indicates the date that this record was updated.',0,'N','Y','7','N',16,TO_TIMESTAMP('2014-10-28 11:41:43','YYYY-MM-DD HH24:MI:SS'),'N',607,100,'N','N','N','Updated','Date this record was updated','Updated','N',0,'9384d25d-e719-4db4-b640-0b14c4ae3e58'); + +-- Step SeqNo = 190, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,AD_Column_UU) VALUES (74659,53888,'D','1',110,'Y','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:41:47','YYYY-MM-DD HH24:MI:SS'),'The Updated By field indicates the user who updated this record.',0,'N','Y','22','N',18,TO_TIMESTAMP('2014-10-28 11:41:47','YYYY-MM-DD HH24:MI:SS'),'N',608,100,'N','N','N','UpdatedBy','User who updated this records','Updated By','N',0,'6a938db8-5b02-45a6-a64a-cb3af8e74352'); + +-- Step SeqNo = 200, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74660,53888,'D','0','N','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:47:05','YYYY-MM-DD HH24:MI:SS'),'A description is limited to 255 characters.',0,'N','Y','255','Y',10,TO_TIMESTAMP('2014-10-28 11:47:05','YYYY-MM-DD HH24:MI:SS'),'N',275,100,'N','Y','N','Y','N','Description','Optional short description of the record','Description','N',0,'N','f4c5aef9-310c-4c84-8f23-397c1c185dc2'); + +-- Step SeqNo = 210, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74661,53888,'D','0','N','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:48:18','YYYY-MM-DD HH24:MI:SS'),'The Percent indicates the percentage used.',0,'N','Y','10','N',12,TO_TIMESTAMP('2014-10-28 11:48:18','YYYY-MM-DD HH24:MI:SS'),'N',951,100,'N','Y','N','Y','N','Percent','Percentage','Percent','N',0,'N','82a993ff-84fc-48d1-90cf-278d8932d3d9'); + +-- Step SeqNo = 220, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,Help,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74662,53888,'D','0','N','N','N','0',100,TO_TIMESTAMP('2014-10-28 11:48:54','YYYY-MM-DD HH24:MI:SS'),'Indicates the unique line for a document. It will also control the display order of the lines within a document.',0,'N','Y','10','N',11,TO_TIMESTAMP('2014-10-28 11:48:54','YYYY-MM-DD HH24:MI:SS'),'N',439,100,'N','Y','N','Y','N','Line','Unique line for this document','Line No','N',0,'N','cec34917-4f48-4420-beb5-1fc18e678ff5'); + +-- Step SeqNo = 230, StepType = AD +INSERT INTO AD_Tab(AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy,AD_Tab_UU) VALUES (0,74649,0,54010,53888,174,TO_TIMESTAMP('2014-10-28 11:51:07','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Service','N','15','1',TO_TIMESTAMP('2014-10-28 11:51:07','YYYY-MM-DD HH24:MI:SS'),100,'1318769d-126e-4dff-845a-91986295d34f'); + +-- Step SeqNo = 240, StepType = AD +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,AD_Field_UU) VALUES (0,74653,74741,0,54010,TO_TIMESTAMP('2014-10-28 11:51:16','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system','1','D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2014-10-28 11:51:16','YYYY-MM-DD HH24:MI:SS'),100,'a9be764b-77e8-43ab-aca6-3d7ebf3a431c'); + +-- Step SeqNo = 250, StepType = AD +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,AD_Field_UU) VALUES (0,74644,74742,0,54010,TO_TIMESTAMP('2014-10-28 11:51:19','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','22','D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2014-10-28 11:51:19','YYYY-MM-DD HH24:MI:SS'),100,'89c58d7c-c56a-4325-a7e5-00d6b9993867'); + +-- Step SeqNo = 260, StepType = AD +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,AD_Field_UU) VALUES (0,74660,74743,0,54010,TO_TIMESTAMP('2014-10-28 11:51:23','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','255','D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2014-10-28 11:51:23','YYYY-MM-DD HH24:MI:SS'),100,'61a18e8d-1a14-4335-abca-d055ec25f634'); + +-- Step SeqNo = 270, StepType = AD +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,AD_Field_UU) VALUES (0,74662,74744,0,54010,TO_TIMESTAMP('2014-10-28 11:51:26','YYYY-MM-DD HH24:MI:SS'),100,'Unique line for this document','10','D','Indicates the unique line for a document. It will also control the display order of the lines within a document.','Y','Y','Y','N','N','N','N','N','Line No',TO_TIMESTAMP('2014-10-28 11:51:26','YYYY-MM-DD HH24:MI:SS'),100,'30b213d1-479a-41dd-beb3-11ab483119df'); + +-- Step SeqNo = 280, StepType = AD +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,AD_Field_UU) VALUES (0,74645,74745,0,54010,TO_TIMESTAMP('2014-10-28 11:51:29','YYYY-MM-DD HH24:MI:SS'),100,'Organisational entity within client','22','D','An organisation is a unit of your client or legal entity - examples are store, department. You can share data between organisations.','Y','Y','Y','N','N','N','N','N','Organisation',TO_TIMESTAMP('2014-10-28 11:51:29','YYYY-MM-DD HH24:MI:SS'),100,'769dcd46-ed5e-462e-9c53-cc8ce1761e8c'); + +-- Step SeqNo = 290, StepType = AD +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,AD_Field_UU) VALUES (0,74661,74746,0,54010,TO_TIMESTAMP('2014-10-28 11:51:31','YYYY-MM-DD HH24:MI:SS'),100,'Percentage','10','D','The Percent indicates the percentage used.','Y','Y','Y','N','N','N','N','N','Percent',TO_TIMESTAMP('2014-10-28 11:51:31','YYYY-MM-DD HH24:MI:SS'),100,'ccfd985b-8d28-4fe7-ad04-b10a331014fe'); + +-- Step SeqNo = 300, StepType = AD +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,AD_Field_UU) VALUES (0,74649,74747,0,54010,TO_TIMESTAMP('2014-10-28 11:51:35','YYYY-MM-DD HH24:MI:SS'),100,'Method for recording revenue','22','D','The Revenue Recognition indicates how revenue will be recognized for this product','Y','Y','Y','N','N','N','N','N','Revenue Recognition',TO_TIMESTAMP('2014-10-28 11:51:35','YYYY-MM-DD HH24:MI:SS'),100,'335a8b7b-90bf-4436-8c69-cf5225b95be7'); + +-- Step SeqNo = 310, StepType = AD +INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74650,74748,0,54010,TO_TIMESTAMP('2014-10-28 11:51:38','YYYY-MM-DD HH24:MI:SS'),100,'22','D','Y','Y','N','N','N','N','N','N','Revenue Recognition Service',TO_TIMESTAMP('2014-10-28 11:51:38','YYYY-MM-DD HH24:MI:SS'),100,'df66a794-719b-426e-82a7-e67bf0b636b5'); + +-- Step SeqNo = 320, StepType = AD +UPDATE AD_Field SET IsDisplayed='N',SeqNo='0' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 330, StepType = AD +UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=74742; + +-- Step SeqNo = 340, StepType = AD +UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 350, StepType = AD +UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=74747; + +-- Step SeqNo = 360, StepType = AD +UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=74744; + +-- Step SeqNo = 370, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 380, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74743; + +-- Step SeqNo = 390, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 400, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 410, StepType = AD +UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74742; + +-- Step SeqNo = 420, StepType = AD +UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 430, StepType = AD +UPDATE AD_Tab SET Parent_Column_ID=3918 WHERE AD_Tab_ID=54010; + +-- Step SeqNo = 440, StepType = AD +UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(Line),0)+10 FROM C_RevenueRecognition_Service WHERE C_RevenueRecognition_ID=@C_RevenueRecognition_ID@' WHERE AD_Column_ID=74662; + +-- Step SeqNo = 450, StepType = AD +UPDATE AD_Tab SET DisplayLogic='@IsTimeBased@=''N''' WHERE AD_Tab_ID=54010; + +-- Step SeqNo = 460, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4834; + +-- Step SeqNo = 470, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=4832; + +-- Step SeqNo = 480, StepType = AD +UPDATE AD_Window SET WinHeight='500',WinWidth='1000' WHERE AD_Window_ID=174; + +-- Step SeqNo = 490, StepType = AD +UPDATE AD_Element SET ColumnName='C_RevenueRecog_Service_ID' WHERE AD_Element_ID=57527; + +-- Step SeqNo = 500, StepType = AD +UPDATE AD_Table SET TableName='C_RevenueRecog_Service' WHERE AD_Table_ID=53888; + +-- Step SeqNo = 520, StepType = AD +INSERT INTO AD_Element(AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy,AD_Element_UU) VALUES (0,57528,0,'DateRecognized',TO_TIMESTAMP('2014-10-28 12:14:14','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Recognition Date','Recognition Date',TO_TIMESTAMP('2014-10-28 12:14:14','YYYY-MM-DD HH24:MI:SS'),100,'1af0f323-b3d0-4750-9da9-fc96cc248aa6'); + +-- Step SeqNo = 530, StepType = AD +INSERT INTO AD_Column(AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,CreatedBy,Updated,AD_Client_ID,IsParent,IsActive,FieldLength,IsSelectionColumn,AD_Reference_ID,Created,IsKey,AD_Element_ID,UpdatedBy,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsSyncDatabase,AD_Org_ID,IsSecure,AD_Column_UU) VALUES (74663,444,'D','0','N','N','N','0',100,TO_TIMESTAMP('2014-10-28 12:14:41','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','7','N',15,TO_TIMESTAMP('2014-10-28 12:14:41','YYYY-MM-DD HH24:MI:SS'),'N',57528,100,'N','Y','N','Y','N','DateRecognized','Recognition Date','N',0,'N','a2a2f66a-e6da-4858-bdae-68f8b3f6798c'); + +-- Step SeqNo = 540, StepType = AD +INSERT INTO AD_Field(AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy,AD_Field_UU) VALUES (0,74663,74749,0,379,TO_TIMESTAMP('2014-10-28 12:47:32','YYYY-MM-DD HH24:MI:SS'),100,'7','D','Y','Y','Y','N','N','N','N','N','Recognition Date',TO_TIMESTAMP('2014-10-28 12:47:32','YYYY-MM-DD HH24:MI:SS'),100,'a27b2876-5b35-4325-9013-6553458347a8'); + +-- Step SeqNo = 550, StepType = AD +UPDATE AD_Field SET SeqNo='0' WHERE AD_Field_ID=4829; + +-- Step SeqNo = 560, StepType = AD +UPDATE AD_Field SET SeqNo='10' WHERE AD_Field_ID=4830; + +-- Step SeqNo = 570, StepType = AD +UPDATE AD_Field SET SeqNo='20' WHERE AD_Field_ID=4834; + +-- Step SeqNo = 580, StepType = AD +UPDATE AD_Field SET SeqNo='30' WHERE AD_Field_ID=4831; + +-- Step SeqNo = 590, StepType = AD +UPDATE AD_Field SET SeqNo='40' WHERE AD_Field_ID=4835; + +-- Step SeqNo = 600, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74749; + +-- Step SeqNo = 610, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=4832; + +-- Step SeqNo = 620, StepType = AD +UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4833; + +-- Step SeqNo = 630, StepType = AD +UPDATE AD_Tab SET IsReadOnly='N' WHERE AD_Tab_ID=379; + +-- Step SeqNo = 640, StepType = AD +INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_TIMESTAMP('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_TIMESTAMP('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'C_RevenueRecognition','48c2742a-be9f-40fb-94eb-85297a7fca49'); + +-- Step SeqNo = 650, StepType = AD +INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_TIMESTAMP('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_TIMESTAMP('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'b21af721-dab7-4632-a49c-a9f3cbef22b1'); + +-- Step SeqNo = 660, StepType = AD +INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct',TO_TIMESTAMP('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'D','0','Y','Y','Y','N','Date','20',TO_TIMESTAMP('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'9d9daf55-fe52-4b7d-896e-6d45880e6566'); + +-- Step SeqNo = 670, StepType = AD +UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003; + +-- Step SeqNo = 680, StepType = AD +INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_TIMESTAMP('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_TIMESTAMP('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'c5723c3d-419a-406c-a33f-b5edf481e652'); + +-- Step SeqNo = 690, StepType = AD +INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_TIMESTAMP('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_TIMESTAMP('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'7e9b6837-4f50-4fb7-b7ae-78bbb2a77ba0'); + +-- Step SeqNo = 700, StepType = AD +UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710; + +-- Step SeqNo = 710, StepType = AD +UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885; + +-- Step SeqNo = 720, StepType = AD +UPDATE AD_Tab SET OrderByClause='C_RevenueRecognition_Run.C_RevenueRecognition_Run_ID' WHERE AD_Tab_ID=379; + +-- Step SeqNo = 730, StepType = AD +UPDATE AD_Tab SET AD_Column_ID=5983 WHERE AD_Tab_ID=379; + +-- Step SeqNo = 740, StepType = SQL +--ALTER TABLE c_revenuerecognition_run ALTER COLUMN gl_journal_id DROP NOT NULL; + + +-- File = 3830_revenue_recognition_process.xml +-- Migration Revenue recognition process, SeqNo=3830 +-- Step SeqNo = 10, StepType = AD +--INSERT INTO AD_Process(AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,AD_Process_UU) VALUES (0,0,53710,'3','org.compiere.process.RevenueRecognition','N',TO_TIMESTAMP('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'Generate journal entries based on valid revenue recognition run entries','D','Y','N','N','N','N','Revenue Recognition Run','Y','0','0',TO_TIMESTAMP('2014-10-28 13:14:54','YYYY-MM-DD HH24:MI:SS'),100,'C_RevenueRecognition','6b4adee2-46d2-422e-9dc7-4ab88b4caacb'); + +-- Step SeqNo = 20, StepType = AD +--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,196,0,53710,55002,18,170,'C_DocType_ID',TO_TIMESTAMP('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','Y','N','Document Type','10',TO_TIMESTAMP('2014-10-28 13:15:43','YYYY-MM-DD HH24:MI:SS'),100,'e96484b3-b7de-4217-9337-be9ff72da09b'); + +-- Step SeqNo = 30, StepType = AD +--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,263,0,53710,55003,15,'DateAcct',TO_TIMESTAMP('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'D','0','Y','Y','Y','N','Date','20',TO_TIMESTAMP('2014-10-28 13:16:14','YYYY-MM-DD HH24:MI:SS'),100,'c0f66c1a-59b6-4e54-a09e-cd9fc6acf4bc'); + +-- Step SeqNo = 40, StepType = AD +--UPDATE AD_Process_Para SET FieldLength='7' WHERE AD_Process_Para_ID=55003; + +-- Step SeqNo = 50, StepType = AD +--INSERT INTO AD_Process_Para(AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy,AD_Process_Para_UU) VALUES (0,1078,0,53710,55004,19,'C_RevenueRecognition_ID',TO_TIMESTAMP('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'D','10','Y','Y','N','N','Revenue Recognition','30',TO_TIMESTAMP('2014-10-28 13:17:03','YYYY-MM-DD HH24:MI:SS'),100,'ef1332d8-a888-43fb-b0d8-99ff37e05ac0'); + +-- Step SeqNo = 60, StepType = AD +--INSERT INTO AD_Menu(AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Action,Created,CreatedBy,EntityType,IsActive,IsCentrallyMaintained,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,AD_Menu_UU) VALUES (0,53885,0,53710,'P',TO_TIMESTAMP('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','N','N','Revenue Recognition Run',TO_TIMESTAMP('2014-10-28 13:17:37','YYYY-MM-DD HH24:MI:SS'),100,'63ae1179-1642-4529-ad26-0cfa0f4226c6'); + +-- Step SeqNo = 70, StepType = AD +UPDATE AD_Process SET Description='Generate revenue recognition journal',Help='Generate GL journal based on valid revenue recognition run entries' WHERE AD_Process_ID=53710; + +-- Step SeqNo = 80, StepType = AD +UPDATE AD_Menu SET Description='Generate revenue recognition journal' WHERE AD_Menu_ID=53885; + +-- File = 4760_Rev_recog_update.xml +-- Migration Revenue recognition changes, SeqNo=4760 +-- Step SeqNo = 10, StepType = AD +UPDATE AD_Column SET IsMandatory='N' WHERE AD_Column_ID=5984; + +-- Step SeqNo = 20, StepType = AD +UPDATE AD_Field SET IsDisplayed='Y',SeqNo='40' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 30, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=74744; + +-- Step SeqNo = 40, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 50, StepType = AD +UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=74743; + +-- Step SeqNo = 60, StepType = AD +UPDATE AD_Field SET IsSameLine='Y' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 70, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74742; + +-- Step SeqNo = 80, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74745; + +-- Step SeqNo = 90, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74747; + +-- Step SeqNo = 100, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74741; + +-- Step SeqNo = 110, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74744; + +-- Step SeqNo = 120, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74746; + +-- Step SeqNo = 130, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74743; + +-- Step SeqNo = 140, StepType = AD +UPDATE AD_Field SET IsDisplayedGrid='Y' WHERE AD_Field_ID=74749; + +-- Step SeqNo = 150, StepType = AD +INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (444,'D','0','N','N','N','0','N','10','N',19,'N','N','N',57527,'N','Y','N','Y','N','C_RevenueRecog_Service_ID','Revenue Recognition Service','Y',100,TO_TIMESTAMP('2015-08-26 00:38:16','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2015-08-26 00:38:16','YYYY-MM-DD HH24:MI:SS'),100,77928,0,'e3f17477-6545-4694-bac4-6280147344f3'); + +-- Step SeqNo = 160, StepType = AD +INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,EntityType,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_TIMESTAMP('2015-08-26 00:38:27','YYYY-MM-DD HH24:MI:SS'),'10','Y','N','N',77928,'N','Y',379,'N','D','Revenue Recognition Service',100,'Y',0,100,TO_TIMESTAMP('2015-08-26 00:38:27','YYYY-MM-DD HH24:MI:SS'),77047,0,'a186c69e-44d7-45dc-a461-98dfd8238f1c'); + +-- Step SeqNo = 170, StepType = AD +UPDATE AD_Field SET SeqNo='50' WHERE AD_Field_ID=77047; + +-- Step SeqNo = 180, StepType = AD +UPDATE AD_Field SET SeqNo='60' WHERE AD_Field_ID=74749; + +-- Step SeqNo = 190, StepType = AD +UPDATE AD_Field SET SeqNo='70' WHERE AD_Field_ID=4832; + +-- Step SeqNo = 200, StepType = AD +UPDATE AD_Field SET SeqNo='80' WHERE AD_Field_ID=4833; + +-- Step SeqNo = 210, StepType = AD +UPDATE AD_Field SET IsReadOnly='Y' WHERE AD_Field_ID=77047; + +-- Step SeqNo = 220, StepType = AD +UPDATE AD_Column SET IsIdentifier='Y',SeqNo='2' WHERE AD_Column_ID=74662; + +-- Step SeqNo = 230, StepType = AD +UPDATE AD_Column SET IsIdentifier='Y',SeqNo='3' WHERE AD_Column_ID=74660; + +-- Step SeqNo = 240, StepType = AD +INSERT INTO AD_Element(ColumnName,AD_Client_ID,Help,EntityType,Name,Description,PrintName,Created,Updated,IsActive,CreatedBy,UpdatedBy,AD_Element_ID,AD_Org_ID,AD_Element_UU) VALUES ('FixedRecogDay',0,'The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Fixed recognition day','Day of the period recognition occurs','Fixed recognition day',TO_TIMESTAMP('2015-08-26 11:13:46','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2015-08-26 11:13:46','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,58294,0,'06ed8fd6-89bf-4596-9a7a-6040bf80cebf'); + +-- Step SeqNo = 250, StepType = AD +INSERT INTO AD_Column(AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSecure,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,IsActive,Created,UpdatedBy,AD_Column_ID,AD_Org_ID,AD_Column_UU) VALUES (336,'D','0','N','N','N','0','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','N','22','N',11,'N','N','N',58294,'N','Y','N','Y','N','FixedRecogDay','Day of the period recognition occurs','Fixed recognition day','Y',100,TO_TIMESTAMP('2015-08-26 11:14:02','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2015-08-26 11:14:02','YYYY-MM-DD HH24:MI:SS'),100,77929,0,'8ec4b7bc-4426-44c1-b42c-6f4be1ee02bd'); + +-- Step SeqNo = 260, StepType = AD +INSERT INTO AD_Field(IsEncrypted,Created,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Field_ID,AD_Org_ID,AD_Field_UU) VALUES ('N',TO_TIMESTAMP('2015-08-26 11:14:16','YYYY-MM-DD HH24:MI:SS'),'22','Y','N','N',77929,'N','Y',272,'N','The Fix Recognition Day indicates the day of the period that unearned revenue is recognised. If zero, the invoice date is used.','D','Day of the period recognition occurs','Fixed recognition day',100,'Y',0,100,TO_TIMESTAMP('2015-08-26 11:14:16','YYYY-MM-DD HH24:MI:SS'),77048,0,'d361f6e4-0597-4ab6-b511-cfdda309ed36'); + +-- Step SeqNo = 270, StepType = AD +UPDATE AD_Field SET DisplayLogic='@IsTimeBased@=Y' WHERE AD_Field_ID=77048; + +SELECT register_migration_script('201811271750_RevenueRecognitionAdaxa.sql') FROM dual +; + diff --git a/migration/i6.1/postgresql/201811271928_RevenueRecognitionPR.sql b/migration/i6.1/postgresql/201811271928_RevenueRecognitionPR.sql new file mode 100644 index 0000000000..b833ee0699 --- /dev/null +++ b/migration/i6.1/postgresql/201811271928_RevenueRecognitionPR.sql @@ -0,0 +1,677 @@ +-- IDEMPIERE-3837 Revenue Recognition +-- Nov 27, 2018, 7:19:23 PM CET +UPDATE AD_Window SET IsActive='Y',Updated=TO_TIMESTAMP('2018-11-27 19:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=174 +; + +-- Nov 27, 2018, 7:19:23 PM CET +UPDATE AD_Menu SET Name='Revenue Recognition', Description='Revenue Recognition Rules', IsActive='Y',Updated=TO_TIMESTAMP('2018-11-27 19:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=186 +; + +-- Nov 27, 2018, 7:19:23 PM CET +UPDATE AD_WF_Node SET Name='Revenue Recognition', Description='Revenue Recognition Rules', IsActive='Y',Updated=TO_TIMESTAMP('2018-11-27 19:19:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_WF_Node_ID=50098 +; + +-- Nov 27, 2018, 7:20:09 PM CET +ALTER TABLE C_RevenueRecognition ADD COLUMN FixedRecogDay NUMERIC(10) DEFAULT NULL +; + +-- Nov 27, 2018, 7:20:45 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='ADClient_CRevenueRecogService', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-27 19:20:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74644 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='ADOrg_CRevenueRecogService', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74645 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='CreatedBy_CRevenueRecogService', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74652 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsUpdateable='N', IsToolbarButton='N', FKConstraintName='CRevenueRecognition_CRevenueRe', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74649 +; + +-- Nov 27, 2018, 7:20:46 PM CET +UPDATE AD_Column SET IsAllowCopy='N', IsToolbarButton='N', FKConstraintName='UpdatedBy_CRevenueRecogService', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-27 19:20:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74659 +; + +-- Nov 27, 2018, 7:20:46 PM CET +CREATE TABLE C_RevenueRecog_Service (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, C_RevenueRecognition_ID NUMERIC(10) NOT NULL, C_RevenueRecog_Service_ID NUMERIC(10) NOT NULL, Description VARCHAR(255) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Line NUMERIC(10) DEFAULT NULL , Percent NUMERIC DEFAULT NULL , Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT C_RevenueRecog_Service_Key PRIMARY KEY (C_RevenueRecog_Service_ID)) +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT ADClient_CRevenueRecogService FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT ADOrg_CRevenueRecogService FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT CreatedBy_CRevenueRecogService FOREIGN KEY (CreatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT CRevenueRecognition_CRevenueRe FOREIGN KEY (C_RevenueRecognition_ID) REFERENCES c_revenuerecognition(c_revenuerecognition_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:20:46 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT UpdatedBy_CRevenueRecogService FOREIGN KEY (UpdatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:21:11 PM CET +INSERT INTO t_alter_column values('c_revenuerecognition_run','GL_Journal_ID','NUMERIC(10)',null,'NULL') +; + +-- Nov 27, 2018, 7:21:27 PM CET +ALTER TABLE C_RevenueRecognition_Run ADD COLUMN DateRecognized TIMESTAMP DEFAULT NULL +; + +-- Nov 27, 2018, 7:21:35 PM CET +UPDATE AD_Column SET IsToolbarButton='N', FKConstraintName='CRevenueRecogService_CRevenueR', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-11-27 19:21:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=77928 +; + +-- Nov 27, 2018, 7:21:35 PM CET +ALTER TABLE C_RevenueRecognition_Run ADD COLUMN C_RevenueRecog_Service_ID NUMERIC(10) DEFAULT NULL +; + +-- Nov 27, 2018, 7:21:35 PM CET +ALTER TABLE C_RevenueRecognition_Run ADD CONSTRAINT CRevenueRecogService_CRevenueR FOREIGN KEY (C_RevenueRecog_Service_ID) REFERENCES c_revenuerecog_service(c_revenuerecog_service_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 27, 2018, 7:22:22 PM CET +UPDATE AD_Sequence SET Name='C_RevenueRecog_Service', Description='Table C_RevenueRecog_Service',Updated=TO_TIMESTAMP('2018-11-27 19:22:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Sequence_ID=54047 +; + +-- Nov 27, 2018, 7:26:38 PM CET +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203286,0,0,'Y',TO_TIMESTAMP('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,'C_RevenueRecog_Service_UU','C_RevenueRecog_Service_UU','C_RevenueRecog_Service_UU','U','ec9dbc11-467b-45c4-912b-cab4291bdd60') +; + +-- Nov 27, 2018, 7:26:39 PM CET +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsAlwaysUpdateable,AD_Column_UU,IsToolbarButton) VALUES (213821,1.0,'C_RevenueRecog_Service_UU',53888,'C_RevenueRecog_Service_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_TIMESTAMP('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-11-27 19:26:37','YYYY-MM-DD HH24:MI:SS'),100,203286,'Y','N','U','N','f9c7c4a1-a23e-46a4-b9c8-3fd103fb31bf','N') +; + +-- Nov 27, 2018, 7:26:39 PM CET +ALTER TABLE C_RevenueRecog_Service ADD COLUMN C_RevenueRecog_Service_UU VARCHAR(36) DEFAULT NULL +; + +-- Nov 27, 2018, 7:26:39 PM CET +ALTER TABLE C_RevenueRecog_Service ADD CONSTRAINT C_RevenueRecog_Service_UU_idx UNIQUE (C_RevenueRecog_Service_UU) +; + +-- Nov 27, 2018, 10:46:24 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:46:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4834 +; + +-- Nov 27, 2018, 10:46:24 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:46:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4832 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4830 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4829 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4834 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4831 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4835 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4833 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74749 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4832 +; + +-- Nov 27, 2018, 10:47:02 PM CET +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=77047 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsAllowCopy='Y', XPosition=3, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74745 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74741 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74746 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=3, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74743 +; + +-- Nov 27, 2018, 10:49:44 PM CET +UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 22:49:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=74748 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74745 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74747 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74748 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74742 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74744 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74746 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74743 +; + +-- Nov 27, 2018, 10:50:47 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74741 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4820 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4819 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4821 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4818 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4857 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4822 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4827 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4825 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4828 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4826 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4823 +; + +-- Nov 27, 2018, 10:51:36 PM CET +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4824 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=77047 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4831 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4834 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=74749 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4832 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4833 +; + +-- Nov 27, 2018, 10:52:20 PM CET +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y', Updated=statement_timestamp(), UpdatedBy=100 WHERE AD_Field_ID=4835 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11767 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5529 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5431 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3079 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53577 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4821 +; + +UPDATE AD_Field SET IsDisplayed='Y', IsDisplayedGrid='Y',Updated=TO_TIMESTAMP('2018-11-27 23:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=53875 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3079 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1025 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2587 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5888 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6129 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1032 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1031 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201343 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6841 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10411 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1026 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200294 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200295 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200296 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200297 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7646 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1319 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1320 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1321 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1322 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3743 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3746 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3747 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3744 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3745 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1027 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1028 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1568 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1569 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5381 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=460, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5383 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=470, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12418 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=480, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5910 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=490, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5911 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=500, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6130 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=510, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8307 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=520, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6343 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=530, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6344 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=540, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58973 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=550, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8608 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=560, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8613 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=570, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52015 +; + +-- Nov 27, 2018, 11:56:17 PM CET +UPDATE AD_Field SET SeqNo=580, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-27 23:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52016 +; + +-- Nov 28, 2018, 12:27:46 AM CET +UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(Line),0)+10 FROM C_RevenueRecog_Service WHERE C_RevenueRecognition_ID=@C_RevenueRecognition_ID@', IsToolbarButton='N',Updated=TO_TIMESTAMP('2018-11-28 00:27:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74662 +; + +-- Nov 28, 2018, 12:30:11 AM CET +UPDATE AD_Field SET IsActive='Y', IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:30:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3927 +; + +-- Nov 28, 2018, 12:30:32 AM CET +UPDATE AD_Field SET IsActive='Y', IsMandatory='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:30:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3853 +; + +UPDATE c_bp_group_acct +SET unearnedrevenue_acct=(SELECT unearnedrevenue_acct FROM c_acctschema_default WHERE c_acctschema_default.c_acctschema_id=c_bp_group_acct.c_acctschema_id) +WHERE unearnedrevenue_acct IS NULL; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=10, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3007 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3008 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3013 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3010 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3012 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3011 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3015 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3014 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=77048 +; + +-- Nov 28, 2018, 12:39:14 AM CET +UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-11-28 00:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3009 +; + +-- Nov 28, 2018, 12:39:51 AM CET +INSERT INTO t_alter_column values('c_revenuerecognition_run','GL_Journal_ID','NUMERIC(10)',null,'NULL') +; + +-- Nov 28, 2018, 12:39:51 AM CET +INSERT INTO t_alter_column values('c_revenuerecognition_run','GL_Journal_ID',null,'NULL',null) +; + +-- Nov 28, 2018, 12:57:53 AM CET +INSERT INTO AD_TreeNodeMM (AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,SeqNo,AD_Tree_ID,Node_ID,AD_Client_ID,AD_TreeNodeMM_UU) VALUES (0,'Y',TO_TIMESTAMP('2018-11-28 00:57:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-11-28 00:57:53','YYYY-MM-DD HH24:MI:SS'),100,0,10,53885,0,'4a31b4dd-998f-48e4-ab69-0129052f5a04') +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53242 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53296 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53014 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53108 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=164 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=1, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=280 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=2, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=158 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=3, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=522 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=4, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200008 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=5, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=118 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=6, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53288 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=7, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=169 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=8, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53289 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=9, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=433 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=10, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53290 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=11, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=352 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=12, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=434 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=435 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=14, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200045 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=15, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200046 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=16, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200019 +; + +-- Nov 28, 2018, 12:58:33 AM CET +UPDATE AD_TreeNodeMM SET Parent_ID=278, SeqNo=17, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53885 +; + +-- Nov 28, 2018, 1:29:56 AM CET +UPDATE AD_Process_Para SET AD_Val_Rule_ID=102,Updated=TO_TIMESTAMP('2018-11-28 01:29:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=55002 +; + +-- Nov 28, 2018, 1:43:02 AM CET +UPDATE AD_Column SET AD_Val_Rule_ID=104,Updated=TO_TIMESTAMP('2018-11-28 01:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=74645 +; + +-- Nov 28, 2018, 1:46:54 AM CET +UPDATE AD_Table SET AccessLevel='3',Updated=TO_TIMESTAMP('2018-11-28 01:46:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53888 +; + +SELECT register_migration_script('201811271928_RevenueRecognitionPR.sql') FROM dual +; + diff --git a/migration/i6.1/postgresql/201811282152_IDEMPIERE-2933.sql b/migration/i6.1/postgresql/201811282152_IDEMPIERE-2933.sql new file mode 100644 index 0000000000..655828ec98 --- /dev/null +++ b/migration/i6.1/postgresql/201811282152_IDEMPIERE-2933.sql @@ -0,0 +1,20 @@ +-- IDEMPIERE-2933 +-- Nov 28, 2018, 9:51:40 PM CET +UPDATE AD_Column SET FKConstraintType='C',Updated=TO_TIMESTAMP('2018-11-28 21:51:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200258 +; + +-- Nov 28, 2018, 9:51:42 PM CET +INSERT INTO t_alter_column values('ad_tab_customization','AD_User_ID','NUMERIC(10)',null,null) +; + +-- Nov 28, 2018, 9:51:42 PM CET +ALTER TABLE AD_Tab_Customization DROP CONSTRAINT aduser_adtabcustomization +; + +-- Nov 28, 2018, 9:51:42 PM CET +ALTER TABLE AD_Tab_Customization ADD CONSTRAINT aduser_adtabcustomization FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED +; + +SELECT register_migration_script('201811282152_IDEMPIERE-2933.sql') FROM dual +; + diff --git a/migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql b/migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..9be67d8c35 --- /dev/null +++ b/migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql @@ -0,0 +1,8 @@ +-- IDEMPIERE-3780 +-- Dec 15, 2018, 4:51:29 PM CET +UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL, IsAdvancedField='Y',Updated=TO_TIMESTAMP('2018-12-15 16:51:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201812151653_IDEMPIERE-3780.sql') FROM dual +; + diff --git a/migration/i6.1z/oracle/201708031855_1008281.sql b/migration/i6.1z/oracle/201708031855_1008281.sql new file mode 100644 index 0000000000..cdfcb9715b --- /dev/null +++ b/migration/i6.1z/oracle/201708031855_1008281.sql @@ -0,0 +1,9 @@ +-- 1008281 - Implement reporting from read-only replica + +CREATE TABLE dbreplicasyncverifier (lastupdate date); + +INSERT INTO dbreplicasyncverifier values (to_date('1900-01-01 00:00:00', 'yyyy-mm-dd HH24:MI:SS')); + +SELECT register_migration_script('201708031855_1008281.sql') FROM dual +; + diff --git a/migration/i6.1z/oracle/201810122100_Ticket_AP2-671.sql b/migration/i6.1z/oracle/201810122100_Ticket_AP2-671.sql new file mode 100644 index 0000000000..efd03cc1cd --- /dev/null +++ b/migration/i6.1z/oracle/201810122100_Ticket_AP2-671.sql @@ -0,0 +1,10 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Oct 11, 2018 5:49:00 PM SGT +-- AP2-671 Make a filtering list box +UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19', AD_Val_Rule_ID=NULL, AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-10-11 17:49:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56279 +; + +SELECT register_migration_script('201810122100_Ticket_AP2-671.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1z/postgresql/201708031855_1008281.sql b/migration/i6.1z/postgresql/201708031855_1008281.sql new file mode 100644 index 0000000000..32a2a09307 --- /dev/null +++ b/migration/i6.1z/postgresql/201708031855_1008281.sql @@ -0,0 +1,13 @@ +-- 1008281 - Implement reporting from read-only replica + +CREATE TABLE dbreplicasyncverifier (lastupdate timestamp); + +INSERT INTO dbreplicasyncverifier values (to_timestamp('1900-01-01 00:00:00', 'yyyy-mm-dd HH24:MI:SS')); + +CREATE OR REPLACE RULE insert_dual AS ON INSERT TO dual DO INSTEAD NOTHING; + +CREATE OR REPLACE RULE delete_dual AS ON DELETE TO dual DO INSTEAD NOTHING; + +SELECT register_migration_script('201708031855_1008281.sql') FROM dual +; + diff --git a/migration/i6.1z/postgresql/201810122100_Ticket_AP2-671.sql b/migration/i6.1z/postgresql/201810122100_Ticket_AP2-671.sql new file mode 100644 index 0000000000..c57577b58c --- /dev/null +++ b/migration/i6.1z/postgresql/201810122100_Ticket_AP2-671.sql @@ -0,0 +1,7 @@ +-- Oct 11, 2018 5:49:00 PM SGT +-- AP2-671 Make a filtering list box +UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=10 | @AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19', AD_Val_Rule_ID=NULL, AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-10-11 17:49:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56279 +; + +SELECT register_migration_script('201810122100_Ticket_AP2-671.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base-feature/packinfolder.app.launch b/org.adempiere.base-feature/packinfolder.app.launch new file mode 100644 index 0000000000..70d4457fd7 --- /dev/null +++ b/org.adempiere.base-feature/packinfolder.app.launch @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java b/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java index a44119b38e..040ad59e62 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; +import java.sql.Types; import java.util.logging.Level; import org.compiere.model.MColumn; @@ -110,6 +111,21 @@ public class ColumnSync extends SvrProcess // update existing column boolean notNull = DatabaseMetaData.columnNoNulls == rs.getInt("NULLABLE"); sql = column.getSQLModify(table, column.isMandatory() != notNull); + if (DB.isOracle()) { + // IDEMPIERE-3842 problem with oracle alter CLOB or BLOB + int actualType = rs.getInt("DATA_TYPE"); + if (actualType == Types.CLOB) { + if (sql.contains(" MODIFY " + column.getColumnName() + " CLOB")) { + // trying to make CLOB a column that is already a CLOB + sql = sql.replaceFirst(" MODIFY " + column.getColumnName() + " CLOB", " MODIFY " + column.getColumnName()); + } + } else if (actualType == Types.BLOB) { + if (sql.contains(" MODIFY " + column.getColumnName() + " BLOB")) { + // trying to make BLOB a column that is already a BLOB + sql = sql.replaceFirst(" MODIFY " + column.getColumnName() + " BLOB", " MODIFY " + column.getColumnName()); + } + } + } break; } DB.close(rs); diff --git a/org.adempiere.base.process/src/org/compiere/process/RevenueRecognition.java b/org.adempiere.base.process/src/org/compiere/process/RevenueRecognition.java new file mode 100644 index 0000000000..21af14d1fb --- /dev/null +++ b/org.adempiere.base.process/src/org/compiere/process/RevenueRecognition.java @@ -0,0 +1,204 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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.process; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.List; +import java.util.logging.Level; + +import org.compiere.model.MAcctSchema; +import org.compiere.model.MConversionType; +import org.compiere.model.MDocType; +import org.compiere.model.MGLCategory; +import org.compiere.model.MInvoice; +import org.compiere.model.MInvoiceLine; +import org.compiere.model.MJournal; +import org.compiere.model.MJournalLine; +import org.compiere.model.MOrg; +import org.compiere.model.MRevenueRecognitionRun; +import org.compiere.model.Query; +import org.compiere.util.Env; +import org.compiere.util.Util; + +/** + */ +public class RevenueRecognition extends SvrProcess +{ + /** The date to calculate the days due from */ + private Timestamp p_Date = null; + /** GL Document Type */ + private int p_C_DocType_ID = 0; + + /** Recognition Type */ + private int p_C_RevenueRecognition_ID = 0; + + /** + * Prepare - e.g., get Parameters. + */ + protected void prepare() + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else if (name.equals("C_RevenueRecognition_ID")) + p_C_RevenueRecognition_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("DateAcct")) + p_Date = (Timestamp)para[i].getParameter(); + else if (name.equals("C_DocType_ID")) + p_C_DocType_ID = para[i].getParameterAsInt(); + else + log.log(Level.SEVERE, "Unknown Parameter: " + name); + } + + + if (p_Date == null) + p_Date = new Timestamp (System.currentTimeMillis()); + + } // prepare + + /** + * DoIt + * @return Message + * @throws Exception + */ + protected String doIt() throws Exception + { + MAcctSchema[] schemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID()); + + String result ="@OK@"; + for (MAcctSchema schema : schemas) + { + result = createGLJournal(schema); + + } + // + return result; + } // doIt + + + /** + * Create GL Journal + * @return document info + */ + private String createGLJournal(MAcctSchema as) + { + // + MDocType docType = MDocType.get(getCtx(), p_C_DocType_ID); + MGLCategory cat = MGLCategory.get(getCtx(), docType.getGL_Category_ID()); + // + + MJournal journal = null; + BigDecimal drTotal = Env.ZERO; + BigDecimal crTotal = Env.ZERO; + + String where = "DateRecognized IS NOT NULL AND DateRecognized <= ? AND GL_Journal_ID IS NULL " + + " AND (SELECT rp.C_AcctSchema_ID " + + "FROM C_RevenueRecognition_Plan rp " + + "WHERE rp.C_RevenueRecognition_Plan_ID=C_RevenueRecognition_Run.C_RevenueRecognition_Plan_ID) = ? " + + " AND EXISTS (SELECT * " + + " FROM C_RevenueRecognition_Plan rp " + + " WHERE rp.C_RevenueRecognition_Plan_ID=C_RevenueRecognition_Run.C_RevenueRecognition_Plan_ID " + + " AND rp.C_RevenueRecognition_ID = ? OR 0 = ?) "; + + Query query = new Query(getCtx(), MRevenueRecognitionRun.Table_Name, + where, get_TrxName()); + query.setParameters(p_Date, as.getC_AcctSchema_ID(), p_C_RevenueRecognition_ID, p_C_RevenueRecognition_ID); + query.setOrderBy("C_RevenueRecognition_Run_ID"); + List list = query.list(); + + int lineNo = 1; + for (MRevenueRecognitionRun run : list) + { + if (run.getRecognizedAmt().signum() == 0) + continue; + + // + if (journal == null) + { + journal = new MJournal(getCtx(), 0, get_TrxName()); + journal.setDescription (getName()); + journal.setC_DocType_ID(p_C_DocType_ID); + journal.setDateDoc(p_Date); + journal.setDateAcct(p_Date); + journal.setC_Currency_ID(as.getC_Currency_ID()); + journal.setC_AcctSchema_ID (as.getC_AcctSchema_ID()); + journal.setC_Currency_ID(as.getC_Currency_ID()); + journal.setC_ConversionType_ID(MConversionType.getDefault(getAD_Client_ID())); + MOrg org = MOrg.get(getCtx(), run.getAD_Org_ID()); + journal.setAD_Org_ID(run.getAD_Org_ID()); + journal.setDescription (getName() + " - " + org.getName()); + journal.setGL_Category_ID (cat.getGL_Category_ID()); + journal.saveEx(); + } + + MInvoiceLine il = (MInvoiceLine) run.getC_RevenueRecognition_Plan().getC_InvoiceLine(); + MInvoice inv = il.getParent(); + String description = inv.getDocumentInfo() + " (" + il.getLine() + ")"; + if (!Util.isEmpty(il.getDescription())) + description = description + " " + il.getDescription(); + // + MJournalLine line = new MJournalLine(journal); + line.setLine(lineNo++ * 10); + line.setDescription(description); + + // + line.setC_ValidCombination_ID(run.getC_RevenueRecognition_Plan().getP_Revenue_Acct()); + + BigDecimal amtReval = run.getRecognizedAmt(); + + BigDecimal dr = amtReval.compareTo(Env.ZERO) > 0 ? amtReval : Env.ZERO; + BigDecimal cr = amtReval.compareTo(Env.ZERO) < 0 ? amtReval.negate() : Env.ZERO; + + drTotal = drTotal.add(dr); + crTotal = crTotal.add(cr); + line.setAmtSourceDr (dr); + line.setAmtAcctDr (dr); + line.setAmtSourceCr (cr); + line.setAmtAcctCr (cr); + line.saveEx(); + + MJournalLine drline = new MJournalLine(journal); + drline.setLine(lineNo++ * 10); + + drline.setDescription(description); + // + drline.setC_ValidCombination_ID(run.getC_RevenueRecognition_Plan().getUnEarnedRevenue_Acct()); + + dr = amtReval.compareTo(Env.ZERO) < 0 ? amtReval.negate() : Env.ZERO; + cr = amtReval.compareTo(Env.ZERO) > 0 ? amtReval : Env.ZERO; + + drTotal = drTotal.add(dr); + crTotal = crTotal.add(cr); + drline.setAmtSourceDr (dr); + drline.setAmtAcctDr (dr); + drline.setAmtSourceCr (cr); + drline.setAmtAcctCr (cr); + drline.saveEx(); + // + run.setGL_Journal_ID(journal.getGL_Journal_ID()); + run.saveEx(); + addBufferLog(journal.getGL_Journal_ID(), journal.getDateAcct(), null, docType.getName() + " " + journal.getDocumentNo(), MJournal.Table_ID, journal.getGL_Journal_ID()); + } + + return "@OK@ #" + list.size(); + } // createGLJournal +} // Aging + diff --git a/org.adempiere.base/plugin.xml b/org.adempiere.base/plugin.xml index 0779342114..6aa93bd88f 100644 --- a/org.adempiere.base/plugin.xml +++ b/org.adempiere.base/plugin.xml @@ -128,4 +128,16 @@ + + + + + + diff --git a/org.adempiere.base/src/org/adempiere/base/Core.java b/org.adempiere.base/src/org/adempiere/base/Core.java index a562fe6a28..83ed39cdff 100644 --- a/org.adempiere.base/src/org/adempiere/base/Core.java +++ b/org.adempiere.base/src/org/adempiere/base/Core.java @@ -122,13 +122,13 @@ public class Core { return null; } - /** + /** * * @param processId Java class name or equinox extension id * @return ProcessCall instance or null if processId not found */ public static ProcessCall getProcess(String processId) { - List factories = Service.locator().list(IProcessFactory.class).getServices(); + List factories = getProcessFactories(); if (factories != null && !factories.isEmpty()) { for(IProcessFactory factory : factories) { ProcessCall process = factory.newProcessInstance(processId); @@ -139,6 +139,39 @@ public class Core { return null; } + /** + * This method load the process factories waiting until the DefaultProcessFactory on base is loaded (IDEMPIERE-3829) + * @return List of factories implementing IProcessFactory + */ + private static List getProcessFactories() { + List factories = null; + int maxIterations = 5; + int waitMillis = 1000; + int iterations = 0; + boolean foundDefault = false; + while (true) { + factories = Service.locator().list(IProcessFactory.class).getServices(); + if (factories != null && !factories.isEmpty()) { + for(IProcessFactory factory : factories) { + // wait until DefaultProcessFactory is loaded + if (factory instanceof DefaultProcessFactory) { + foundDefault = true; + break; + } + } + } + iterations++; + if (foundDefault || iterations >= maxIterations) { + break; + } + try { + Thread.sleep(waitMillis); + } catch (InterruptedException e) { + } + } + return factories; + } + /** * * @param validatorId Java class name or equinox extension Id diff --git a/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java b/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java new file mode 100644 index 0000000000..880b0450ce --- /dev/null +++ b/org.adempiere.base/src/org/adempiere/base/PackInFolderApplication.java @@ -0,0 +1,88 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * 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: * + * - Carlos Ruiz (sponsored by FH) * + **********************************************************************/ +package org.adempiere.base; + +import java.util.Map; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.Adempiere; +import org.compiere.model.MPInstance; +import org.compiere.process.ProcessCall; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogMgt; +import org.compiere.util.Env; +import org.eclipse.equinox.app.IApplication; +import org.eclipse.equinox.app.IApplicationContext; + +/** + * @author Carlos Ruiz (globalqss) + * + */ +public class PackInFolderApplication implements IApplication { + + /* (non-Javadoc) + * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) + */ + @Override + public Object start(IApplicationContext context) throws Exception { + Adempiere.startup(false); + CLogMgt.setLevel(Level.FINE); + + Map args = context.getArguments(); + String commandlineArgs[] = (String[]) args.get("application.args"); + if (commandlineArgs.length == 1) { + Properties ctx = Env.getCtx(); + String directory = commandlineArgs[0]; + ProcessInfo pi = new ProcessInfo("PackInFolder", 200099); + pi.setAD_Client_ID(0); + pi.setAD_User_ID(100); + MPInstance instance = new MPInstance(ctx, 200099, 0); + instance.saveEx(); + instance.createParameter(10, "Folder", directory); + pi.setAD_PInstance_ID(instance.getAD_PInstance_ID()); + ProcessCall process = Core.getProcess("org.adempiere.pipo2.PackInFolder"); + process.startProcess(ctx, pi, null); + StringBuilder msgout = new StringBuilder("Process=").append(pi.getTitle()) + .append(" Error=").append(pi.isError()).append(" Summary=") + .append(pi.getSummary()); + System.out.println(msgout.toString()); + } else { + System.out.println("Apply PackIn from Folder usage:"); + System.out.println("RUN_ApplyPackInFromFolder.sh folder"); + } + + + return IApplication.EXIT_OK; + } + + /* (non-Javadoc) + * @see org.eclipse.equinox.app.IApplication#stop() + */ + @Override + public void stop() { + } + +} diff --git a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java index e5be3fea25..f28128cf0f 100644 --- a/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java +++ b/org.adempiere.base/src/org/adempiere/impexp/GridTabCSVImporter.java @@ -481,7 +481,10 @@ public class GridTabCSVImporter implements IGridTabImporter StringBuilder errMsg = new StringBuilder(); try { - map = mapReader.read( (String []) header.toArray(), processors); + // devCoffee #6141 - IDEMPIERE-3832 + String[] hdrs = new String[header.size()]; + header.toArray(hdrs); + map = mapReader.read( hdrs, processors); } catch (SuperCsvCellProcessorException e) { int idx = e.getCsvContext().getColumnNumber() - 1; errMsg.append(header.get(idx)).append(": ").append(e.getMessage()); diff --git a/org.adempiere.base/src/org/compiere/acct/FactLine.java b/org.adempiere.base/src/org/compiere/acct/FactLine.java index bfe93b328c..beb7cc628d 100644 --- a/org.adempiere.base/src/org/compiere/acct/FactLine.java +++ b/org.adempiere.base/src/org/compiere/acct/FactLine.java @@ -942,8 +942,8 @@ public final class FactLine extends X_Fact_Acct if (getUser2_ID() == 0) setUser2_ID (m_acct.getUser2_ID()); - // Revenue Recognition for AR Invoices - if (m_doc.getDocumentType().equals(Doc.DOCTYPE_ARInvoice) + // Revenue Recognition for AR/AP Invoices + if ((m_doc.getDocumentType().equals(Doc.DOCTYPE_ARInvoice) || m_doc.getDocumentType().equals(Doc.DOCTYPE_APInvoice)) && m_docLine != null && m_docLine.getC_RevenueRecognition_ID() != 0) { @@ -1005,14 +1005,13 @@ public final class FactLine extends X_Fact_Acct int C_Campaign_ID, int C_Activity_ID, int User1_ID, int User2_ID, int UserElement1_ID, int UserElement2_ID) { - if (log.isLoggable(Level.FINE)) log.fine("From Accout_ID=" + Account_ID); + if (log.isLoggable(Level.FINE)) log.fine("From Account_ID=" + Account_ID); // get VC for P_Revenue (from Product) MAccount revenue = MAccount.get(getCtx(), AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), Account_ID, C_SubAcct_ID, M_Product_ID, C_BPartner_ID, AD_OrgTrx_ID, C_LocFrom_ID, C_LocTo_ID, C_SRegion_ID, C_Project_ID, C_Campaign_ID, C_Activity_ID, - User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, - get_TrxName()); + User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, get_TrxName()); if (revenue != null && revenue.get_ID() == 0) revenue.saveEx(); if (revenue == null || revenue.get_ID() == 0) @@ -1020,16 +1019,25 @@ public final class FactLine extends X_Fact_Acct log.severe ("Revenue_Acct not found"); return Account_ID; } + + int existing = DB.getSQLValue(get_TrxName(), "SELECT vc.Account_ID FROM C_RevenueRecognition_Plan rp" + + " JOIN C_ValidCombination vc ON rp.UnearnedRevenue_Acct=vc.C_ValidCombination_ID" + + " WHERE rp.C_InvoiceLine_ID = ? AND rp.C_AcctSchema_ID=?" + , C_InvoiceLine_ID, getC_AcctSchema_ID()); + if ( existing > 0 ) + return existing; + + int P_Revenue_Acct = revenue.get_ID(); // get Unearned Revenue Acct from BPartner Group int UnearnedRevenue_Acct = 0; int new_Account_ID = 0; String sql = "SELECT ga.UnearnedRevenue_Acct, vc.Account_ID " - + "FROM C_BP_Group_Acct ga, C_BPartner p, C_ValidCombination vc " - + "WHERE ga.C_BP_Group_ID=p.C_BP_Group_ID" - + " AND ga.UnearnedRevenue_Acct=vc.C_ValidCombination_ID" - + " AND ga.C_AcctSchema_ID=? AND p.C_BPartner_ID=?"; + + "FROM C_BP_Group_Acct ga, C_BPartner p, C_ValidCombination vc " + + "WHERE ga.C_BP_Group_ID=p.C_BP_Group_ID" + + " AND ga.UnearnedRevenue_Acct=vc.C_ValidCombination_ID" + + " AND ga.C_AcctSchema_ID=? AND p.C_BPartner_ID=?"; PreparedStatement pstmt = null; ResultSet rs = null; try @@ -1057,12 +1065,19 @@ public final class FactLine extends X_Fact_Acct log.severe ("UnearnedRevenue_Acct not found"); return Account_ID; } + + MAccount unearned = MAccount.get(getCtx(), + AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), new_Account_ID, C_SubAcct_ID, + M_Product_ID, C_BPartner_ID, AD_OrgTrx_ID, C_LocFrom_ID, C_LocTo_ID, C_SRegion_ID, + C_Project_ID, C_Campaign_ID, C_Activity_ID, + User1_ID, User2_ID, UserElement1_ID, UserElement2_ID, get_TrxName()); - MRevenueRecognitionPlan plan = new MRevenueRecognitionPlan(getCtx(), 0, null); + MRevenueRecognitionPlan plan = new MRevenueRecognitionPlan(getCtx(), 0, get_TrxName()); + plan.setAD_Org_ID(AD_Org_ID); plan.setC_RevenueRecognition_ID (C_RevenueRecognition_ID); plan.setC_AcctSchema_ID (getC_AcctSchema_ID()); plan.setC_InvoiceLine_ID (C_InvoiceLine_ID); - plan.setUnEarnedRevenue_Acct (UnearnedRevenue_Acct); + plan.setUnEarnedRevenue_Acct (unearned.getC_ValidCombination_ID()); plan.setP_Revenue_Acct (P_Revenue_Acct); plan.setC_Currency_ID (getC_Currency_ID()); plan.setTotalAmt (getAcctBalance()); @@ -1071,7 +1086,7 @@ public final class FactLine extends X_Fact_Acct log.severe ("Plan NOT created"); return Account_ID; } - if (log.isLoggable(Level.FINE)) log.fine("From Acctount_ID=" + Account_ID + " to " + new_Account_ID + if (log.isLoggable(Level.FINE)) log.fine("From Account_ID=" + Account_ID + " to " + new_Account_ID + " - Plan from UnearnedRevenue_Acct=" + UnearnedRevenue_Acct + " to Revenue_Acct=" + P_Revenue_Acct); return new_Account_ID; } // createRevenueRecognition diff --git a/org.adempiere.base/src/org/compiere/db/AdempiereDatabase.java b/org.adempiere.base/src/org/compiere/db/AdempiereDatabase.java index be6cc13a4f..0451e77f6b 100644 --- a/org.adempiere.base/src/org/compiere/db/AdempiereDatabase.java +++ b/org.adempiere.base/src/org/compiere/db/AdempiereDatabase.java @@ -305,7 +305,7 @@ public interface AdempiereDatabase /** * Default sql use to test whether a connection is still valid */ - public final static String DEFAULT_CONN_TEST_SQL = "SELECT Version FROM AD_System"; + //public final static String DEFAULT_CONN_TEST_SQL = "SELECT Version FROM AD_System"; /** * Is the database have sql extension that return a subset of the query result diff --git a/org.adempiere.base/src/org/compiere/db/StatementProxy.java b/org.adempiere.base/src/org/compiere/db/StatementProxy.java index ee592f0348..97e4b3b308 100644 --- a/org.adempiere.base/src/org/compiere/db/StatementProxy.java +++ b/org.adempiere.base/src/org/compiere/db/StatementProxy.java @@ -95,6 +95,8 @@ public class StatementProxy implements InvocationHandler { return null; } else if (name.equals("getSql") && (args == null || args.length == 0)) { return getSql(); + } else if (name.equals("equals") && (args != null && args.length == 1)) { + return equals(args[0]); } String logSql = null; diff --git a/org.adempiere.base/src/org/compiere/install/Translation.java b/org.adempiere.base/src/org/compiere/install/Translation.java index 3bd02e9bdd..b0a0a6f410 100644 --- a/org.adempiere.base/src/org/compiere/install/Translation.java +++ b/org.adempiere.base/src/org/compiere/install/Translation.java @@ -173,7 +173,7 @@ public class Translation implements IApplication * @param Trl_Table translation table _Trl * @return status message */ - public String exportTrl (String directory, int AD_Client_ID, String AD_Language, String Trl_Table) + public String exportTrl (String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized) { String fileName = directory + File.separator + Trl_Table + "_" + AD_Language + ".xml"; log.info(fileName); @@ -185,6 +185,12 @@ public class Translation implements IApplication String Base_Table = Trl_Table.substring(0, pos); if (isBaseLanguage) tableName = Base_Table; + + if (onlyCentralized) { + if (MTable.get(m_ctx, tableName).getAD_Table_ID() > MTable.MAX_OFFICIAL_ID) + return ""; + } + String keyColumn = Base_Table + "_ID"; String uuidColumn = MTable.getUUIDColumnName(Base_Table); String[] trlColumns = getTrlColumns (Base_Table); @@ -237,6 +243,10 @@ public class Translation implements IApplication } if (AD_Client_ID >= 0) sql.append(haveWhere ? " AND " : " WHERE ").append("o.AD_Client_ID=").append(AD_Client_ID); + + if (onlyCentralized) + sql.append(haveWhere ? " AND " : " WHERE ").append(" o.").append(keyColumn).append("<=").append(MTable.MAX_OFFICIAL_ID).append(" AND o.IsActive = 'Y'"); + sql.append(" ORDER BY t.").append(keyColumn); // pstmt = DB.prepareStatement(sql.toString(), null); @@ -500,7 +510,7 @@ public class Translation implements IApplication System.out.println("Cannot create directory " + directory + " to export the language to it."); System.exit(1); } - exportTrl(directory, -1, AD_Language, table); + exportTrl(directory, -1, AD_Language, table, true); } else System.out.println("Just import and export are supported as modes."); } diff --git a/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java b/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java index 3216485d3e..009c4a7df2 100644 --- a/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java +++ b/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java @@ -220,6 +220,7 @@ public class AttachmentFileSystem implements IAttachmentStore { attach.m_items.add(entry); } else { log.severe("file not found: " + file.getAbsolutePath()); + attach.m_items.add(new MAttachmentEntry("~" + file.getName() + "~", "".getBytes(), attach.m_items.size() + 1)); } } diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_User.java b/org.adempiere.base/src/org/compiere/model/I_AD_User.java index ec433a0230..73697e0514 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_User.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_User.java @@ -485,6 +485,15 @@ public interface I_AD_User */ public String getIsMenuAutoExpand(); + /** Column name IsNoExpire */ + public static final String COLUMNNAME_IsNoExpire = "IsNoExpire"; + + /** Set No Expire */ + public void setIsNoExpire (boolean IsNoExpire); + + /** Get No Expire */ + public boolean isNoExpire(); + /** Column name IsNoPasswordReset */ public static final String COLUMNNAME_IsNoPasswordReset = "IsNoPasswordReset"; diff --git a/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecog_Service.java b/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecog_Service.java new file mode 100644 index 0000000000..35dc1e8713 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecog_Service.java @@ -0,0 +1,181 @@ +/****************************************************************************** + * Product: iDempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2012 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; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for C_RevenueRecog_Service + * @author iDempiere (generated) + * @version Release 6.1 + */ +public interface I_C_RevenueRecog_Service +{ + + /** TableName=C_RevenueRecog_Service */ + public static final String Table_Name = "C_RevenueRecog_Service"; + + /** AD_Table_ID=53888 */ + public static final int Table_ID = 53888; + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_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 Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name C_RevenueRecognition_ID */ + public static final String COLUMNNAME_C_RevenueRecognition_ID = "C_RevenueRecognition_ID"; + + /** Set Revenue Recognition. + * Method for recording revenue + */ + public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID); + + /** Get Revenue Recognition. + * Method for recording revenue + */ + public int getC_RevenueRecognition_ID(); + + public org.compiere.model.I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException; + + /** Column name C_RevenueRecog_Service_ID */ + public static final String COLUMNNAME_C_RevenueRecog_Service_ID = "C_RevenueRecog_Service_ID"; + + /** Set Revenue Recognition Service */ + public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID); + + /** Get Revenue Recognition Service */ + public int getC_RevenueRecog_Service_ID(); + + /** Column name C_RevenueRecog_Service_UU */ + public static final String COLUMNNAME_C_RevenueRecog_Service_UU = "C_RevenueRecog_Service_UU"; + + /** Set C_RevenueRecog_Service_UU */ + public void setC_RevenueRecog_Service_UU (String C_RevenueRecog_Service_UU); + + /** Get C_RevenueRecog_Service_UU */ + public String getC_RevenueRecog_Service_UU(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Line */ + public static final String COLUMNNAME_Line = "Line"; + + /** Set Line No. + * Unique line for this document + */ + public void setLine (int Line); + + /** Get Line No. + * Unique line for this document + */ + public int getLine(); + + /** Column name Percent */ + public static final String COLUMNNAME_Percent = "Percent"; + + /** Set Percent. + * Percentage + */ + public void setPercent (BigDecimal Percent); + + /** Get Percent. + * Percentage + */ + public BigDecimal getPercent(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); +} diff --git a/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition.java b/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition.java index cb3e3665d2..81c7f63351 100644 --- a/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition.java +++ b/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition.java @@ -113,6 +113,19 @@ public interface I_C_RevenueRecognition */ public String getDescription(); + /** Column name FixedRecogDay */ + public static final String COLUMNNAME_FixedRecogDay = "FixedRecogDay"; + + /** Set Fixed recognition day. + * Day of the period recognition occurs + */ + public void setFixedRecogDay (int FixedRecogDay); + + /** Get Fixed recognition day. + * Day of the period recognition occurs + */ + public int getFixedRecogDay(); + /** Column name IsActive */ public static final String COLUMNNAME_IsActive = "IsActive"; diff --git a/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition_Run.java b/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition_Run.java index 623d937ad2..c7f62ac5d4 100644 --- a/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition_Run.java +++ b/org.adempiere.base/src/org/compiere/model/I_C_RevenueRecognition_Run.java @@ -115,6 +115,26 @@ public interface I_C_RevenueRecognition_Run /** Get C_RevenueRecognition_Run_UU */ public String getC_RevenueRecognition_Run_UU(); + /** Column name C_RevenueRecog_Service_ID */ + public static final String COLUMNNAME_C_RevenueRecog_Service_ID = "C_RevenueRecog_Service_ID"; + + /** Set Revenue Recognition Service */ + public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID); + + /** Get Revenue Recognition Service */ + public int getC_RevenueRecog_Service_ID(); + + public org.compiere.model.I_C_RevenueRecog_Service getC_RevenueRecog_Service() throws RuntimeException; + + /** Column name DateRecognized */ + public static final String COLUMNNAME_DateRecognized = "DateRecognized"; + + /** Set Recognition Date */ + public void setDateRecognized (Timestamp DateRecognized); + + /** Get Recognition Date */ + public Timestamp getDateRecognized(); + /** Column name GL_Journal_ID */ public static final String COLUMNNAME_GL_Journal_ID = "GL_Journal_ID"; diff --git a/org.adempiere.base/src/org/compiere/model/MColumn.java b/org.adempiere.base/src/org/compiere/model/MColumn.java index 93dd0e0a67..f7a302758b 100644 --- a/org.adempiere.base/src/org/compiere/model/MColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MColumn.java @@ -763,7 +763,7 @@ public class MColumn extends X_AD_Column foreignTable = "M_AttributeSetInstance"; } else if (DisplayType.Assignment == refid) { foreignTable = "S_ResourceAssignment"; - } else if (DisplayType.Image == refid) { + } else if (DisplayType.Image == refid && !"BinaryData".equals(getColumnName())) { foreignTable = "AD_Image"; } else if (DisplayType.Chart == refid) { foreignTable = "AD_Chart"; diff --git a/org.adempiere.base/src/org/compiere/model/MJournalLine.java b/org.adempiere.base/src/org/compiere/model/MJournalLine.java index 08dd1190de..842d63fb17 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalLine.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalLine.java @@ -469,7 +469,8 @@ public class MJournalLine extends X_GL_JournalLine setM_Product_ID(combi.getM_Product_ID() > 0 ? combi.getM_Product_ID() : 0); setC_BPartner_ID(combi.getC_BPartner_ID() > 0 ? combi.getC_BPartner_ID() : 0); setAD_OrgTrx_ID(combi.getAD_OrgTrx_ID() > 0 ? combi.getAD_OrgTrx_ID() : 0); - setAD_Org_ID(combi.getAD_Org_ID() > 0 ? combi.getAD_Org_ID() : 0); + if (combi.getAD_Org_ID() > 0) + setAD_Org_ID(combi.getAD_Org_ID()); setC_LocFrom_ID(combi.getC_LocFrom_ID() > 0 ? combi.getC_LocFrom_ID() : 0); setC_LocTo_ID(combi.getC_LocTo_ID() > 0 ? combi.getC_LocTo_ID() : 0); setC_SalesRegion_ID(combi.getC_SalesRegion_ID() > 0 ? combi.getC_SalesRegion_ID() : 0); diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index e6b2c17b8b..52ea5233db 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -1289,7 +1289,7 @@ public class MMatchPO extends X_M_MatchPO this.saveEx(); // auto create new matchpo if have invoice line - if ( reversal.getC_InvoiceLine_ID() > 0) + if ( reversal.getC_InvoiceLine_ID() > 0 && reversal.getM_InOutLine_ID() > 0 ) { MMatchPO[] matchPOs = MMatchPO.getOrderLine(reversal.getCtx(), reversal.getC_OrderLine_ID(), reversal.get_TrxName()); BigDecimal matchQty = getQty(); diff --git a/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java b/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java index f32e93cdb5..e257a3ca42 100644 --- a/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java +++ b/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java @@ -1,18 +1,18 @@ package org.compiere.model; import java.sql.ResultSet; +import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.compiere.util.Env; public class MPasswordHistory extends X_AD_Password_History { - /** * */ - private static final long serialVersionUID = 3480028808276906947L; - + private static final long serialVersionUID = 8602148028134601856L; + public MPasswordHistory(Properties ctx, int AD_Password_History_ID, String trxName) { super(ctx, AD_Password_History_ID, trxName); @@ -35,6 +35,9 @@ public class MPasswordHistory extends X_AD_Password_History { * @return */ public static List getPasswordHistoryForCheck (int daysReuse, int userId){ + if (daysReuse <= 0) { + return new ArrayList(); + } StringBuilder whereClause = new StringBuilder() .append("SYSDATE-") .append(daysReuse) diff --git a/org.adempiere.base/src/org/compiere/model/MRefTable.java b/org.adempiere.base/src/org/compiere/model/MRefTable.java index 17402dd25e..10a75c8d03 100644 --- a/org.adempiere.base/src/org/compiere/model/MRefTable.java +++ b/org.adempiere.base/src/org/compiere/model/MRefTable.java @@ -59,7 +59,7 @@ public class MRefTable extends X_AD_Ref_Table @Override public I_AD_Table getAD_Table() throws RuntimeException { - MTable table = MTable.get(getCtx(), getAD_Table_ID()); + MTable table = MTable.get(getCtx(), getAD_Table_ID(), get_TrxName()); return table; } diff --git a/org.adempiere.base/src/org/compiere/model/MRevenueRecogService.java b/org.adempiere.base/src/org/compiere/model/MRevenueRecogService.java new file mode 100644 index 0000000000..4c9e2be5b3 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MRevenueRecogService.java @@ -0,0 +1,56 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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.sql.ResultSet; +import java.util.Properties; + + +/** + * Revenue Recognition Service Model + * + */ +public class MRevenueRecogService extends X_C_RevenueRecog_Service +{ + + + /** + * + */ + private static final long serialVersionUID = -3434480004031478264L; + + /** + * Standard Constructor + * @param ctx context + * @param C_RevenueRecognition_ID id + */ + public MRevenueRecogService (Properties ctx, int C_RevenueRecog_Service_ID, String trxName) + { + super (ctx, C_RevenueRecog_Service_ID, trxName); + } // MRevenueRecogService + + /** + * Load Constructor + * @param ctx context + * @param rs result set + */ + public MRevenueRecogService (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MRevenueRecognition + +} // MRevenueRecogService diff --git a/org.adempiere.base/src/org/compiere/model/MRevenueRecognition.java b/org.adempiere.base/src/org/compiere/model/MRevenueRecognition.java index 2b57d48434..ca2290fbdc 100644 --- a/org.adempiere.base/src/org/compiere/model/MRevenueRecognition.java +++ b/org.adempiere.base/src/org/compiere/model/MRevenueRecognition.java @@ -17,6 +17,7 @@ package org.compiere.model; import java.sql.ResultSet; +import java.util.List; import java.util.Properties; @@ -54,4 +55,22 @@ public class MRevenueRecognition extends X_C_RevenueRecognition super(ctx, rs, trxName); } // MRevenueRecognition + public List getServicesList() { + + if ( isTimeBased() ) + return null; + + Query query = new Query(getCtx(),MRevenueRecogService.Table_Name, "C_RevenueRecognition_ID = ?",get_TrxName()); + query.setParameters(getC_RevenueRecognition_ID()); + query.setOnlyActiveRecords(true); + query.setOrderBy("Line"); + + return query.list(); + } + + public static List getAll(Properties ctx, String trxName) { + Query query = new Query(ctx,MRevenueRecognition.Table_Name, null, trxName); + return query.list(); + } + } // MRevenueRecognition diff --git a/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionPlan.java b/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionPlan.java index b55cea821d..df9531a30b 100644 --- a/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionPlan.java +++ b/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionPlan.java @@ -16,7 +16,12 @@ *****************************************************************************/ package org.compiere.model; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.List; import java.util.Properties; import org.compiere.util.Env; @@ -73,35 +78,115 @@ public class MRevenueRecognitionPlan extends X_C_RevenueRecognition_Plan * @param success success * @return success */ -// protected boolean afterSave (boolean newRecord, boolean success) -// { -// if (!success) -// return success; -// if (newRecord) -// { -// MRevenueRecognition rr = new MRevenueRecognition(getCtx(), getC_RevenueRecognition_ID(), get_TrxName()); -// if (rr.isTimeBased()) -// { -// /** Get InvoiveQty -// SELECT QtyInvoiced, M_Product_ID -// INTO v_Qty, v_M_Product_ID -// FROM C_InvoiceLine -// WHERE C_InvoiceLine_ID=:new.C_InvoiceLine_ID; -// -- Insert -// AD_Sequence_Next ('C_ServiceLevel', :new.AD_Client_ID, v_NextNo); -// INSERT INTO C_ServiceLevel -// (C_ServiceLevel_ID, C_RevenueRecognition_Plan_ID, -// AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy, -// M_Product_ID, Description, ServiceLevelInvoiced, ServiceLevelProvided, -// Processing,Processed) -// VALUES -// (v_NextNo, :new.C_RevenueRecognition_Plan_ID, -// :new.AD_Client_ID,:new.AD_Org_ID,'Y',SysDate,:new.CreatedBy,SysDate,:new.UpdatedBy, -// v_M_Product_ID, NULL, v_Qty, 0, -// 'N', 'N'); -// **/ -// } -// } -// return success; -// } // afterSave + protected boolean afterSave (boolean newRecord, boolean success) + { + if (newRecord) + { + MRevenueRecognition rr = new MRevenueRecognition(getCtx(), getC_RevenueRecognition_ID(), get_TrxName()); + if (rr.isTimeBased()) + { + MInvoiceLine il = (MInvoiceLine) getC_InvoiceLine(); + + Calendar cal = Calendar.getInstance(); + Timestamp startDate = new Timestamp(cal.getTimeInMillis()); + if ( il.getRRStartDate() != null ) + startDate = il.getRRStartDate(); + else if ( il.getParent().getDateInvoiced() != null ) + startDate = il.getParent().getDateInvoiced(); + + cal.setTimeInMillis(startDate.getTime()); + + int interval = 1; + if ( MRevenueRecognition.RECOGNITIONFREQUENCY_Quarter.equals(rr.getRecognitionFrequency())) + interval = 3; + else if ( MRevenueRecognition.RECOGNITIONFREQUENCY_Year.equals(rr.getRecognitionFrequency())) + interval = 12; + + + int periods = rr.getNoMonths(); + BigDecimal amt = getTotalAmt().divide(new BigDecimal(periods + ""), RoundingMode.HALF_UP); + BigDecimal total = Env.ZERO; + BigDecimal startAmt = amt; + + int monthOffset = cal.get(Calendar.MONTH); + + double startDay = cal.get(Calendar.DAY_OF_MONTH); + + if ( MRevenueRecognition.RECOGNITIONFREQUENCY_Month.equals(rr.getRecognitionFrequency()) && + rr.getFixedRecogDay() != 0 ) + { // include start day + double daysInMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH); + periods = periods + 1; + + double totalDays = rr.getFixedRecogDay() > daysInMonth ? daysInMonth : rr.getFixedRecogDay(); + + double noDays = totalDays - (startDay-1); + + if ( noDays <= 0 ) // start recognition following month + { + monthOffset +=1; + noDays = noDays + daysInMonth; + } + + BigDecimal proportion = new BigDecimal( noDays / daysInMonth); + startAmt = amt.multiply(proportion); + startAmt = startAmt.setScale(2, RoundingMode.HALF_UP); + cal.set(Calendar.DAY_OF_MONTH, rr.getFixedRecogDay()); + } + + cal.set(Calendar.MONTH, 0); // January + + + for ( int i = 0; i <= periods - 1; i++ ) + { + Calendar cal2 = Calendar.getInstance(); + cal2.setTimeInMillis(cal.getTimeInMillis()); + cal2.add(Calendar.MONTH, (interval*i)+monthOffset); + + MRevenueRecognitionRun run = new MRevenueRecognitionRun(getCtx(), 0, get_TrxName()); + run.setClientOrg(this); + run.setC_RevenueRecognition_Plan_ID(getC_RevenueRecognition_Plan_ID()); + run.setDateRecognized(new Timestamp(cal2.getTimeInMillis())); + BigDecimal recogAmt = amt; + + if ( i == 0) + recogAmt = startAmt; + if ( i == periods - 1 ) + recogAmt = getTotalAmt().subtract(total); + run.setRecognizedAmt(recogAmt); + if ( recogAmt.signum() != 0 ) + run.saveEx(); + total = total.add(recogAmt); + } + } + else + { + List services = rr.getServicesList(); + BigDecimal totalAmt = Env.ZERO; + MRevenueRecognitionRun last = null; + for (MRevenueRecogService service : services ) + { + BigDecimal recogAmt = getTotalAmt().multiply(service.getPercent()).divide(Env.ONEHUNDRED, 4, RoundingMode.HALF_UP); + MRevenueRecognitionRun run = new MRevenueRecognitionRun(getCtx(), 0, get_TrxName()); + run.setClientOrg(this); + run.setC_RevenueRecognition_Plan_ID(getC_RevenueRecognition_Plan_ID()); + run.setRecognizedAmt(recogAmt); + run.setC_RevenueRecog_Service_ID(service.getC_RevenueRecog_Service_ID()); + run.saveEx(); + + last = run; + totalAmt = totalAmt.add(recogAmt); + } + + if ( getTotalAmt().subtract(totalAmt).compareTo(Env.ZERO) != 0) + { + last.setRecognizedAmt(last.getRecognizedAmt().add(getTotalAmt().subtract(totalAmt))); + last.saveEx(); + } + + + } + } + return success; + } // afterSave } // MRevenueRecognitionPlan diff --git a/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionRun.java b/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionRun.java new file mode 100644 index 0000000000..bd272cf551 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MRevenueRecognitionRun.java @@ -0,0 +1,56 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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.sql.ResultSet; +import java.util.Properties; + + +/** + * Revenue Recognition Run Model + * + */ +public class MRevenueRecognitionRun extends X_C_RevenueRecognition_Run +{ + + + /** + * + */ + private static final long serialVersionUID = -6068883255121303257L; + + /** + * Standard Constructor + * @param ctx context + * @param C_RevenueRecognition_ID id + */ + public MRevenueRecognitionRun (Properties ctx, int C_RevenueRecognition_Run_ID, String trxName) + { + super (ctx, C_RevenueRecognition_Run_ID, trxName); + } // MRevenueRecognitionRun + + /** + * Load Constructor + * @param ctx context + * @param rs result set + */ + public MRevenueRecognitionRun (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MRevenueRecognitionRun + +} // MRevenueRecognitionRun diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 77bcaf5a63..f515a6e80e 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -42,9 +42,9 @@ public class MSysConfig extends X_AD_SysConfig /** * */ - private static final long serialVersionUID = 8623809160538454497L; + private static final long serialVersionUID = 2856526441538434702L; - public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; + public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS"; public static final String ALLOCATION_DESCRIPTION = "ALLOCATION_DESCRIPTION"; public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO"; @@ -59,7 +59,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String APPLICATION_MAIN_VERSION = "APPLICATION_MAIN_VERSION"; public static final String APPLICATION_MAIN_VERSION_SHOWN = "APPLICATION_MAIN_VERSION_SHOWN"; public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN"; - public static final String APPLICATION_URL = "APPLICATION_URL"; + public static final String APPLICATION_URL = "APPLICATION_URL"; public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK"; public static final String AUTO_ASSIGN_ROLE_TO_CREATOR_USER = "AUTO_ASSIGN_ROLE_TO_CREATOR_USER"; public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS"; @@ -80,6 +80,9 @@ public class MSysConfig extends X_AD_SysConfig public static final String CLIENT_ACCOUNTING = "CLIENT_ACCOUNTING"; public static final String DEFAULT_COA_PATH = "DEFAULT_COA_PATH"; public static final String DEFAULT_ENTITYTYPE = "DEFAULT_ENTITYTYPE"; // used as default in entity type columns with get_sysconfig + public static final String DB_READ_REPLICA_NORMAL_MAX_ITERATIONS = "DB_READ_REPLICA_NORMAL_MAX_ITERATIONS"; + public static final String DB_READ_REPLICA_NORMAL_TIMEOUT_IN_MILLISECONDS = "DB_READ_REPLICA_NORMAL_TIMEOUT_IN_MILLISECONDS"; + public static final String DB_READ_REPLICA_URLS = "DB_READ_REPLICA_URLS"; public static final String DICTIONARY_ID_COMMENTS = "DICTIONARY_ID_COMMENTS"; public static final String DICTIONARY_ID_PASSWORD = "DICTIONARY_ID_PASSWORD"; public static final String DICTIONARY_ID_USE_CENTRALIZED_ID = "DICTIONARY_ID_USE_CENTRALIZED_ID"; @@ -141,7 +144,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String SYSTEM_IN_MAINTENANCE_MODE = "SYSTEM_IN_MAINTENANCE_MODE"; public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG"; public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE"; - public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER"; + public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER"; public static final String TRACE_ALL_TRX_CONNECTION_GET = "TRACE_ALL_TRX_CONNECTION_GET"; public static final String TWOPACK_COMMIT_DDL = "2PACK_COMMIT_DDL"; public static final String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS"; @@ -175,6 +178,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL"; public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE"; public static final String ZK_MOBILE_PAGING_SIZE = "ZK_MOBILE_PAGING_SIZE"; + public static final String ZK_PAGING_DETAIL_SIZE = "ZK_PAGING_DETAIL_SIZE"; public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE"; public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE"; public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE"; @@ -183,8 +187,8 @@ public class MSysConfig extends X_AD_SysConfig public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER"; public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL"; public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS"; - public static final String ZK_THEME = "ZK_THEME"; public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE"; + public static final String ZK_THEME = "ZK_THEME"; public static final String ZOOM_ACROSS_QUERY_TIMEOUT = "ZOOM_ACROSS_QUERY_TIMEOUT"; /** diff --git a/org.adempiere.base/src/org/compiere/model/MTable.java b/org.adempiere.base/src/org/compiere/model/MTable.java index 74a01516cd..373f74d374 100644 --- a/org.adempiere.base/src/org/compiere/model/MTable.java +++ b/org.adempiere.base/src/org/compiere/model/MTable.java @@ -58,7 +58,7 @@ public class MTable extends X_AD_Table /** * */ - private static final long serialVersionUID = -8757836873040013402L; + private static final long serialVersionUID = 7527235342324308477L; public final static int MAX_OFFICIAL_ID = 999999; @@ -102,7 +102,7 @@ public class MTable extends X_AD_Table * @param tableName case insensitive table name * @return Table */ - public static MTable get (Properties ctx, String tableName) + public static synchronized MTable get (Properties ctx, String tableName) { if (tableName == null) return null; @@ -699,10 +699,12 @@ public class MTable extends X_AD_Table return (tablename.equals("AD_Org") || tablename.equals("AD_OrgInfo") || tablename.equals("AD_Client") || // IDEMPIERE-668 + tablename.equals("AD_AllClients_V") || tablename.equals("AD_ReportView") || tablename.equals("AD_Role") || tablename.equals("AD_System") || tablename.equals("AD_User") || + tablename.equals("AD_AllUsers_V") || tablename.equals("C_DocType") || tablename.equals("GL_Category") || tablename.equals("M_AttributeSet") || diff --git a/org.adempiere.base/src/org/compiere/model/MUser.java b/org.adempiere.base/src/org/compiere/model/MUser.java index 05ce2ac997..21555e5d8e 100644 --- a/org.adempiere.base/src/org/compiere/model/MUser.java +++ b/org.adempiere.base/src/org/compiere/model/MUser.java @@ -907,14 +907,6 @@ public class MUser extends X_AD_User MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName()); if (pwdrule != null){ List passwordHistorys = MPasswordHistory.getPasswordHistoryForCheck(pwdrule.getDays_Reuse_Password(), this.getAD_User_ID()); - // for long time user don't use this system, because all password in history table is out of check range. but we will want new password must difference latest password - if (passwordHistorys.size() == 0 && !this.is_new() && this.get_ValueOld(MUser.COLUMNNAME_Password) != null){ - Object oldSalt = this.get_ValueOld(MUser.COLUMNNAME_Salt); - Object oldPassword = this.get_ValueOld(MUser.COLUMNNAME_Password); - - MPasswordHistory latestPassword = new MPasswordHistory(oldSalt == null?null:oldSalt.toString(), oldPassword == null?null:oldPassword.toString()); - passwordHistorys.add(latestPassword); - } pwdrule.validate((getLDAPUser() != null ? getLDAPUser() : getName()), getPassword(), passwordHistorys); } setDatePasswordChanged(new Timestamp(new Date().getTime())); @@ -1055,17 +1047,24 @@ public class MUser extends X_AD_User @Override protected boolean afterSave(boolean newRecord, boolean success) { if (getPassword() != null && getPassword().length() > 0 && (newRecord || is_ValueChanged("Password"))) { - MPasswordHistory passwordHistory = new MPasswordHistory(this.getCtx(), 0, this.get_TrxName()); - passwordHistory.setSalt(this.getSalt()); - passwordHistory.setPassword(this.getPassword()); - // http://wiki.idempiere.org/en/System_user - if (!this.is_new() && this.getAD_User_ID() == 0){ - passwordHistory.set_Value(MPasswordHistory.COLUMNNAME_AD_User_ID, 0); - }else{ - passwordHistory.setAD_User_ID(this.getAD_User_ID()); + MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName()); + if (pwdrule != null && pwdrule.getDays_Reuse_Password() > 0) { + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); + if (! hash_password) { + log.severe("Saving password history: it is strongly encouraged to save password history just when using hashed passwords - WARNING! table AD_Password_History is possibly keeping plain passwords"); + } + MPasswordHistory passwordHistory = new MPasswordHistory(this.getCtx(), 0, this.get_TrxName()); + passwordHistory.setSalt(this.getSalt()); + passwordHistory.setPassword(this.getPassword()); + // http://wiki.idempiere.org/en/System_user + if (!this.is_new() && this.getAD_User_ID() == 0){ + passwordHistory.set_Value(MPasswordHistory.COLUMNNAME_AD_User_ID, 0); + }else{ + passwordHistory.setAD_User_ID(this.getAD_User_ID()); + } + passwordHistory.setDatePasswordChanged(this.getUpdated()); + passwordHistory.saveEx(); } - passwordHistory.setDatePasswordChanged(this.getUpdated()); - passwordHistory.saveEx(); } return super.afterSave(newRecord, success); } diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_User.java b/org.adempiere.base/src/org/compiere/model/X_AD_User.java index 0dad803eff..4e45ba1a2e 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_User.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_User.java @@ -31,7 +31,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent /** * */ - private static final long serialVersionUID = 20181104L; + private static final long serialVersionUID = 20180831L; /** Standard Constructor */ public X_AD_User (Properties ctx, int AD_User_ID, String trxName) @@ -52,6 +52,8 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent // N setIsLocked (false); // 'N' + setIsNoExpire (false); +// N setIsNoPasswordReset (false); // 'N' setIsSalesLead (false); @@ -747,6 +749,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent return (String)get_Value(COLUMNNAME_IsMenuAutoExpand); } + /** Set No Expire. + @param IsNoExpire No Expire */ + public void setIsNoExpire (boolean IsNoExpire) + { + set_Value (COLUMNNAME_IsNoExpire, Boolean.valueOf(IsNoExpire)); + } + + /** Get No Expire. + @return No Expire */ + public boolean isNoExpire () + { + Object oo = get_Value(COLUMNNAME_IsNoExpire); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set No Password Reset. @param IsNoPasswordReset No Password Reset */ public void setIsNoPasswordReset (boolean IsNoPasswordReset) diff --git a/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecog_Service.java b/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecog_Service.java new file mode 100644 index 0000000000..42ad1d6665 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecog_Service.java @@ -0,0 +1,202 @@ +/****************************************************************************** + * Product: iDempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2012 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 * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for C_RevenueRecog_Service + * @author iDempiere (generated) + * @version Release 6.1 - $Id$ */ +public class X_C_RevenueRecog_Service extends PO implements I_C_RevenueRecog_Service, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20181128L; + + /** Standard Constructor */ + public X_C_RevenueRecog_Service (Properties ctx, int C_RevenueRecog_Service_ID, String trxName) + { + super (ctx, C_RevenueRecog_Service_ID, trxName); + /** if (C_RevenueRecog_Service_ID == 0) + { + setC_RevenueRecognition_ID (0); + setC_RevenueRecog_Service_ID (0); + } */ + } + + /** Load Constructor */ + public X_C_RevenueRecog_Service (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 3 - Client - Org + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_C_RevenueRecog_Service[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public org.compiere.model.I_C_RevenueRecognition getC_RevenueRecognition() throws RuntimeException + { + return (org.compiere.model.I_C_RevenueRecognition)MTable.get(getCtx(), org.compiere.model.I_C_RevenueRecognition.Table_Name) + .getPO(getC_RevenueRecognition_ID(), get_TrxName()); } + + /** Set Revenue Recognition. + @param C_RevenueRecognition_ID + Method for recording revenue + */ + public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID) + { + if (C_RevenueRecognition_ID < 1) + set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_ID, null); + else + set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_ID, Integer.valueOf(C_RevenueRecognition_ID)); + } + + /** Get Revenue Recognition. + @return Method for recording revenue + */ + public int getC_RevenueRecognition_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecognition_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getC_RevenueRecognition_ID())); + } + + /** Set Revenue Recognition Service. + @param C_RevenueRecog_Service_ID Revenue Recognition Service */ + public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID) + { + if (C_RevenueRecog_Service_ID < 1) + set_ValueNoCheck (COLUMNNAME_C_RevenueRecog_Service_ID, null); + else + set_ValueNoCheck (COLUMNNAME_C_RevenueRecog_Service_ID, Integer.valueOf(C_RevenueRecog_Service_ID)); + } + + /** Get Revenue Recognition Service. + @return Revenue Recognition Service */ + public int getC_RevenueRecog_Service_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecog_Service_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set C_RevenueRecog_Service_UU. + @param C_RevenueRecog_Service_UU C_RevenueRecog_Service_UU */ + public void setC_RevenueRecog_Service_UU (String C_RevenueRecog_Service_UU) + { + set_Value (COLUMNNAME_C_RevenueRecog_Service_UU, C_RevenueRecog_Service_UU); + } + + /** Get C_RevenueRecog_Service_UU. + @return C_RevenueRecog_Service_UU */ + public String getC_RevenueRecog_Service_UU () + { + return (String)get_Value(COLUMNNAME_C_RevenueRecog_Service_UU); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Line No. + @param Line + Unique line for this document + */ + public void setLine (int Line) + { + set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); + } + + /** Get Line No. + @return Unique line for this document + */ + public int getLine () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Line); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Percent. + @param Percent + Percentage + */ + public void setPercent (BigDecimal Percent) + { + set_Value (COLUMNNAME_Percent, Percent); + } + + /** Get Percent. + @return Percentage + */ + public BigDecimal getPercent () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Percent); + if (bd == null) + return Env.ZERO; + return bd; + } +} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition.java b/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition.java index f977fec8bd..b1b66a9ac8 100644 --- a/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition.java +++ b/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition.java @@ -30,7 +30,7 @@ public class X_C_RevenueRecognition extends PO implements I_C_RevenueRecognition /** * */ - private static final long serialVersionUID = 20181104L; + private static final long serialVersionUID = 20181127L; /** Standard Constructor */ public X_C_RevenueRecognition (Properties ctx, int C_RevenueRecognition_ID, String trxName) @@ -127,6 +127,26 @@ public class X_C_RevenueRecognition extends PO implements I_C_RevenueRecognition return (String)get_Value(COLUMNNAME_Description); } + /** Set Fixed recognition day. + @param FixedRecogDay + Day of the period recognition occurs + */ + public void setFixedRecogDay (int FixedRecogDay) + { + set_Value (COLUMNNAME_FixedRecogDay, Integer.valueOf(FixedRecogDay)); + } + + /** Get Fixed recognition day. + @return Day of the period recognition occurs + */ + public int getFixedRecogDay () + { + Integer ii = (Integer)get_Value(COLUMNNAME_FixedRecogDay); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Time based. @param IsTimeBased Time based Revenue Recognition rather than Service Level based diff --git a/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition_Run.java b/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition_Run.java index b738b98acb..b4a1ac8b18 100644 --- a/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition_Run.java +++ b/org.adempiere.base/src/org/compiere/model/X_C_RevenueRecognition_Run.java @@ -19,6 +19,7 @@ package org.compiere.model; import java.math.BigDecimal; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.Properties; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; @@ -32,7 +33,7 @@ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecogni /** * */ - private static final long serialVersionUID = 20181104L; + private static final long serialVersionUID = 20181127L; /** Standard Constructor */ public X_C_RevenueRecognition_Run (Properties ctx, int C_RevenueRecognition_Run_ID, String trxName) @@ -42,7 +43,6 @@ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecogni { setC_RevenueRecognition_Plan_ID (0); setC_RevenueRecognition_Run_ID (0); - setGL_Journal_ID (0); setRecognizedAmt (Env.ZERO); } */ } @@ -148,6 +148,45 @@ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecogni return (String)get_Value(COLUMNNAME_C_RevenueRecognition_Run_UU); } + public org.compiere.model.I_C_RevenueRecog_Service getC_RevenueRecog_Service() throws RuntimeException + { + return (org.compiere.model.I_C_RevenueRecog_Service)MTable.get(getCtx(), org.compiere.model.I_C_RevenueRecog_Service.Table_Name) + .getPO(getC_RevenueRecog_Service_ID(), get_TrxName()); } + + /** Set Revenue Recognition Service. + @param C_RevenueRecog_Service_ID Revenue Recognition Service */ + public void setC_RevenueRecog_Service_ID (int C_RevenueRecog_Service_ID) + { + if (C_RevenueRecog_Service_ID < 1) + set_Value (COLUMNNAME_C_RevenueRecog_Service_ID, null); + else + set_Value (COLUMNNAME_C_RevenueRecog_Service_ID, Integer.valueOf(C_RevenueRecog_Service_ID)); + } + + /** Get Revenue Recognition Service. + @return Revenue Recognition Service */ + public int getC_RevenueRecog_Service_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecog_Service_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Recognition Date. + @param DateRecognized Recognition Date */ + public void setDateRecognized (Timestamp DateRecognized) + { + set_Value (COLUMNNAME_DateRecognized, DateRecognized); + } + + /** Get Recognition Date. + @return Recognition Date */ + public Timestamp getDateRecognized () + { + return (Timestamp)get_Value(COLUMNNAME_DateRecognized); + } + public org.compiere.model.I_GL_Journal getGL_Journal() throws RuntimeException { return (org.compiere.model.I_GL_Journal)MTable.get(getCtx(), org.compiere.model.I_GL_Journal.Table_Name) diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index e65a67f1a6..082ab78689 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -830,7 +830,7 @@ public class DataEngine ResultSet rs = null; try { - pstmt = DB.prepareStatement(pd.getSQL(), m_trxName); + pstmt = DB.prepareNormalReadReplicaStatement(pd.getSQL(), m_trxName); rs = pstmt.executeQuery(); // Row Loop while (rs.next()) diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 41065426a4..072d6696d2 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -33,6 +33,7 @@ import java.sql.Timestamp; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -2114,6 +2115,15 @@ public final class DB } catch (SQLException e) { ; } + if (readReplicaStatements.contains(st)) { + try { + DBReadReplica.closeReadReplicaStatement(st); + } catch (Exception e) { + ; + } finally { + readReplicaStatements.remove(st); + } + } } /** @@ -2524,4 +2534,48 @@ public final class DB return rowsArray; } + /** Read Replica Statements List */ + private static final List readReplicaStatements = Collections.synchronizedList(new ArrayList()); + + /** + * Prepare Read Replica Statement + * @param sql sql statement + * @param trxName transaction + * @return Prepared Statement (from replica if possible, otherwise normal statement) + */ + public static PreparedStatement prepareNormalReadReplicaStatement(String sql, String trxName) { + int concurrency = ResultSet.CONCUR_READ_ONLY; + String upper = sql.toUpperCase(); + if (upper.startsWith("UPDATE ") || upper.startsWith("DELETE ")) + concurrency = ResultSet.CONCUR_UPDATABLE; + return prepareNormalReadReplicaStatement(sql, ResultSet.TYPE_FORWARD_ONLY, concurrency, trxName); + } + + /** + * Prepare Read Replica Statement + * @param sql sql statement + * @param resultSetType - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE + * @param resultSetConcurrency - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE + * @param trxName transaction name + * @return Prepared Statement (from replica if possible, otherwise normal statement) + */ + private static PreparedStatement prepareNormalReadReplicaStatement(String sql, int resultSetType, int resultSetConcurrency, String trxName) { + if (sql == null || sql.length() == 0) + throw new IllegalArgumentException("No SQL"); + boolean useReadReplica = MSysConfig.getValue(MSysConfig.DB_READ_REPLICA_URLS) != null; + if ( trxName == null + && useReadReplica + && resultSetType == ResultSet.TYPE_FORWARD_ONLY + && resultSetConcurrency == ResultSet.CONCUR_READ_ONLY) { + // this is a candidate for a read replica connection (read-only, forward-only, no-trx), try to obtain one, otherwise fallback to normal + PreparedStatement stmt = DBReadReplica.prepareNormalReadReplicaStatement(sql, resultSetType, resultSetConcurrency, trxName); + if (stmt != null) { + readReplicaStatements.add(stmt); + return stmt; + } + } + // + return ProxyFactory.newCPreparedStatement(resultSetType, resultSetConcurrency, sql, trxName); + } + } // DB diff --git a/org.adempiere.base/src/org/compiere/util/DBReadReplica.java b/org.adempiere.base/src/org/compiere/util/DBReadReplica.java new file mode 100644 index 0000000000..35ab65f763 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/util/DBReadReplica.java @@ -0,0 +1,349 @@ +/********************************************************************** +* 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: * +* - Trek Global * +* - Carlos Ruiz - globalqss * +**********************************************************************/ +package org.compiere.util; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.logging.Level; + +import org.adempiere.exceptions.DBException; +import org.compiere.model.MSysConfig; +import org.compiere.model.MSystem; + +public class DBReadReplica { + + private static String m_user = null; + private static String m_pass = null; + final private static String sqlValidateSync = "SELECT lastupdate FROM dbreplicasyncverifier"; + final private static String sqlUpdateSync = "UPDATE dbreplicasyncverifier SET lastupdate=SYSDATE"; + final private static String sqlValidateDBAddress = "SELECT DBAddress FROM AD_System"; + private volatile static int shift = 0; // for load balancing between different replicas + + /** Logger */ + private static CLogger log = CLogger.getCLogger (DBReadReplica.class); + + /** + * Prepare Normal Read Replica Statement + * @param sql sql statement + * @param resultSetType - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE + * @param resultSetConcurrency - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE + * @param trxName transaction + * @return Prepared Statement (from replica if possible, otherwise null) + * + * @TODO: Add profiles fast and slow for other read replica statements + * + */ + public static PreparedStatement prepareNormalReadReplicaStatement(String sql, int resultSetType, int resultSetConcurrency, String trxName) { + String replicaURLsConfig = MSysConfig.getValue(MSysConfig.DB_READ_REPLICA_URLS); // list of JDBC URLs separated by | + if (Util.isEmpty(replicaURLsConfig, true)) + return null; + int DB_READ_REPLICA_NORMAL_TIMEOUT_IN_MILLISECONDS = MSysConfig.getIntValue(MSysConfig.DB_READ_REPLICA_NORMAL_TIMEOUT_IN_MILLISECONDS, 5000); + int DB_READ_REPLICA_NORMAL_MAX_ITERATIONS = MSysConfig.getIntValue(MSysConfig.DB_READ_REPLICA_NORMAL_MAX_ITERATIONS, 3); + + setUserPass(); + + Timestamp lastTs = setMasterVerificationTimestamp(); + String masterDBAddress = MSystem.get(Env.getCtx()).getDBAddress(); + + List urlConnList = new ArrayList(); + + String[] replicaURLs = replicaURLsConfig.split("\\|"); + int index = 0; + int length = replicaURLs.length; + for (int i = 0; i < length; i++) { + String replicaURL = replicaURLs[i].trim(); + index = (i + shift) % length; + URLReplicaConnection urc = new URLReplicaConnection(replicaURL, index); + urlConnList.add(urc); + } + shift++; + if (shift >= length) + shift = 0; + + // sort URLs by index - for load balancing + Collections.sort(urlConnList); + + PreparedStatement statementToReturn = null; + String usedReplicaURL = null; + for (int i = 0; i < DB_READ_REPLICA_NORMAL_MAX_ITERATIONS; i++) { + + for (URLReplicaConnection urlConn : urlConnList) { + + if (! urlConn.isUsable()) + continue; // next urlConn + + String replicaURL = urlConn.getReplicaURL(); + + Connection conn = urlConn.getConnection(); + if (conn == null && urlConn.isUsable()) { + conn = tryConnect(replicaURL); + } + if (conn == null) { + urlConn.setUsable(false); + continue; // next urlConn + } + urlConn.setConnection(conn); + + String replicaDBAddress = getReplicaDBAddress(conn); + if (!masterDBAddress.equals(replicaDBAddress)) { + log.warning("Replica DB Address doesn't match with master DB Address -> " + replicaURL); + urlConn.setUsable(false); + continue; // next urlConn + } + + Timestamp replicaTs = getReplicaVerificationTimestamp(conn); + if (replicaTs == null) { + log.warning("Could not get replica verification timestamp -> " + replicaURL); + urlConn.setUsable(false); + continue; // next urlConn + } + + if (replicaTs.before(lastTs)) { + // not usable yet + continue; // next urlConn + } + try { + sql = DB.getDatabase().convertStatement(sql); + statementToReturn = conn.prepareStatement(sql, resultSetType, resultSetConcurrency); + usedReplicaURL = urlConn.getReplicaURL(); + } catch (SQLException e) { + log.warning("Error preparing statement in replica -> " + replicaURL + " / SQL = " + sql); + statementToReturn = null; + urlConn.setUsable(false); + } + } // end for urlConnList + + if (statementToReturn != null) + break; // break iterations + + boolean noMoreUsables = true; + for (URLReplicaConnection urlConn : urlConnList) { + if (urlConn.isUsable()) { + noMoreUsables = false; + break; + } + } + + if (noMoreUsables) + break; + + if (i < DB_READ_REPLICA_NORMAL_MAX_ITERATIONS-1) { + try { + log.warning("Waiting " + DB_READ_REPLICA_NORMAL_TIMEOUT_IN_MILLISECONDS + " milliseconds for replication to sync"); + Thread.sleep(DB_READ_REPLICA_NORMAL_TIMEOUT_IN_MILLISECONDS); + } catch (InterruptedException e) { + ; + } + } + } // end for iterations + + if (statementToReturn == null) + log.warning("Abandoning replicas: none usable or max wait reached without sync"); + + // close any connection not used in the statement to return + for (URLReplicaConnection urlConn : urlConnList) { + Connection conn = urlConn.getConnection(); + if (conn == null) + continue; + try { + if (statementToReturn != null && conn == statementToReturn.getConnection()) + continue; // next connection + } catch (SQLException e) { + log.warning("Error getting connection from statement on replica, URL = " + urlConn.getReplicaURL() + ", cause = " + e.getLocalizedMessage()); + } + try { + conn.close(); + } catch (SQLException e) { + log.warning("Could not close connection statement on replica, URL = " + urlConn.getReplicaURL() + ", cause = " + e.getLocalizedMessage()); + } + } + + if (statementToReturn != null) + log.warning("Using replica for statement, URL = " + usedReplicaURL + " / SQL = " + sql); // WARNING during test phase, change to info before moving to production + return statementToReturn; + } + + private static Timestamp getReplicaVerificationTimestamp(Connection conn) { + PreparedStatement stVerifySync = null; + ResultSet rsVerifySync = null; + Timestamp replicaTs = null; + try { + stVerifySync = conn.prepareStatement(sqlValidateSync); + rsVerifySync = stVerifySync.executeQuery(); + if (rsVerifySync.next()) + replicaTs = rsVerifySync.getTimestamp("lastupdate"); + } catch (SQLException e) { + replicaTs = null; + } finally { + DB.close(rsVerifySync, stVerifySync); + } + return replicaTs; + } + + private static String getReplicaDBAddress(Connection conn) { + PreparedStatement stVerifyAddr = null; + ResultSet rsVerifyAddr = null; + String dbAddr = null; + try { + stVerifyAddr = conn.prepareStatement(sqlValidateDBAddress); + rsVerifyAddr = stVerifyAddr.executeQuery(); + if (rsVerifyAddr.next()) + dbAddr = rsVerifyAddr.getString("DBAddress"); + } catch (SQLException e) { + dbAddr = null; + } finally { + DB.close(rsVerifyAddr, stVerifyAddr); + } + return dbAddr; + } + + private static Connection tryConnect(String replicaURL) { + // open connection to replica + Connection conn = null; + try { + conn = DB.getDatabase(replicaURL).getDriverConnection(replicaURL, m_user, m_pass); + } catch (SQLException e) { + log.warning("Could not get a connection to " + replicaURL + ", cause = " + e.getLocalizedMessage()); + conn = null; + } + return conn; + } + + private static Timestamp setMasterVerificationTimestamp() { + // update time in master database to verify synchronization of replicas + Timestamp lastTs = null; + try { + DB.executeUpdateEx(sqlUpdateSync, null); + lastTs = DB.getSQLValueTSEx(null, sqlValidateSync); + } catch (DBException e1) { + log.warning("Could not sync dbreplicasyncverifier, cause = " + e1.getLocalizedMessage()); + lastTs = null; + } + return lastTs; + } + + public static void closeReadReplicaStatement(Statement st) { + // close the connection associated to the statement + try { + st.getConnection().close(); + } catch (SQLException e) { + log.warning("Error closing the read replica statement, cause = " + e.getLocalizedMessage()); + } + } + + /** + * Set Attributes from String (pares toStringLong()) + * @param attributes attributes + */ + private static void setUserPass() { + if (m_user != null || m_pass != null) + return; + String attributes = Ini.getProperty (Ini.P_CONNECTION); + try { + attributes = attributes.substring(attributes.indexOf("[")+1, attributes.length() - 1); + String[] pairs= attributes.split("[,]"); + for(String pair : pairs) + { + String[] pairComponents = pair.split("[=]"); + String key = pairComponents[0]; + String value = pairComponents.length == 2 ? unescape(pairComponents[1]) : ""; + if ("UID".equalsIgnoreCase(key)) { + m_user = value; + } else if ("PWD".equalsIgnoreCase(key)) { + m_pass = value; + } + } + } catch (Exception e) { + log.log(Level.SEVERE, attributes + " - " + e.toString (), e); + } + } // setAttributes + + private static String unescape(String value) { + value = value.replace("&eq;", "="); + value = value.replace(",", ","); + return value; + } + + /** + * URL connection class for DB Read Replica + * + */ + private static class URLReplicaConnection implements Comparable { + + private String replicaURL; + private int index; + private boolean usable = true; + private Connection conn = null; + + public URLReplicaConnection(String replicaURL, int index) { + this.replicaURL = replicaURL; + this.index = index; + } + + public String getReplicaURL() { + return replicaURL; + } + + public boolean isUsable() { + return usable; + } + + public void setUsable(boolean usable) { + this.usable = usable; + } + + public Connection getConnection() { + return conn; + } + + public void setConnection(Connection conn) { + this.conn = conn; + } + + @Override + public int compareTo(URLReplicaConnection o) { + if (index > o.index) + return 1; + else if (index < o.index) + return -1; + return 0; + } + + @Override + public String toString() { + return "replicaURL=" + replicaURL + + " index=" + index + + " usable=" + usable + + " connection=" + conn; + } + + } + +} diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 9ca1beea23..860480a28a 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -1312,7 +1312,7 @@ public class Login if (minutes > MAX_ACCOUNT_LOCK_MINUTES) { boolean inactive = false; - if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null) + if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null && !user.isNoExpire()) { long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24); if (days > MAX_INACTIVE_PERIOD_DAY) @@ -1331,7 +1331,7 @@ public class Login } } - if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null) + if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null && !user.isNoExpire()) { long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24); if (days > MAX_INACTIVE_PERIOD_DAY) diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNode.java b/org.adempiere.base/src/org/compiere/wf/MWFNode.java index 69994490a7..3a2fc8f06e 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFNode.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFNode.java @@ -611,7 +611,7 @@ public class MWFNode extends X_AD_WF_Node } if (getAD_Column_ID() > 0) { // validate that just advanced roles can manipulate secure content via workflows - MColumn column = MColumn.get(getCtx(), getAD_Column_ID()); + MColumn column = MColumn.get(getCtx(), getAD_Column_ID(), get_TrxName ()); if (column.isSecure() || column.isAdvanced()) { if (! MRole.getDefault().isAccessAdvanced()) { log.saveError("AccessTableNoUpdate", Msg.getElement(getCtx(), column.getColumnName())); diff --git a/org.adempiere.install/src/org/compiere/install/ConfigVM.java b/org.adempiere.install/src/org/compiere/install/ConfigVM.java index 4c2764b0fd..357ca9a9ce 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigVM.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigVM.java @@ -46,8 +46,6 @@ public class ConfigVM extends Config // Java Home, e.g. D:\j2sdk1.4.1\jre String javaHome = System.getProperty("java.home"); log.fine(javaHome); - if (javaHome.endsWith("jre")) - javaHome = javaHome.substring(0, javaHome.length()-4); p_data.setJavaHome(javaHome); } // init diff --git a/org.adempiere.payment.processor/pom.xml b/org.adempiere.payment.processor/pom.xml index 4922742ad8..2501a0acde 100644 --- a/org.adempiere.payment.processor/pom.xml +++ b/org.adempiere.payment.processor/pom.xml @@ -22,7 +22,7 @@ wget - ${url.file.srv}/jarfile/6.1/jpayment.jar + ${url.file.srv}/extra.jar/jpayment.jar false lib 5 @@ -35,7 +35,7 @@ wget - ${url.file.srv}/jarfile/6.1/Verisign.jar + ${url.file.srv}/extra.jar/Verisign.jar false lib 5 @@ -48,7 +48,7 @@ wget - ${url.file.srv}/jarfile/6.1/payflow.jar + ${url.file.srv}/extra.jar/payflow.jar false lib 5 diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ColumnElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ColumnElementHandler.java index 763e77c17b..9c4f70f105 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ColumnElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ColumnElementHandler.java @@ -20,6 +20,7 @@ import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Types; import java.util.List; import java.util.logging.Level; @@ -245,10 +246,23 @@ public class ColumnElementHandler extends AbstractElementHandler { if (rsc.next()) { if (doAlter) { // update existing column - boolean notNull = DatabaseMetaData.columnNoNulls == rsc - .getInt("NULLABLE"); - sql = column.getSQLModify(table, - column.isMandatory() != notNull); + boolean notNull = DatabaseMetaData.columnNoNulls == rsc.getInt("NULLABLE"); + sql = column.getSQLModify(table, column.isMandatory() != notNull); + if (DB.isOracle()) { + // IDEMPIERE-3842 problem with oracle alter CLOB or BLOB + int actualType = rsc.getInt("DATA_TYPE"); + if (actualType == Types.CLOB) { + if (sql.contains(" MODIFY " + column.getColumnName() + " CLOB")) { + // trying to make CLOB a column that is already a CLOB + sql = sql.replaceFirst(" MODIFY " + column.getColumnName() + " CLOB", " MODIFY " + column.getColumnName()); + } + } else if (actualType == Types.BLOB) { + if (sql.contains(" MODIFY " + column.getColumnName() + " BLOB")) { + // trying to make BLOB a column that is already a BLOB + sql = sql.replaceFirst(" MODIFY " + column.getColumnName() + " BLOB", " MODIFY " + column.getColumnName()); + } + } + } } } else { // No existing column diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java index e1a6913c85..c4b9e40f86 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java @@ -20,6 +20,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.util.ArrayList; import java.util.List; import java.util.logging.Level; @@ -195,7 +196,7 @@ public class GenericPOElementHandler extends AbstractElementHandler { for (int i = 1; i < components.length; i++) { String tables[] = components[i].split("[>]"); - exportDetail(ctx, document, po, 0, tables); + exportDetail(ctx, document, po, tables); } if (createElement) { @@ -209,19 +210,19 @@ public class GenericPOElementHandler extends AbstractElementHandler { } } - private void exportDetail(PIPOContext ctx, TransformerHandler document, GenericPO parent, int index, String[] tables) { + private void exportDetail(PIPOContext ctx, TransformerHandler document, GenericPO parent, String[] tables) { + String mainTable = tables[0]; AttributesImpl atts = new AttributesImpl(); - tables[index] = tables[index].trim(); - String sql = "SELECT * FROM " + tables[index] + " WHERE " + parent.get_TableName() + "_ID = ?"; + String sql = "SELECT * FROM " + mainTable + " WHERE " + parent.get_TableName() + "_ID = ?"; PreparedStatement pstmt = null; ResultSet rs = null; try { - sql = MRole.getDefault().addAccessSQL(sql, tables[index], true, true); + sql = MRole.getDefault().addAccessSQL(sql, mainTable, true, true); pstmt = DB.prepareStatement(sql, null); pstmt.setInt(1, parent.get_ID()); rs = pstmt.executeQuery(); while (rs.next()) { - GenericPO po = new GenericPO(tables[index], ctx.ctx, rs, getTrxName(ctx)); + GenericPO po = new GenericPO(mainTable, ctx.ctx, rs, getTrxName(ctx)); int AD_Client_ID = po.getAD_Client_ID(); if (AD_Client_ID != Env.getAD_Client_ID(ctx.ctx)) continue; @@ -237,12 +238,12 @@ public class GenericPOElementHandler extends AbstractElementHandler { } if (createElement) { verifyPackOutRequirement(po); - List excludes = defaultExcludeList(tables[index]); + List excludes = defaultExcludeList(mainTable); addTypeName(atts, "table"); - document.startElement("", "", tables[index], atts); + document.startElement("", "", mainTable, atts); PoExporter filler = new PoExporter(ctx, document, po); filler.export(excludes, true); - ctx.packOut.getCtx().ctx.put("Table_Name",tables[index]); + ctx.packOut.getCtx().ctx.put("Table_Name",mainTable); try { new CommonTranslationHandler().packOut(ctx.packOut,document,null,po.get_ID()); } catch(Exception e) { @@ -250,11 +251,27 @@ public class GenericPOElementHandler extends AbstractElementHandler { } } } - for (int i=index+1; i detTablesArr = new ArrayList(); + for (int j=i; j 0) diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/GridTab2PackExporter.java b/org.adempiere.pipo/src/org/adempiere/pipo2/GridTab2PackExporter.java index b8b4d6e2c3..9a7cc2704e 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/GridTab2PackExporter.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/GridTab2PackExporter.java @@ -72,7 +72,11 @@ public class GridTab2PackExporter implements IGridTabExporter { if (child.getTableName().toLowerCase().endsWith("_trl")) // ignore trl tabs as they are exported as translation continue; if (child.getTabLevel() > gridTab.getTabLevel()+1) { - sql = sql.append(">").append(child.getTableName()); + int level = child.getTabLevel() - gridTab.getTabLevel() - 1; + String sep = ">"; + for (int i = 1; i < level; i++) + sep += "+"; + sql = sql.append(sep).append(child.getTableName()); } else { sql = sql.append(";").append(child.getTableName()); } diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java index 3325d8118c..77ebe1caa3 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java @@ -11,6 +11,7 @@ import org.compiere.model.MTree; import org.compiere.model.PO; import org.compiere.model.POInfo; import org.compiere.model.X_AD_Client; +import org.compiere.model.X_AD_Image; import org.compiere.model.X_AD_Org; import org.compiere.model.X_C_Location; import org.compiere.model.X_M_Locator; @@ -276,6 +277,8 @@ public class PoExporter { addTableReference(columnName, X_M_Locator.Table_Name, new AttributesImpl()); } else if (DisplayType.Location == displayType) { addTableReference(columnName, X_C_Location.Table_Name, new AttributesImpl()); + } else if (DisplayType.Image == displayType) { + addTableReference(columnName, X_AD_Image.Table_Name, new AttributesImpl()); } else { add(columnName, "", new AttributesImpl()); } diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java index 8414308d7f..04d693f56c 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java @@ -303,7 +303,7 @@ public class PoFiller{ } else if (info.getColumnClass(index) == Timestamp.class) { setTimestamp(qName); }else if(DisplayType.TextLong == info.getColumnDisplayType(index)) {// export column from system have type is normal string, but import to system have this column but type is textlong (mean blob) - if (getStringValue (qName) != null || !isBlobOnPackinFile(qName)) { + if (getStringValue (qName) != null && !isBlobOnPackinFile(qName)) { setString(qName); }else { setBlob(qName); diff --git a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java index 9d049f8482..4ffe6436c2 100644 --- a/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java +++ b/org.adempiere.plugin.utils/src/org/adempiere/plugin/utils/AbstractActivator.java @@ -87,8 +87,17 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack protected boolean installedPackage(String version) { StringBuilder where = new StringBuilder("AD_Client_ID=? AND Name=? AND PK_Status='Completed successfully'"); List params = new ArrayList(); - params.add(Env.getAD_Client_ID(Env.getCtx())); - params.add(getName()); + String fileName = getName(); + int clientId = Env.getAD_Client_ID(Env.getCtx()); + if (version == null) { + String [] parts = fileName.split("_"); + String clientValue = parts[1]; + clientId = DB.getSQLValueEx(null, "SELECT AD_Client_ID FROM AD_Client WHERE Value=?", clientValue); + if (clientId < 0) + clientId = 0; + } + params.add(clientId); + params.add(fileName); if (version != null) { where.append(" AND PK_Version LIKE ?"); params.add(version + "%"); diff --git a/org.adempiere.report.jasper.library/pom.xml b/org.adempiere.report.jasper.library/pom.xml index c37b210c63..ba1d29df53 100644 --- a/org.adempiere.report.jasper.library/pom.xml +++ b/org.adempiere.report.jasper.library/pom.xml @@ -78,7 +78,7 @@ wget - ${url.file.srv}/jarfile/jp-${jp.version}/jasperreports-fonts-${jp.version}.jar + ${url.file.srv}/extra.jar/jasperreports-fonts-${jp.version}.jar false lib jasperreports-fonts.jar diff --git a/org.adempiere.server-feature/idempiere-server.sh b/org.adempiere.server-feature/idempiere-server.sh index 6b4cc1e436..1d40ac8d2e 100644 --- a/org.adempiere.server-feature/idempiere-server.sh +++ b/org.adempiere.server-feature/idempiere-server.sh @@ -20,16 +20,23 @@ echo =================================== echo Starting iDempiere Server echo =================================== +# if don't set from service get default value +TELNET_PORT=${TELNET_PORT:-12612} + VMOPTS="-Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events -Dosgi.compatibility.bootdelegation=true -Djetty.home=$BASE/jettyhome -Djetty.base=$BASE/jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml --Dosgi.console=localhost:12612 +-Dosgi.console=localhost:$TELNET_PORT -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true --Dmail.mime.decodeparameters=true" +-Dmail.mime.decodeparameters=true +--add-exports java.desktop/sun.awt=ALL-UNNAMED +--add-exports java.sql.rowset/com.sun.rowset=ALL-UNNAMED +--add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED +--add-modules=ALL-SYSTEM" $JAVA ${DEBUG} $IDEMPIERE_JAVA_OPTIONS $VMOPTS -jar $BASE/plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.server.application diff --git a/org.adempiere.server-feature/pom.xml b/org.adempiere.server-feature/pom.xml index 312b721fdb..c116c4aa66 100644 --- a/org.adempiere.server-feature/pom.xml +++ b/org.adempiere.server-feature/pom.xml @@ -184,7 +184,7 @@ wget - ${url.file.srv}/jarfile/6.1/101-20121212164242.zip + ${url.file.srv}/extra.jar/101-20121212164242.zip false ../fitnesse/FitNesseRoot/FitLibraryWeb 5 @@ -197,7 +197,7 @@ wget - ${url.file.srv}/jarfile/6.1/21-20121212154702.zip + ${url.file.srv}/extra.jar/21-20121212154702.zip false ../fitnesse/FitNesseRoot/FitLibraryWeb 5 @@ -210,7 +210,7 @@ wget - ${url.file.srv}/jarfile/6.1/6-20121212124109.zip + ${url.file.srv}/extra.jar/6-20121212124109.zip false ../fitnesse/FitNesseRoot/FitLibraryWeb 5 diff --git a/org.adempiere.server-feature/setup.ini b/org.adempiere.server-feature/setup.ini index f63d88f720..2b0d897bd2 100644 --- a/org.adempiere.server-feature/setup.ini +++ b/org.adempiere.server-feature/setup.ini @@ -1,5 +1,5 @@ -startup -plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar +plugins/org.eclipse.equinox.launcher_1.5.100.v20180827-1352.jar -install setup --launcher.XXMaxPermSize diff --git a/org.adempiere.server-feature/utils.unix/RUN_ApplyPackInFromFolder.sh b/org.adempiere.server-feature/utils.unix/RUN_ApplyPackInFromFolder.sh new file mode 100644 index 0000000000..a537dd141b --- /dev/null +++ b/org.adempiere.server-feature/utils.unix/RUN_ApplyPackInFromFolder.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +if [ $IDEMPIERE_HOME ]; then + cd $IDEMPIERE_HOME/utils +else + cd "`dirname $0`" +fi +. ./myEnvironment.sh Server + +if [ $JAVA_HOME ]; then + JAVA=$JAVA_HOME/bin/java +else + JAVA=java +fi + +# $Id: RUN_ApplyPackInFromFolder.sh +echo Apply PackIn from Folder - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) + +if [ $# -eq 1 ] +then + export DIRECTORY=$1 +else + echo "Usage: $0 folder" + exit 1 +fi + +cd .. + +echo This Procedure import packin files from directory $DIRECTORY + +$JAVA -Dosgi.compatibility.bootdelegation=true -Dosgi.noShutdown=false -jar plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.base.PackInFolderApplication $DIRECTORY + +echo Done +echo . +echo For problems, check log file in base directory diff --git a/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh b/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh index 884d763287..d7c46619d4 100644 --- a/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh +++ b/org.adempiere.server-feature/utils.unix/RUN_ExportReference.sh @@ -1,10 +1,13 @@ #!/bin/sh -# -# $Id: RUN_ImportReference.sh,v 1.11 2005/12/13 00:17:54 jjanke Exp $ +# Author + Copyright 1999-2005 Jorg Janke +# $Id: RUN_DBExport.sh,v 1.10 2005/05/31 18:45:33 jjanke Exp $ if [ $IDEMPIERE_HOME ]; then cd $IDEMPIERE_HOME/utils fi . ./myEnvironment.sh Server -echo Export Reference - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) -sh $ADEMPIERE_DB_PATH/ExportReference.sh +echo Export idempiere Database - $IDEMPIERE_HOME \($ADEMPIERE_DB_NAME\) + + +# Parameter: / +sh $ADEMPIERE_DB_PATH/ExportReference.sh $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD system/$ADEMPIERE_DB_SYSTEM diff --git a/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh b/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh index 2ebd876df1..d8f02335dd 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh @@ -29,8 +29,11 @@ echo ------------------------------------- echo Re-Create DataPump directory echo ------------------------------------- sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data +# Note the user running this script must be member of dba group: usermod -G dba idempiere chgrp dba $IDEMPIERE_HOME/data chmod 770 $IDEMPIERE_HOME/data +chgrp dba $IDEMPIERE_HOME/data/ExpDat.dmp +chmod 640 $IDEMPIERE_HOME/data/ExpDat.dmp echo ------------------------------------- echo Import ExpDat diff --git a/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh b/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh index 671c3ce00a..8991e31a65 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh @@ -1,21 +1,50 @@ #!/bin/sh -echo Adempiere Database Export $Revision: 1.5 $ +echo Adempiere Database Export $Revision: 1.5 $ -# $Id: DBExport.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $ +# $Id: ExportReference.sh,v 1.5 2005/12/20 07:12:17 jjanke Exp $ echo Saving reference database reference@$ADEMPIERE_DB_NAME to $IDEMPIERE_HOME/data/Adempiere.dmp if [ "$IDEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ] then echo "Please make sure that the environment variables are set correctly:" - echo " IDEMPIERE_HOME e.g. /idempiere" - echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" + echo " IDEMPIERE_HOME e.g. /idempiere" + echo " ADEMPIERE_DB_NAME e.g. adempiere.adempiere.org" exit 1 fi +echo ------------------------------------- +echo Re-Create DataPump directory +echo ------------------------------------- +sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data +chgrp dba $IDEMPIERE_HOME/data +chmod 770 $IDEMPIERE_HOME/data + +if [ "x${1,,}" != "xreference" ] +then + sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME < /dev/null +then + ISAMAZONRDS=Y +fi + +PGPASSWORD=$4 +export PGPASSWORD +if [ "x$4" = "x^TryLocalConnection^" ] +then + LOCALPG=true # Allow to run this command with user postgres (just useful running configure as root) +else + LOCALPG=false +fi PGPASSWORD=$4 export PGPASSWORD @@ -33,7 +47,14 @@ fi echo ------------------------------------- echo Recreate user and database echo ------------------------------------- -ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 SUPERUSER LOGIN PASSWORD '$3'" +if [ $ISAMAZONRDS = Y ] +then + # modified for amazon RDS - doesn't allow SUPERUSER + ROOT_ROLE="CREATEDB IN ROLE rds_superuser, adempiere" +else + ROOT_ROLE="SUPERUSER" +fi +ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 $ROOT_ROLE LOGIN PASSWORD '$3'" if [ $LOCALPG = "true" ] then # Assuming that adempiere role already exists (it was created out there) @@ -41,7 +62,18 @@ then export PGPASSWORD dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME else - dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + if [ "x$2" != xadempiere ] + then + psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "CREATE ROLE adempiere" + fi + if [ $ISAMAZONRDS = Y ] + then + PGPASSWORD=$3 + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME + PGPASSWORD=$4 + else + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + fi dropuser -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $2 psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "$ADEMPIERE_CREATE_ROLE_SQL" fi @@ -54,7 +86,6 @@ createdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -E UNICODE -T template0 - echo ------------------------------------- echo Import Adempiere_pg.dmp echo ------------------------------------- -psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "drop schema sqlj cascade" ADEMPIERE_ALTER_ROLE_SQL="ALTER ROLE $2 SET search_path TO adempiere, pg_catalog" psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -c "$ADEMPIERE_ALTER_ROLE_SQL" psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -d $ADEMPIERE_DB_NAME -U $2 -f $IDEMPIERE_HOME/data/ExpDat.dmp diff --git a/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh b/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh index 06a8f42a82..5791179f55 100644 --- a/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh +++ b/org.adempiere.server-feature/utils.unix/postgresql/ImportIdempiere.sh @@ -21,6 +21,12 @@ if [ "$IDEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" -o "$ADEMPIERE_DB_SERV exit 1 fi +ISAMAZONRDS=N +if echo "$ADEMPIERE_DB_SERVER" | grep 'rds.amazonaws.com$' > /dev/null +then + ISAMAZONRDS=Y +fi + PGPASSWORD=$4 export PGPASSWORD if [ "x$4" = "x^TryLocalConnection^" ] @@ -32,7 +38,14 @@ fi echo ------------------------------------- echo Recreate user and database echo ------------------------------------- -ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 SUPERUSER LOGIN PASSWORD '$3'" +if [ $ISAMAZONRDS = Y ] +then + # modified for amazon RDS - doesn't allow SUPERUSER + ROOT_ROLE="CREATEDB IN ROLE rds_superuser, adempiere" +else + ROOT_ROLE="SUPERUSER" +fi +ADEMPIERE_CREATE_ROLE_SQL="CREATE ROLE $2 $ROOT_ROLE LOGIN PASSWORD '$3'" if [ $LOCALPG = "true" ] then # Assuming that adempiere role already exists (it was created out there) @@ -40,7 +53,18 @@ then export PGPASSWORD dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME else - dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + if [ "x$2" != xadempiere ] + then + psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "CREATE ROLE adempiere" + fi + if [ $ISAMAZONRDS = Y ] + then + PGPASSWORD=$3 + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U $2 $ADEMPIERE_DB_NAME + PGPASSWORD=$4 + else + dropdb -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $ADEMPIERE_DB_NAME + fi dropuser -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres $2 psql -h $ADEMPIERE_DB_SERVER -p $ADEMPIERE_DB_PORT -U postgres -c "$ADEMPIERE_CREATE_ROLE_SQL" fi diff --git a/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh b/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh index a3f4767f6e..dd81b3214d 100644 --- a/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh +++ b/org.adempiere.server-feature/utils.unix/postgresql/SyncDB.sh @@ -46,6 +46,11 @@ else fi cd "$DIR_SCRIPTS" +if [ $? -ne 0 ] +then + echo "ERROR: Cannot change to folder $DIR_SCRIPTS" + exit 1 +fi # Create list of files already applied - registered in AD_MigrationScript table echo "select name from ad_migrationscript" | $SILENTCMD | sed -e 's:^ ::' | grep -v '^$' | sort > $TMPFOLDER/lisDB_$$.txt @@ -102,11 +107,12 @@ then fi done fi +PGPASSWORD= +export PGPASSWORD if [ -n "$MSGERROR" ] then echo "$MSGERROR" echo "\n Errors were found during the process (see message above) - please review and fix the error running manually the script - and then restart this process again" + exit 1 fi - -PGPASSWORD= -export PGPASSWORD +exit 0 diff --git a/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere b/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere index d79728fc31..d93c02c288 100755 --- a/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere +++ b/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere @@ -39,11 +39,13 @@ esac # adjust these variables to your environment IDEMPIERE_USER=idempiere IDEMPIERE_HOME=/opt/idempiere-server -JAVA_HOME=`ls -r /usr/lib/jvm/java-[6789]-openjdk*/bin/javac /usr/lib/jvm/java-[89]-oracle*/bin/javac | head -1` +# in case you manual install java by use zip or your linux distros, or your java provider have difference pattern of path, please update here +JAVA_HOME=`ls -r /usr/lib/jvm/java-1[0-9]-openjdk*/bin/javac /usr/lib/jvm/java-1[0-9]-oracle*/bin/javac | head -1` JAVA_HOME=`dirname $JAVA_HOME` JAVA_HOME=`dirname $JAVA_HOME` SU=su export IDEMPIERE_HOME +export TELNET_PORT=12612 if [ $(id -u) != "0" ] then @@ -533,8 +535,8 @@ Enter postgres password:" } getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -571,7 +573,7 @@ start () { echo -n "Starting iDempiere ERP: " export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log $SU ${IDEMPIERE_USER} -c "mkdir -p $IDEMPIERE_HOME/log" - $SU ${IDEMPIERE_USER} -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + $SU ${IDEMPIERE_USER} -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile @@ -620,20 +622,20 @@ stop () { cd $IDEMPIERE_HOME/utils # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 log_warning_msg "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with OSGi shutdown" else log_warning_msg "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with kill -15" else log_warning_msg "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -664,7 +666,7 @@ dostatus () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh index 760b307d6d..9bc0f45f9b 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh @@ -20,6 +20,7 @@ # adjust these variables to your environment IDEMPIERE_HOME=/opt/idempiere-server IDEMPIEREUSER=idempiere +export TELNET_PORT=12612 # Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH # in this case you can comment the source lines for ENVFILE below # detected some problems with Hardy Heron ubuntu using the bash source command @@ -32,8 +33,8 @@ IDEMPIERESTATUS= MAXITERATIONS=60 getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -48,7 +49,7 @@ start () { . $ENVFILE export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" - su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile @@ -90,20 +91,20 @@ stop () { . $ENVFILE # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 log_warning_msg "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with OSGi shutdown" else log_warning_msg "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with kill -15" else log_warning_msg "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -134,7 +135,7 @@ status () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh index 4e96fd83f7..265ed54cca 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh @@ -20,6 +20,7 @@ IDEMPIERE_HOME=/opt/idempiere-server ENVFILE=$IDEMPIERE_HOME/utils/myEnvironment.sh IDEMPIEREUSER=idempiere +export TELNET_PORT=12612 . /etc/rc.d/init.d/functions @@ -28,8 +29,8 @@ IDEMPIERESTATUS= MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -44,7 +45,7 @@ start () { source $ENVFILE export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" - su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile @@ -86,20 +87,20 @@ stop () { source $ENVFILE # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 echo "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo_success else echo "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo_success else echo "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -131,7 +132,7 @@ status () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh index a999dc31d4..0fd61f9ff2 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh @@ -19,6 +19,7 @@ # adjust these variables to your environment IDEMPIERE_HOME=/opt/idempiere-server IDEMPIEREUSER=idempiere +export TELNET_PORT=12612 # Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH # in this case you can comment the source lines for ENVFILE below # detected some problems with Hardy Heron ubuntu using the bash source command @@ -57,8 +58,8 @@ IDEMPIERESTATUS= MAXITERATIONS=60 getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -74,7 +75,7 @@ start () { . $ENVFILE export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" - su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile @@ -117,20 +118,20 @@ stop () { . $ENVFILE # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 log_warning_msg "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo "Service stopped with OSGi shutdown" else echo "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo "Service stopped with kill -15" else echo "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -166,7 +167,7 @@ status () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.windows/RUN_ApplyPackInFromFolder.bat b/org.adempiere.server-feature/utils.windows/RUN_ApplyPackInFromFolder.bat new file mode 100644 index 0000000000..43e23c1d7d --- /dev/null +++ b/org.adempiere.server-feature/utils.windows/RUN_ApplyPackInFromFolder.bat @@ -0,0 +1,14 @@ +@Rem $Id: RUN_ApplyPackInFromFolder.bat + +@if (%IDEMPIERE_HOME%) == () (CALL myEnvironment.bat Server) else (CALL %IDEMPIERE_HOME%\utils\myEnvironment.bat Server) +@Title Import Translation - %IDEMPIERE_HOME% (%ADEMPIERE_DB_NAME%) + +@SET DIRECTORY=%1 + +@echo This Procedure import packin files from directory %DIRECTORY% +@pause + +FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c +@"%JAVA_HOME%\bin\java" -Dosgi.compatibility.bootdelegation=true -Dosgi.noShutdown=false -jar %JARFILE% -application org.adempiere.base.PackInFolderApplication %DIRECTORY% + +@pause diff --git a/org.adempiere.server/idempiere.jsp b/org.adempiere.server/idempiere.jsp index 4443e22f85..f4b7c199a8 100644 --- a/org.adempiere.server/idempiere.jsp +++ b/org.adempiere.server/idempiere.jsp @@ -13,7 +13,7 @@ Author URI: http://www.bmlaurus.com <% if(Prop.isRssOn()){ - out.write("\n"); + out.write("\n"); out.write(""); } %> @@ -187,4 +187,4 @@ Author URI: http://www.bmlaurus.com - \ No newline at end of file + diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java index 9a94a79bfd..587e812f72 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java @@ -297,10 +297,17 @@ public abstract class AdempiereServer implements Runnable p_model.getFrequency(), p_model.getCronPattern()); m_sleepMS = m_nextWork - now; + if (m_nextWork == 0) { + m_sleepMS = 0; + } if (log.isLoggable(Level.INFO)) log.info(" Next run: " + new Timestamp(m_nextWork) + " sleep " + m_sleepMS); // p_model.setDateLastRun(lastRun); - p_model.setDateNextRun(new Timestamp(m_nextWork)); + if (m_nextWork == 0) { + p_model.setDateNextRun(null); + } else { + p_model.setDateNextRun(new Timestamp(m_nextWork)); + } p_model.saveEx(); } // run diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java index 2065ae7f6e..790f1bba56 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java @@ -577,7 +577,9 @@ public class AdempiereServerMgr implements ServiceTrackerCustomizerwget - ${url.file.srv}/jarfile/6.1/jpedal.jar + ${url.file.srv}/extra.jar/jpedal.jar false lib 5 diff --git a/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java b/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java index 5539688d1f..7ea92cd2a5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java @@ -36,6 +36,7 @@ import org.compiere.apps.ADialog; import org.compiere.apps.StatusBar; import org.compiere.apps.form.FormFrame; import org.compiere.apps.form.FormPanel; +import org.compiere.grid.ed.VCheckBox; import org.compiere.swing.CPanel; import org.compiere.util.CLogger; import org.compiere.util.Env; @@ -80,6 +81,7 @@ public class VTranslationDialog extends TranslationController private StatusBar statusBar = new StatusBar(); private JLabel lClient = new JLabel(); private JComboBox cbClient = new JComboBox(); + private VCheckBox isOnlyCentralized = new VCheckBox(); /** @@ -93,6 +95,7 @@ public class VTranslationDialog extends TranslationController lLanguage.setText(Msg.translate(Env.getCtx(), "AD_Language")); lLanguage.setToolTipText(Msg.translate(Env.getCtx(), "IsSystemLanguage")); lTable.setText(Msg.translate(Env.getCtx(), "AD_Table_ID")); + isOnlyCentralized.setText(Msg.getMsg(Env.getCtx(), "OnlyCentralizedData")); // bExport.setText(Msg.getMsg(Env.getCtx(), "Export")); bExport.addActionListener(this); @@ -107,9 +110,11 @@ public class VTranslationDialog extends TranslationController ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.add(cbTable, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); - panel.add(bExport, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0 + panel.add(isOnlyCentralized, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); + panel.add(bExport, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - panel.add(bImport, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0 + panel.add(bImport, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.add(lClient, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); @@ -224,7 +229,7 @@ public class VTranslationDialog extends TranslationController AD_Table = (ValueNamePair)cbTable.getItemAt(i); msg = imp ? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) - : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); + : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue(), isOnlyCentralized.isSelected()); } if(msg == null || msg.length() == 0) @@ -237,7 +242,7 @@ public class VTranslationDialog extends TranslationController msg = null; msg = imp ? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) - : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); + : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue(), isOnlyCentralized.isSelected()); if(msg == null || msg.length() == 0) msg = (imp ? "Import" : "Export") + " Successful. [" + directory + "]"; diff --git a/org.adempiere.ui.zk/META-INF/MANIFEST.MF b/org.adempiere.ui.zk/META-INF/MANIFEST.MF index 2e902b8f4c..4f20c296d2 100644 --- a/org.adempiere.ui.zk/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.zk/META-INF/MANIFEST.MF @@ -14,6 +14,8 @@ Import-Package: groovy.transform.stc;version="2.4.7", javax.servlet.http, javax.servlet.jsp.resources;version="2.3.0", javax.servlet.resources;version="3.1.0", + javax.websocket;version="1.1.0", + javax.websocket.server;version="1.1.0", javax.xml.bind;version="2.3.0", net.sf.jasperreports.engine, net.sf.jasperreports.engine.export, @@ -32,6 +34,8 @@ Import-Package: groovy.transform.stc;version="2.4.7", org.apache.tools.ant.taskdefs, org.compiere.css, org.eclipse.core.runtime;version="3.4.0", + org.eclipse.jetty.websocket.jsr356;version="9.4.12", + org.eclipse.jetty.websocket.jsr356.server;version="9.4.12", org.jfree.chart, org.jfree.chart.encoders, org.jfree.chart.entity, diff --git a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml index d5e98d7741..7a46ecca0d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml +++ b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml @@ -45,5 +45,6 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI). + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index 04e42b624f..5c2f426607 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -615,6 +615,7 @@ public class WAcctViewer extends Window implements EventListener private void dynInit (int AD_Table_ID, int Record_ID) { + m_data.validateAcctSchemas(Record_ID); m_data.fillAcctSchema(selAcctSchema ); selAcctSchema.addEventListener(Events.ON_SELECT, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java index 6a4385a0dd..44a590d5d2 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java @@ -21,6 +21,8 @@ package org.adempiere.webui.acct; +import static org.compiere.model.SystemIDs.REFERENCE_POSTING_TYPE; + import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; @@ -36,9 +38,9 @@ import org.adempiere.webui.component.Listbox; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MFactAcct; +import org.compiere.model.MJournal; import org.compiere.model.MLookupFactory; import org.compiere.model.MRefList; -import static org.compiere.model.SystemIDs.*; import org.compiere.report.core.RColumn; import org.compiere.report.core.RModel; import org.compiere.util.CLogger; @@ -179,6 +181,24 @@ public class WAcctViewerData Env.clearWinContext(WindowNo); } // dispose + /** + * GL Journal only posts in one Accounting Schema + * if the record is a GL Journal, remove the others from the array + * @param Record_ID + */ + protected void validateAcctSchemas(int Record_ID) + { + if (Record_ID > 0 && AD_Table_ID == MJournal.Table_ID) { + MJournal journal = new MJournal(Env.getCtx(), Record_ID, null); + + if (journal != null) { + ASchemas = new MAcctSchema[1]; + ASchemas[0] = MAcctSchema.get(Env.getCtx(), journal.getC_AcctSchema_ID()); + ASchema = ASchemas[0]; + } + } + } // validateAcctSchemas + /************************************************************************** * Fill Accounting Schema * @param cb Listbox to be filled diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index b9ca3e3c25..5d1671a4c5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -78,7 +78,7 @@ public class GridView extends Vlayout implements EventListener, IdSpace, /** * */ - private static final long serialVersionUID = -2966799998482667434L; + private static final long serialVersionUID = 3046157124327495333L; private static final String HEADER_GRID_STYLE = "border: none; margin:0; padding: 0;"; @@ -208,11 +208,16 @@ public class GridView extends Vlayout implements EventListener, IdSpace, public void setDetailPaneMode(boolean detailPaneMode) { if (this.detailPaneMode != detailPaneMode) { this.detailPaneMode = detailPaneMode; - pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx())); + pageSize = detailPaneMode ? getDetailPageSize() : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx())); updatePaging(); } } + /** Returns the number of records to be displayed in detail grid (TODO : manage exceptions defined in SysConfig - see https://idempiere.atlassian.net/browse/IDEMPIERE-3786) */ + int getDetailPageSize() { + return MSysConfig.getIntValue(MSysConfig.ZK_PAGING_DETAIL_SIZE, DEFAULT_DETAIL_PAGE_SIZE, Env.getAD_Client_ID(Env.getCtx())); + } + public boolean isDetailPaneMode() { return this.detailPaneMode; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java index 159eb6d78c..0d7e9df830 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java @@ -14,6 +14,7 @@ package org.adempiere.webui.apps.form; +import java.util.ArrayList; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; @@ -37,6 +38,8 @@ import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.FDialog; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; +import org.compiere.model.MPasswordHistory; +import org.compiere.model.MPasswordRule; import org.compiere.model.MSysConfig; import org.compiere.model.MUser; import org.compiere.util.CLogger; @@ -44,8 +47,10 @@ import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.Util; +import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.Columns; @@ -140,12 +145,14 @@ public class WResetPassword implements IFormController, EventListener, Va txtNewPassword.setId("txtNewPassword"); txtNewPassword.setType("password"); txtNewPassword.setCols(25); + txtNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtNewPassword, "220px"); txtRetypeNewPassword = new Textbox(); txtRetypeNewPassword.setId("txtRetypeNewPassword"); txtRetypeNewPassword.setType("password"); txtRetypeNewPassword.setCols(25); + txtRetypeNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px"); cbForceChangeNextLogin = new Checkbox(); @@ -261,6 +268,29 @@ public class WResetPassword implements IFormController, EventListener, Va { validateChangePassword(); } + else if (e.getTarget() == txtNewPassword) { + MPasswordRule pwdrule = MPasswordRule.getRules(Env.getCtx(), null); + String userName = ""; + int userID = -1; + if (fUser.getValue() != null) { + userID = Integer.parseInt(fUser.getValue().toString()); + } + if (userID < 0) + throw new WrongValueException(fUser.getComponent(), Msg.getMsg(Env.getCtx(), "UserMandatory")); + userName = MUser.getNameOfUser(userID); + if (pwdrule != null) { + try { + pwdrule.validate(userName, txtNewPassword.getValue(), new ArrayList()); + } + catch (Exception ex) { + throw new WrongValueException(txtNewPassword, ex.getMessage()); + } + } + } + else if (e.getTarget() == txtRetypeNewPassword) { + if (!txtNewPassword.getValue().equals(txtRetypeNewPassword.getValue())) + throw new WrongValueException(txtRetypeNewPassword, Msg.getMsg(Env.getCtx(), "PasswordNotMatch")); + } } private void validateChangePassword() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java index 945f292167..37ee9064d3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AutoComplete.java @@ -17,6 +17,7 @@ package org.adempiere.webui.component; +import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; @@ -36,7 +37,7 @@ public class AutoComplete extends Combobox /** * */ - private static final long serialVersionUID = 8350448733668388572L; + private static final long serialVersionUID = 7437206681528058083L; /** comboItems All menu labels */ private String[] comboItems; @@ -47,6 +48,8 @@ public class AutoComplete extends Combobox private String[] images; private String[] contents; + + private Object[] values; private HashMap mapItems = new HashMap(); @@ -57,8 +60,18 @@ public class AutoComplete extends Combobox */ public void setDict(String[] vals) + { + setDict(vals, true); + } + + public void setDict(String[] vals, boolean sort) { comboItems = vals; + + if (comboItems != null && sort) + { + Arrays.sort(comboItems); + } } /** @@ -88,6 +101,11 @@ public class AutoComplete extends Combobox this.images = images; } + public void setValues(Object[] values) + { + this.values = values; + } + /** * Constructor */ @@ -161,6 +179,8 @@ public class AutoComplete extends Combobox } comboitem.setLabel(comboItems[i]); + if (values != null) + comboitem.setValue(values[i]); comboitem.setDescription(strDescription[i]); if (images != null && i < images.length && images[i] != null && images[i].trim().length() > 0) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java index 5a2a377261..27701017fb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java @@ -92,32 +92,30 @@ public class NumberBox extends Div char separatorChar = DisplayType.getNumberFormat(DisplayType.Number, Env.getLanguage(Env.getCtx())).getDecimalFormatSymbols().getDecimalSeparator(); String separator = Character.toString(separatorChar); boolean processDotKeypad = MSysConfig.getBooleanValue(MSysConfig.ZK_DECIMALBOX_PROCESS_DOTKEYPAD, true, Env.getAD_Client_ID(Env.getCtx())); - if (".".equals(separator)) - processDotKeypad = false; if (processDotKeypad) { StringBuffer funct = new StringBuffer(); funct.append("function(evt)"); funct.append("{"); - // ignore dot and process it on key up - funct.append(" if (!this._shallIgnore(evt, '0123456789-%").append(separator).append("'))"); + // ignore dot, comma and decimal separator and process them on key down + funct.append(" if (!this._shallIgnore(evt, '0123456789-%'))"); funct.append(" {"); funct.append(" this.$doKeyPress_(evt);"); funct.append(" }"); funct.append("}"); decimalBox.setWidgetOverride("doKeyPress_", funct.toString()); funct = new StringBuffer(); - // not working correctly on opera + // debug // funct.append("console.log('keyCode='+event.keyCode);"); funct.append("if (window.event)"); funct.append(" key = event.keyCode;"); funct.append("else"); funct.append(" key = event.which;"); - funct.append("if ((key == 110 || key == 190) && !window.opera) {"); + funct.append("if (key == 108 || key == 110 || key == 188 || key == 190 || key == 194) {"); funct.append(" var id = '$'.concat('").append(decimalBox.getId()).append("');"); funct.append(" var calcText = jq(id)[0];"); funct.append(" calcText.value += '").append(separator).append("';"); funct.append(" event.stop;"); funct.append("};"); - decimalBox.setWidgetListener("onKeyUp", funct.toString()); + decimalBox.setWidgetListener("onKeyDown", funct.toString()); } appendChild(decimalBox); @@ -251,29 +249,27 @@ public class NumberBox extends Div txtCalc.setId(txtCalc.getUuid()); boolean processDotKeypad = MSysConfig.getBooleanValue(MSysConfig.ZK_DECIMALBOX_PROCESS_DOTKEYPAD, true, Env.getAD_Client_ID(Env.getCtx())); - if (".".equals(separator)) - processDotKeypad = false; - - // restrict allowed characters - String decimalSep = separator; - if (!processDotKeypad && !".".equals(separator)) - decimalSep += "."; StringBuffer funct = new StringBuffer(); funct.append("function(evt)"); funct.append("{"); - funct.append(" if (!this._shallIgnore(evt, '= -/()*%+0123456789").append(decimalSep).append("'))"); + if (processDotKeypad) { + funct.append(" if (!this._shallIgnore(evt, '= -/()*%+0123456789'))"); + } else { + // restrict allowed characters + String decimalSep = separator; + if (!processDotKeypad && !".".equals(separator)) + decimalSep += "."; + funct.append(" if (!this._shallIgnore(evt, '= -/()*%+0123456789").append(decimalSep).append("'))"); + } funct.append(" {"); funct.append(" this.$doKeyPress_(evt);"); funct.append(" }"); funct.append("}"); txtCalc.setWidgetOverride("doKeyPress_", funct.toString()); - txtCalc.setWidgetListener("onKeyUp", "calc.validateUp('" + + txtCalc.setWidgetListener("onKeyDown", "calc.validateDown('" + decimalBox.getId() + "','" + txtCalc.getId() + "'," + integral + "," + (int)separatorChar + ", event, " + ( processDotKeypad ? "true" : "false" ) + ");"); - txtCalc.setWidgetListener("onKeyPress", "calc.validatePress('" + - decimalBox.getId() + "','" + txtCalc.getId() - + "'," + integral + "," + (int)separatorChar + ", event);"); txtCalc.setMaxlength(250); txtCalc.setCols(30); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java index ae46c5d9f1..7f6accd3c3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java @@ -27,6 +27,7 @@ import javax.swing.event.ListDataListener; import org.adempiere.webui.ValuePreference; import org.adempiere.webui.apps.AEnv; +import org.adempiere.webui.component.AutoComplete; import org.adempiere.webui.component.Combobox; import org.adempiere.webui.event.ContextMenuEvent; import org.adempiere.webui.event.ContextMenuListener; @@ -53,6 +54,7 @@ import org.compiere.util.Msg; import org.compiere.util.NamePair; import org.compiere.util.Util; import org.compiere.util.ValueNamePair; +import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Desktop; import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.Page; @@ -96,8 +98,13 @@ ContextMenuListener, IZoomableEditor public WTableDirEditor(GridField gridField) { - super(new EditorCombobox(), gridField); - ((EditorCombobox)getComponent()).editor = this; + this(gridField.isAutocomplete() ? new EditorAutoComplete() : new EditorCombobox(), gridField); + } + + private WTableDirEditor(Component comp, GridField gridField) + { + super(comp, gridField); + ((ITableDirEditor)getComponent()).setEditor(this); lookup = gridField.getLookup(); init(); } @@ -114,8 +121,18 @@ ContextMenuListener, IZoomableEditor */ public WTableDirEditor(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable) { - super(new EditorCombobox(), label, description, mandatory, readonly, updateable); - ((EditorCombobox)getComponent()).editor = this; + this(lookup, label, description, mandatory, readonly, updateable, false); + } + + public WTableDirEditor(Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable, boolean autocomplete) + { + this(autocomplete ? new EditorAutoComplete() : new EditorCombobox(), lookup, label, description, mandatory, readonly, updateable); + } + + private WTableDirEditor(Component comp, Lookup lookup, String label, String description, boolean mandatory, boolean readonly, boolean updateable) + { + super(comp, label, description, mandatory, readonly, updateable); + ((ITableDirEditor)getComponent()).setEditor(this); if (lookup == null) { @@ -135,11 +152,20 @@ ContextMenuListener, IZoomableEditor * @param isUpdateable * @param lookup */ - public WTableDirEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, - Lookup lookup) + public WTableDirEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup) { - super(new EditorCombobox(), columnName, null, null, mandatory, isReadOnly, isUpdateable); - ((EditorCombobox)getComponent()).editor = this; + this(columnName, mandatory, isReadOnly, isUpdateable, lookup, false); + } + + public WTableDirEditor(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup, boolean autocomplete) + { + this(autocomplete ? new EditorAutoComplete() : new EditorCombobox(), columnName, mandatory, isReadOnly, isUpdateable, lookup); + } + + private WTableDirEditor(Component comp, String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, Lookup lookup) + { + super(comp, columnName, null, null, mandatory, isReadOnly, isUpdateable); + ((ITableDirEditor)getComponent()).setEditor(this); if (lookup == null) { throw new IllegalArgumentException("Lookup cannot be null"); @@ -153,10 +179,12 @@ ContextMenuListener, IZoomableEditor ZKUpdateUtil.setWidth(getComponent(), "200px"); getComponent().setAutocomplete(true); getComponent().setAutodrop(true); - getComponent().addEventListener(Events.ON_BLUR, this); - getComponent().addEventListener(Events.ON_CHANGING, this); - getComponent().addEventListener(Events.ON_OPEN, this); - getComponent().addEventListener("onPostSelect", this); + getComponent().addEventListener(Events.ON_BLUR, this); + if (getComponent() instanceof EditorAutoComplete) { + ; + } else { + getComponent().addEventListener(Events.ON_CHANGING, this); + } boolean zoom= false; if (lookup != null) @@ -309,6 +337,9 @@ ContextMenuListener, IZoomableEditor getComponent().setValue(null); getComponent().setSelectedItem(null); oldValue = value; + + if (getComponent() instanceof EditorAutoComplete) + updateStyle(); } } @@ -394,6 +425,26 @@ ContextMenuListener, IZoomableEditor } } } + + if (getComponent() instanceof EditorAutoComplete) { + EditorAutoComplete editor = (EditorAutoComplete) getComponent(); + editor.setDict(null); + editor.setValues(null); + editor.setDescription(null); + + String[] dict = new String[getComponent().getItemCount()]; + Object[] values = new Object[getComponent().getItemCount()]; + String[] description = new String[getComponent().getItemCount()]; + for (int i = 0; i < dict.length; i++) { + Comboitem item = getComponent().getItemAtIndex(i); + dict[i] = item.getLabel(); + values[i] = item.getValue(); + } + editor.setDict(dict, false); + editor.setDescription(description); + editor.setValues(values); + } + getComponent().setValue(oldValue); } @@ -673,15 +724,27 @@ ContextMenuListener, IZoomableEditor super.dynamicDisplay(ctx); } - private static class EditorCombobox extends Combobox { - + private interface ITableDirEditor { + public void setEditor(WTableDirEditor editor); + } + + private static class EditorCombobox extends Combobox implements ITableDirEditor { /** * generated serial id */ - private static final long serialVersionUID = 4540856986889452983L; - protected WTableDirEditor editor; + private static final long serialVersionUID = 9087317631313577239L; + private WTableDirEditor editor; private DesktopCleanup listener = null; + protected EditorCombobox() { + + } + + @Override + public void setPage(Page page) { + super.setPage(page); + } + @Override public void onPageAttached(Page newpage, Page oldpage) { super.onPageAttached(newpage, oldpage); @@ -716,6 +779,78 @@ ContextMenuListener, IZoomableEditor editor.tableCacheListener = null; } } + + @Override + public void setEditor(WTableDirEditor editor) { + this.editor = editor; + } + } + + private static class EditorAutoComplete extends AutoComplete implements ITableDirEditor { + /** + * generated serial id + */ + private static final long serialVersionUID = 8435677226644775152L; + protected WTableDirEditor editor; + private DesktopCleanup listener = null; + + protected EditorAutoComplete() { + + } + + @Override + public void setPage(Page page) { + super.setPage(page); + } + + @Override + public void onPageAttached(Page newpage, Page oldpage) { + super.onPageAttached(newpage, oldpage); + if (editor.tableCacheListener == null) { + editor.createCacheListener(); + if (listener == null) { + listener = new DesktopCleanup() { + @Override + public void cleanup(Desktop desktop) throws Exception { + EditorAutoComplete.this.cleanup(); + } + }; + newpage.getDesktop().addListener(listener); + } + } + } + + @Override + public void onPageDetached(Page page) { + super.onPageDetached(page); + if (listener != null && page.getDesktop() != null) + page.getDesktop().removeListener(listener); + cleanup(); + } + + /** + * + */ + protected void cleanup() { + if (editor.tableCacheListener != null) { + CacheMgt.get().unregister(editor.tableCacheListener); + editor.tableCacheListener = null; + } + } + + @Override + public void setEditor(WTableDirEditor editor) { + this.editor = editor; + } + + @Override + public void setValue(String value) + { + setText(value); + if (Util.isEmpty(value)) { + refresh(""); + } + } } private static class CCacheListener extends CCache { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java index 11751005b4..7ec74dfb89 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java @@ -588,7 +588,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL boolean isMandatory = !m_lookup && infoColumn.isMandatory() && infoColumn.isQueryCriteria(); GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), infoWindow.getAD_InfoWindow_ID(), 0, columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(), - infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.getPlaceholder()); + infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.get_Translation("Placeholder")); if (infoColumn.getAD_Val_Rule_ID() > 0) { vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode(); if (vo.lookupInfo != null) { @@ -2026,7 +2026,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL String columnName = infoColumn.getColumnName(); GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0, columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(), - infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.getPlaceholder()); + infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.get_Translation("Placeholder")); if (infoColumn.getAD_Val_Rule_ID() > 0) { vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode(); if (vo.lookupInfo != null) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java index c90009f84f..0c35c9c78f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java @@ -29,6 +29,7 @@ import org.adempiere.exceptions.AdempiereException; import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.Button; +import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.FolderBrowser; import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.GridFactory; @@ -119,6 +120,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo private int m_AD_Client_ID; private boolean m_imp; private ValueNamePair m_AD_Language; + private Checkbox isOnlyCentralized = new Checkbox(); private void zkInit() throws Exception { @@ -139,6 +141,8 @@ public class WTranslationDialog extends TranslationController implements IFormCo bImportZIP.setLabel(Msg.getMsg(Env.getCtx(), "ImportZIP")); bImportZIP.setUpload(AdempiereWebUI.getUploadSetting()); bImportZIP.addEventListener(Events.ON_UPLOAD, this); + isOnlyCentralized.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCentralizedData")); + isOnlyCentralized.setChecked(true); Rows rows = centerLayout.newRows(); Row row = rows.newRow(); @@ -152,7 +156,11 @@ public class WTranslationDialog extends TranslationController implements IFormCo row = rows.newRow(); row.appendChild(lTable.rightAlign()); row.appendChild(cbTable); - + + row = rows.newRow(); + row.appendChild(new Label("")); + row.appendChild(isOnlyCentralized); + row = rows.newRow(); Div div = new Div(); div.setStyle("text-align: right;"); @@ -298,7 +306,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo // Carlos Ruiz - globalqss - improve output message from translation import process msg.append(m_AD_Table.getValue()).append(" ").append((m_imp ? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()) - : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()))).append(" "); + : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue(), isOnlyCentralized.isChecked()))).append(" "); } if(msg == null || msg.length() == 0) @@ -311,7 +319,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo msg = null; msg = new StringBuilder(m_imp ? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()) - : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue())); + : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue(), isOnlyCentralized.isChecked())); if(msg == null || msg.length() == 0) msg = new StringBuilder(m_imp ? "Import" : "Export").append(" Successful. [").append(directory).append("]"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java index 0743ed76f6..b21860250b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java @@ -15,6 +15,7 @@ package org.adempiere.webui.panel; +import java.util.ArrayList; import java.util.Properties; import org.adempiere.exceptions.AdempiereException; @@ -32,6 +33,8 @@ import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.LoginWindow; +import org.compiere.model.MPasswordHistory; +import org.compiere.model.MPasswordRule; import org.compiere.model.MSysConfig; import org.compiere.model.MUser; import org.compiere.util.CLogger; @@ -44,8 +47,10 @@ import org.zkoss.zhtml.Div; import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Td; import org.zkoss.zhtml.Tr; +import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Image; @@ -59,7 +64,7 @@ public class ChangePasswordPanel extends Window implements EventListener /** * */ - private static final long serialVersionUID = 6055606520280550335L; + private static final long serialVersionUID = -4117126419866788951L; private static CLogger logger = CLogger.getCLogger(ChangePasswordPanel.class); @@ -246,12 +251,14 @@ public class ChangePasswordPanel extends Window implements EventListener txtNewPassword.setId("txtNewPassword"); txtNewPassword.setType("password"); txtNewPassword.setCols(25); + txtNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtNewPassword, "220px"); txtRetypeNewPassword = new Textbox(); txtRetypeNewPassword.setId("txtRetypeNewPassword"); txtRetypeNewPassword.setType("password"); txtRetypeNewPassword.setCols(25); + txtRetypeNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px"); txtAnswer = new Textbox(); @@ -272,6 +279,21 @@ public class ChangePasswordPanel extends Window implements EventListener SessionManager.logoutSession(); wndLogin.loginCancelled(); } + else if (event.getTarget() == txtNewPassword) { + MPasswordRule pwdrule = MPasswordRule.getRules(Env.getCtx(), null); + if (pwdrule != null) { + try { + pwdrule.validate(m_userName, txtNewPassword.getValue(), new ArrayList()); + } + catch (Exception e) { + throw new WrongValueException(txtNewPassword, e.getMessage()); + } + } + } + else if (event.getTarget() == txtRetypeNewPassword) { + if (!txtNewPassword.getValue().equals(txtRetypeNewPassword.getValue())) + throw new WrongValueException(txtRetypeNewPassword, Msg.getMsg(m_ctx, "PasswordNotMatch")); + } } public void validateChangePassword() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java index 0435823bfc..c6946c4588 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java @@ -216,6 +216,7 @@ public class ExportAction implements EventListener chkSelectionTab.setAttribute("tabBinding", child); vlayout.appendChild(chkSelectionTab); chkSelectionTabForExport.add(chkSelectionTab); + chkSelectionTab.addEventListener(Events.ON_CHECK, this); isHasSelectionTab = true; } @@ -235,6 +236,26 @@ public class ExportAction implements EventListener panel.hideBusyMask(); }else if (event.getTarget().equals(cboType) && event.getName().equals(Events.ON_SELECT)) { displayExportTabSelection(); + }else if (event.getTarget() instanceof Checkbox) { + // A child is not exportable without its parent + Checkbox cbSel = (Checkbox) event.getTarget(); + GridTab gtSel = (GridTab)cbSel.getAttribute("tabBinding"); + boolean found = false; + for (Checkbox cb : chkSelectionTabForExport) { + if (cb == cbSel) { + found = true; + continue; + } + GridTab gt = (GridTab)cb.getAttribute("tabBinding"); + if (found) { + if (gt.getTabLevel() > gtSel.getTabLevel()) { + cb.setChecked(cbSel.isChecked()); + cb.setEnabled(cbSel.isChecked()); + } else { + break; + } + } + } }else if (event.getName().equals("onExporterException")){ FDialog.error(0, winExportFile, "FileInvalidExtension"); winExportFile.onClose(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/idempiere/ui/zk/websocket/ServerPushEndPoint.java b/org.adempiere.ui.zk/WEB-INF/src/org/idempiere/ui/zk/websocket/ServerPushEndPoint.java new file mode 100644 index 0000000000..a2aeee57a6 --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/idempiere/ui/zk/websocket/ServerPushEndPoint.java @@ -0,0 +1,99 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * 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: * + * - hengsin * + **********************************************************************/ +package org.idempiere.ui.zk.websocket; + +import java.io.IOException; +import java.util.logging.Level; + +import javax.websocket.OnClose; +import javax.websocket.OnError; +import javax.websocket.OnMessage; +import javax.websocket.OnOpen; +import javax.websocket.Session; +import javax.websocket.server.PathParam; +import javax.websocket.server.ServerEndpoint; + +import org.compiere.util.CLogger; +import org.compiere.util.Util; + +/** + * @author hengsin + * + */ +@ServerEndpoint(value="/serverpush/{dtid}") +public class ServerPushEndPoint { + + private Session session; + private String dtid; + + /** + * + */ + public ServerPushEndPoint() { + } + + + @OnClose + public void onClose(Session sess) throws IOException { + if (this.session != null) { + this.session = null; + WebSocketServerPush.unregisterEndPoint(dtid); + } + } + + + @OnOpen + public void onOpen(Session sess, @PathParam("dtid") String dtid) throws IOException { + if (!Util.isEmpty(dtid, true) && WebSocketServerPush.isValidDesktopId(dtid)) { + session = sess; + this.dtid = dtid; + WebSocketServerPush.registerEndPoint(dtid, this); + } + } + + + @OnError + public void onError(Session sess, Throwable throwable) { + CLogger.getCLogger(getClass()).log(Level.WARNING, throwable.getMessage(), throwable); + } + + + @OnMessage + public void onMessage(Session session, String message) { + } + + /** + * Message client to send echo event to server + */ + public void echo() { + if (session != null) { + try { + session.getBasicRemote().sendText("echo"); + } catch (IOException e) { + CLogger.getCLogger(getClass()).log(Level.WARNING, e.getMessage(), e); + } + } + } +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/idempiere/ui/zk/websocket/WebSocketServerPush.java b/org.adempiere.ui.zk/WEB-INF/src/org/idempiere/ui/zk/websocket/WebSocketServerPush.java new file mode 100644 index 0000000000..6a2dc59e90 --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/idempiere/ui/zk/websocket/WebSocketServerPush.java @@ -0,0 +1,313 @@ +/*********************************************************************** + * This file is part of iDempiere ERP Open Source * + * http://www.idempiere.org * + * * + * 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: * + * - hengsin * + **********************************************************************/ +package org.idempiere.ui.zk.websocket; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicReference; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.zkoss.zk.au.out.AuScript; +import org.zkoss.zk.ui.Desktop; +import org.zkoss.zk.ui.DesktopUnavailableException; +import org.zkoss.zk.ui.Executions; +import org.zkoss.zk.ui.UiException; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.impl.ExecutionCarryOver; +import org.zkoss.zk.ui.sys.Scheduler; +import org.zkoss.zk.ui.sys.ServerPush; +import org.zkoss.zk.ui.util.Clients; + +/** + * + * @author hengsin + * + */ +public class WebSocketServerPush implements ServerPush { + + private static final String ON_ACTIVATE_DESKTOP = "onActivateDesktop"; + + private final AtomicReference desktop = new AtomicReference(); + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private ThreadInfo _active; + private ExecutionCarryOver _carryOver; + private final Object _mutex = new Object(); + + private final static Map endPointMap = new ConcurrentHashMap<>(); + private final static ServerPushEndPoint STUB = new ServerPushEndPoint(); + private List> schedules = new ArrayList<>(); + + public WebSocketServerPush() { + } + + @Override + public boolean activate(long timeout) throws InterruptedException, DesktopUnavailableException { + final Thread curr = Thread.currentThread(); + if (_active != null && _active.thread.equals(curr)) { //re-activate + ++_active.nActive; + return true; + } + + final ThreadInfo info = new ThreadInfo(curr); + + EventListener task = new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + if (event.getName().equals(ON_ACTIVATE_DESKTOP)) + { + synchronized (_mutex) { + _carryOver = new ExecutionCarryOver(desktop.get()); + + synchronized (info) { + info.nActive = 1; //granted + info.notifyAll(); + } + + try { + _mutex.wait(); //wait until the server push is done + } catch (InterruptedException ex) { + throw UiException.Aide.wrap(ex); + } + } + } + } + }; + + synchronized (info) { + Executions.schedule(desktop.get(), task, new Event(ON_ACTIVATE_DESKTOP)); + if (info.nActive == 0) + info.wait(timeout <= 0 ? 10*60*1000: timeout); + } + + _carryOver.carryOver(); + _active = info; + + return true; + } + + private boolean echo() { + Desktop dt = desktop.get(); + if (dt != null) { + ServerPushEndPoint endPoint = getEndPoint(dt.getId()); + if (endPoint == null) { + if (dt.isServerPushEnabled()) { + try { + Thread.sleep(5000); + } catch (InterruptedException e) { + } + endPoint = getEndPoint(dt.getId()); + } + } + if (endPoint != null) { + endPoint.echo(); + return true; + } + } + return false; + } + + @Override + public boolean deactivate(boolean stop) { + boolean stopped = false; + if (_active != null && Thread.currentThread().equals(_active.thread)) { + if (--_active.nActive <= 0) { + if (stop) + { + stop(); + stopped = true; + } + + _carryOver.cleanup(); + _carryOver = null; + _active.nActive = 0; //just in case + _active = null; + + synchronized (_mutex) { + _mutex.notifyAll(); + } + } + } + return stopped; + } + + @Override + public boolean isActive() { + return _active != null && _active.nActive > 0; + } + + @SuppressWarnings("unchecked") + @Override + public void onPiggyback() { + Schedule[] pendings = null; + synchronized (schedules) { + if (!schedules.isEmpty()) { + pendings = schedules.toArray(new Schedule[0]); + schedules = new ArrayList<>(); + } + } + if (pendings != null && pendings.length > 0) { + for(Schedule p : pendings) { + p.scheduler.schedule(p.task, p.event); + } + } + + //check web socket end point + Desktop dt = desktop.get(); + if (dt != null) { + ServerPushEndPoint endPoint = getEndPoint(dt.getId()); + if (endPoint == null) { + if (dt.isServerPushEnabled()) { + startServerPushAtClient(dt); + } + } + } + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void schedule(EventListener task, T event, + Scheduler scheduler) { + if (Executions.getCurrent() == null) { + //save for schedule at on piggyback event + synchronized (schedules) { + schedules.add(new Schedule(task, event, scheduler)); + } + echo(); + } else { + //in event listener thread, can schedule immediately + scheduler.schedule(task, event); + } + } + + private class Schedule { + private EventListener task; + private T event; + private Scheduler scheduler; + + private Schedule(EventListener task, T event, Scheduler scheduler) { + this.task = task; + this.event = event; + this.scheduler = scheduler; + } + } + + @Override + public void start(Desktop desktop) { + Desktop oldDesktop = this.desktop.getAndSet(desktop); + if (oldDesktop != null) { + log.warn("Server push already started for desktop " + desktop.getId()); + return; + } + + if (log.isDebugEnabled()) + log.debug("Starting server push for " + desktop); + registerEndPoint(desktop.getId(), STUB); + startServerPushAtClient(desktop); + } + + private void startServerPushAtClient(Desktop desktop) { + Clients.response("org.idempiere.websocket.serverpush.start", new AuScript(null, "org.idempiere.websocket.startServerPush('" + desktop.getId() + "');")); + } + + @Override + public void stop() { + Desktop desktop = this.desktop.getAndSet(null); + if (desktop == null) { + log.warn("Server push hasn't been started or has already stopped"); + return; + } + + if (log.isDebugEnabled()) + log.debug("Stopping server push for " + desktop); + Clients.response("org.idempiere.websocket.serverpush.stop", new AuScript(null, "org.idempiere.websocket.stopServerPush('" + desktop.getId() + "');")); + } + + private static class ThreadInfo { + private final Thread thread; + /** # of activate() was called. */ + private int nActive; + private ThreadInfo(Thread thread) { + this.thread = thread; + } + public String toString() { + return "[" + thread + ',' + nActive + ']'; + } + } + + @Override + public void resume() { + if (this.desktop.get() != null) { + Desktop desktop = this.desktop.getAndSet(null); + start(desktop); + } + } + + /** + * Register web socket end point for desktop + * @param dtid Desktop id + * @param endpoint Connected web socket end point + */ + public static void registerEndPoint(String dtid, ServerPushEndPoint endpoint) { + endPointMap.put(dtid, endpoint); + } + + /** + * Remove web socket end point for desktop + * @param dtid Desktop id + * @return true if there's end point register previously for desktop, false otherwise + */ + public static boolean unregisterEndPoint(String dtid) { + ServerPushEndPoint endpoint = endPointMap.remove(dtid); + return endpoint != null; + } + + /** + * Get web socket end point for desktop + * @param dtid Desktop id + * @return Web socket end point + */ + public static ServerPushEndPoint getEndPoint(String dtid) { + ServerPushEndPoint endpoint = endPointMap.get(dtid); + if (endpoint == STUB) + return null; + else + return endpoint; + } + + /** + * + * @param dtid desktop id + * @return true if serverpush started for dtid, false otherwise + */ + public static boolean isValidDesktopId(String dtid) { + return endPointMap.containsKey(dtid); + } +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js new file mode 100644 index 0000000000..79b6d6febf --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/serverpush.js @@ -0,0 +1,62 @@ +(function() { + org.idempiere.websocket.startServerPush = function(dtid) { + var dt = zk.Desktop.$(dtid); + if (dt._serverpush) + dt._serverpush.stop(); + + var spush = new org.idempiere.websocket.ServerPush(dt); + spush.start(); + }; + org.idempiere.websocket.stopServerPush = function(dtid) { + var dt = zk.Desktop.$(dtid); + if (dt._serverpush) + dt._serverpush.stop(); + }; + org.idempiere.websocket.ServerPush = zk.$extends(zk.Object, { + desktop: null, + socket: null, + active: false, + delay: 10, + $init: function(desktop) { + this.desktop = desktop; + }, + start: function() { + this.desktop._serverpush = this; + var url = window.location.protocol == "http:" ? "ws://" : "wss://"; + var path = window.location.href.substring(window.location.protocol.length+2); + path = path.substring(location.host.length+1); + var last=path.lastIndexOf("/"); + if (last > 0) { + path = "/" + path.substring(0, last) + "/serverpush/"; + } else { + path = "/serverpush/"; + } + url = url + window.location.host + path + this.desktop.id; + var me = this; + this.socket = new WebSocket(url); + this.socket.onopen = function (event) { + me.active = true; + }; + this.socket.onmessage = function (event) { + if (event.data=="echo") { + zAu.cmd0.echo(this.desktop); + } else if (event.data=="stop") { + me.stop(); + } + } + this.socket.onerror = function(event) { + console.log(event); + }; + }, + stop: function() { + this.active = false; + this.desktop._serverpush = null; + if (this.socket) { + try { + this.socket.close(); + } catch (error) {} + this.socket = null; + } + } + }); +})(); \ No newline at end of file diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/zk.wpd b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/zk.wpd new file mode 100644 index 0000000000..3fcdbfa87e --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/org/idempiere/websocket/zk.wpd @@ -0,0 +1,4 @@ + + +