Merge with default

This commit is contained in:
hieplq 2018-12-22 12:23:39 +07:00
commit 3e2012fb97
122 changed files with 5109 additions and 413 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -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
;

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.adempiere.base.PackInFolderApplication"/>
<booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticValidate" value="true"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/packinfolder.app"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="false"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-packinfolder.app"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog&#10;/home/carlos/srcFH/scm/fhca/dumps/2packs"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-DPropertyFile=/home/carlos/.idempiere/camaleo21pg.properties"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.adempiere.server.server_product"/>
<stringAttribute key="selected_target_plugins" value="bcprov@default:default,com.itextpdf@default:default,com.jaspersoft.studio.bundles.barbecue@default:default,com.jaspersoft.studio.bundles.poi@default:default,com.sun.mail.javax.mail@default:default,groovy-all@default:default,javax.activation@default:default,javax.ejb@default:default,javax.jms@default:default,javax.management.j2ee-api@default:default,javax.transaction@default:false,javax.xml.rpc@default:default,javax.xml.soap@default:default,javax.xml.stream@default:default,javax.xml@default:default,net.sf.supercsv.super-csv@default:default,org.apache.activemq.activemq-core@default:default,org.apache.activemq.kahadb@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.felix.scr@default:default,org.apache.poi@default:default,org.apache.servicemix.bundles.cglib@default:default,org.apache.servicemix.bundles.xmlbeans@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.cryptacular@default:default,org.dom4j@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@3:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.jetty.osgi-servlet-api@default:default,org.eclipse.jetty.osgi.alpn.fragment@default:false,org.eclipse.osgi.compatibility.plugins@default:false,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.jfree.chart-osgi@default:default,org.jfree.jcommon-osgi@default:default,org.junit@default:default,org.krysalis.barcode4j@default:default,org.passay@default:default,org.restlet@default:default,org.slf4j.api@default:default,org.slf4j.jcl@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base.process@default:default,org.adempiere.base@4:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.pipo.handlers@default:default,org.adempiere.pipo@3:true,org.adempiere.plugin.utils@3:true,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.slf4j.jdk14@default:false"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>

View File

@ -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);

View File

@ -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<MRevenueRecognitionRun> 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

View File

@ -128,4 +128,16 @@
</run>
</application>
</extension>
<extension
id="org.adempiere.base.PackInFolderApplication"
point="org.eclipse.core.runtime.applications">
<application
cardinality="singleton-global"
thread="main"
visible="true">
<run
class="org.adempiere.base.PackInFolderApplication">
</run>
</application>
</extension>
</plugin>

View File

@ -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<IProcessFactory> factories = Service.locator().list(IProcessFactory.class).getServices();
List<IProcessFactory> 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<IProcessFactory> getProcessFactories() {
List<IProcessFactory> 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

View File

@ -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() {
}
}

View File

@ -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());

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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.");
}

View File

@ -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));
}
}

View File

@ -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";

View File

@ -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();
}

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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);

View File

@ -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();

View File

@ -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<MPasswordHistory> getPasswordHistoryForCheck (int daysReuse, int userId){
if (daysReuse <= 0) {
return new ArrayList<MPasswordHistory>();
}
StringBuilder whereClause = new StringBuilder()
.append("SYSDATE-")
.append(daysReuse)

View File

@ -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;
}

View File

@ -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

View File

@ -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<MRevenueRecogService> 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<MRevenueRecognition> getAll(Properties ctx, String trxName) {
Query query = new Query(ctx,MRevenueRecognition.Table_Name, null, trxName);
return query.list();
}
} // MRevenueRecognition

View File

@ -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<MRevenueRecogService> 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

View File

@ -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

View File

@ -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";
/**

View File

@ -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") ||

View File

@ -907,14 +907,6 @@ public class MUser extends X_AD_User
MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName());
if (pwdrule != null){
List<MPasswordHistory> 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);
}

View File

@ -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)

View File

@ -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;
}
}

View File

@ -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

View File

@ -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)

View File

@ -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())

View File

@ -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<PreparedStatement> readReplicaStatements = Collections.synchronizedList(new ArrayList<PreparedStatement>());
/**
* 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

View File

@ -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<URLReplicaConnection> urlConnList = new ArrayList<URLReplicaConnection>();
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("&comma;", ",");
return value;
}
/**
* URL connection class for DB Read Replica
*
*/
private static class URLReplicaConnection implements Comparable<URLReplicaConnection> {
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;
}
}
}

View File

@ -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)

View File

@ -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()));

View File

@ -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

View File

@ -22,7 +22,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/jpayment.jar</url>
<url>${url.file.srv}/extra.jar/jpayment.jar</url>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
<retries>5</retries>
@ -35,7 +35,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/Verisign.jar</url>
<url>${url.file.srv}/extra.jar/Verisign.jar</url>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
<retries>5</retries>
@ -48,7 +48,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/payflow.jar</url>
<url>${url.file.srv}/extra.jar/payflow.jar</url>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
<retries>5</retries>

View File

@ -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

View File

@ -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<String> excludes = defaultExcludeList(tables[index]);
List<String> 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<tables.length; i++) {
exportDetail(ctx, document, po, 0, new String[] {tables[i]});
for (int i=1; i<tables.length; i++) {
if (tables[i].startsWith("+")) {
continue;
}
List<String> detTablesArr = new ArrayList<String>();
for (int j=i; j<tables.length; j++) {
if (j == i) {
detTablesArr.add(tables[j]);
} else {
if (tables[j].startsWith("+")) {
detTablesArr.add(tables[j].substring(1));
} else {
break;
}
}
}
String[] detTables = detTablesArr.toArray(new String[0]);
exportDetail(ctx, document, po, detTables);
}
if (createElement) {
document.endElement("","",tables[index]);
document.endElement("","",mainTable);
}
}
} catch (Exception e) {

View File

@ -107,6 +107,8 @@ public class TableElementHandler extends AbstractElementHandler {
public void endElement(PIPOContext ctx, Element element) throws SAXException {
MTable mTable = findPO(ctx, element);
if (element.defer && mTable == null)
return;
boolean isValidateView = false;
MViewComponent[] m_vcs = mTable.getViewComponent(true);
if (m_vcs != null && m_vcs.length > 0)

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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);

View File

@ -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<Object> params = new ArrayList<Object>();
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 + "%");

View File

@ -78,7 +78,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/jp-${jp.version}/jasperreports-fonts-${jp.version}.jar</url>
<url>${url.file.srv}/extra.jar/jasperreports-fonts-${jp.version}.jar</url>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
<outputFileName>jasperreports-fonts.jar</outputFileName>

View File

@ -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

View File

@ -184,7 +184,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/101-20121212164242.zip</url>
<url>${url.file.srv}/extra.jar/101-20121212164242.zip</url>
<unpack>false</unpack>
<outputDirectory>../fitnesse/FitNesseRoot/FitLibraryWeb</outputDirectory>
<retries>5</retries>
@ -197,7 +197,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/21-20121212154702.zip</url>
<url>${url.file.srv}/extra.jar/21-20121212154702.zip</url>
<unpack>false</unpack>
<outputDirectory>../fitnesse/FitNesseRoot/FitLibraryWeb</outputDirectory>
<retries>5</retries>
@ -210,7 +210,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/6-20121212124109.zip</url>
<url>${url.file.srv}/extra.jar/6-20121212124109.zip</url>
<unpack>false</unpack>
<outputDirectory>../fitnesse/FitNesseRoot/FitLibraryWeb</outputDirectory>
<retries>5</retries>

View File

@ -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

View File

@ -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

View File

@ -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: <adempiereDBuser>/<adempiereDBpassword>
sh $ADEMPIERE_DB_PATH/ExportReference.sh $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD system/$ADEMPIERE_DB_SYSTEM

View File

@ -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

View File

@ -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 <<!
DROP USER REFERENCE CASCADE;
alter session set "_enable_rename_user"=true;
alter system enable restricted session;
ALTER USER $1 RENAME TO REFERENCE IDENTIFIED BY "$2";
alter system disable restricted session;
!
fi
rm -f $IDEMPIERE_HOME/data/Adempiere.dmp $IDEMPIERE_HOME/data/Adempiere.log
# Export
exp reference/reference@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME FILE=$IDEMPIERE_HOME/data/Adempiere.dmp Log=$IDEMPIERE_HOME/data/Adempiere.log CONSISTENT=Y OWNER=reference
expdp REFERENCE/$2@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=Adempiere.dmp LOGFILE=Adempiere.log EXCLUDE=STATISTICS SCHEMAS=REFERENCE
if [ "x${1,,}" != "xreference" ]
then
sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME <<!
alter session set "_enable_rename_user"=true;
alter system enable restricted session;
ALTER USER REFERENCE RENAME TO $1 IDENTIFIED BY "$2";
alter system disable restricted session;
!
fi
cd $IDEMPIERE_HOME/data
jar cvfM Adempiere.jar Adempiere.dmp Adempiere.log

View File

@ -30,8 +30,13 @@ 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/seed
# 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/seed
chmod 770 $IDEMPIERE_HOME/data/seed
chgrp dba $IDEMPIERE_HOME/data/seed/Adempiere.dmp
chmod 640 $IDEMPIERE_HOME/data/seed/Adempiere.dmp
echo -------------------------------------
echo Import Adempiere.dmp

View File

@ -44,6 +44,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 "set heading off
@ -109,4 +114,6 @@ 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
exit 0

View File

@ -20,6 +20,20 @@ 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^" ]
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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -13,7 +13,7 @@ Author URI: http://www.bmlaurus.com
<link rel="stylesheet" href="<%=Prop.loadCss()%>">
<script type="text/javascript" src="resources/jquery/jquery.js"></script>
<% if(Prop.isRssOn()){
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"http://www.google.com/jsapi?key=ABQIAAAAFEyVt-pBJaTXzM__EKlCrBRyn6VRRdQGMLQqRPPw1fs6QDtVcBRGklOHzrf7hmoAX3qgxg4t5ImqRA\"></script>\n");
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"https://www.google.com/jsapi?key=ABQIAAAAFEyVt-pBJaTXzM__EKlCrBRyn6VRRdQGMLQqRPPw1fs6QDtVcBRGklOHzrf7hmoAX3qgxg4t5ImqRA\"></script>\n");
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"resources/gfeedfetcher.js\"></script>");
}
%>
@ -187,4 +187,4 @@ Author URI: http://www.bmlaurus.com
</div>
</div>
</body>
</html>
</html>

View File

@ -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

View File

@ -577,7 +577,9 @@ public class AdempiereServerMgr implements ServiceTrackerCustomizer<IServerFacto
public void run() {
if (server.isSleeping()) {
server.run();
scheduleFuture = Adempiere.getThreadPoolExecutor().schedule(this, server.getSleepMS(), TimeUnit.MILLISECONDS);
if (server.getSleepMS() != 0) {
scheduleFuture = Adempiere.getThreadPoolExecutor().schedule(this, server.getSleepMS(), TimeUnit.MILLISECONDS);
}
} else {
//server busy, try again after one minute
scheduleFuture = Adempiere.getThreadPoolExecutor().schedule(this, 60 * 1000, TimeUnit.MILLISECONDS);

View File

@ -69,7 +69,7 @@
<goal>wget</goal>
</goals>
<configuration>
<url>${url.file.srv}/jarfile/6.1/jpedal.jar</url>
<url>${url.file.srv}/extra.jar/jpedal.jar</url>
<unpack>false</unpack>
<outputDirectory>lib</outputDirectory>
<retries>5</retries>

View File

@ -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<Object> cbClient = new JComboBox<Object>();
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 + "]";

View File

@ -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,

View File

@ -45,5 +45,6 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
<javascript package="jawwa.atmosphere" merge="false" />
<javascript package="org.idempiere.websocket" merge="false" />
</language>

View File

@ -615,6 +615,7 @@ public class WAcctViewer extends Window implements EventListener<Event>
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);

View File

@ -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

View File

@ -78,7 +78,7 @@ public class GridView extends Vlayout implements EventListener<Event>, 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<Event>, 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;
}

View File

@ -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<Event>, 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<Event>, 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<MPasswordHistory>());
}
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()

View File

@ -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<Comboitem, String> mapItems = new HashMap<Comboitem, String>();
@ -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)

View File

@ -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);

View File

@ -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<String, Object> {

View File

@ -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) {

View File

@ -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("]");

Some files were not shown because too many files have changed in this diff Show More