From bb085c554656b3de9468115df92aa2f334be6bdf Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Thu, 18 Oct 2012 15:53:46 +0530 Subject: [PATCH 1/9] IDEMPIERE-293 List of active session --- db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql | 7 + .../postgresql/views/AD_SESSIONINFO_V.sql | 7 + .../oracle/935_IDEMPIERE-293.sql | 810 +++++++++++++++++ .../postgresql/935_IDEMPIERE-293.sql | 811 ++++++++++++++++++ .../webui/LoggedSessionListener.java | 76 ++ .../webui/session/SessionContextListener.java | 41 +- org.adempiere.ui.zk/WEB-INF/web.xml | 31 +- 7 files changed, 1767 insertions(+), 16 deletions(-) create mode 100644 db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql create mode 100644 db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql create mode 100644 migration/360lts-release/oracle/935_IDEMPIERE-293.sql create mode 100644 migration/360lts-release/postgresql/935_IDEMPIERE-293.sql create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LoggedSessionListener.java diff --git a/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql b/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql new file mode 100644 index 0000000000..24346cf159 --- /dev/null +++ b/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql @@ -0,0 +1,7 @@ +CREATE OR REPLACE VIEW ad_sessioninfo_v AS + SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive, + s.created, s.createdby, s.updated, s.updatedby, s.websession, + s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, + s.servername, s.ad_client_id AS login_client_id + FROM ad_session s + WHERE s.processed = 'N'; \ No newline at end of file diff --git a/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql b/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql new file mode 100644 index 0000000000..adc0895cdd --- /dev/null +++ b/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql @@ -0,0 +1,7 @@ +CREATE OR REPLACE VIEW ad_sessioninfo_v AS + SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive, + s.created, s.createdby, s.updated, s.updatedby, s.websession, + s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, + s.servername, s.ad_client_id AS login_client_id + FROM ad_session s + WHERE s.processed = 'N'::bpchar; \ No newline at end of file diff --git a/migration/360lts-release/oracle/935_IDEMPIERE-293.sql b/migration/360lts-release/oracle/935_IDEMPIERE-293.sql new file mode 100644 index 0000000000..15891a3f94 --- /dev/null +++ b/migration/360lts-release/oracle/935_IDEMPIERE-293.sql @@ -0,0 +1,810 @@ +CREATE OR REPLACE VIEW ad_sessioninfo_v AS + SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive, + s.created, s.createdby, s.updated, s.updatedby, s.websession, + s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, + s.servername, s.ad_client_id AS login_client_id + FROM ad_session s + WHERE s.processed = 'N'; + + Update AD_Session set processed='Y'; + +-- Oct 11, 2012 6:09:22 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,EntityType,CopyColumnsFromTable,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,AD_Client_ID,IsActive,AD_Org_ID,Updated,CreatedBy,UpdatedBy,Created) VALUES ('N','4',0,200025,'N','N','N','N','D','N','L','fd0427f8-ec15-4bd2-b4b1-d9ee2fb3890f','Y','Y','AD_SessionInfo_v','List of current logged in user','AD_SessionInfo_v',0,'Y',0,TO_DATE('2012-10-11 18:09:20','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2012-10-11 18:09:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 11, 2012 6:09:22 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200025 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID) +; + + +-- Oct 11, 2012 6:09:24 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,AD_Sequence_UU,Description,Name,IncrementNo,AD_Org_ID,AD_Client_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive) VALUES ('N',50000,'Y',1000000,1000000,'N','Y',200025,'8d765793-7e49-47fe-809f-e82c93b8a5f2','Table AD_SessionInfo_v','AD_SessionInfo_v',1,0,0,TO_DATE('2012-10-11 18:09:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-10-11 18:09:22','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- Oct 11, 2012 6:12:56 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200588,'D','N','N','N','N',10,'N',19,'N',2029,'ce1e4f62-f570-4d3f-b57f-29cbfc70ad8a','N','Y','N','AD_Session_ID','User Session Online or Web','Online or Web Session Information','Session',100,TO_DATE('2012-10-11 18:12:55','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:12:55','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:12:56 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200588 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + + +-- Oct 11, 2012 6:12:58 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200589,'D','N','N','N','N',10,'N',19,'N',102,'4fb5a4e2-626f-44e3-ab61-9225cee5b188','N','N','N','AD_Client_ID','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client',100,TO_DATE('2012-10-11 18:12:56','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:12:56','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:12:58 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200589 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + + +-- Oct 11, 2012 6:12:59 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200590,'D','N','N','N','N',10,'N',19,'N',113,'52199616-5a16-4bf4-ba03-496a75b33138','N','N','N','AD_Org_ID','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization',100,TO_DATE('2012-10-11 18:12:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:12:58','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:12:59 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200590 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:00 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200591,'D','N','N','N','N',1,'N',20,'N',348,'b011d222-0512-474d-967a-39501f9f4aad','N','Y','N','IsActive','The record is active in the system','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.','Active',100,TO_DATE('2012-10-11 18:12:59','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:12:59','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:00 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200591 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:01 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200592,'D','N','N','N','N',29,'N',16,'N',245,'6a2a8dff-02b4-4a9d-8218-4c1ac75967c7','N','N','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created',100,TO_DATE('2012-10-11 18:13:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:01 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200592 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:02 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200593,'D',110,'N','N','N','N',10,'N',18,'N',246,'f712b956-5f63-4051-99b0-36c0f96ad562','N','N','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By',100,TO_DATE('2012-10-11 18:13:01','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:01','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:03 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200593 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:04 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200594,'D','N','N','N','N',29,'N',16,'N',607,'62fb0d4a-a813-4c3f-b61b-b50d769e7221','N','N','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated',100,TO_DATE('2012-10-11 18:13:03','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:03','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:05 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200594 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:07 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200595,'D',110,'N','N','N','N',10,'N',18,'N',608,'dfbd1427-339e-4bff-83a6-99ab8ae71b0b','N','N','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By',100,TO_DATE('2012-10-11 18:13:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:05','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:08 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200595 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:13 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200596,'D','N','N','N','N',40,'N',10,'N',2059,'c105dadf-309d-4a1d-b0bd-a5a2aac25667','N','Y','N','WebSession','Web Session ID','Web Session',100,TO_DATE('2012-10-11 18:13:08','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:08','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:13 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200596 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:16 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200597,'D','N','N','N','N',60,'N',10,'N',1430,'7cd7f374-5ab8-4f64-ab70-03191fe92705','N','Y','N','Remote_Addr','Remote Address','The Remote Address indicates an alternative or external address.','Remote Addr',100,TO_DATE('2012-10-11 18:13:13','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:13','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:16 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200597 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:18 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200598,'D','N','N','N','N',120,'N',10,'N',1431,'2505c72d-c722-4548-8339-de2a4c38b94f','N','Y','N','Remote_Host','Remote host Info','Remote Host',100,TO_DATE('2012-10-11 18:13:16','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:16','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:18 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200598 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:24 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200599,'D','N','N','N','N',10,'N',19,'N',123,'a979c0b4-d349-40b7-9dc9-6aa9dbb41913','N','Y','N','AD_Role_ID','Responsibility Role','The Role determines security and access a user who has this Role will have in the System.','Role',100,TO_DATE('2012-10-11 18:13:19','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:19','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:24 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200599 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:27 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200600,'D','N','N','N','N',29,'N',16,'N',53344,'b286aafe-777b-46ff-ab4a-bcd304962e38','N','Y','N','LoginDate','Login date',100,TO_DATE('2012-10-11 18:13:24','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:27 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200600 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:29 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200601,'D','N','N','N','N',36,'N',10,'N',54595,'58879fef-b363-465a-a56e-25f15bdf296e','N','Y','N','AD_Session_UU','AD_Session_UU',100,TO_DATE('2012-10-11 18:13:27','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:27','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:29 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200601 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200602 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:17:07 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Window (WindowType,IsSOTrx,IsDefault,IsBetaFunctionality,WinHeight,WinWidth,EntityType,Name,Description,AD_Window_ID,Processing,AD_Window_UU,Created,Updated,AD_Org_ID,AD_Client_ID,IsActive,UpdatedBy,CreatedBy) VALUES ('Q','Y','N','N',0,0,'D','Current Logins','List of Current Logged in user',200016,'N','9ca5088a-12f9-4f68-9ad2-8d6bc667c718',TO_DATE('2012-10-11 18:17:05','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-11 18:17:05','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',100,100) +; + +-- Oct 11, 2012 6:17:08 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=200016 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + + +-- Oct 11, 2012 6:24:07 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Tab (IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,ImportFields,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,Description,AD_Tab_ID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,Processing,IsActive) VALUES ('Y',200016,10,'N','N',200025,'N','N','N','N','Y','N',0,'6fb7071b-f94c-49fe-86db-a4a5560f119f','D','Sessions','Current Sessions',200025,0,0,TO_DATE('2012-10-11 18:24:05','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-10-11 18:24:05','YYYY-MM-DD HH24:MI:SS'),100,'N','Y') +; + +-- Oct 11, 2012 6:24:08 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200025 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID) +; + + +-- Oct 11, 2012 6:24:17 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,1,'N','N',200591,'Y',200604,'N','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.','D','The record is active in the system','Active','Y','N','4a4ea069-d90b-4f94-bd8c-54bc9e9e410d',100,0,TO_DATE('2012-10-11 18:24:14','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:14','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:17 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200604 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:20 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200601,'Y',200605,'N','D','AD_Session_UU','Y','N','13fd257c-f4b4-4847-b550-a5b5121c4dd3',100,0,TO_DATE('2012-10-11 18:24:17','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:17','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:20 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200605 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:26 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200589,'Y',200606,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','Y','N','0a1cb71d-afb0-4b44-8500-b98bcb0d6f5a',100,0,TO_DATE('2012-10-11 18:24:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:20','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:26 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200606 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:28 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,29,'N','N',200600,'Y',200607,'N','D','Login date','Y','N','75afce1d-6a45-4f3c-991b-a99755414c06',100,0,TO_DATE('2012-10-11 18:24:26','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:26','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:28 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200607 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200590,'Y',200608,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','Y','N','b2f7e6d5-192f-4602-967f-0bad43829dd2',100,0,TO_DATE('2012-10-11 18:24:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:28','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200608 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,60,'N','N',200597,'Y',200609,'N','The Remote Address indicates an alternative or external address.','D','Remote Address','Remote Addr','Y','N','246620b1-bdfd-44f6-9e04-86a1b2acebb9',100,0,TO_DATE('2012-10-11 18:24:32','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:32','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:33 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200609 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:34 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,120,'N','N',200598,'Y',200610,'N','D','Remote host Info','Remote Host','Y','N','721af3e7-10ec-4e6f-b9b7-cefb1f11579d',100,0,TO_DATE('2012-10-11 18:24:33','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:33','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:34 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200610 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:35 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200599,'Y',200611,'N','The Role determines security and access a user who has this Role will have in the System.','D','Responsibility Role','Role','Y','N','3e693000-4510-4d7b-a1cf-7cc2d33a877a',100,0,TO_DATE('2012-10-11 18:24:34','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:34','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:35 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200611 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:36 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,40,'N','N',200602,'Y',200612,'N','D','Server name','Y','N','b15ce97a-2550-4c7d-9cfa-2ae4e66e5783',100,0,TO_DATE('2012-10-11 18:24:35','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:35','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:36 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200612 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:37 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200588,'Y',200613,'N','Online or Web Session Information','D','User Session Online or Web','Session','Y','N','8dd5343c-ebd6-4824-8a37-f2129750a5c1',100,0,TO_DATE('2012-10-11 18:24:36','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:36','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:37 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200613 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:39 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,40,'N','N',200596,'Y',200614,'N','D','Web Session ID','Web Session','Y','N','55af8bd7-d361-4f1c-8b8f-3546b66f4d05',100,0,TO_DATE('2012-10-11 18:24:37','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-11 18:24:37','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:39 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200614 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:28:47 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,Description,Action,AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200016,200022,'N','N','N','U','Y','Login Session','Current logged in session','W','cef6bf48-0c65-4739-97f5-2d0b0cb062d4','Y',0,100,TO_DATE('2012-10-11 18:28:44','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-10-11 18:28:44','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Oct 11, 2012 6:28:47 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200022 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Oct 11, 2012 6:28:47 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200022, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200022) +; + + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Window SET Name='Active Session',Updated=TO_DATE('2012-10-18 13:30:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=200016 +; + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Window_Trl SET IsTranslated='N' WHERE AD_Window_ID=200016 +; + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Menu SET Name='Active Session', Description='List of Current Logged in user', IsActive='Y',Updated=TO_DATE('2012-10-18 13:30:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200022 +; + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=200022 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200606 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200608 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:33:15 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:33:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200606 +; + +-- Oct 18, 2012 1:33:39 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:33:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200608 +; + +-- Oct 18, 2012 1:34:00 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:34:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200609 +; + +-- Oct 18, 2012 1:34:13 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET IsSameLine='Y', XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:34:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200610 +; + +-- Oct 18, 2012 1:34:28 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:34:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200611 +; + +-- Oct 18, 2012 1:34:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET XPosition=4,Updated=TO_DATE('2012-10-18 13:34:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200607 +; + +-- Oct 18, 2012 1:35:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:35:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:35:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:38:12 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_SysConfig SET Value='IDEMPIERE-293 List of Active Session',Updated=TO_DATE('2012-10-18 13:38:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50003 +; + +-- Oct 18, 2012 1:38:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200701,'D','N','N','N','N',40,'Y',10,'N',200182,'d7bc09f3-6c2c-444b-bea9-0ef0324cccbf','N','Y','N','ServerName','Load balancing instance name','Server Name',100,TO_DATE('2012-10-18 13:38:57','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-18 13:38:57','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 18, 2012 1:39:00 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200701 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 18, 2012 1:40:09 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,40,'N','N',200701,'Y',200646,'N','Load balancing instance name','D','Server Name','N','Y','cd3e0ee3-501f-4445-adc8-ecef383bc96b',100,0,TO_DATE('2012-10-18 13:40:08','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-18 13:40:08','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 18, 2012 1:40:09 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200646 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:42:24 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:42:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200646 +; + +-- Oct 18, 2012 1:42:36 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:42:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:42:53 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=2,Updated=TO_DATE('2012-10-18 13:42:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:43:19 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-18 13:43:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:46:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53242 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53014 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53108 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=16, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=228 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200022 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=114 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=108 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=115 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53225 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53226 +; + + + + +-- Oct 18, 2012 2:28:42 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_client_id',200186,'D','login_client_id','login_client_id','4fc6243a-2368-4251-9229-5dd20de17693',0,TO_DATE('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 18, 2012 2:28:42 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200186 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 18, 2012 2:28:43 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200702,'D','N','N','N','N',10,'N',19,'N',200186,'1b4a16bb-fe54-4afb-a1b1-2320a09ab856','N','N','N','login_client_id','login_client_id',100,TO_DATE('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 18, 2012 2:28:43 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200702 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 18, 2012 2:31:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Client', PrintName='Client',Updated=TO_DATE('2012-10-18 14:31:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186 +; + +-- Oct 18, 2012 2:31:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186 +; + +-- Oct 18, 2012 2:31:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_client_id', Name='Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y' +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y' +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem pi SET PrintName='Client', Name='Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200186) +; + +-- Oct 18, 2012 2:32:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Table SET AccessLevel='4', IsView='N',Updated=TO_DATE('2012-10-18 14:32:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200025 +; + +-- Oct 18, 2012 2:32:57 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Table SET IsView='Y',Updated=TO_DATE('2012-10-18 14:32:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200025 +; + +-- Oct 18, 2012 2:33:22 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200702,'Y',200647,'N','D','Client','N','Y','5fb154ca-0759-4700-9beb-071c871a7b7b',100,0,TO_DATE('2012-10-18 14:33:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-18 14:33:21','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 18, 2012 2:33:22 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200647 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 18, 2012 2:33:59 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200606 +; + +-- Oct 18, 2012 2:33:59 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200647 +; + +-- Oct 18, 2012 2:37:13 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Reference (AD_Reference_ID,Name,EntityType,AD_Reference_UU,IsOrderByValue,Description,ValidationType,AD_Client_ID,AD_Org_ID,CreatedBy,Updated,IsActive,Created,UpdatedBy) VALUES (200013,'AD_Session','D','3d5add60-2d2d-4570-b1d1-0e188b731374','N','AD Session','T',0,0,100,TO_DATE('2012-10-18 14:37:12','YYYY-MM-DD HH24:MI:SS'),'Y',TO_DATE('2012-10-18 14:37:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Oct 18, 2012 2:37:13 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Reference_Trl_UU ) SELECT l.AD_Language,t.AD_Reference_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=200013 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) +; + +-- Oct 18, 2012 2:38:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=129, AD_Reference_ID=18,Updated=TO_DATE('2012-10-18 14:38:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200702 +; + +-- Oct 18, 2012 2:39:09 PM IST +-- IDEMPIERE-293 List of Active Session +DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013 +; + +-- Oct 18, 2012 2:39:09 PM IST +-- IDEMPIERE-293 List of Active Session +DELETE FROM AD_Reference WHERE AD_Reference_ID=200013 +; + + + +SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual +; \ No newline at end of file diff --git a/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql b/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql new file mode 100644 index 0000000000..abdd1dbe48 --- /dev/null +++ b/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql @@ -0,0 +1,811 @@ +CREATE OR REPLACE VIEW ad_sessioninfo_v AS + SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive, + s.created, s.createdby, s.updated, s.updatedby, s.websession, + s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, + s.servername, s.ad_client_id AS login_client_id + FROM ad_session s + WHERE s.processed = 'N'::bpchar; + + Update AD_Session set processed='Y'; + +-- Oct 11, 2012 6:09:22 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,EntityType,CopyColumnsFromTable,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,AD_Client_ID,IsActive,AD_Org_ID,Updated,CreatedBy,UpdatedBy,Created) VALUES ('N','4',0,200025,'N','N','N','N','D','N','L','fd0427f8-ec15-4bd2-b4b1-d9ee2fb3890f','Y','Y','AD_SessionInfo_v','List of current logged in user','AD_SessionInfo_v',0,'Y',0,TO_TIMESTAMP('2012-10-11 18:09:20','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2012-10-11 18:09:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 11, 2012 6:09:22 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200025 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID) +; + + +-- Oct 11, 2012 6:09:24 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,AD_Sequence_UU,Description,Name,IncrementNo,AD_Org_ID,AD_Client_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive) VALUES ('N',50000,'Y',1000000,1000000,'N','Y',200025,'8d765793-7e49-47fe-809f-e82c93b8a5f2','Table AD_SessionInfo_v','AD_SessionInfo_v',1,0,0,TO_TIMESTAMP('2012-10-11 18:09:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-10-11 18:09:22','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- Oct 11, 2012 6:12:56 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200588,'D','N','N','N','N',10,'N',19,'N',2029,'ce1e4f62-f570-4d3f-b57f-29cbfc70ad8a','N','Y','N','AD_Session_ID','User Session Online or Web','Online or Web Session Information','Session',100,TO_TIMESTAMP('2012-10-11 18:12:55','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:12:55','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:12:56 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200588 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:12:58 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200589,'D','N','N','N','N',10,'N',19,'N',102,'4fb5a4e2-626f-44e3-ab61-9225cee5b188','N','N','N','AD_Client_ID','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client',100,TO_TIMESTAMP('2012-10-11 18:12:56','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:12:56','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:12:58 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200589 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:12:59 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200590,'D','N','N','N','N',10,'N',19,'N',113,'52199616-5a16-4bf4-ba03-496a75b33138','N','N','N','AD_Org_ID','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization',100,TO_TIMESTAMP('2012-10-11 18:12:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:12:58','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:12:59 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200590 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:00 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200591,'D','N','N','N','N',1,'N',20,'N',348,'b011d222-0512-474d-967a-39501f9f4aad','N','Y','N','IsActive','The record is active in the system','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.','Active',100,TO_TIMESTAMP('2012-10-11 18:12:59','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:12:59','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:00 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200591 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:01 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200592,'D','N','N','N','N',29,'N',16,'N',245,'6a2a8dff-02b4-4a9d-8218-4c1ac75967c7','N','N','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created',100,TO_TIMESTAMP('2012-10-11 18:13:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:01 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200592 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:02 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200593,'D',110,'N','N','N','N',10,'N',18,'N',246,'f712b956-5f63-4051-99b0-36c0f96ad562','N','N','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By',100,TO_TIMESTAMP('2012-10-11 18:13:01','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:01','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:03 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200593 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:04 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200594,'D','N','N','N','N',29,'N',16,'N',607,'62fb0d4a-a813-4c3f-b61b-b50d769e7221','N','N','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated',100,TO_TIMESTAMP('2012-10-11 18:13:03','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:03','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:05 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200594 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:07 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200595,'D',110,'N','N','N','N',10,'N',18,'N',608,'dfbd1427-339e-4bff-83a6-99ab8ae71b0b','N','N','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By',100,TO_TIMESTAMP('2012-10-11 18:13:05','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:05','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:08 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200595 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:13 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200596,'D','N','N','N','N',40,'N',10,'N',2059,'c105dadf-309d-4a1d-b0bd-a5a2aac25667','N','Y','N','WebSession','Web Session ID','Web Session',100,TO_TIMESTAMP('2012-10-11 18:13:08','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:08','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:13 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200596 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:16 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200597,'D','N','N','N','N',60,'N',10,'N',1430,'7cd7f374-5ab8-4f64-ab70-03191fe92705','N','Y','N','Remote_Addr','Remote Address','The Remote Address indicates an alternative or external address.','Remote Addr',100,TO_TIMESTAMP('2012-10-11 18:13:13','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:13','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:16 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200597 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:18 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200598,'D','N','N','N','N',120,'N',10,'N',1431,'2505c72d-c722-4548-8339-de2a4c38b94f','N','Y','N','Remote_Host','Remote host Info','Remote Host',100,TO_TIMESTAMP('2012-10-11 18:13:16','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:16','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:18 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200598 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:24 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200599,'D','N','N','N','N',10,'N',19,'N',123,'a979c0b4-d349-40b7-9dc9-6aa9dbb41913','N','Y','N','AD_Role_ID','Responsibility Role','The Role determines security and access a user who has this Role will have in the System.','Role',100,TO_TIMESTAMP('2012-10-11 18:13:19','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:19','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:24 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200599 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:13:27 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200600,'D','N','N','N','N',29,'N',16,'N',53344,'b286aafe-777b-46ff-ab4a-bcd304962e38','N','Y','N','LoginDate','Login date',100,TO_TIMESTAMP('2012-10-11 18:13:24','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:27 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200600 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:29 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200601,'D','N','N','N','N',36,'N',10,'N',54595,'58879fef-b363-465a-a56e-25f15bdf296e','N','Y','N','AD_Session_UU','AD_Session_UU',100,TO_TIMESTAMP('2012-10-11 18:13:27','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:27','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:29 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200601 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 11, 2012 6:13:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 11, 2012 6:13:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200602 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + + +-- Oct 11, 2012 6:17:07 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Window (WindowType,IsSOTrx,IsDefault,IsBetaFunctionality,WinHeight,WinWidth,EntityType,Name,Description,AD_Window_ID,Processing,AD_Window_UU,Created,Updated,AD_Org_ID,AD_Client_ID,IsActive,UpdatedBy,CreatedBy) VALUES ('Q','Y','N','N',0,0,'D','Current Logins','List of Current Logged in user',200016,'N','9ca5088a-12f9-4f68-9ad2-8d6bc667c718',TO_TIMESTAMP('2012-10-11 18:17:05','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-11 18:17:05','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',100,100) +; + +-- Oct 11, 2012 6:17:08 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=200016 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Oct 11, 2012 6:24:07 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Tab (IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,ImportFields,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,Description,AD_Tab_ID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,Processing,IsActive) VALUES ('Y',200016,10,'N','N',200025,'N','N','N','N','Y','N',0,'6fb7071b-f94c-49fe-86db-a4a5560f119f','D','Sessions','Current Sessions',200025,0,0,TO_TIMESTAMP('2012-10-11 18:24:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-10-11 18:24:05','YYYY-MM-DD HH24:MI:SS'),100,'N','Y') +; + +-- Oct 11, 2012 6:24:08 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200025 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID) +; + + +-- Oct 11, 2012 6:24:17 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,1,'N','N',200591,'Y',200604,'N','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.','D','The record is active in the system','Active','Y','N','4a4ea069-d90b-4f94-bd8c-54bc9e9e410d',100,0,TO_TIMESTAMP('2012-10-11 18:24:14','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:14','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:17 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200604 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:20 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200601,'Y',200605,'N','D','AD_Session_UU','Y','N','13fd257c-f4b4-4847-b550-a5b5121c4dd3',100,0,TO_TIMESTAMP('2012-10-11 18:24:17','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:17','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:20 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200605 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:26 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200589,'Y',200606,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','Y','N','0a1cb71d-afb0-4b44-8500-b98bcb0d6f5a',100,0,TO_TIMESTAMP('2012-10-11 18:24:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:20','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:26 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200606 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:28 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,29,'N','N',200600,'Y',200607,'N','D','Login date','Y','N','75afce1d-6a45-4f3c-991b-a99755414c06',100,0,TO_TIMESTAMP('2012-10-11 18:24:26','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:26','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:28 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200607 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200590,'Y',200608,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','Y','N','b2f7e6d5-192f-4602-967f-0bad43829dd2',100,0,TO_TIMESTAMP('2012-10-11 18:24:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:28','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200608 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:32 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,60,'N','N',200597,'Y',200609,'N','The Remote Address indicates an alternative or external address.','D','Remote Address','Remote Addr','Y','N','246620b1-bdfd-44f6-9e04-86a1b2acebb9',100,0,TO_TIMESTAMP('2012-10-11 18:24:32','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:32','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:33 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200609 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:34 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,120,'N','N',200598,'Y',200610,'N','D','Remote host Info','Remote Host','Y','N','721af3e7-10ec-4e6f-b9b7-cefb1f11579d',100,0,TO_TIMESTAMP('2012-10-11 18:24:33','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:33','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:34 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200610 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:35 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200599,'Y',200611,'N','The Role determines security and access a user who has this Role will have in the System.','D','Responsibility Role','Role','Y','N','3e693000-4510-4d7b-a1cf-7cc2d33a877a',100,0,TO_TIMESTAMP('2012-10-11 18:24:34','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:34','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:35 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200611 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:36 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,40,'N','N',200602,'Y',200612,'N','D','Server name','Y','N','b15ce97a-2550-4c7d-9cfa-2ae4e66e5783',100,0,TO_TIMESTAMP('2012-10-11 18:24:35','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:35','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:36 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200612 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:37 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200588,'Y',200613,'N','Online or Web Session Information','D','User Session Online or Web','Session','Y','N','8dd5343c-ebd6-4824-8a37-f2129750a5c1',100,0,TO_TIMESTAMP('2012-10-11 18:24:36','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:36','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:37 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200613 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:24:39 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,40,'N','N',200596,'Y',200614,'N','D','Web Session ID','Web Session','Y','N','55af8bd7-d361-4f1c-8b8f-3546b66f4d05',100,0,TO_TIMESTAMP('2012-10-11 18:24:37','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-11 18:24:37','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 11, 2012 6:24:39 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200614 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + + +-- Oct 11, 2012 6:28:47 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,Description,"action",AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200016,200022,'N','N','N','U','Y','Login Session','Current logged in session','W','cef6bf48-0c65-4739-97f5-2d0b0cb062d4','Y',0,100,TO_TIMESTAMP('2012-10-11 18:28:44','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-10-11 18:28:44','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Oct 11, 2012 6:28:47 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200022 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + + +-- Oct 11, 2012 6:28:47 PM PDT +-- IDEMPIERE-293-List of logged users +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 200022, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200022) +; + + + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Window SET Name='Active Session',Updated=TO_TIMESTAMP('2012-10-18 13:30:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=200016 +; + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Window_Trl SET IsTranslated='N' WHERE AD_Window_ID=200016 +; + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Menu SET Name='Active Session', Description='List of Current Logged in user', IsActive='Y',Updated=TO_TIMESTAMP('2012-10-18 13:30:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200022 +; + +-- Oct 18, 2012 1:30:02 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=200022 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200606 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200608 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:31:38 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:32:31 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:33:15 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:33:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200606 +; + +-- Oct 18, 2012 1:33:39 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:33:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200608 +; + +-- Oct 18, 2012 1:34:00 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:34:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200609 +; + +-- Oct 18, 2012 1:34:13 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET IsSameLine='Y', XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:34:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200610 +; + +-- Oct 18, 2012 1:34:28 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:34:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200611 +; + +-- Oct 18, 2012 1:34:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET XPosition=4,Updated=TO_TIMESTAMP('2012-10-18 13:34:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200607 +; + +-- Oct 18, 2012 1:35:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:35:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:35:43 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:38:12 PM IST +-- IDEMPIERE-389 Adding server name on AD_Session +UPDATE AD_SysConfig SET Value='IDEMPIERE-293 List of Active Session',Updated=TO_TIMESTAMP('2012-10-18 13:38:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50003 +; + +-- Oct 18, 2012 1:38:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200701,'D','N','N','N','N',40,'Y',10,'N',200182,'d7bc09f3-6c2c-444b-bea9-0ef0324cccbf','N','Y','N','ServerName','Load balancing instance name','Server Name',100,TO_TIMESTAMP('2012-10-18 13:38:57','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-18 13:38:57','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 18, 2012 1:39:00 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200701 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 18, 2012 1:40:09 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,40,'N','N',200701,'Y',200646,'N','Load balancing instance name','D','Server Name','N','Y','cd3e0ee3-501f-4445-adc8-ecef383bc96b',100,0,TO_TIMESTAMP('2012-10-18 13:40:08','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-18 13:40:08','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 18, 2012 1:40:09 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200646 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 18, 2012 1:41:56 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:42:24 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:42:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200646 +; + +-- Oct 18, 2012 1:42:36 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:42:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200614 +; + +-- Oct 18, 2012 1:42:53 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=2,Updated=TO_TIMESTAMP('2012-10-18 13:42:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200604 +; + +-- Oct 18, 2012 1:43:19 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-18 13:43:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200605 +; + +-- Oct 18, 2012 1:46:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53242 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53014 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=14, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53108 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=15, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=16, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=228 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200022 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=114 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=108 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=115 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53225 +; + +-- Oct 18, 2012 1:46:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53226 +; + + + + +-- Oct 18, 2012 2:28:42 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_client_id',200186,'D','login_client_id','login_client_id','4fc6243a-2368-4251-9229-5dd20de17693',0,TO_TIMESTAMP('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 18, 2012 2:28:42 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200186 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 18, 2012 2:28:43 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200702,'D','N','N','N','N',10,'N',19,'N',200186,'1b4a16bb-fe54-4afb-a1b1-2320a09ab856','N','N','N','login_client_id','login_client_id',100,TO_TIMESTAMP('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-18 14:28:41','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 18, 2012 2:28:43 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200702 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 18, 2012 2:31:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Client', PrintName='Client',Updated=TO_TIMESTAMP('2012-10-18 14:31:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186 +; + +-- Oct 18, 2012 2:31:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186 +; + +-- Oct 18, 2012 2:31:50 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_client_id', Name='Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y' +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y' +; + +-- Oct 18, 2012 2:31:51 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem SET PrintName='Client', Name='Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200186) +; + +-- Oct 18, 2012 2:32:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Table SET AccessLevel='4', IsView='N',Updated=TO_TIMESTAMP('2012-10-18 14:32:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200025 +; + +-- Oct 18, 2012 2:32:57 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Table SET IsView='Y',Updated=TO_TIMESTAMP('2012-10-18 14:32:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200025 +; + +-- Oct 18, 2012 2:33:22 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200702,'Y',200647,'N','D','Client','N','Y','5fb154ca-0759-4700-9beb-071c871a7b7b',100,0,TO_TIMESTAMP('2012-10-18 14:33:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-18 14:33:21','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 18, 2012 2:33:22 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200647 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 18, 2012 2:33:59 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200606 +; + +-- Oct 18, 2012 2:33:59 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200647 +; + +-- Oct 18, 2012 2:37:13 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Reference (AD_Reference_ID,Name,EntityType,AD_Reference_UU,IsOrderByValue,Description,ValidationType,AD_Client_ID,AD_Org_ID,CreatedBy,Updated,IsActive,Created,UpdatedBy) VALUES (200013,'AD_Session','D','3d5add60-2d2d-4570-b1d1-0e188b731374','N','AD Session','T',0,0,100,TO_TIMESTAMP('2012-10-18 14:37:12','YYYY-MM-DD HH24:MI:SS'),'Y',TO_TIMESTAMP('2012-10-18 14:37:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Oct 18, 2012 2:37:13 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Reference_Trl_UU ) SELECT l.AD_Language,t.AD_Reference_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=200013 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) +; + +-- Oct 18, 2012 2:38:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=129, AD_Reference_ID=18,Updated=TO_TIMESTAMP('2012-10-18 14:38:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200702 +; + +-- Oct 18, 2012 2:39:09 PM IST +-- IDEMPIERE-293 List of Active Session +DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013 +; + +-- Oct 18, 2012 2:39:09 PM IST +-- IDEMPIERE-293 List of Active Session +DELETE FROM AD_Reference WHERE AD_Reference_ID=200013 +; + + + +SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual +; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LoggedSessionListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LoggedSessionListener.java new file mode 100644 index 0000000000..7f14da2b18 --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/LoggedSessionListener.java @@ -0,0 +1,76 @@ +package org.adempiere.webui; + +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Hashtable; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionEvent; +import javax.servlet.http.HttpSessionListener; + +import org.compiere.model.MSession; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.WebUtil; + +public class LoggedSessionListener implements HttpSessionListener, ServletContextListener{ + private static Hashtable AD_SessionList = new Hashtable(); + + @Override + public void sessionCreated(HttpSessionEvent evt) { + AD_SessionList.put(evt.getSession().getId(), evt.getSession()); + } + + @Override + public void sessionDestroyed(HttpSessionEvent evt) { + HttpSession currSess = evt.getSession(); + if(AD_SessionList.containsKey(currSess.getId())){ + String serverName = WebUtil.getServerName(); + removeADSession(currSess.getId(),serverName); + AD_SessionList.remove(currSess.getId()); + } + + } + + @Override + public void contextDestroyed(ServletContextEvent arg0) { + DestroyAllSession(); + } + + @Override + public void contextInitialized(ServletContextEvent arg0) { + DestroyAllSession(); + } + + public void DestroyAllSession() { + String serverName = WebUtil.getServerName(); + String sql = "UPDATE AD_Session SET processed = 'Y' WHERE processed ='N' AND servername = '"+serverName+"'"; + Statement stmt = DB.createStatement(); + try{ + stmt.executeUpdate(sql); + }catch (Exception e) { + System.out.println("UpdateSession: "+e); + } + + } + + public void removeADSession(String sessionID, String serverName) { + StringBuilder sql = new StringBuilder("SELECT * FROM AD_Session WHERE websession = '"); + sql.append(sessionID) + .append("' AND servername = '") + .append(serverName).append("' AND processed = 'N'"); + Statement stmt = DB.createStatement(); + try{ + ResultSet rs = stmt.executeQuery(sql.toString()); + if(rs.next()){ + MSession mSession = new MSession(Env.getCtx(), rs, null); + mSession.setProcessed(true); + mSession.save(); + } + }catch (Exception e) { + System.out.println("UpdateSession: "+e); + } + } +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java index 54e41cb5b5..cf3c9ff121 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java @@ -22,10 +22,13 @@ import java.util.Properties; import javax.servlet.http.HttpSession; -import org.compiere.util.CLogMgt; +import org.adempiere.util.ServerContext; +import org.adempiere.util.ServerContextURLHandler; +import org.compiere.model.MSession; import org.compiere.util.Env; import org.zkoss.util.Locales; import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.Desktop; import org.zkoss.zk.ui.Execution; import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.Session; @@ -36,12 +39,11 @@ import org.zkoss.zk.ui.event.EventThreadResume; import org.zkoss.zk.ui.event.EventThreadSuspend; import org.zkoss.zk.ui.sys.DesktopCtrl; import org.zkoss.zk.ui.sys.ServerPush; +import org.zkoss.zk.ui.util.DesktopCleanup; +import org.zkoss.zk.ui.util.DesktopInit; import org.zkoss.zk.ui.util.ExecutionCleanup; import org.zkoss.zk.ui.util.ExecutionInit; -import org.adempiere.util.ServerContextURLHandler; -import org.adempiere.util.ServerContext; - /** * * @author Ashley G Ramdass @@ -49,7 +51,7 @@ import org.adempiere.util.ServerContext; * @version $Revision: 0.10 $ */ public class SessionContextListener implements ExecutionInit, - ExecutionCleanup, EventThreadInit, EventThreadResume, EventThreadCleanup, EventThreadSuspend + ExecutionCleanup, EventThreadInit, EventThreadResume, EventThreadCleanup, EventThreadSuspend, DesktopCleanup, DesktopInit { public static final String SERVLET_SESSION_ID = "servlet.sessionId"; public static final String SESSION_CTX = "WebUISessionContext"; @@ -301,4 +303,33 @@ public class SessionContextListener implements ExecutionInit, return true; } + + @Override + public void cleanup(Desktop desktop) throws Exception { + if (ServerContext.getCurrentInstance().isEmpty() || !isContextValid()) + { + setupExecutionContextFromSession(Executions.getCurrent()); + } + MSession mSession = MSession.get(Env.getCtx(), false); + if(mSession!=null && !mSession.isProcessed() && (Env.getContext(Env.getCtx(), "isReloaded")==null || Env.getContext(Env.getCtx(), "isReloaded").equals("") || Env.getContext(Env.getCtx(), "isReloaded").equals("N"))){ + mSession.setProcessed(true); + mSession.save(); + } + Env.setContext(Env.getCtx(), "isReloaded", "N"); + } + + @Override + public void init(Desktop desktop, Object request) throws Exception { + if (ServerContext.getCurrentInstance().isEmpty() || !isContextValid()) + { + setupExecutionContextFromSession(Executions.getCurrent()); + } + MSession mSession = MSession.get(Env.getCtx(), false); + if(mSession!=null && mSession.isProcessed()){ + mSession.setProcessed(false); + mSession.save(); + }else if(mSession!=null){ + Env.setContext(Env.getCtx(), "isReloaded", "Y"); + } + } } diff --git a/org.adempiere.ui.zk/WEB-INF/web.xml b/org.adempiere.ui.zk/WEB-INF/web.xml index 69d8086ea6..314a50bab4 100644 --- a/org.adempiere.ui.zk/WEB-INF/web.xml +++ b/org.adempiere.ui.zk/WEB-INF/web.xml @@ -53,6 +53,15 @@ org.zkoss.zk.ui.http.HttpSessionListener + + + Used to track the session currently used + + Update Session + + org.adempiere.webui.LoggedSessionListener + + ZK loader for ZUML pages @@ -88,17 +97,17 @@ auEngine /zkau/* - - - servlet to provide timeline xml event feed - timelineFeed - - org.adempiere.webui.TimelineEventFeed - - - - timelineFeed - /timeline + + + servlet to provide timeline xml event feed + timelineFeed + + org.adempiere.webui.TimelineEventFeed + + + + timelineFeed + /timeline From 2b8ecf09bee413de10ff2e2dfaea074bd74fd0b2 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 19 Oct 2012 10:28:08 +0800 Subject: [PATCH 2/9] IDEMPIERE-369 Master Detail layout improvements. 1) Fixed dataIgnore bugs with new record. 2) Fixed wrong icon for customized grid view dialog. 3) Fixed layout issue with document action dialog. 3) Added highlight for active tab. 4) Click on row indicator will now toggle form view. 5) Added indicator for 2nd or 3rd level tab. 5) Drop desktop implementation that's not maintained anymore. --- .../src/org/compiere/model/GridTable.java | 4 +- .../adempiere/webui/adwindow/ADSortTab.java | 5 + .../adempiere/webui/adwindow/ADTabpanel.java | 30 +- .../adwindow/AbstractADWindowContent.java | 5 + .../webui/adwindow/CompositeADTabbox.java | 54 +-- .../adempiere/webui/adwindow/DetailPane.java | 51 ++- .../webui/adwindow/GridTabRowRenderer.java | 53 ++- .../adempiere/webui/adwindow/GridView.java | 13 +- .../adempiere/webui/adwindow/IADTabpanel.java | 4 +- .../webui/desktop/NavBar2Desktop.java | 351 ----------------- .../webui/desktop/NavBarDesktop.java | 359 ------------------ .../webui/panel/CustomizeGridViewPanel.java | 8 +- .../webui/panel/WDocActionPanel.java | 4 +- .../theme/default/css/theme.css.dsp | 38 +- 14 files changed, 200 insertions(+), 779 deletions(-) delete mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java delete mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 0bfa30cfe1..f086aef7bd 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -2657,7 +2657,9 @@ public class GridTable extends AbstractTableModel { if (!m_inserting && !m_changed && m_rowChanged < 0) { - log.fine("Nothing to ignore"); + if (log.isLoggable(Level.FINE)) + log.fine("Nothing to ignore"); + m_newRow = -1; return; } log.info("Inserting=" + m_inserting); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index d81a81a2e4..f5f69a7a88 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -931,5 +931,10 @@ public class ADSortTab extends Panel implements IADTabpanel public void setDetailPaneMode(boolean detailMode, boolean vflex) { this.setVflex(Boolean.toString(vflex)); } + + @Override + public GridView getGridView() { + return null; + } } //ADSortTab diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 2ca421fa59..6f4324e594 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -98,6 +98,12 @@ import org.zkoss.zul.impl.XulElement; public class ADTabpanel extends Div implements Evaluatee, EventListener, DataStatusListener, IADTabpanel { + public static final String ON_SWITCH_VIEW_EVENT = "onSwitchView"; + + public static final String ON_ACTIVATE_EVENT = "onActivate"; + + private static final String ATTR_ON_ACTIVATE_POSTED = "org.adempiere.webui.adwindow.ADTabpanel.onActivatePosted"; + /** * */ @@ -163,6 +169,13 @@ DataStatusListener, IADTabpanel initComponents(); addEventListener(ON_DEFER_SET_SELECTED_NODE, this); addEventListener(WPaymentEditor.ON_SAVE_PAYMENT, this); + + addEventListener(ON_ACTIVATE_EVENT, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + removeAttribute(ATTR_ON_ACTIVATE_POSTED); + } + }); } private void initComponents() @@ -586,7 +599,7 @@ DataStatusListener, IADTabpanel for (WEditor comp : editors) { GridField mField = comp.getGridField(); - if (mField != null && mField.getIncluded_Tab_ID() <= 0) + if (mField != null) { if (mField.isDisplayed(true)) // check context { @@ -796,6 +809,14 @@ DataStatusListener, IADTabpanel */ public void activate(boolean activate) { + if (activate) { + if (getAttribute(ATTR_ON_ACTIVATE_POSTED) != null) { + return; + } + + setAttribute(ATTR_ON_ACTIVATE_POSTED, Boolean.TRUE); + } + active = activate; if (listPanel.isVisible()) { if (activate) @@ -813,8 +834,8 @@ DataStatusListener, IADTabpanel setSelectedNode(gridTab.getRecord_ID()); } - Event event = new Event("onActivate", this, activate); - Events.sendEvent(event); + Event event = new Event(ON_ACTIVATE_EVENT, this, activate); + Events.postEvent(event); } /** @@ -1060,7 +1081,7 @@ DataStatusListener, IADTabpanel if (details != null) addDetails(details); - Events.sendEvent(this, new Event("onSwitchView", this)); + Events.sendEvent(this, new Event(ON_SWITCH_VIEW_EVENT, this)); } class ZoomListener implements EventListener { @@ -1132,6 +1153,7 @@ DataStatusListener, IADTabpanel * * @return GridPanel */ + @Override public GridView getGridView() { return listPanel; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 3030d26d4e..5bc47062fe 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -1126,6 +1126,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (adTabbox.getSelectedGridTab() != null && adTabbox.getSelectedGridTab().isQueryActive()) dbInfo = "[ " + dbInfo + " ]"; breadCrumb.setStatusDB(dbInfo, e); + } else if (adTabbox.getSelectedDetailADTabpanel() == null) + { + return; } // Set Message / Info @@ -1485,6 +1488,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } private void doOnFind() { + adTabbox.dataIgnore(); + // Gets Fields from AD_Field_v GridField[] findFields = adTabbox.getSelectedGridTab().getFields(); if (findWindow == null || !findWindow.validate(adTabbox.getSelectedGridTab().getWindowNo(), adTabbox.getSelectedGridTab().getName(), diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java index 4ee6a73f3a..043dde7ba4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java @@ -41,6 +41,7 @@ import org.zkoss.zk.ui.HtmlBasedComponent; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; +import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Menuitem; import org.zkoss.zul.Vlayout; @@ -53,10 +54,6 @@ import org.zkoss.zul.Vlayout; */ public class CompositeADTabbox extends AbstractADTabbox { - private static final String ON_SWITCH_VIEW_EVENT = "onSwitchView"; - - private static final String ON_ACTIVATE_EVENT = "onActivate"; - public static final String ON_SELECTION_CHANGED_EVENT = "onSelectionChanged"; public static final String ADTAB_INDEX_ATTRIBUTE = "adtab.index"; @@ -87,6 +84,8 @@ public class CompositeADTabbox extends AbstractADTabbox @Override public void onEvent(Event event) throws Exception { if (DetailPane.ON_EDIT_EVENT.equals(event.getName())) { + if (headerTab.getGridTab().isNew()) return; + final int row = detailPane.getSelectedADTabpanel() != null ? detailPane.getSelectedADTabpanel().getGridTab().getCurrentRow() : 0; @@ -99,6 +98,8 @@ public class CompositeADTabbox extends AbstractADTabbox }); } else if (DetailPane.ON_NEW_EVENT.equals(event.getName())) { + if (headerTab.getGridTab().isNew()) return; + final int row = detailPane.getSelectedADTabpanel() != null ? detailPane.getSelectedADTabpanel().getGridTab().getCurrentRow() : 0; @@ -113,6 +114,8 @@ public class CompositeADTabbox extends AbstractADTabbox }); } else if (DetailPane.ON_DELETE_EVENT.equals(event.getName())) { + if (headerTab.getGridTab().isNew()) return; + final IADTabpanel tabPanel = detailPane.getSelectedADTabpanel(); if (tabPanel != null && tabPanel.getGridTab().getRowCount() > 0 && tabPanel.getGridTab().getCurrentRow() >= 0) { @@ -137,6 +140,7 @@ public class CompositeADTabbox extends AbstractADTabbox protected void onEditDetail(int row) { int oldIndex = selectedIndex; IADTabpanel selectedPanel = detailPane.getSelectedADTabpanel(); + if (selectedPanel == null) return; int newIndex = (Integer)selectedPanel.getAttribute(ADTAB_INDEX_ATTRIBUTE); Event selectionChanged = new Event(ON_SELECTION_CHANGED_EVENT, layout, new Object[]{oldIndex, newIndex}); @@ -198,7 +202,7 @@ public class CompositeADTabbox extends AbstractADTabbox tabPanel.setAttribute(ADTAB_INDEX_ATTRIBUTE, tabPanelList.size()-1); - tabPanel.addEventListener(ON_ACTIVATE_EVENT, new EventListener() { + tabPanel.addEventListener(ADTabpanel.ON_ACTIVATE_EVENT, new EventListener() { @Override public void onEvent(Event event) throws Exception { Boolean b = (Boolean) event.getData(); @@ -247,7 +251,7 @@ public class CompositeADTabbox extends AbstractADTabbox } }); - tabPanel.addEventListener(ON_SWITCH_VIEW_EVENT, new EventListener() { + tabPanel.addEventListener(ADTabpanel.ON_SWITCH_VIEW_EVENT, new EventListener() { @Override public void onEvent(Event event) throws Exception { @@ -277,16 +281,26 @@ public class CompositeADTabbox extends AbstractADTabbox } }); + if (tabPanel.getGridView() != null) { + tabPanel.getGridView().addEventListener(DetailPane.ON_EDIT_EVENT, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + GridView gridView = (GridView) event.getTarget(); + if (gridView.getParent() == headerTab) { + adWindowPanel.onToggle(); + } + } + }); + } + if (layout.getChildren().isEmpty()) { layout.appendChild(tabPanel); headerTab = tabPanel; updateBreadCrumb(); } else if (tabLabel.tabLevel <= 1) { - boolean activate = false; if (detailPane.getParent() == null) { ADTabpanel adtabpanel = (ADTabpanel) headerTab; adtabpanel.addDetails(detailPane); - activate = true; } else tabPanel.setVisible(false); detailPane.setHflex("1"); @@ -294,8 +308,6 @@ public class CompositeADTabbox extends AbstractADTabbox detailPane.addADTabpanel(tabPanel, tabLabel); tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane()); detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane())); - if (activate) - activateDetailADTabpanel(); } else { detailPane.addADTabpanel(tabPanel, tabLabel, false); tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane()); @@ -305,15 +317,7 @@ public class CompositeADTabbox extends AbstractADTabbox htmlComponent.setVflex("1"); htmlComponent.setWidth("100%"); - tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel)); - - if (detailPane.getTabcount() > 1) { - int selectedIndex = detailPane.getSelectedIndex(); - updateTabState(); - if (detailPane.getSelectedIndex() != selectedIndex) { - activateDetailADTabpanel(); - } - } + tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel)); } private void activateDetailADTabpanel() { @@ -403,6 +407,8 @@ public class CompositeADTabbox extends AbstractADTabbox } else if (tabLevel > currentLevel ){ detailPane.addADTabpanel(tabPanel, tabLabel, false); tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane()); + } else { + break; } } @@ -413,6 +419,8 @@ public class CompositeADTabbox extends AbstractADTabbox detailPane.setSelectedIndex(0); } + headerTab.setDetailPaneMode(false, isUseVflexForDetailPane()); + updateBreadCrumb(); } @@ -518,7 +526,7 @@ public class CompositeADTabbox extends AbstractADTabbox //refresh current row detailTab.getGridTab().dataRefresh(false); //keep focus - onDetailRecord(); + Clients.scrollIntoView(detailTab); return; } @@ -530,7 +538,6 @@ public class CompositeADTabbox extends AbstractADTabbox if (!parentColumnNames.contains(field.getColumnName())) Env.setContext(Env.getCtx(), field.getWindowNo(), field.getColumnName(), ""); } - detailTab.query(false, 0, 0); detailTab.activate(true); detailTab.setDetailPaneMode(true, isUseVflexForDetailPane()); detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane())); @@ -655,7 +662,10 @@ public class CompositeADTabbox extends AbstractADTabbox @Override public void updateDetailPaneToolbar(boolean changed, boolean readOnly) { - detailPane.updateToolbar(changed, readOnly); + if (headerTab.getGridTab().isNew() || headerTab.getGridTab().getRowCount() == 0) + detailPane.disableToolbar(); + else + detailPane.updateToolbar(changed, readOnly); } @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index 889f611fca..d9fb1ce435 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -140,19 +140,16 @@ public class DetailPane extends Panel implements EventListener { tab.setLabel(tabLabel.label); if (!enabled) { tab.setDisabled(true); + tab.setSclass("adwindow-detailpane-sub-tab"); } Tabpanels tabpanels = tabbox.getTabpanels(); if (tabpanels == null) { tabpanels = new Tabpanels(); - //TODO: is this style needed ? - tabpanels.setStyle("min-height: 200px; overflow-y: visible;"); tabpanels.setWidth("100%"); tabbox.appendChild(tabpanels); } Tabpanel tp = new Tabpanel(); - //TODO: is this style needed - tp.setStyle("min-height: 180px; overflow-y: visible; width: 99%; margin: auto;"); tabpanels.appendChild(tp); tp.setStyle("background-color: #fff"); ToolBar toolbar = new ToolBar(); @@ -206,6 +203,17 @@ public class DetailPane extends Panel implements EventListener { tabPanel.setAttribute("AD_Tab_ID", tabLabel.AD_Tab_ID); tp.appendChild(tabPanel); + if (tabPanel instanceof ADTabpanel) { + ADTabpanel adtab = (ADTabpanel) tabPanel; + adtab.getGridView().addEventListener(ON_EDIT_EVENT, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + GridView gridView = (GridView) event.getTarget(); + if (gridView.isDetailPaneMode()) + onEdit(); + } + }); + } } public void setEventListener(EventListener listener) { @@ -247,6 +255,7 @@ public class DetailPane extends Panel implements EventListener { public void setStatusMessage(String status, boolean error) { IADTabpanel tabPanel = getSelectedADTabpanel(); + if (tabPanel == null) return; Hbox messageContainer = messageContainers.get(tabPanel.getAttribute("AD_Tab_ID")); Execution execution = Executions.getCurrent(); @@ -323,12 +332,14 @@ public class DetailPane extends Panel implements EventListener { @Override public void onEvent(Event event) throws Exception { - Component messageContainer = event.getTarget().getParent(); - Boolean error = (Boolean) messageContainer.getAttribute(STATUS_ERROR_ATTRIBUTE); - String status = (String) messageContainer.getAttribute(STATUS_TEXT_ATTRIBUTE); - - createPopupContent(status); - showPopup(error, messageContainer); + if (event.getName().equals(Events.ON_CLICK)) { + Component messageContainer = event.getTarget().getParent(); + Boolean error = (Boolean) messageContainer.getAttribute(STATUS_ERROR_ATTRIBUTE); + String status = (String) messageContainer.getAttribute(STATUS_TEXT_ATTRIBUTE); + + createPopupContent(status); + showPopup(error, messageContainer); + } } protected void createPopupContent(String status) { @@ -394,20 +405,14 @@ public class DetailPane extends Panel implements EventListener { } boolean enableNew = !changed && insertRecord && !adtab.getGridTab().isSortTab(); boolean enableDelete = !changed && !readOnly && !adtab.getGridTab().isSortTab(); - int newBtn = 0; - int deleteBtn = 0; for(Component c : toolbar.getChildren()) { if (c instanceof ToolBarButton) { ToolBarButton btn = (ToolBarButton) c; if (NEW_IMAGE.equals(btn.getImage())) { btn.setDisabled(!enableNew); - newBtn++; } else if (DELETE_IMAGE.equals(btn.getImage())) { btn.setDisabled(!enableDelete); - deleteBtn++; } - if (newBtn > 0 && deleteBtn > 0) - break; } } } @@ -453,4 +458,18 @@ public class DetailPane extends Panel implements EventListener { Tab tab = (Tab) tabbox.getTabs().getChildren().get(i); tab.setDisabled(!enabled); } + + public void disableToolbar() { + int index = getSelectedIndex(); + if (index < 0 || index >= getTabcount()) return; + + Tabpanel tabpanel = tabbox.getTabpanel(index); + Toolbar toolbar = (Toolbar) tabpanel.getFirstChild(); + for(Component c : toolbar.getChildren()) { + if (c instanceof ToolBarButton) { + ToolBarButton btn = (ToolBarButton) c; + btn.setDisabled(true); + } + } + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java index 1b0975ca52..f5d56eba1b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java @@ -39,7 +39,9 @@ import org.compiere.model.GridField; import org.compiere.model.GridTab; import org.compiere.util.DisplayType; import org.compiere.util.Env; +import org.compiere.util.Msg; import org.compiere.util.NamePair; +import org.compiere.util.Util; import org.zkoss.zk.au.out.AuFocus; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.HtmlBasedComponent; @@ -86,6 +88,7 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt private boolean editing = false; private int currentRowIndex = -1; private AbstractADWindowContent m_windowPanel; + private ActionListener buttonListener; /** * @@ -113,9 +116,10 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt private void prepareFieldEditor(GridField gridField, WEditor editor) { if (editor instanceof WButtonEditor) { - if (m_windowPanel != null) + if (buttonListener != null) { - ((WButtonEditor)editor).addActionListener(m_windowPanel); + ((WButtonEditor)editor).removeActionListener(buttonListener); + ((WButtonEditor)editor).addActionListener(buttonListener); } else { @@ -229,16 +233,7 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt editor.setValue(gridTab.getValue(rowIndex, gridField.getColumnName())); editor.setReadWrite(gridField.isEditable(gridRowCtx, true,true)); editor.getComponent().setAttribute("grid.row.index", rowIndex); - editor.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - WButtonEditor editor = (WButtonEditor) event.getSource(); - int rowIndex = (Integer) editor.getComponent().getAttribute("grid.row.index"); - int newRowIndex = gridTab.navigate(rowIndex); - if (newRowIndex == rowIndex) { - m_windowPanel.actionPerformed(event); - } - } - }); + editor.addActionListener(buttonListener); component = editor.getComponent(); } else { String text = getDisplayText(value, gridField); @@ -398,6 +393,18 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt Cell cell = new Cell(); cell.setWidth("10px"); + cell.addEventListener(Events.ON_CLICK, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + Cell cell = (Cell) event.getTarget(); + if (cell.getSclass() != null && cell.getSclass().indexOf("row-indicator-seld") >= 0) + Events.sendEvent(gridPanel, new Event(DetailPane.ON_EDIT_EVENT, gridPanel)); + else + Events.sendEvent(event.getTarget().getParent(), event); + } + }); + cell.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "EditRecord"))); + //TODO: checkbox for selection and batch action ( delete, export, complete, etc ) // cell.appendChild(new Checkbox()); row.appendChild(cell); @@ -450,13 +457,13 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt Cell cell = (Cell) currentRow.getFirstChild(); if (cell != null) { cell.setStyle("background-color: transparent"); - cell.setSclass(null); + cell.setSclass("row-indicator"); } } currentRow = row; Cell cell = (Cell) currentRow.getFirstChild(); if (cell != null) { - cell.setSclass("current-row-indicator"); + cell.setSclass("row-indicator-seld"); } currentRowIndex = gridTab.getCurrentRow(); @@ -665,6 +672,24 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt * @param windowPanel */ public void setADWindowPanel(AbstractADWindowContent windowPanel) { + if (this.m_windowPanel == windowPanel) + return; + this.m_windowPanel = windowPanel; + + buttonListener = new ActionListener() { + public void actionPerformed(ActionEvent event) { + WButtonEditor editor = (WButtonEditor) event.getSource(); + Integer rowIndex = (Integer) editor.getComponent().getAttribute("grid.row.index"); + if (rowIndex != null) { + int newRowIndex = gridTab.navigate(rowIndex); + if (newRowIndex == rowIndex) { + m_windowPanel.actionPerformed(event); + } + } else { + m_windowPanel.actionPerformed(event); + } + } + }; } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index d6e7473d08..b270602dee 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -119,6 +119,8 @@ public class GridView extends Vbox implements EventListener private Borderlayout borderLayout; + private boolean detailPaneMode; + public GridView() { this(0); @@ -191,7 +193,8 @@ public class GridView extends Vbox implements EventListener } public void setDetailPaneMode(boolean detailPaneMode, boolean vflex) { - if (detailPaneMode) { + this.detailPaneMode = detailPaneMode; + if (detailPaneMode) { pageSize = DEFAULT_DETAIL_PAGE_SIZE; updatePaging(); if (borderLayout.getParent() != null) { @@ -221,6 +224,10 @@ public class GridView extends Vbox implements EventListener } } + public boolean isDetailPaneMode() { + return this.detailPaneMode; + } + private void updatePaging() { if (paging != null && paging.getPageSize() != pageSize) { paging.setPageSize(pageSize); @@ -435,7 +442,7 @@ public class GridView extends Vbox implements EventListener columns.appendChild(indicator); listbox.appendChild(columns); columns.setSizable(true); - columns.setMenupopup("auto"); + columns.setMenupopup("none"); columns.setColumnsgroup(false); Map colnames = new HashMap(); @@ -777,7 +784,7 @@ public class GridView extends Vbox implements EventListener for (WEditor comp : list) { GridField mField = comp.getGridField(); - if (mField != null && mField.getIncluded_Tab_ID() <= 0) + if (mField != null) { if (noData) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java index 295d691f63..75a5a9b76c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java @@ -119,5 +119,7 @@ public interface IADTabpanel extends Component, Evaluatee { public boolean isActive(); - public void setDetailPaneMode(boolean detailMode, boolean vflex); + public void setDetailPaneMode(boolean detailMode, boolean vflex); + + public abstract GridView getGridView(); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java deleted file mode 100644 index 6db684281a..0000000000 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java +++ /dev/null @@ -1,351 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2008 Low Heng Sin * - * Copyright (C) 2008 Idalica Corporation * - * 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. * - *****************************************************************************/ -package org.adempiere.webui.desktop; - -import java.io.Serializable; -import java.util.Properties; - -import org.adempiere.util.ServerContext; -import org.adempiere.webui.adwindow.ADWindow; -import org.adempiere.webui.apps.BusyDialog; -import org.adempiere.webui.apps.ProcessDialog; -import org.adempiere.webui.component.Accordion; -import org.adempiere.webui.component.Tabpanel; -import org.adempiere.webui.component.ToolBarButton; -import org.adempiere.webui.dashboard.DPActivities; -import org.adempiere.webui.dashboard.DashboardPanel; -import org.adempiere.webui.event.MenuListener; -import org.adempiere.webui.panel.ADForm; -import org.adempiere.webui.panel.HeaderPanel; -import org.adempiere.webui.session.SessionContextListener; -import org.adempiere.webui.session.SessionManager; -import org.adempiere.webui.util.IServerPushCallback; -import org.adempiere.webui.util.ServerPushTemplate; -import org.adempiere.webui.util.UserPreference; -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.Msg; -import org.compiere.util.Util; -import org.zkoss.zk.au.out.AuScript; -import org.zkoss.zk.ui.Component; -import org.zkoss.zk.ui.Executions; -import org.zkoss.zk.ui.Page; -import org.zkoss.zk.ui.event.Event; -import org.zkoss.zk.ui.event.EventListener; -import org.zkoss.zk.ui.event.Events; -import org.zkoss.zk.ui.event.OpenEvent; -import org.zkoss.zk.ui.util.Clients; -import org.zkoss.zul.Borderlayout; -import org.zkoss.zul.Center; -import org.zkoss.zul.Div; -import org.zkoss.zul.North; -import org.zkoss.zul.West; - -/** - * @author hengsin - */ -public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Serializable, EventListener, IServerPushCallback -{ - - private static final long serialVersionUID = -7483133591812825441L; - - private static final String FAVOURITES_PATH = "/zul/favourites.zul"; - - private static final String ACTIVITIES_PATH = "/zul/activities.zul"; - - @SuppressWarnings("unused") - private static final CLogger logger = CLogger.getCLogger(DefaultDesktop.class); - - private Center windowArea; - - private Borderlayout layout; - - private Accordion shortcutPanel; - - private int noOfNotice; - - private int noOfRequest; - - private int noOfWorkflow; - - private int noOfUnprocessed; - - private Tabpanel homeTab; - - private DashboardController dashboardController, sideController; - - public NavBar2Desktop() - { - super(); - dashboardController = new DashboardController(); - sideController = new DashboardController(); - } - - protected Component doCreatePart(Component parent) - { - HeaderPanel pnlHead = new HeaderPanel(); - - layout = new Borderlayout(); - if (parent != null) - { - layout.setParent(parent); - layout.setWidth("100%"); - layout.setHeight("100%"); - layout.setStyle("position: absolute"); - } - else - layout.setPage(page); - - North n = new North(); - layout.appendChild(n); - n.setCollapsible(false); - pnlHead.setParent(n); - - West w = new West(); - w.setTitle(" "); - layout.appendChild(w); - w.setWidth("300px"); - w.setCollapsible(true); - w.setSplittable(true); - w.addEventListener(Events.ON_OPEN, new EventListener() { - @Override - public void onEvent(Event event) throws Exception { - OpenEvent oe = (OpenEvent) event; - UserPreference pref = SessionManager.getSessionApplication().getUserPreference(); - pref.setProperty(UserPreference.P_MENU_COLLAPSED, !oe.isOpen()); - pref.savePreference(); - } - }); - UserPreference pref = SessionManager.getSessionApplication().getUserPreference(); - boolean menuCollapsed= pref.isPropertyBool(UserPreference.P_MENU_COLLAPSED); - w.setOpen(!menuCollapsed); - - sideController.render(w, this, false); - - Center center = new Center(); - center.setParent(layout); - - Borderlayout innerLayout = new Borderlayout(); - innerLayout.setHeight("100%"); - innerLayout.setWidth("100%"); - innerLayout.setParent(center); - innerLayout.setVflex("1"); - innerLayout.setHflex("1"); - - West innerW = new West(); - innerW.setWidth("200px"); - innerW.setCollapsible(true); - innerW.setTitle("Navigation"); - innerW.setSplittable(true); - innerW.setCollapsible(true); - innerW.setParent(innerLayout); - - shortcutPanel = new Accordion(); - shortcutPanel.setWidth("100%"); - shortcutPanel.setHeight("100%"); - innerW.appendChild(shortcutPanel); - - Div div = new Div(); - Executions.createComponents(FAVOURITES_PATH, div, null); - shortcutPanel.add(div, "Favourites"); - - div = new Div(); - Component component = Executions.createComponents(ACTIVITIES_PATH, div, null); - if (component instanceof DashboardPanel) - { - DashboardPanel dashboardPanel = (DashboardPanel) component; - dashboardController.addDashboardPanel(dashboardPanel); - } - shortcutPanel.add(div, "Activities"); - - shortcutPanel.setSelectedIndex(0); - - windowArea = new Center(); - windowArea.setParent(innerLayout); - - windowContainer.createPart(windowArea); - - homeTab = new Tabpanel(); - windowContainer.addWindow(homeTab, Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Home")), false); - BusyDialog busyDialog = new BusyDialog(); - busyDialog.setShadow(false); - homeTab.appendChild(busyDialog); - - if (!layout.getDesktop().isServerPushEnabled()) - { - layout.getDesktop().enableServerPush(true); - } - - Runnable runnable = new Runnable() { - public void run() { - try { - Thread.sleep(100); - } catch (InterruptedException e) {} - - IServerPushCallback callback = new IServerPushCallback() { - public void updateUI() { - Properties ctx = (Properties)layout.getDesktop().getSession().getAttribute(SessionContextListener.SESSION_CTX); - try { - ServerContext.setCurrentInstance(ctx); - renderHomeTab(); - } finally { - ServerContext.dispose(); - } - } - }; - ServerPushTemplate template = new ServerPushTemplate(layout.getDesktop()); - template.executeAsync(callback); - } - }; - - Thread thread = new Thread(runnable); - thread.start(); - - return layout; - } - - private void renderHomeTab() - { - homeTab.getChildren().clear(); - - //register as 0 - registerWindow(homeTab); - - dashboardController.render(homeTab, this, true); - } - - public void onEvent(Event event) - { - Component comp = event.getTarget(); - String eventName = event.getName(); - - if(eventName.equals(Events.ON_CLICK)) - { - if(comp instanceof ToolBarButton) - { - ToolBarButton btn = (ToolBarButton) comp; - - int menuId = 0; - try - { - menuId = Integer.valueOf(btn.getName()); - } - catch (Exception e) { - - } - - if(menuId > 0) onMenuSelected(menuId); - } - } - } - - public void onServerPush(ServerPushTemplate template) - { - noOfNotice = DPActivities.getNoticeCount(); - noOfRequest = DPActivities.getRequestCount(); - noOfWorkflow = DPActivities.getWorkflowCount(); - noOfUnprocessed = DPActivities.getUnprocessedCount(); - - template.executeAsync(this); - } - - /** - * - * @param page - */ - public void setPage(Page page) { - if (this.page != page) { - layout.setPage(page); - this.page = page; - } - if (dashboardController != null) { - dashboardController.onSetPage(page, layout.getDesktop(), this); - } - if (sideController != null) { - sideController.onSetPage(page, layout.getDesktop(), this); - } - } - - /** - * Get the root component - * @return Component - */ - public Component getComponent() { - return layout; - } - - public void logout() { - if (dashboardController != null) { - dashboardController.onLogOut(); - } - if (sideController != null) { - sideController.onLogOut(); - } - } - - public void updateUI() { - int total = noOfNotice + noOfRequest + noOfWorkflow + noOfUnprocessed; - shortcutPanel.setLabel(1, "Activities (" + total + ")"); - shortcutPanel.setTooltiptext(1, Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice - + ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest - + ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow - + (noOfUnprocessed>0 ? ", " + Msg.getMsg (Env.getCtx(), "UnprocessedDocs") + " : " + noOfUnprocessed : "") - ); - } - - private void autoHideMenu() { - if (layout.getWest().isCollapsible() && !layout.getWest().isOpen()) - { - //using undocumented js api, need to be retested after every version upgrade - String id = layout.getWest().getUuid() + "!real"; - String btn = layout.getWest().getUuid() + "!btn"; - String script = "zk.show('" + id + "', false);"; - script += "$e('"+id+"')._isSlide = false;"; - script += "$e('"+id+"')._lastSize = null;"; - script += "$e('"+btn+"').style.display = '';"; - AuScript aus = new AuScript(layout.getWest(), script); - Clients.response("autoHideWest", aus); - } - } - - @Override - public ADWindow openWindow(int windowId) { - autoHideMenu(); - return super.openWindow(windowId); - } - - @Override - public ADForm openForm(int formId) { - autoHideMenu(); - return super.openForm(formId); - } - - @Override - public ProcessDialog openProcessDialog(int processId, boolean soTrx) { - autoHideMenu(); - return super.openProcessDialog(processId, soTrx); - } - - @Override - public void openTask(int taskId) { - autoHideMenu(); - super.openTask(taskId); - } - - @Override - public void openWorkflow(int workflowID) { - autoHideMenu(); - super.openWorkflow(workflowID); - } -} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java deleted file mode 100644 index 084160ae39..0000000000 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java +++ /dev/null @@ -1,359 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2008 Low Heng Sin * - * Copyright (C) 2008 Idalica Corporation * - * 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. * - *****************************************************************************/ -package org.adempiere.webui.desktop; - -import java.io.Serializable; -import java.util.Properties; - -import org.adempiere.util.ServerContext; -import org.adempiere.webui.adwindow.ADWindow; -import org.adempiere.webui.apps.BusyDialog; -import org.adempiere.webui.apps.ProcessDialog; -import org.adempiere.webui.component.Accordion; -import org.adempiere.webui.component.Tabpanel; -import org.adempiere.webui.component.ToolBarButton; -import org.adempiere.webui.dashboard.DPActivities; -import org.adempiere.webui.dashboard.DPFavourites; -import org.adempiere.webui.dashboard.DashboardPanel; -import org.adempiere.webui.event.MenuListener; -import org.adempiere.webui.panel.ADForm; -import org.adempiere.webui.panel.HeaderPanel; -import org.adempiere.webui.panel.MenuTreePanel; -import org.adempiere.webui.session.SessionContextListener; -import org.adempiere.webui.session.SessionManager; -import org.adempiere.webui.util.IServerPushCallback; -import org.adempiere.webui.util.ServerPushTemplate; -import org.adempiere.webui.util.UserPreference; -import org.compiere.util.CLogger; -import org.compiere.util.Env; -import org.compiere.util.Msg; -import org.zkoss.zk.au.out.AuScript; -import org.zkoss.zk.ui.Component; -import org.zkoss.zk.ui.Executions; -import org.zkoss.zk.ui.Page; -import org.zkoss.zk.ui.event.DropEvent; -import org.zkoss.zk.ui.event.Event; -import org.zkoss.zk.ui.event.EventListener; -import org.zkoss.zk.ui.event.Events; -import org.zkoss.zk.ui.event.OpenEvent; -import org.zkoss.zk.ui.util.Clients; -import org.zkoss.zul.Borderlayout; -import org.zkoss.zul.Center; -import org.zkoss.zul.Div; -import org.zkoss.zul.North; -import org.zkoss.zul.Treeitem; -import org.zkoss.zul.Treerow; -import org.zkoss.zul.West; - -/** - * @author hengsin - */ -public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serializable, EventListener, IServerPushCallback -{ - - private static final long serialVersionUID = 4721048271543882164L; - - private static final String FAVOURITES_PATH = "/zul/favourites.zul"; - - private static final String ACTIVITIES_PATH = "/zul/activities.zul"; - - private static final String VIEWS_PATH = "/zul/views.zul"; - - @SuppressWarnings("unused") - private static final CLogger logger = CLogger.getCLogger(DefaultDesktop.class); - - private Center windowArea; - - private Borderlayout layout; - - private Accordion navigationPanel; - - private West leftRegion; - - private DPFavourites favPanel; - - private int noOfNotice; - - private int noOfRequest; - - private int noOfWorkflow; - - private int noOfUnprocessed; - - private Tabpanel homeTab; - - private DashboardController dashboardController; - - public NavBarDesktop() - { - super(); - dashboardController = new DashboardController(); - } - - protected Component doCreatePart(Component parent) - { - HeaderPanel pnlHead = new HeaderPanel(); - - layout = new Borderlayout(); - if (parent != null) - { - layout.setParent(parent); - layout.setWidth("100%"); - layout.setHeight("100%"); - layout.setStyle("position: absolute"); - } - else - layout.setPage(page); - - North n = new North(); - layout.appendChild(n); - n.setCollapsible(false); - pnlHead.setParent(n); - - leftRegion = new West(); - layout.appendChild(leftRegion); - leftRegion.setWidth("300px"); - leftRegion.setCollapsible(true); - leftRegion.setSplittable(true); - leftRegion.setTitle("Navigation"); - leftRegion.addEventListener(Events.ON_OPEN, new EventListener() { - @Override - public void onEvent(Event event) throws Exception { - OpenEvent oe = (OpenEvent) event; - UserPreference pref = SessionManager.getSessionApplication().getUserPreference(); - pref.setProperty(UserPreference.P_MENU_COLLAPSED, !oe.isOpen()); - pref.savePreference(); - } - }); - UserPreference pref = SessionManager.getSessionApplication().getUserPreference(); - boolean menuCollapsed= pref.isPropertyBool(UserPreference.P_MENU_COLLAPSED); - leftRegion.setOpen(!menuCollapsed); - navigationPanel = new Accordion(); - navigationPanel.setParent(leftRegion); - - navigationPanel.setWidth("100%"); - navigationPanel.setHeight("100%"); - - navigationPanel.add(new MenuTreePanel(null), "Application Menu"); - - Div div = new Div(); - favPanel = (DPFavourites) Executions.createComponents(FAVOURITES_PATH, div, null); - navigationPanel.add(div, "Favourites"); - - //setup drag and drop for favourites - div = navigationPanel.getHeader(1); - div.setDroppable(DPFavourites.FAVOURITE_DROPPABLE); - div.addEventListener(Events.ON_DROP, this); - - div = new Div(); - Component component = Executions.createComponents(ACTIVITIES_PATH, div, null); - if (component instanceof DashboardPanel) - { - DashboardPanel dashboardPanel = (DashboardPanel) component; - dashboardController.addDashboardPanel(dashboardPanel); - } - navigationPanel.add(div, "Activities"); - - div = new Div(); - Executions.createComponents(VIEWS_PATH, div, null); - navigationPanel.add(div, Msg.getMsg(Env.getCtx(), "View").replaceAll("&", "")); - - navigationPanel.setSelectedIndex(0); - - windowArea = new Center(); - windowArea.setParent(layout); - - windowContainer.createPart(windowArea); - - homeTab = new Tabpanel(); - windowContainer.addWindow(homeTab, Msg.getMsg(Env.getCtx(), "Home").replaceAll("&", ""), false); - BusyDialog busyDialog = new BusyDialog(); - busyDialog.setShadow(false); - homeTab.appendChild(busyDialog); - - if (!layout.getDesktop().isServerPushEnabled()) - { - layout.getDesktop().enableServerPush(true); - } - - Runnable runnable = new Runnable() { - public void run() { - try { - Thread.sleep(100); - } catch (InterruptedException e) {} - - IServerPushCallback callback = new IServerPushCallback() { - public void updateUI() { - Properties ctx = (Properties)layout.getDesktop().getSession().getAttribute(SessionContextListener.SESSION_CTX); - try { - ServerContext.setCurrentInstance(ctx); - renderHomeTab(); - } finally { - ServerContext.dispose(); - } - } - }; - ServerPushTemplate template = new ServerPushTemplate(layout.getDesktop()); - template.executeAsync(callback); - } - }; - - Thread thread = new Thread(runnable); - thread.start(); - - return layout; - } - - private void renderHomeTab() - { - homeTab.getChildren().clear(); - - //register as 0 - registerWindow(homeTab); - - dashboardController.render(homeTab, this, true); - } - - public void onEvent(Event event) - { - Component comp = event.getTarget(); - String eventName = event.getName(); - - if(eventName.equals(Events.ON_CLICK)) - { - if(comp instanceof ToolBarButton) - { - ToolBarButton btn = (ToolBarButton) comp; - - int menuId = 0; - try - { - menuId = Integer.valueOf(btn.getName()); - } - catch (Exception e) { - - } - - if(menuId > 0) onMenuSelected(menuId); - } - } - else if(eventName.equals(Events.ON_DROP)) - { - DropEvent de = (DropEvent) event; - Component dragged = de.getDragged(); - - if(dragged instanceof Treerow) - { - Treerow treerow = (Treerow) dragged; - Treeitem treeitem = (Treeitem) treerow.getParent(); - - favPanel.addItem(treeitem); - } - } - } - - public void onServerPush(ServerPushTemplate template) - { - noOfNotice = DPActivities.getNoticeCount(); - noOfRequest = DPActivities.getRequestCount(); - noOfWorkflow = DPActivities.getWorkflowCount(); - noOfUnprocessed = DPActivities.getUnprocessedCount(); - - template.executeAsync(this); - } - - /** - * - * @param page - */ - public void setPage(Page page) { - if (this.page != page) { - layout.setPage(page); - this.page = page; - } - - if (dashboardController != null) { - dashboardController.onSetPage(page, layout.getDesktop(), this); - } - } - - /** - * Get the root component - * @return Component - */ - public Component getComponent() { - return layout; - } - - public void logout() { - if (dashboardController != null) { - dashboardController.onLogOut(); - } - } - - public void updateUI() { - int total = noOfNotice + noOfRequest + noOfWorkflow + noOfUnprocessed; - navigationPanel.setLabel(2, "Activities (" + total + ")"); - navigationPanel.setTooltiptext(2, Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice - + ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest - + ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow - + (noOfUnprocessed>0 ? ", " + Msg.getMsg (Env.getCtx(), "UnprocessedDocs") + " : " + noOfUnprocessed : "") - ); - } - - private void autoHideMenu() { - if (layout.getWest().isCollapsible() && !layout.getWest().isOpen()) - { - //using undocumented js api, need to be retested after every version upgrade - String id = layout.getWest().getUuid() + "!real"; - String btn = layout.getWest().getUuid() + "!btn"; - String script = "zk.show('" + id + "', false);"; - script += "$e('"+id+"')._isSlide = false;"; - script += "$e('"+id+"')._lastSize = null;"; - script += "$e('"+btn+"').style.display = '';"; - AuScript aus = new AuScript(layout.getWest(), script); - Clients.response("autoHideWest", aus); - } - } - - @Override - public ADWindow openWindow(int windowId) { - autoHideMenu(); - return super.openWindow(windowId); - } - - @Override - public ADForm openForm(int formId) { - autoHideMenu(); - return super.openForm(formId); - } - - @Override - public ProcessDialog openProcessDialog(int processId, boolean soTrx) { - autoHideMenu(); - return super.openProcessDialog(processId, soTrx); - } - - @Override - public void openTask(int taskId) { - autoHideMenu(); - super.openTask(taskId); - } - - @Override - public void openWorkflow(int workflowID) { - autoHideMenu(); - super.openWorkflow(workflowID); - } -} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java index a1d6f0b0f1..cf0f49071d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java @@ -160,10 +160,10 @@ public class CustomizeGridViewPanel extends Panel yesList.setSeltype("multiple"); noList.setSeltype("multiple"); - bAdd.setImage("images/Detail24.png"); + bAdd.setImage("images/Next24.png"); bAdd.addEventListener(Events.ON_CLICK, actionListener); - bRemove.setImage("images/Parent24.png"); + bRemove.setImage("images/Previous24.png"); bRemove.addEventListener(Events.ON_CLICK, actionListener); EventListener crossListMouseListener = new DragListener(); @@ -179,10 +179,10 @@ public class CustomizeGridViewPanel extends Panel } }; - bUp.setImage("images/Previous24.png"); + bUp.setImage("images/Parent24.png"); bUp.addEventListener(Events.ON_CLICK, actionListener); - bDown.setImage("images/Next24.png"); + bDown.setImage("images/Detail24.png"); bDown.addEventListener(Events.ON_CLICK, actionListener); EventListener yesListMouseMotionListener = new EventListener() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java index 05789f1b50..7386f9b1ef 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java @@ -247,7 +247,7 @@ public class WDocActionPanel extends Window implements EventListener, Dia Grid grid = GridFactory.newGridLayout(); grid.setId("grd"); - grid.setWidth("400px"); + grid.setStyle("width: 390px; margin: auto;"); Rows rows = new Rows(); @@ -258,10 +258,10 @@ public class WDocActionPanel extends Window implements EventListener, Dia Panel pnlDocAction = new Panel(); pnlDocAction.appendChild(lblDocAction); + pnlDocAction.appendChild(new Space()); pnlDocAction.appendChild(lstDocAction); rowDocAction.appendChild(pnlDocAction); - rowDocAction.setAlign("right"); rowLabel.appendChild(label); rowConfirm.appendChild(confirmPanel); rowSpacer.appendChild(new Space()); diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index ff7fadbce4..03bc0a07f8 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -230,6 +230,22 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { margin-right: 2px; } +.desktop-tabbox .z-tab .z-tab-hl, .desktop-tabbox .z-tab .z-tab-hr, +.desktop-tabbox .z-tab .z-tab-hm { + height: 22px; +} + +.desktop-tabbox .z-tab-seld .z-tab-hl, .desktop-tabbox .z-tab-seld .z-tab-hr, +.desktop-tabbox .z-tab-seld .z-tab-hm { + height: 21px; +} + +.desktop-tabbox .z-tab-seld { + border-top: 2px solid #666; + border-top-left-radius: 5px 5px; + border-top-right-radius: 5px 5px; +} + .desktop-north, .desktop-center { border: none; } @@ -485,8 +501,13 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { position: absolute; } -.current-row-indicator { - background-color: #FA962F !important; +.row-indicator-seld { + background-color: #666 !important; + background-image: none !important; +} + +.row-indicator { + background-color: transparent !important; background-image: none !important; } @@ -864,4 +885,17 @@ tbody.z-grid-empty-body td { border-left: 6px dashed transparent; border-right: 6px dashed transparent; border-bottom: 6px solid #FFF; +} + +.adwindow-detailpane-sub-tab::before { + content: ''; + position: absolute; + width: 0px; + height: 0px; + top: 6px; + left: 4px; + border-top: 5px dashed transparent; + border-left: 5px dashed #696969; + border-right: 5px dashed transparent; + border-bottom: 5px solid transparent; } \ No newline at end of file From e1778c15018e386918bdb9910ff10dab8a8403a7 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 19 Oct 2012 16:35:15 +0800 Subject: [PATCH 3/9] IDEMPIERE-392 Redesign payment button --- .../oracle/940_IDEMPIERE-392.sql | 62 ++++++ .../postgresql/940_IDEMPIERE-392.sql | 62 ++++++ .../src/org/compiere/model/MPayment.java | 3 + .../org/compiere/model/MPaymentProcessor.java | 2 +- .../org/compiere/grid/VPaymentFormCash.java | 2 +- .../org/compiere/grid/VPaymentFormCheck.java | 59 ++++- .../compiere/grid/VPaymentFormCreditCard.java | 64 +++++- .../org/compiere/grid/VPaymentFormDirect.java | 141 ++++++++++++ .../grid/VPaymentFormDirectDebit.java | 6 +- .../grid/VPaymentFormDirectDeposit.java | 119 +--------- .../compiere/grid/VPaymentFormFactory.java | 15 +- .../webui/apps/form/WPaymentFormCash.java | 2 +- .../webui/apps/form/WPaymentFormCheck.java | 97 ++++++--- .../apps/form/WPaymentFormCreditCard.java | 81 +++++-- .../webui/apps/form/WPaymentFormDirect.java | 178 +++++++++++++++ .../apps/form/WPaymentFormDirectDebit.java | 4 +- .../apps/form/WPaymentFormDirectDeposit.java | 144 +------------ .../webui/apps/form/WPaymentFormFactory.java | 22 +- .../webui/apps/form/WPaymentFormWindow.java | 3 + .../theme/default/css/theme.css.dsp | 4 +- .../src/org/compiere/grid/IPaymentForm.java | 8 + .../src/org/compiere/grid/PaymentForm.java | 60 +++++- .../org/compiere/grid/PaymentFormCash.java | 21 +- .../org/compiere/grid/PaymentFormCheck.java | 33 ++- .../compiere/grid/PaymentFormCreditCard.java | 47 ++-- .../org/compiere/grid/PaymentFormDirect.java | 204 ++++++++++++++++++ .../compiere/grid/PaymentFormDirectDebit.java | 12 -- .../grid/PaymentFormDirectDeposit.java | 125 ----------- .../compiere/grid/PaymentFormMixedPOS.java | 2 - .../compiere/grid/PaymentFormOnCredit.java | 2 - 30 files changed, 1073 insertions(+), 511 deletions(-) create mode 100644 migration/360lts-release/oracle/940_IDEMPIERE-392.sql create mode 100644 migration/360lts-release/postgresql/940_IDEMPIERE-392.sql create mode 100644 org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java create mode 100644 org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java delete mode 100644 org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java delete mode 100644 org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java diff --git a/migration/360lts-release/oracle/940_IDEMPIERE-392.sql b/migration/360lts-release/oracle/940_IDEMPIERE-392.sql new file mode 100644 index 0000000000..aacb91afde --- /dev/null +++ b/migration/360lts-release/oracle/940_IDEMPIERE-392.sql @@ -0,0 +1,62 @@ +-- Oct 19, 2012 4:08:01 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create payment',200077,'D','da079a31-b0e8-4e39-8d06-5861235240cd','PaymentNotCreated','Y',TO_DATE('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:05 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to cancel payment',200078,'D','147fef6f-7a60-4579-9b20-2bcb1836cbbb','PaymentNotCancelled','Y',TO_DATE('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200078 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200079,'D','2a395bb4-e2cc-4c5c-ad6c-e5d96bb8b16e','CashNotCancelled','Y',TO_DATE('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200079 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message SET MsgText='Failed to cancel cash',Updated=TO_DATE('2012-10-19 16:09:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200080,'D','9a1b19b9-03a4-4a94-a4be-3c330e6ef800','CashNotCreated','Y',TO_DATE('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200080 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Card not processed',200081,'D','743abddc-b21d-4317-b959-9e7dba185313','CardNotProcessed','Y',TO_DATE('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200081 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('940_IDEMPIERE-392.sql') FROM dual +; \ No newline at end of file diff --git a/migration/360lts-release/postgresql/940_IDEMPIERE-392.sql b/migration/360lts-release/postgresql/940_IDEMPIERE-392.sql new file mode 100644 index 0000000000..5b85eab4b2 --- /dev/null +++ b/migration/360lts-release/postgresql/940_IDEMPIERE-392.sql @@ -0,0 +1,62 @@ +-- Oct 19, 2012 4:08:01 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create payment',200077,'D','da079a31-b0e8-4e39-8d06-5861235240cd','PaymentNotCreated','Y',TO_TIMESTAMP('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:08:00','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:05 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to cancel payment',200078,'D','147fef6f-7a60-4579-9b20-2bcb1836cbbb','PaymentNotCancelled','Y',TO_TIMESTAMP('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:08:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:08:20 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200078 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200079,'D','2a395bb4-e2cc-4c5c-ad6c-e5d96bb8b16e','CashNotCancelled','Y',TO_TIMESTAMP('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:09:31','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:09:32 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200079 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message SET MsgText='Failed to cancel cash',Updated=TO_TIMESTAMP('2012-10-19 16:09:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:09:57 PM SGT +-- IDEMPIERE-392 Redesign payment button +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200079 +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create cash',200080,'D','9a1b19b9-03a4-4a94-a4be-3c330e6ef800','CashNotCreated','Y',TO_TIMESTAMP('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:10:18','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:18 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200080 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Card not processed',200081,'D','743abddc-b21d-4317-b959-9e7dba185313','CardNotProcessed','Y',TO_TIMESTAMP('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-19 16:10:55','YYYY-MM-DD HH24:MI:SS')) +; + +-- Oct 19, 2012 4:10:55 PM SGT +-- IDEMPIERE-392 Redesign payment button +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200081 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('940_IDEMPIERE-392.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index c857774075..899b5794b3 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -850,7 +850,10 @@ public final class MPayment extends X_C_Payment } } if (m_mBankAccountProcessor != null) + { setC_BankAccount_ID (m_mBankAccountProcessor.getC_BankAccount_ID()); + setC_PaymentProcessor_ID (m_mBankAccountProcessor.getC_PaymentProcessor_ID()); + } // return m_mBankAccountProcessor != null; } // setPaymentProcessor diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java b/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java index 53c7368bcd..d0129619dd 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentProcessor.java @@ -61,7 +61,7 @@ public class MPaymentProcessor extends X_C_PaymentProcessor * @param trxName transaction * @return Array of BankAccount[0] & PaymentProcessor[1] or null */ - protected static MBankAccountProcessor[] find (Properties ctx, + public static MBankAccountProcessor[] find (Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal Amt, String trxName) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java index 92d1d9cae3..33132e30e1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java @@ -209,7 +209,7 @@ public class VPaymentFormCash extends PaymentFormCash implements ActionListener else if (processMsg != null) ADialog.info(getWindowNo(), dialog, "PaymentCreated", processMsg); - return true; + return ok; } @Override diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java index 9372033e30..faa67738a8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java @@ -6,6 +6,8 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Enumeration; @@ -14,6 +16,7 @@ import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.ADialog; import org.compiere.grid.ed.VNumber; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MConversionRate; import org.compiere.model.MPaymentValidate; import org.compiere.swing.CButton; @@ -24,7 +27,7 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; -public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener { +public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener, FocusListener { private VPaymentFormDialog dialog; @@ -64,6 +67,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene sRoutingField.setPreferredSize(new Dimension(70, 21)); sStatus.setText(" "); sOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); + sOnline.addActionListener(this); dialog.getPanel().add(sBankAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 2, 0), 0, 0)); dialog.getPanel().add(sBankAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 @@ -76,6 +80,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 5, 0), 0, 0)); dialog.getPanel().add(sAmountField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 5, 5), 0, 0)); + sAmountField.addFocusListener(this); dialog.getPanel().add(sRoutingLabel, new GridBagConstraints(0, 3, 1, 2, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 2, 0), 0, 0)); dialog.getPanel().add(sRoutingField, new GridBagConstraints(1, 3, 2, 1, 0.0, 0.0 @@ -133,19 +138,63 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene // Set Selection if (selectedBankAccount != null) sBankAccountCombo.setSelectedItem(selectedBankAccount); + + boolean exist = isBankAccountProcessorExist(m_C_Currency_ID, (BigDecimal) sAmountField.getValue()); + sOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); } public void actionPerformed(ActionEvent e) { if (e.getSource() == sCurrencyCombo) { + int C_Currency_ID = 0; KeyNamePair pp = (KeyNamePair)sCurrencyCombo.getSelectedItem(); + if (pp != null) + C_Currency_ID = pp.getKey(); + BigDecimal amt = MConversionRate.convert(Env.getCtx(), - m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID); + m_Amount, m_C_Currency_ID, C_Currency_ID, m_AD_Client_ID, m_AD_Org_ID); sAmountField.setValue(amt); + + updateOnlineButton(); + } + else if (e.getSource() == sOnline) + processOnline(); + } + + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + if (e.getSource() == sAmountField) + updateOnlineButton(); + } + + private void updateOnlineButton() + { + int C_Currency_ID = 0; + KeyNamePair pp = (KeyNamePair)sCurrencyCombo.getSelectedItem(); + if (pp != null) + C_Currency_ID = pp.getKey(); + + BigDecimal PayAmt = (BigDecimal) sAmountField.getValue(); + + if (C_Currency_ID > 0 && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(C_Currency_ID, PayAmt); + sOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + sOnline.setEnabled(false); + setBankAccountProcessor(null); } -// else if (e.getSource() == sOnline) -// processOnline(); } @Override @@ -203,7 +252,7 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene else if (processMsg != null) ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo()); - return true; + return ok; } @Override diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java index 9369663408..5032e3137f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java @@ -6,11 +6,15 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; import java.math.BigDecimal; import org.compiere.apps.ADialog; import org.compiere.grid.ed.VNumber; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.model.MPaymentProcessor; import org.compiere.swing.CButton; import org.compiere.swing.CComboBox; import org.compiere.swing.CLabel; @@ -19,7 +23,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; -public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener { +public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener, FocusListener { private VPaymentFormDialog dialog; @@ -65,6 +69,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 0), 0, 0)); dialog.getPanel().add(kTypeCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0)); + kTypeCombo.addActionListener(this); dialog.getPanel().add(kNumberLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 0), 0, 0)); dialog.getPanel().add(kNumberField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0 @@ -81,6 +86,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 5, 0), 0, 0)); dialog.getPanel().add(kAmountField, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 5, 5, 5), 0, 0)); + kAmountField.addFocusListener(this); dialog.getPanel().add(kApprovalLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); dialog.getPanel().add(kApprovalField, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0 @@ -124,12 +130,66 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act // Set Selection if (selectedCreditCard != null) kTypeCombo.setSelectedItem(selectedCreditCard); + + if (m_mPayment.isApproved()) + { + kOnline.setVisible(true); + kOnline.setEnabled(false); + + MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue()); + kOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); + } } public void actionPerformed(ActionEvent e) { if (e.getSource() == kOnline) processOnline(); + else if (e.getSource() == kTypeCombo) + updateOnlineButton(); + } + + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + if (e.getSource() == kAmountField) + updateOnlineButton(); + } + + private void updateOnlineButton() + { + String CCType = null; + ValueNamePair vp = (ValueNamePair)kTypeCombo.getSelectedItem(); + if (vp != null) + CCType = vp.getValue(); + + BigDecimal PayAmt = (BigDecimal) kAmountField.getValue(); + + if (CCType != null && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(CCType, PayAmt); + kOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + + MPaymentProcessor paymentProcessor = new MPaymentProcessor(Env.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), null); + kApprovalField.setReadWrite(paymentProcessor.isRequireVV()); + } + else + { + kOnline.setEnabled(false); + setBankAccountProcessor(null); + } } @Override @@ -150,7 +210,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act else if (processMsg != null) ADialog.info(getWindowNo(), dialog, "PaymentCreated", processMsg); - return true; + return ok; } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java new file mode 100644 index 0000000000..2cf578c3bb --- /dev/null +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java @@ -0,0 +1,141 @@ +package org.compiere.grid; + +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; + +import org.adempiere.plaf.AdempierePLAF; +import org.compiere.apps.ADialog; +import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.swing.CButton; +import org.compiere.swing.CComboBox; +import org.compiere.swing.CLabel; +import org.compiere.swing.CTextField; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; + +public abstract class VPaymentFormDirect extends PaymentFormDirect implements ActionListener { + + private VPaymentFormDialog dialog; + + private CLabel tAccountLabel = new CLabel(); + private CComboBox tAccountCombo = new CComboBox(); + private CButton tOnline = new CButton(); + private CTextField tRoutingField = new CTextField(); + private CTextField tNumberField = new CTextField(); + private CLabel tStatus = new CLabel(); + private CLabel tRoutingText = new CLabel(); + private CLabel tNumberText = new CLabel(); + + public VPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) { + super(windowNo, mTab, isDebit); + dialog = new VPaymentFormDialog(this, windowNo); + init(); + } + + public void init() { + GridBagLayout tPanelLayout = new GridBagLayout(); + dialog.getPanel().setLayout(tPanelLayout); + tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); + tRoutingField.setColumns(8); + tNumberField.setColumns(10); + tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); + tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); + tOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); + tOnline.addActionListener(this); + tStatus.setText(" "); + dialog.getPanel().add(tAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); + dialog.getPanel().add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + dialog.getPanel().add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); + dialog.getPanel().add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); + dialog.getPanel().add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + dialog.getPanel().add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); + dialog.getPanel().add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); + dialog.getPanel().add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + } + + @Override + public void loadData() { + if (m_C_Payment_ID != 0) + { + tRoutingField.setText(m_mPayment.getRoutingNo()); + tNumberField.setText(m_mPayment.getAccountNo()); + tStatus.setText(m_mPayment.getR_PnRef()); + } + + ArrayList list = getBPBankAccountList(); + for (KeyNamePair pp : list) + tAccountCombo.addItem(pp); + + boolean exist = isBankAccountProcessorExist(); + tOnline.setVisible(exist); + + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(); + setBankAccountProcessor(bankAccountProcessor); + } + + public void actionPerformed(ActionEvent e) + { + if (e.getSource() == tOnline) + processOnline(); + } + + @Override + public boolean checkMandatory() { + /*********************** + * Mandatory Data Check + */ + boolean dataOK = true; + KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem(); + if (bpba == null) + { + tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error()); + ADialog.error(getWindowNo(), dialog, "PaymentBPBankNotFound"); + dataOK = false; + } + // + log.config("OK=" + dataOK); + return dataOK; + } + + @Override + public boolean saveChangesInTrx(String trxName) { + boolean ok = save(0, tRoutingField.getText(), tNumberField.getText()); + if (!ok) + ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg); + else if (processMsg != null) + ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo()); + + return ok; + } + + @Override + public void showWindow() + { + dialog.setVisible(true); + } + + @Override + public void closeWindow() + { + dialog.dispose(); + } + + @Override + public Object getWindow() { + return dialog; + } +} diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java index 467521d950..cd99b2b926 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java @@ -2,10 +2,10 @@ package org.compiere.grid; import org.compiere.model.GridTab; -public class VPaymentFormDirectDebit extends VPaymentFormDirectDeposit { +public class VPaymentFormDirectDebit extends VPaymentFormDirect { - public VPaymentFormDirectDebit(int WindowNo, GridTab mTab) { - super(WindowNo, mTab); + public VPaymentFormDirectDebit(int windowNo, GridTab mTab) { + super(windowNo, mTab, true); } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java index 1ba21f5a5d..3dc918af14 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java @@ -1,125 +1,10 @@ package org.compiere.grid; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.util.ArrayList; - -import org.adempiere.plaf.AdempierePLAF; -import org.compiere.apps.ADialog; import org.compiere.model.GridTab; -import org.compiere.swing.CButton; -import org.compiere.swing.CComboBox; -import org.compiere.swing.CLabel; -import org.compiere.swing.CTextField; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; -import org.compiere.util.Msg; -public class VPaymentFormDirectDeposit extends PaymentFormDirectDeposit { +public class VPaymentFormDirectDeposit extends VPaymentFormDirect { - private VPaymentFormDialog dialog; - - private CLabel tAccountLabel = new CLabel(); - private CComboBox tAccountCombo = new CComboBox(); - private CButton tOnline = new CButton(); - private CTextField tRoutingField = new CTextField(); - private CTextField tNumberField = new CTextField(); - private CLabel tStatus = new CLabel(); - private CLabel tRoutingText = new CLabel(); - private CLabel tNumberText = new CLabel(); - public VPaymentFormDirectDeposit(int windowNo, GridTab mTab) { - super(windowNo, mTab); - dialog = new VPaymentFormDialog(this, windowNo); - init(); - } - - public void init() { - GridBagLayout tPanelLayout = new GridBagLayout(); - dialog.getPanel().setLayout(tPanelLayout); - tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); - tRoutingField.setColumns(8); - tNumberField.setColumns(10); - tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); - tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); - tOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); - tStatus.setText(" "); - dialog.getPanel().add(tAccountLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); - dialog.getPanel().add(tAccountCombo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - dialog.getPanel().add(tRoutingField, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); - dialog.getPanel().add(tNumberField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); - dialog.getPanel().add(tStatus, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0 - ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - dialog.getPanel().add(tRoutingText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); - dialog.getPanel().add(tNumberText, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); - dialog.getPanel().add(tOnline, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - } - - @Override - public void loadData() { - if (m_C_Payment_ID != 0) - { - tRoutingField.setText(m_mPayment.getRoutingNo()); - tNumberField.setText(m_mPayment.getAccountNo()); - tStatus.setText(m_mPayment.getR_PnRef()); - } - - ArrayList list = getBankAccountList(); - for (KeyNamePair pp : list) - tAccountCombo.addItem(pp); - } - - @Override - public boolean checkMandatory() { - /*********************** - * Mandatory Data Check - */ - boolean dataOK = true; - KeyNamePair bpba = (KeyNamePair)tAccountCombo.getSelectedItem(); - if (bpba == null) - { - tAccountCombo.setBackground(AdempierePLAF.getFieldBackground_Error()); - ADialog.error(getWindowNo(), dialog, "PaymentBPBankNotFound"); - dataOK = false; - } - // - log.config("OK=" + dataOK); - return dataOK; - } - - @Override - public boolean saveChangesInTrx(String trxName) { - boolean ok = save(); - if (!ok) - ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg); - else if (processMsg != null) - ADialog.info(getWindowNo(), dialog, "PaymentCreated", m_mPayment.getDocumentNo()); - - return true; - } - - @Override - public void showWindow() - { - dialog.setVisible(true); - } - - @Override - public void closeWindow() - { - dialog.dispose(); - } - - @Override - public Object getWindow() { - return dialog; + super(windowNo, mTab, false); } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java index a843002551..c89215c2a5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.logging.Level; import org.compiere.model.GridTab; +import org.compiere.model.MInvoice; import org.compiere.util.CLogger; public class VPaymentFormFactory { @@ -27,13 +28,13 @@ public class VPaymentFormFactory { { // Register defaults: s_registeredClasses = new HashMap>(); - s_registeredClasses.put(PaymentFormCash.PAYMENTRULE, VPaymentFormCash.class); - s_registeredClasses.put(PaymentFormCheck.PAYMENTRULE, VPaymentFormCheck.class); - s_registeredClasses.put(PaymentFormCreditCard.PAYMENTRULE, VPaymentFormCreditCard.class); - s_registeredClasses.put(PaymentFormDirectDebit.PAYMENTRULE, VPaymentFormDirectDebit.class); - s_registeredClasses.put(PaymentFormDirectDeposit.PAYMENTRULE, VPaymentFormDirectDeposit.class); - s_registeredClasses.put(PaymentFormMixedPOS.PAYMENTRULE, VPaymentFormMixedPOS.class); - s_registeredClasses.put(PaymentFormOnCredit.PAYMENTRULE, VPaymentFormOnCredit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, VPaymentFormCash.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, VPaymentFormCheck.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, VPaymentFormCreditCard.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, VPaymentFormDirectDebit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, VPaymentFormDirectDeposit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, VPaymentFormMixedPOS.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, VPaymentFormOnCredit.class); } public static IPaymentForm create (int windowNo, GridTab mTab, String paymentRule) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java index 9bf7193eba..7d9f6893ca 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java @@ -224,7 +224,7 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener { @@ -39,6 +43,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener private Listbox sBankAccountCombo = ListboxFactory.newDropdownListbox(); private Label sCurrencyLabel = new Label(); private Listbox sCurrencyCombo = ListboxFactory.newDropdownListbox(); + private Space sCurrencySpace = new Space(); private Label sAmountLabel = new Label(); private WNumberEditor sAmountField = new WNumberEditor(); private Label sRoutingLabel = new Label(); @@ -49,6 +54,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener private Label sCheckLabel = new Label(); private Button sOnline = new Button(); private Label sStatus = new Label(); + private Panel customizePanel = new Panel(); public WPaymentFormCheck(int windowNo, GridTab mTab) { super(windowNo, mTab); @@ -71,7 +77,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener sStatus.setText(" "); sOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); LayoutUtils.addSclass("action-text-button", sOnline); -// sOnline.addActionListener(this); + sOnline.addActionListener(this); window.getPanel().setId("sPanel"); Columns columns = new Columns(); @@ -79,15 +85,11 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener Column column = new Column(); columns.appendChild(column); - column.setWidth("30%"); + column.setWidth("40%"); column = new Column(); columns.appendChild(column); - column.setWidth("50%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("20%"); + column.setWidth("60%"); sAmountField.getComponent().setWidth("150px"); @@ -95,38 +97,37 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener Row row = rows.newRow(); row.appendChild(sBankAccountLabel.rightAlign()); row.appendChild(sBankAccountCombo); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sCurrencyLabel.rightAlign()); row.appendChild(sCurrencyCombo); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sAmountLabel.rightAlign()); row.appendChild(sAmountField.getComponent()); - row.appendChild(new Space()); + sAmountField.getComponent().addEventListener(Events.ON_BLUR, this); row = rows.newRow(); row.appendChild(sRoutingLabel.rightAlign()); row.appendChild(sRoutingField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sNumberLabel.rightAlign()); row.appendChild(sNumberField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(sCheckLabel.rightAlign()); row.appendChild(sCheckField); + + row = rows.newRow(); + row.appendCellChild(customizePanel, 2); + + row = rows.newRow(); + row.appendChild(new Space()); row.appendChild(sOnline); row = rows.newRow(); - Cell cell = new Cell(); - row.appendChild(cell); - cell.appendChild(sStatus); - cell.setColspan(3); + row.appendCellChild(sStatus, 2); } @Override @@ -159,6 +160,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener { sCurrencyLabel.setVisible(false); // Check sCurrencyCombo.setVisible(false); + sCurrencySpace.setVisible(false); } ArrayList list = getBankAccountList(); @@ -168,21 +170,59 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener // Set Selection if (selectedBankAccount != null) sBankAccountCombo.setSelectedKeyNamePair(selectedBankAccount); + + boolean exist = isBankAccountProcessorExist(m_C_Currency_ID, (BigDecimal) sAmountField.getValue()); + sOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); } public void onEvent(Event e) { - if (e.getTarget() == sCurrencyCombo) + if (e.getTarget() == sCurrencyCombo || e.getTarget() == sAmountField) { + int C_Currency_ID = 0; KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair(); - BigDecimal amt = MConversionRate.convert(Env.getCtx(), - m_Amount, m_C_Currency_ID, pp.getKey(), m_AD_Client_ID, m_AD_Org_ID); - sAmountField.setValue(amt); + if (pp != null) + C_Currency_ID = pp.getKey(); + + if (e.getTarget() == sCurrencyCombo) + { + BigDecimal amt = MConversionRate.convert(Env.getCtx(), + m_Amount, m_C_Currency_ID, C_Currency_ID, m_AD_Client_ID, m_AD_Org_ID); + sAmountField.setValue(amt); + } + + updateOnlineButton(); + } + else if (e.getTarget() == sOnline) + { + window.lockUI(); + Clients.response(new AuEcho(window, "runProcessOnline", null)); + } + } + + private void updateOnlineButton() + { + int C_Currency_ID = 0; + KeyNamePair pp = sCurrencyCombo.getSelectedItem().toKeyNamePair(); + if (pp != null) + C_Currency_ID = pp.getKey(); + + BigDecimal PayAmt = (BigDecimal) sAmountField.getValue(); + + if (C_Currency_ID > 0 && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(C_Currency_ID, PayAmt); + sOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + sOnline.setEnabled(false); + setBankAccountProcessor(null); } -// else if (e.getTarget() == sOnline) { -// window.lockUI(); -// Clients.response(new AuEcho(window, "runProcessOnline", null)); -// } } @Override @@ -240,7 +280,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener else if (processMsg != null) FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); - return true; + return ok; } @Override @@ -257,4 +297,9 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener public Object getWindow() { return window; } + + @Override + public Object getCustomizePanel() { + return customizePanel; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java index 05eea7a290..f91bc6111a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java @@ -12,6 +12,7 @@ import org.adempiere.webui.component.Label; import org.adempiere.webui.component.ListItem; import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.ListboxFactory; +import org.adempiere.webui.component.Panel; import org.adempiere.webui.component.Row; import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Textbox; @@ -19,12 +20,15 @@ import org.adempiere.webui.editor.WNumberEditor; import org.adempiere.webui.window.FDialog; import org.compiere.grid.PaymentFormCreditCard; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.model.MPaymentProcessor; import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; import org.zkoss.zk.au.out.AuEcho; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; @@ -44,6 +48,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve private Textbox kApprovalField = new Textbox(); private Button kOnline = new Button(); private Label kStatus = new Label(); + private Panel customizePanel = new Panel(); public WPaymentFormCreditCard(int windowNo, GridTab mTab) { super(windowNo, mTab); @@ -73,15 +78,11 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve Column column = new Column(); columns.appendChild(column); - column.setWidth("30%"); + column.setWidth("40%"); column = new Column(); columns.appendChild(column); - column.setWidth("50%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("20%"); + column.setWidth("60%"); kAmountField.getComponent().setWidth("150px"); @@ -89,30 +90,34 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve Row row = rows.newRow(); row.appendChild(kTypeLabel.rightAlign()); row.appendChild(kTypeCombo); - row.appendChild(new Space()); + kTypeCombo.addEventListener(Events.ON_SELECT, this); row = rows.newRow(); row.appendChild(kNumberLabel.rightAlign()); row.appendChild(kNumberField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(kExpLabel.rightAlign()); row.appendChild(kExpField); - row.appendChild(new Space()); row = rows.newRow(); row.appendChild(kAmountLabel.rightAlign()); row.appendChild(kAmountField.getComponent()); - row.appendChild(new Space()); + kAmountField.getComponent().addEventListener(Events.ON_BLUR, this); row = rows.newRow(); row.appendChild(kApprovalLabel.rightAlign()); row.appendChild(kApprovalField); + + row = rows.newRow(); + row.appendCellChild(customizePanel, 2); + + row = rows.newRow(); + row.appendChild(new Space()); row.appendChild(kOnline); row = rows.newRow(); - row.appendCellChild(kStatus, 3); + row.appendCellChild(kStatus, 2); } @Override @@ -146,6 +151,23 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve // Set Selection if (selectedCreditCard != null) kTypeCombo.setSelectedValueNamePair(selectedCreditCard); + + if (m_mPayment.isApproved()) + { + kOnline.setVisible(true); + kOnline.setEnabled(false); + + MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null); + setBankAccountProcessor(bankAccountProcessor); + } + else + { + boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue()); + kOnline.setVisible(exist); + + if (exist) + updateOnlineButton(); + } } public void onEvent(Event e) @@ -154,6 +176,34 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve window.lockUI(); Clients.response(new AuEcho(window, "runProcessOnline", null)); } + else if (e.getTarget() == kTypeCombo || e.getTarget() == kAmountField) + updateOnlineButton(); + } + + private void updateOnlineButton() + { + String CCType = null; + ListItem selected = kTypeCombo.getSelectedItem(); + ValueNamePair vp = selected != null ? selected.toValueNamePair() : null; + if (vp != null) + CCType = vp.getValue(); + + BigDecimal PayAmt = (BigDecimal) kAmountField.getValue(); + + if (CCType != null && PayAmt != null) + { + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(CCType, PayAmt); + kOnline.setEnabled(bankAccountProcessor != null); + setBankAccountProcessor(bankAccountProcessor); + + MPaymentProcessor paymentProcessor = new MPaymentProcessor(Env.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), null); + kApprovalField.setReadonly(!paymentProcessor.isRequireVV()); + } + else + { + kOnline.setEnabled(false); + setBankAccountProcessor(null); + } } @Override @@ -175,7 +225,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve else if (processMsg != null) FDialog.info(getWindowNo(), window, "PaymentCreated", processMsg); - return true; + return ok; } @Override @@ -190,7 +240,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve boolean ok = processOnline(CCType, kNumberField.getText(), kExpField.getText()); if (!ok) - FDialog.error(getWindowNo(), window, "PaymentError", processMsg); + FDialog.error(getWindowNo(), window, "PaymentNotProcessed", processMsg); else if (processMsg != null) FDialog.info(getWindowNo(), window, "PaymentProcessed", processMsg); } // online @@ -209,4 +259,9 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve public Object getWindow() { return window; } + + @Override + public Object getCustomizePanel() { + return customizePanel; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java new file mode 100644 index 0000000000..e121e747fe --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java @@ -0,0 +1,178 @@ +package org.adempiere.webui.apps.form; + +import java.util.ArrayList; + +import org.adempiere.webui.LayoutUtils; +import org.adempiere.webui.component.Button; +import org.adempiere.webui.component.Column; +import org.adempiere.webui.component.Columns; +import org.adempiere.webui.component.Grid; +import org.adempiere.webui.component.GridFactory; +import org.adempiere.webui.component.Label; +import org.adempiere.webui.component.ListItem; +import org.adempiere.webui.component.Listbox; +import org.adempiere.webui.component.ListboxFactory; +import org.adempiere.webui.component.Panel; +import org.adempiere.webui.component.Row; +import org.adempiere.webui.component.Rows; +import org.adempiere.webui.component.Textbox; +import org.adempiere.webui.window.FDialog; +import org.compiere.grid.PaymentFormDirect; +import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; +import org.zkoss.zk.au.out.AuEcho; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.util.Clients; +import org.zkoss.zul.Space; + +public abstract class WPaymentFormDirect extends PaymentFormDirect implements EventListener { + + private WPaymentFormWindow window; + + private Label tAccountLabel = new Label(); + private Listbox tAccountCombo = ListboxFactory.newDropdownListbox(); + private Button tOnline = new Button(); + private Textbox tRoutingField = new Textbox(); + private Textbox tNumberField = new Textbox(); + private Label tStatus = new Label(); + private Label tRoutingText = new Label(); + private Label tNumberText = new Label(); + private Panel customizePanel = new Panel(); + + public WPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) { + super(windowNo, mTab, isDebit); + window = new WPaymentFormWindow(this, windowNo); + init(); + } + + public void init() { + Grid tPanelLayout = GridFactory.newGridLayout(); + window.getPanel().appendChild(tPanelLayout); + tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); + tRoutingField.setCols(8); + tNumberField.setCols(10); + tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); + tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); + tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); + LayoutUtils.addSclass("action-text-button", tOnline); + tOnline.addActionListener(this); + tStatus.setText(" "); + window.getPanel().setId("tPanel"); + + Columns columns = new Columns(); + tPanelLayout.appendChild(columns); + + Column column = new Column(); + columns.appendChild(column); + column.setWidth("40%"); + + column = new Column(); + columns.appendChild(column); + column.setWidth("60%"); + + Rows rows = tPanelLayout.newRows(); + Row row = rows.newRow(); + row.appendChild(tAccountLabel.rightAlign()); + row.appendChild(tAccountCombo); + + row = rows.newRow(); + row.appendChild(tRoutingText.rightAlign()); + row.appendChild(tRoutingField); + + row = rows.newRow(); + row.appendChild(tNumberText.rightAlign()); + row.appendChild(tNumberField); + + row = rows.newRow(); + row.appendCellChild(customizePanel, 2); + + row = rows.newRow(); + row.appendChild(new Space()); + row.appendChild(tOnline); + + row = rows.newRow(); + row.appendCellChild(tStatus, 2); + } + + @Override + public void loadData() { + if (m_C_Payment_ID != 0) + { + tRoutingField.setText(m_mPayment.getRoutingNo()); + tNumberField.setText(m_mPayment.getAccountNo()); + tStatus.setText(m_mPayment.getR_PnRef()); + } + + ArrayList list = getBPBankAccountList(); + for (KeyNamePair pp : list) + tAccountCombo.addItem(pp); + + boolean exist = isBankAccountProcessorExist(); + tOnline.setVisible(exist); + + MBankAccountProcessor bankAccountProcessor = getBankAccountProcessor(); + setBankAccountProcessor(bankAccountProcessor); + } + + public void onEvent(Event e) + { + if (e.getTarget() == tOnline) + { + window.lockUI(); + Clients.response(new AuEcho(window, "runProcessOnline", null)); + } + } + + @Override + public boolean checkMandatory() { + /*********************** + * Mandatory Data Check + */ + boolean dataOK = true; + ListItem selected = tAccountCombo.getSelectedItem(); + KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null; + if (bpba == null) + { + FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound"); + dataOK = false; + } + // + log.config("OK=" + dataOK); + return dataOK; + } + + @Override + public boolean saveChangesInTrx(final String trxName) { + boolean ok = save(0, tRoutingField.getText(), tNumberField.getText()); + if (!ok) + FDialog.error(getWindowNo(), window, "PaymentError", processMsg); + else if (processMsg != null) + FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); + + return ok; + } + + @Override + public void showWindow() { + window.setVisible(true); + } + + @Override + public void closeWindow() { + window.dispose(); + } + + @Override + public Object getWindow() { + return window; + } + + @Override + public Object getCustomizePanel() { + return customizePanel; + } +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java index da586ac96a..0567756c04 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java @@ -2,9 +2,9 @@ package org.adempiere.webui.apps.form; import org.compiere.model.GridTab; -public class WPaymentFormDirectDebit extends WPaymentFormDirectDeposit { +public class WPaymentFormDirectDebit extends WPaymentFormDirect { public WPaymentFormDirectDebit(int windowNo, GridTab mTab) { - super(windowNo, mTab); + super(windowNo, mTab, true); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java index 8abac750de..9ef79d9d3c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java @@ -1,150 +1,10 @@ package org.adempiere.webui.apps.form; -import java.util.ArrayList; - -import org.adempiere.webui.LayoutUtils; -import org.adempiere.webui.component.Button; -import org.adempiere.webui.component.Column; -import org.adempiere.webui.component.Columns; -import org.adempiere.webui.component.Grid; -import org.adempiere.webui.component.GridFactory; -import org.adempiere.webui.component.Label; -import org.adempiere.webui.component.ListItem; -import org.adempiere.webui.component.Listbox; -import org.adempiere.webui.component.ListboxFactory; -import org.adempiere.webui.component.Row; -import org.adempiere.webui.component.Rows; -import org.adempiere.webui.component.Textbox; -import org.adempiere.webui.window.FDialog; -import org.compiere.grid.PaymentFormDirectDeposit; import org.compiere.model.GridTab; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; -import org.compiere.util.Msg; -import org.zkoss.zul.Space; -public class WPaymentFormDirectDeposit extends PaymentFormDirectDeposit { - - private WPaymentFormWindow window; - - private Label tAccountLabel = new Label(); - private Listbox tAccountCombo = ListboxFactory.newDropdownListbox(); - private Button tOnline = new Button(); - private Textbox tRoutingField = new Textbox(); - private Textbox tNumberField = new Textbox(); - private Label tStatus = new Label(); - private Label tRoutingText = new Label(); - private Label tNumberText = new Label(); +public class WPaymentFormDirectDeposit extends WPaymentFormDirect { public WPaymentFormDirectDeposit(int windowNo, GridTab mTab) { - super(windowNo, mTab); - window = new WPaymentFormWindow(this, windowNo); - init(); - } - - public void init() { - Grid tPanelLayout = GridFactory.newGridLayout(); - window.getPanel().appendChild(tPanelLayout); - tAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BP_BankAccount_ID")); - tRoutingField.setCols(8); - tNumberField.setCols(10); - tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo")); - tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo")); - tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); - LayoutUtils.addSclass("action-text-button", tOnline); - tStatus.setText(" "); - window.getPanel().setId("tPanel"); - - Columns columns = new Columns(); - tPanelLayout.appendChild(columns); - - Column column = new Column(); - columns.appendChild(column); - column.setWidth("30%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("50%"); - - column = new Column(); - columns.appendChild(column); - column.setWidth("20%"); - - Rows rows = tPanelLayout.newRows(); - Row row = rows.newRow(); - row.appendChild(tAccountLabel.rightAlign()); - row.appendChild(tAccountCombo); - row.appendChild(new Space()); - - row = rows.newRow(); - row.appendChild(tRoutingText.rightAlign()); - row.appendChild(tRoutingField); - row.appendChild(new Space()); - - row = rows.newRow(); - row.appendChild(tNumberText.rightAlign()); - row.appendChild(tNumberField); - row.appendChild(tOnline); - - row = rows.newRow(); - row.appendCellChild(tStatus, 3); - } - - @Override - public void loadData() { - if (m_C_Payment_ID != 0) - { - tRoutingField.setText(m_mPayment.getRoutingNo()); - tNumberField.setText(m_mPayment.getAccountNo()); - tStatus.setText(m_mPayment.getR_PnRef()); - } - - ArrayList list = getBankAccountList(); - for (KeyNamePair pp : list) - tAccountCombo.addItem(pp); - } - - @Override - public boolean checkMandatory() { - /*********************** - * Mandatory Data Check - */ - boolean dataOK = true; - ListItem selected = tAccountCombo.getSelectedItem(); - KeyNamePair bpba = selected != null ? selected.toKeyNamePair() : null; - if (bpba == null) - { - FDialog.error(getWindowNo(), window, "PaymentBPBankNotFound"); - dataOK = false; - } - // - log.config("OK=" + dataOK); - return dataOK; - } - - @Override - public boolean saveChangesInTrx(final String trxName) { - boolean ok = save(); - if (!ok) - FDialog.error(getWindowNo(), window, "PaymentError", processMsg); - else if (processMsg != null) - FDialog.info(getWindowNo(), window, "PaymentCreated", m_mPayment.getDocumentNo()); - - return true; - } - - @Override - public void showWindow() { - window.setVisible(true); - } - - @Override - public void closeWindow() { - window.dispose(); - } - - @Override - public Object getWindow() { - return window; + super(windowNo, mTab, false); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java index ca340fe9d2..3831441d00 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java @@ -4,14 +4,8 @@ import java.util.HashMap; import java.util.logging.Level; import org.compiere.grid.IPaymentForm; -import org.compiere.grid.PaymentFormCash; -import org.compiere.grid.PaymentFormCheck; -import org.compiere.grid.PaymentFormCreditCard; -import org.compiere.grid.PaymentFormDirectDebit; -import org.compiere.grid.PaymentFormDirectDeposit; -import org.compiere.grid.PaymentFormMixedPOS; -import org.compiere.grid.PaymentFormOnCredit; import org.compiere.model.GridTab; +import org.compiere.model.MInvoice; import org.compiere.util.CLogger; public class WPaymentFormFactory { @@ -36,13 +30,13 @@ public class WPaymentFormFactory { { // Register defaults: s_registeredClasses = new HashMap>(); - s_registeredClasses.put(PaymentFormCash.PAYMENTRULE, WPaymentFormCash.class); - s_registeredClasses.put(PaymentFormCheck.PAYMENTRULE, WPaymentFormCheck.class); - s_registeredClasses.put(PaymentFormCreditCard.PAYMENTRULE, WPaymentFormCreditCard.class); - s_registeredClasses.put(PaymentFormDirectDebit.PAYMENTRULE, WPaymentFormDirectDebit.class); - s_registeredClasses.put(PaymentFormDirectDeposit.PAYMENTRULE, WPaymentFormDirectDeposit.class); - s_registeredClasses.put(PaymentFormMixedPOS.PAYMENTRULE, WPaymentFormMixedPOS.class); - s_registeredClasses.put(PaymentFormOnCredit.PAYMENTRULE, WPaymentFormOnCredit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, WPaymentFormCash.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, WPaymentFormCheck.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, WPaymentFormCreditCard.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, WPaymentFormDirectDebit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, WPaymentFormDirectDeposit.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, WPaymentFormMixedPOS.class); + s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, WPaymentFormOnCredit.class); } public static IPaymentForm create(int windowNo, GridTab mTab, String paymentRule) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java index d2b3c672ca..17575017ba 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java @@ -59,6 +59,9 @@ public class WPaymentFormWindow extends Window implements EventListener, Center center = new Center(); mainLayout.appendChild(center); center.appendChild(centerPanel = getPanel()); + centerPanel.setHflex("1"); + centerPanel.setVflex("1"); + center.setAutoscroll(true); // South south = new South(); south.setStyle("border: none"); diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index 03bc0a07f8..0cb5daa8a0 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -803,12 +803,12 @@ div.simileAjax-bubble-container { background-color: transparent !important; } -.grid-layout .z-row-inner { +.grid-layout .z-row-inner, .grid-layout .z-cell { border: none !important; background-color: transparent !important; } -.grid-layout tr.z-row-over>td.z-row-inner { +.grid-layout tr.z-row-over>td.z-row-inner, .grid-layout tr.z-row-over>.z-cell { border: none !important; } diff --git a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java index 4dfdfea19c..8d56650c21 100644 --- a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java @@ -1,5 +1,7 @@ package org.compiere.grid; +import org.compiere.model.MBankAccountProcessor; + public interface IPaymentForm { public boolean checkMandatory(); @@ -13,4 +15,10 @@ public interface IPaymentForm { public void closeWindow(); public Object getWindow(); + + public Object getCustomizePanel(); + + public void setCustomizeValues(); + + public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor); } \ No newline at end of file diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java index 53f080d782..d5e1d290f8 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java @@ -6,17 +6,21 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Hashtable; +import java.util.Properties; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MCashLine; import org.compiere.model.MPayment; +import org.compiere.model.MPaymentProcessor; import org.compiere.model.MSysConfig; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; import org.compiere.util.Trx; import org.compiere.util.TrxRunnable; @@ -198,6 +202,9 @@ public abstract class PaymentForm implements IPaymentForm { }; try { Trx.run(r); + } catch (AdempiereException ae) { + success[0] = false; + throw ae; } catch (Throwable e) { success[0] = false; throw new AdempiereException("PaymentError", e); @@ -277,7 +284,43 @@ public abstract class PaymentForm implements IPaymentForm { public void processOnline() { - + throw new AdempiereException(Msg.getMsg(Env.getCtx(), "ActionNotSupported")); + } + + public boolean isBankAccountProcessorExist(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName) + { + MBankAccountProcessor[] m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, PayAmt, trxName); + // Relax Amount + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, Env.ZERO, trxName); + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + return false; + return true; + } + + public MBankAccountProcessor getBankAccountProcessor(Properties ctx, String tender, String CCType, int AD_Client_ID, int C_Currency_ID, BigDecimal PayAmt, String trxName) + { + MBankAccountProcessor[] m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, PayAmt, trxName); + // Relax Amount + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + m_mBankAccountProcessors = MPaymentProcessor.find(ctx, tender, CCType, AD_Client_ID, C_Currency_ID, Env.ZERO, trxName); + if (m_mBankAccountProcessors == null || m_mBankAccountProcessors.length == 0) + return null; + + MBankAccountProcessor m_mBankAccountProcessor = null; + // Find the first right one + for (int i = 0; i < m_mBankAccountProcessors.length; i++) + { + MBankAccountProcessor bankAccountProcessor = m_mBankAccountProcessors[i]; + MPaymentProcessor paymentProcessor = new MPaymentProcessor(bankAccountProcessor.getCtx(), bankAccountProcessor.getC_PaymentProcessor_ID(), bankAccountProcessor.get_TrxName()); + if (paymentProcessor.accepts (tender, CCType)) + { + m_mBankAccountProcessor = m_mBankAccountProcessors[i]; + break; + } + } + // + return m_mBankAccountProcessor; } public GridTab getGridTab() @@ -299,4 +342,19 @@ public abstract class PaymentForm implements IPaymentForm { { return m_WindowNo; } + + public Object getCustomizePanel() + { + return null; + } + + public void setCustomizeValues() + { + + } + + public void setBankAccountProcessor(MBankAccountProcessor bankAccountProcessor) + { + + } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java index f69a7dabc1..6f27b1bdca 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java @@ -8,6 +8,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; import org.compiere.model.MCash; import org.compiere.model.MCashLine; @@ -20,10 +21,11 @@ import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; import org.compiere.util.TimeUtil; public abstract class PaymentFormCash extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash; + private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash; public PaymentFormCash(int WindowNo, GridTab mTab) { super(WindowNo, mTab); @@ -116,7 +118,6 @@ public abstract class PaymentFormCash extends PaymentForm { public boolean save(int newC_BankAccount_ID, int newC_CashBook_ID, Timestamp newDateAcct, BigDecimal newAmount, String trxName) { processMsg = null; - boolean error = false; int newC_CashLine_ID = m_C_CashLine_ID; /*********************** @@ -134,8 +135,8 @@ public abstract class PaymentFormCash extends PaymentForm { log.config( "CashCancelled"); else { - processMsg = "CashNotCancelled"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "CashNotCancelled"); + throw new AdempiereException(processMsg); } } newC_CashLine_ID = 0; // reset @@ -177,8 +178,8 @@ public abstract class PaymentFormCash extends PaymentForm { if (C_Invoice_ID == 0 && order == null) { log.config("No Invoice!"); - processMsg = "CashNotCreated"; - error = false; + processMsg = Msg.getMsg(Env.getCtx(), "CashNotCreated"); + throw new AdempiereException(processMsg); } else { @@ -219,7 +220,7 @@ public abstract class PaymentFormCash extends PaymentForm { if (cash == null || cash.get_ID() == 0) { processMsg = CLogger.retrieveErrorString("CashNotCreated"); - error = true; + throw new AdempiereException(processMsg); } else { @@ -290,8 +291,8 @@ public abstract class PaymentFormCash extends PaymentForm { processMsg = m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); } } else @@ -321,6 +322,6 @@ public abstract class PaymentFormCash extends PaymentForm { else getGridTab().setValue("C_CashLine_ID", new Integer(newC_CashLine_ID)); } - return !error; + return true; } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index d2c7dc7efd..88c5882a10 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -7,7 +7,9 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MInvoice; import org.compiere.model.MOrder; import org.compiere.model.MPayment; @@ -16,9 +18,10 @@ import org.compiere.process.DocAction; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; public abstract class PaymentFormCheck extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check; + private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check; public PaymentFormCheck(int WindowNo, GridTab mTab) { super(WindowNo, mTab); @@ -68,7 +71,6 @@ public abstract class PaymentFormCheck extends PaymentForm { public boolean save(int newC_BankAccount_ID, String routing, String number, String check, BigDecimal amount) { processMsg = null; - boolean error = false; String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; /*********************** @@ -85,11 +87,11 @@ public abstract class PaymentFormCheck extends PaymentForm { boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); if (ok) - log.info( "Payment Canecelled - " + m_mPaymentOriginal); + log.info( "Payment Cancelled - " + m_mPaymentOriginal); else { - processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); + throw new AdempiereException(processMsg); } m_mPayment.resetNew(); } @@ -111,8 +113,8 @@ public abstract class PaymentFormCheck extends PaymentForm { } else { - processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo(); + throw new AdempiereException(processMsg); } } } @@ -163,6 +165,7 @@ public abstract class PaymentFormCheck extends PaymentForm { } m_mPayment.setDateTrx(m_DateAcct); m_mPayment.setDateAcct(m_DateAcct); + setCustomizeValues(); m_mPayment.saveEx(); // Save/Post @@ -174,8 +177,8 @@ public abstract class PaymentFormCheck extends PaymentForm { processMsg = m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); } } else @@ -193,6 +196,16 @@ public abstract class PaymentFormCheck extends PaymentForm { else getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); } - return !error; + return true; + } + + public boolean isBankAccountProcessorExist(int C_Currency_ID, BigDecimal PayAmt) + { + return isBankAccountProcessorExist(Env.getCtx(), MPayment.TENDERTYPE_Check, "", Env.getAD_Client_ID(Env.getCtx()), C_Currency_ID, PayAmt, null); + } + + public MBankAccountProcessor getBankAccountProcessor(int C_Currency_ID, BigDecimal PayAmt) + { + return getBankAccountProcessor(Env.getCtx(), MPayment.TENDERTYPE_Check, "", Env.getAD_Client_ID(Env.getCtx()), C_Currency_ID, PayAmt, null); } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java index 21ee1c18c5..721a0a6b2d 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java @@ -2,17 +2,20 @@ package org.compiere.grid; import java.math.BigDecimal; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; import org.compiere.model.MInvoice; import org.compiere.model.MOrder; import org.compiere.model.MPayment; import org.compiere.process.DocAction; import org.compiere.util.Env; +import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; public abstract class PaymentFormCreditCard extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard; - + private final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard; + public PaymentFormCreditCard(int WindowNo, GridTab mTab) { super(WindowNo, mTab); } @@ -34,7 +37,6 @@ public abstract class PaymentFormCreditCard extends PaymentForm { public boolean save(String newCCType, String newCCNumber, String newCCExp, BigDecimal newAmount) { processMsg = null; - boolean error = false; String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; /*********************** @@ -51,11 +53,11 @@ public abstract class PaymentFormCreditCard extends PaymentForm { boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); if (ok) - log.info( "Payment Canecelled - " + m_mPaymentOriginal); + log.info( "Payment Cancelled - " + m_mPaymentOriginal); else { - processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); + throw new AdempiereException(processMsg); } m_mPayment.resetNew(); } @@ -77,8 +79,8 @@ public abstract class PaymentFormCreditCard extends PaymentForm { } else { - processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo(); - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo(); + throw new AdempiereException(processMsg); } } } @@ -130,6 +132,14 @@ public abstract class PaymentFormCreditCard extends PaymentForm { } m_mPayment.setDateTrx(m_DateAcct); m_mPayment.setDateAcct(m_DateAcct); + setCustomizeValues(); + + if (!m_mPayment.isApproved()) + { + processMsg = Msg.getMsg(Env.getCtx(), "CardNotProcessed"); + throw new AdempiereException(processMsg); + } + m_mPayment.saveEx(); // Save/Post @@ -141,8 +151,8 @@ public abstract class PaymentFormCreditCard extends PaymentForm { processMsg = m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; - error = true; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); } } else @@ -161,7 +171,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm { getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); } - return !error; + return true; } public boolean processOnline(String CCType, String CCNumber, String CCExp) @@ -188,8 +198,9 @@ public abstract class PaymentFormCreditCard extends PaymentForm { m_mPayment.setDateTrx(m_DateAcct); // Set Amount m_mPayment.setAmount(m_C_Currency_ID, m_Amount); + setCustomizeValues(); if (!m_mPayment.save()) { - processMsg = "PaymentNotCreated"; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); return false; } else { approved = m_mPayment.processOnline(); @@ -205,7 +216,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm { processMsg = info + "\n" + m_mPayment.getDocumentNo(); else { - processMsg = "PaymentNotCreated"; + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); error = true; } saveChanges(); @@ -218,4 +229,14 @@ public abstract class PaymentFormCreditCard extends PaymentForm { } return !error; } + + public boolean isBankAccountProcessorExist(String CCType, BigDecimal PayAmt) + { + return isBankAccountProcessorExist(Env.getCtx(), MPayment.TENDERTYPE_CreditCard, CCType, Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, PayAmt, null); + } + + public MBankAccountProcessor getBankAccountProcessor(String CCType, BigDecimal PayAmt) + { + return getBankAccountProcessor(Env.getCtx(), MPayment.TENDERTYPE_CreditCard, CCType, Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, PayAmt, null); + } } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java new file mode 100644 index 0000000000..c845a475e9 --- /dev/null +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -0,0 +1,204 @@ +package org.compiere.grid; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.logging.Level; + +import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.GridTab; +import org.compiere.model.MBankAccountProcessor; +import org.compiere.model.MInvoice; +import org.compiere.model.MOrder; +import org.compiere.model.MPayment; +import org.compiere.process.DocAction; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; + +public abstract class PaymentFormDirect extends PaymentForm { + private String PAYMENTRULE; + + public PaymentFormDirect(int WindowNo, GridTab mTab, boolean isDebit) { + super(WindowNo, mTab); + PAYMENTRULE = isDebit ? MInvoice.PAYMENTRULE_DirectDebit : MInvoice.PAYMENTRULE_DirectDeposit; + } + + public ArrayList getBPBankAccountList() { + ArrayList list = new ArrayList(); + + /** + * Load Accounts + */ + String SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct " + + "FROM C_BP_BankAccount a" + + " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) " + + "WHERE C_BPartner_ID=?" + + "AND a.IsActive='Y' AND a.IsACH='Y'"; + try + { + PreparedStatement pstmt = DB.prepareStatement(SQL, null); + pstmt.setInt(1, m_C_BPartner_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + int key = rs.getInt(1); + String name = rs.getString(2); + KeyNamePair pp = new KeyNamePair(key, name); + list.add(pp); + } + rs.close(); + pstmt.close(); + } + catch (SQLException eac) + { + log.log(Level.SEVERE, SQL, eac); + } + + return list; + } + + public String processMsg; + public boolean save(int newC_BankAccount_ID, String routing, String number) + { + processMsg = null; + + String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; + + /*********************** + * Changed PaymentRule + */ + if (!PAYMENTRULE.equals(m_PaymentRule)) + { + log.fine("Changed PaymentRule: " + m_PaymentRule + " -> " + PAYMENTRULE); + // We had a change in Payment type (e.g. Check to CC) + if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) != -1 && m_mPaymentOriginal != null) + { + log.fine("Old Payment(1) - " + m_mPaymentOriginal); + m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); + boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); + m_mPaymentOriginal.saveEx(); + if (ok) + log.info( "Payment Cancelled - " + m_mPaymentOriginal); + else + { + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); + throw new AdempiereException(processMsg); + } + m_mPayment.resetNew(); + } + // We had a Payment and something else (e.g. Check to Cash) + else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) == -1) + { + log.fine("Old Payment(2) - " + m_mPaymentOriginal); + if (m_mPaymentOriginal != null) + { + m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); + boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); + m_mPaymentOriginal.saveEx(); + if (ok) // Cancel Payment + { + log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ()); + getGridTab().getTableModel().dataSave(true); + m_mPayment.resetNew(); + m_mPayment.setAmount(m_C_Currency_ID, m_Amount); + } + else + { + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPayment.getDocumentNo(); + throw new AdempiereException(processMsg); + } + } + } + } + + // Get Order and optionally Invoice + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getWindowNo(), "C_Order_ID"); + int C_Invoice_ID = Env.getContextAsInt(Env.getCtx(), getWindowNo(), "C_Invoice_ID"); + if (C_Invoice_ID == 0 && m_DocStatus.equals("CO")) + C_Invoice_ID = getInvoiceID (C_Order_ID); + + // Amount sign negative, if ARC (Credit Memo) or API (AP Invoice) + boolean negateAmt = false; + MInvoice invoice = null; + if (C_Invoice_ID != 0) + { + invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); + negateAmt = invoice.isCreditMemo(); + } + MOrder order = null; + if (invoice == null && C_Order_ID != 0) + order = new MOrder (Env.getCtx(), C_Order_ID, null); + + BigDecimal payAmount = m_Amount; + + + if (negateAmt) + payAmount = m_Amount.negate(); + // Info + log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); + + /*********************** + * Payments + */ + m_mPayment.setBankACH(newC_BankAccount_ID, m_isSOTrx, PAYMENTRULE, routing, number); + m_mPayment.setAmount(m_C_Currency_ID, payAmount); + m_mPayment.setC_BPartner_ID(m_C_BPartner_ID); + m_mPayment.setC_Invoice_ID(C_Invoice_ID); + if (order != null) + { + m_mPayment.setC_Order_ID(C_Order_ID); + m_needSave = true; + } + m_mPayment.setDateTrx(m_DateAcct); + m_mPayment.setDateAcct(m_DateAcct); + setCustomizeValues(); + m_mPayment.saveEx(); + + // Save/Post + if (m_mPayment.get_ID() > 0 && MPayment.DOCSTATUS_Drafted.equals(m_mPayment.getDocStatus())) + { + boolean ok = m_mPayment.processIt(DocAction.ACTION_Complete); + m_mPayment.saveEx(); + if (ok) + processMsg = m_mPayment.getDocumentNo(); + else + { + processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated"); + throw new AdempiereException(processMsg); + } + } + else + log.fine("NotDraft " + m_mPayment); + + /********************** + * Save Values to mTab + */ + log.config("Saving changes"); + // Set Payment + if (m_mPayment.getC_Payment_ID() != m_C_Payment_ID) + { + if (m_mPayment.getC_Payment_ID() == 0) + getGridTab().setValue("C_Payment_ID", null); + else + getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); + } + + return true; + } + + public boolean isBankAccountProcessorExist() + { + String tender = PAYMENTRULE.equals(MInvoice.PAYMENTRULE_DirectDebit) ? MPayment.TENDERTYPE_DirectDebit : MPayment.TENDERTYPE_DirectDeposit; + return isBankAccountProcessorExist(Env.getCtx(), tender, "", Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, m_Amount, null); + } + + public MBankAccountProcessor getBankAccountProcessor() + { + String tender = PAYMENTRULE.equals(MInvoice.PAYMENTRULE_DirectDebit) ? MPayment.TENDERTYPE_DirectDebit : MPayment.TENDERTYPE_DirectDeposit; + return getBankAccountProcessor(Env.getCtx(), tender, "", Env.getAD_Client_ID(Env.getCtx()), m_C_Currency_ID, m_Amount, null); + } +} diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java deleted file mode 100644 index e8a2409dc0..0000000000 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDebit.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.compiere.grid; - -import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; - -public abstract class PaymentFormDirectDebit extends PaymentFormDirectDeposit { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_DirectDebit; - - public PaymentFormDirectDebit(int WindowNo, GridTab mTab) { - super(WindowNo, mTab); - } -} diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java deleted file mode 100644 index 25b9d4fec8..0000000000 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirectDeposit.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.compiere.grid; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.logging.Level; - -import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; -import org.compiere.process.DocAction; -import org.compiere.util.DB; -import org.compiere.util.KeyNamePair; - -public abstract class PaymentFormDirectDeposit extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_DirectDeposit; - - public PaymentFormDirectDeposit(int WindowNo, GridTab mTab) { - super(WindowNo, mTab); - } - - public ArrayList getBankAccountList() { - ArrayList list = new ArrayList(); - - /** - * Load Accounts - */ - String SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct " - + "FROM C_BP_BankAccount a" - + " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) " - + "WHERE C_BPartner_ID=?" - + "AND a.IsActive='Y' AND a.IsACH='Y'"; - try - { - PreparedStatement pstmt = DB.prepareStatement(SQL, null); - pstmt.setInt(1, m_C_BPartner_ID); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - { - int key = rs.getInt(1); - String name = rs.getString(2); - KeyNamePair pp = new KeyNamePair(key, name); - list.add(pp); - } - rs.close(); - pstmt.close(); - } - catch (SQLException eac) - { - log.log(Level.SEVERE, SQL, eac); - } - - return list; - } - - public String processMsg; - public boolean save() - { - processMsg = null; - boolean error = false; - - String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; - - /*********************** - * Changed PaymentRule - */ - if (!PAYMENTRULE.equals(m_PaymentRule)) - { - log.fine("Changed PaymentRule: " + m_PaymentRule + " -> " + PAYMENTRULE); - // We had a change in Payment type (e.g. Check to CC) - if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) != -1 && m_mPaymentOriginal != null) - { - log.fine("Old Payment(1) - " + m_mPaymentOriginal); - m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); - boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); - m_mPaymentOriginal.saveEx(); - if (ok) - log.info( "Payment Canecelled - " + m_mPaymentOriginal); - else - { - processMsg = "PaymentNotCancelled " + m_mPaymentOriginal.getDocumentNo(); - error = true; - } - m_mPayment.resetNew(); - } - // We had a Payment and something else (e.g. Check to Cash) - else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(PAYMENTRULE) == -1) - { - log.fine("Old Payment(2) - " + m_mPaymentOriginal); - if (m_mPaymentOriginal != null) - { - m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); - boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); - m_mPaymentOriginal.saveEx(); - if (ok) // Cancel Payment - { - log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ()); - getGridTab().getTableModel().dataSave(true); - m_mPayment.resetNew(); - m_mPayment.setAmount(m_C_Currency_ID, m_Amount); - } - else - { - processMsg = "PaymentNotCancelled " + m_mPayment.getDocumentNo(); - error = true; - } - } - } - } - /********************** - * Save Values to mTab - */ - log.config("Saving changes"); - // Set Payment - if (m_mPayment.getC_Payment_ID() != m_C_Payment_ID) - { - if (m_mPayment.getC_Payment_ID() == 0) - getGridTab().setValue("C_Payment_ID", null); - else - getGridTab().setValue("C_Payment_ID", new Integer(m_mPayment.getC_Payment_ID())); - } - - return !error; - } -} diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java index aa4876bc3d..9d70429310 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java @@ -1,10 +1,8 @@ package org.compiere.grid; import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; public abstract class PaymentFormMixedPOS extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_MixedPOSPayment; public PaymentFormMixedPOS(int WindowNo, GridTab mTab) { super(WindowNo, mTab); diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java index 16948a745f..0283d467b7 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java @@ -7,13 +7,11 @@ import java.util.ArrayList; import java.util.logging.Level; import org.compiere.model.GridTab; -import org.compiere.model.MInvoice; import org.compiere.model.MRole; import org.compiere.util.DB; import org.compiere.util.KeyNamePair; public abstract class PaymentFormOnCredit extends PaymentForm { - public static final String PAYMENTRULE = MInvoice.PAYMENTRULE_OnCredit; /** Start Payment Term */ public int m_C_PaymentTerm_ID = 0; From 9c26a16dccad1f4a2e87613d495f1632bfeaa413 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 19 Oct 2012 17:24:15 +0800 Subject: [PATCH 4/9] IDEMPIERE-392 Redesign payment button - include copyright text --- .../src/org/adempiere/util/PaymentUtil.java | 18 +++++++++++++ .../org/compiere/model/MPaymentLookup.java | 23 ++++++++++++++++ .../org/compiere/grid/VPaymentFormCash.java | 19 ++++++++++++- .../org/compiere/grid/VPaymentFormCheck.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormCreditCard.java | 18 +++++++++++++ .../org/compiere/grid/VPaymentFormDialog.java | 26 ++++++++++++++++-- .../org/compiere/grid/VPaymentFormDirect.java | 18 +++++++++++++ .../grid/VPaymentFormDirectDebit.java | 18 +++++++++++++ .../grid/VPaymentFormDirectDeposit.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormFactory.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormMixedPOS.java | 18 +++++++++++++ .../compiere/grid/VPaymentFormOnCredit.java | 18 +++++++++++++ .../org/compiere/grid/ed/VPaymentEditor.java | 22 +++++++++++++++ .../webui/apps/form/WPaymentFormCash.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormCheck.java | 18 +++++++++++++ .../apps/form/WPaymentFormCreditCard.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormDirect.java | 18 +++++++++++++ .../apps/form/WPaymentFormDirectDebit.java | 18 +++++++++++++ .../apps/form/WPaymentFormDirectDeposit.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormFactory.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormMixedPOS.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormOnCredit.java | 18 +++++++++++++ .../webui/apps/form/WPaymentFormWindow.java | 27 +++++++++++++++++-- .../adempiere/webui/component/Paymentbox.java | 22 +++++++++++++++ .../webui/editor/WPaymentEditor.java | 18 +++++++++++++ .../src/org/compiere/grid/IPaymentForm.java | 13 +++++++++ .../src/org/compiere/grid/PaymentForm.java | 18 +++++++++++++ .../org/compiere/grid/PaymentFormCash.java | 18 +++++++++++++ .../org/compiere/grid/PaymentFormCheck.java | 18 +++++++++++++ .../compiere/grid/PaymentFormCreditCard.java | 18 +++++++++++++ .../org/compiere/grid/PaymentFormDirect.java | 18 +++++++++++++ .../compiere/grid/PaymentFormMixedPOS.java | 18 +++++++++++++ .../compiere/grid/PaymentFormOnCredit.java | 18 +++++++++++++ 33 files changed, 615 insertions(+), 5 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java b/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java index d1169736ff..ec362670de 100644 --- a/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/PaymentUtil.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.util; import java.sql.PreparedStatement; @@ -12,6 +25,11 @@ import org.compiere.model.MBPartner; import org.compiere.util.CLogger; import org.compiere.util.DB; +/** + * + * @author Elaine + * + */ public class PaymentUtil { private static final CLogger logger = CLogger.getCLogger(PaymentUtil.class); diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java b/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java index 87c5577af9..4e12509385 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentLookup.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.model; import java.io.Serializable; @@ -14,8 +27,18 @@ import org.compiere.util.Env; import org.compiere.util.NamePair; import org.compiere.util.ValueNamePair; +/** + * + * @author Elaine + * + */ public class MPaymentLookup extends Lookup implements Serializable { + /** + * + */ + private static final long serialVersionUID = -6863672221350217533L; + private static final int PAYMENT_RULE_REFERENCE_ID = 195; /** Context */ diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java index 33132e30e1..8f9e6fa340 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.awt.GridBagConstraints; @@ -23,7 +36,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; - +/** + * + * @author Elaine + * + */ public class VPaymentFormCash extends PaymentFormCash implements ActionListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java index faa67738a8..3bab2d238a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.awt.Dimension; @@ -27,6 +40,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListener, FocusListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java index 5032e3137f..e802579d8f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.awt.Dimension; @@ -23,6 +36,11 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; +/** + * + * @author Elaine + * + */ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements ActionListener, FocusListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java index ac4cb2fdd9..bcbc37b4c9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDialog.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.awt.BorderLayout; @@ -15,10 +28,19 @@ import org.compiere.swing.CPanel; import org.compiere.util.Env; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class VPaymentFormDialog extends CDialog implements ActionListener { + /** + * + */ + private static final long serialVersionUID = 6249016140530436885L; private PaymentForm paymentForm; - private int windowNo; +// private int windowNo; private CPanel mainPanel = new CPanel(); private BorderLayout mainLayout = new BorderLayout(); @@ -32,7 +54,7 @@ public class VPaymentFormDialog extends CDialog implements ActionListener super(AEnv.getWindow(windowNo), Msg.getMsg(Env.getCtx(), "Payment"), true); this.paymentForm = paymentForm; - this.windowNo = windowNo; +// this.windowNo = windowNo; try { jbInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java index 2cf578c3bb..9613251430 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.awt.GridBagConstraints; @@ -19,6 +32,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public abstract class VPaymentFormDirect extends PaymentFormDirect implements ActionListener { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java index cd99b2b926..f8360f529b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class VPaymentFormDirectDebit extends VPaymentFormDirect { public VPaymentFormDirectDebit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java index 3dc918af14..68092ed142 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class VPaymentFormDirectDeposit extends VPaymentFormDirect { public VPaymentFormDirectDeposit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java index c89215c2a5..3f9c0a9fc5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.util.HashMap; @@ -7,6 +20,11 @@ import org.compiere.model.GridTab; import org.compiere.model.MInvoice; import org.compiere.util.CLogger; +/** + * + * @author Elaine + * + */ public class VPaymentFormFactory { /** Static Logger */ private static CLogger s_log = CLogger.getCLogger (VPaymentFormFactory.class); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java index d64924f207..7ad7c2a286 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class VPaymentFormMixedPOS extends PaymentFormMixedPOS { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java index bdefc9df47..5a37bc165a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.awt.GridBagConstraints; @@ -12,6 +25,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class VPaymentFormOnCredit extends PaymentFormOnCredit { private VPaymentFormDialog dialog; diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java index 71e0d5b056..957fd8fec2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid.ed; import java.awt.BorderLayout; @@ -27,8 +40,17 @@ import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.NamePair; +/** + * + * @author Elaine + * + */ public class VPaymentEditor extends JComponent implements VEditor, ActionListener, FocusListener { + /** + * + */ + private static final long serialVersionUID = -1840246214698245287L; /** Logger */ private static CLogger log = CLogger.getCLogger(VPaymentEditor.class); /** Search: The Button to open Editor */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java index 7d9f6893ca..c2f011a98a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.math.BigDecimal; @@ -28,6 +41,11 @@ import org.compiere.util.Msg; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +/** + * + * @author Elaine + * + */ public class WPaymentFormCash extends PaymentFormCash implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java index 4882849254..836a008322 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.math.BigDecimal; @@ -35,6 +48,11 @@ import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; +/** + * + * @author Elaine + * + */ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java index f91bc6111a..808a921d8d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCreditCard.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.math.BigDecimal; @@ -32,6 +45,11 @@ import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; +/** + * + * @author Elaine + * + */ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java index e121e747fe..1466f90223 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.util.ArrayList; @@ -29,6 +42,11 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Space; +/** + * + * @author Elaine + * + */ public abstract class WPaymentFormDirect extends PaymentFormDirect implements EventListener { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java index 0567756c04..e2618d7329 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDebit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class WPaymentFormDirectDebit extends WPaymentFormDirect { public WPaymentFormDirectDebit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java index 9ef79d9d3c..1d3345fde9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirectDeposit.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class WPaymentFormDirectDeposit extends WPaymentFormDirect { public WPaymentFormDirectDeposit(int windowNo, GridTab mTab) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java index 3831441d00..be1ba65e52 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormFactory.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.util.HashMap; @@ -8,6 +21,11 @@ import org.compiere.model.GridTab; import org.compiere.model.MInvoice; import org.compiere.util.CLogger; +/** + * + * @author Elaine + * + */ public class WPaymentFormFactory { /** Static Logger */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java index ef09dfc5da..fafcd5d55a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java @@ -1,8 +1,26 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.compiere.grid.PaymentFormMixedPOS; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public class WPaymentFormMixedPOS extends PaymentFormMixedPOS { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java index 4318ba204e..d097837818 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import java.util.ArrayList; @@ -18,6 +31,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public class WPaymentFormOnCredit extends PaymentFormOnCredit { private WPaymentFormWindow window; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java index 17575017ba..17e0afcfab 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.apps.form; import org.adempiere.webui.apps.BusyDialog; @@ -15,10 +28,20 @@ import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.South; +/** + * + * @author Elaine + * + */ public class WPaymentFormWindow extends Window implements EventListener, DialogEvents { + /** + * + */ + private static final long serialVersionUID = 2710316463655831868L; + private PaymentForm paymentForm; - private int windowNo; +// private int windowNo; private Panel mainPanel = new Panel(); private Panel centerPanel = new Panel(); @@ -34,7 +57,7 @@ public class WPaymentFormWindow extends Window implements EventListener, super(); this.paymentForm = paymentForm; - this.windowNo = windowNo; +// this.windowNo = windowNo; try { zkInit(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java index 1f9d1ffbc4..5301b3071e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Paymentbox.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.component; import java.beans.PropertyChangeListener; @@ -10,8 +23,17 @@ import org.zkoss.zul.Comboitem; import org.zkoss.zul.Div; import org.zkoss.zul.Hlayout; +/** + * + * @author Elaine + * + */ public class Paymentbox extends Div { + /** + * + */ + private static final long serialVersionUID = 1807586169091171780L; protected PropertyChangeSupport m_propertyChangeListeners = new PropertyChangeSupport(this); protected Combobox combo; protected Button btn; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java index 55d7b38141..09c3ad1778 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.adempiere.webui.editor; import javax.swing.event.ListDataListener; @@ -25,6 +38,11 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Comboitem; +/** + * + * @author Elaine + * + */ public class WPaymentEditor extends WEditor implements ListDataListener { public final static String ON_SAVE_PAYMENT = "onSavePayment"; diff --git a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java index 8d56650c21..8fa848b10c 100644 --- a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.MBankAccountProcessor; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java index d5e1d290f8..89a04cda80 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -24,6 +37,11 @@ import org.compiere.util.Msg; import org.compiere.util.Trx; import org.compiere.util.TrxRunnable; +/** + * + * @author Elaine + * + */ public abstract class PaymentForm implements IPaymentForm { /** Logger */ diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java index 6f27b1bdca..305b03660b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -24,6 +37,11 @@ import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; import org.compiere.util.TimeUtil; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormCash extends PaymentForm { private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Cash; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index 88c5882a10..71aa19d29b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -20,6 +33,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormCheck extends PaymentForm { private final String PAYMENTRULE = MInvoice.PAYMENTRULE_Check; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java index 721a0a6b2d..a7b5e93839 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -13,6 +26,11 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.ValueNamePair; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormCreditCard extends PaymentForm { private final String PAYMENTRULE = MInvoice.PAYMENTRULE_CreditCard; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java index c845a475e9..8d00b6d017 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.math.BigDecimal; @@ -19,6 +32,11 @@ import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormDirect extends PaymentForm { private String PAYMENTRULE; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java index 9d70429310..9e86d71fb4 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java @@ -1,7 +1,25 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import org.compiere.model.GridTab; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormMixedPOS extends PaymentForm { public PaymentFormMixedPOS(int WindowNo, GridTab mTab) { diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java index 0283d467b7..99ce09bbc6 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java @@ -1,3 +1,16 @@ +/****************************************************************************** + * Copyright (C) 2012 Elaine Tan * + * Copyright (C) 2012 Trek Global + * 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. * + *****************************************************************************/ package org.compiere.grid; import java.sql.PreparedStatement; @@ -11,6 +24,11 @@ import org.compiere.model.MRole; import org.compiere.util.DB; import org.compiere.util.KeyNamePair; +/** + * + * @author Elaine + * + */ public abstract class PaymentFormOnCredit extends PaymentForm { /** Start Payment Term */ From 61b327991aa0cdd774457d50774b59369477d884 Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Fri, 19 Oct 2012 15:18:31 +0530 Subject: [PATCH 5/9] IDEMPIERE-293 : Adding AD_User_ID and making window to show session from all org. --- db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql | 5 +- .../postgresql/views/AD_SESSIONINFO_V.sql | 5 +- .../oracle/935_IDEMPIERE-293.sql | 405 +++++++++++++++++- .../postgresql/935_IDEMPIERE-293.sql | 399 ++++++++++++++++- 4 files changed, 804 insertions(+), 10 deletions(-) diff --git a/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql b/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql index 24346cf159..b70cc7a9cc 100644 --- a/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql +++ b/db/ddlutils/oracle/views/AD_SESSIONINFO_V.sql @@ -1,7 +1,8 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id,0 as ad_client_id,0 as ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'; \ No newline at end of file diff --git a/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql b/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql index adc0895cdd..6d1c6ee2c8 100644 --- a/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql +++ b/db/ddlutils/postgresql/views/AD_SESSIONINFO_V.sql @@ -1,7 +1,8 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, 0::numeric(10,0) AS ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'::bpchar; \ No newline at end of file diff --git a/migration/360lts-release/oracle/935_IDEMPIERE-293.sql b/migration/360lts-release/oracle/935_IDEMPIERE-293.sql index 15891a3f94..4b1a7d5100 100644 --- a/migration/360lts-release/oracle/935_IDEMPIERE-293.sql +++ b/migration/360lts-release/oracle/935_IDEMPIERE-293.sql @@ -1,8 +1,9 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id,0 ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id,0 as ad_client_id,0 as ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'; @@ -180,7 +181,7 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien -- Oct 11, 2012 6:13:32 PM PDT -- IDEMPIERE-293-List of logged users -INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',200182,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- Oct 11, 2012 6:13:32 PM PDT @@ -804,6 +805,404 @@ DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013 DELETE FROM AD_Reference WHERE AD_Reference_ID=200013 ; +-- Oct 19, 2012 1:35:06 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200705,'D','N','N','N','N',10,'N',19,'N',138,'f1336921-57f1-4fe8-8c12-543d2b4a49bf','N','N','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact',100,TO_DATE('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 1:35:07 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200705 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_org_id',200189,'D','login_org_id','login_org_id','a5353900-dd61-4d08-8a16-ff00125c61cd',0,TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200189 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200706,'D','N','N','N','N',10,'N',19,'N',200189,'f6a3b130-de25-4cbd-802f-560435d2cbab','N','N','N','login_org_id','login_org_id',100,TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200706 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Login Org', PrintName='Login Org',Updated=TO_DATE('2012-10-19 13:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL, AD_Element_ID=200189 WHERE UPPER(ColumnName)='LOGIN_ORG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Login Org', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200189) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:03 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem pi SET PrintName='Login Org', Name='Login Org' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200189) +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Loing Client', PrintName='Loing Client',Updated=TO_DATE('2012-10-19 13:44:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem pi SET PrintName='Loing Client', Name='Loing Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200186) +; + +-- Oct 19, 2012 1:46:13 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET IsKey='Y', IsUpdateable='N', IsAllowCopy='N',Updated=TO_DATE('2012-10-19 13:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200706,'Y',200650,'N','D','Login Org','N','Y','b40af732-2db2-4cac-aa21-1149a50b106b',100,0,TO_DATE('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200650 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200705,'Y',200651,'N','The User identifies a unique user in the system. This could be an internal user or a business partner contact','D','User within the system - Internal or Business Partner Contact','User/Contact','N','Y','4dc92524-ada7-4797-9501-54e662606e48',100,0,TO_DATE('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200651 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200606 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=200647 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + + + + +-- Oct 19, 2012 2:02:21 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-10-19 14:02:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:04:08 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276, AD_Reference_ID=18,Updated=TO_DATE('2012-10-19 14:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:04:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=130,Updated=TO_DATE('2012-10-19 14:04:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:05:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276,Updated=TO_DATE('2012-10-19 14:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_SessionInfo_v_ID',200190,'D','AD_SessionInfo_v','AD_SessionInfo_v','388c863c-f3a7-4645-8591-6e1604e725e8',0,TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200190 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200707,'D','N','N','N','N',10,'N',13,'Y',200190,'49302e65-9959-4cd4-8604-bc83ca508df0','N','N','N','AD_SessionInfo_v_ID','AD_SessionInfo_v',100,TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200707 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid) VALUES ('N',200025,10,'N','N',200707,'Y',200652,'N','D','AD_SessionInfo_v','N','N','d5552148-760e-4df8-a701-1c768670718f',100,0,TO_DATE('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),'Y','N') +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200652 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('ad_sessioninfo_v_uu',200191,'D','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu','c84d427a-3b7b-479a-82e2-7dd40d061ff6',0,TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200191 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200708,'D','N','N','N','N',36,'N',10,'N',200191,'2aeb7648-a543-4a73-af45-87b3b6096a1a','N','N','N','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu',100,TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200708 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200708,'Y',200653,'N','D','ad_sessioninfo_v_uu','N','Y','008aae2b-0106-44a8-a6a1-bbec08dba31a',100,0,TO_DATE('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200653 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:34:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200653 +; + SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual diff --git a/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql b/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql index abdd1dbe48..e5c9a2c69a 100644 --- a/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql +++ b/migration/360lts-release/postgresql/935_IDEMPIERE-293.sql @@ -1,8 +1,9 @@ CREATE OR REPLACE VIEW ad_sessioninfo_v AS - SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, s.ad_org_id, s.isactive, + SELECT s.ad_session_id, 0::numeric(10,0) AS ad_client_id, 0::numeric(10,0) AS ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.websession, s.remote_addr, s.remote_host, s.ad_role_id, s.logindate, s.ad_session_uu, - s.servername, s.ad_client_id AS login_client_id + s.servername, s.ad_client_id AS login_client_id,createdby as ad_user_id,s.ad_org_id as login_org_id,s.ad_session_id as ad_sessioninfo_v_id, + s.ad_session_uu as ad_sessioninfo_v_uu FROM ad_session s WHERE s.processed = 'N'::bpchar; @@ -180,7 +181,7 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien -- Oct 11, 2012 6:13:32 PM PDT -- IDEMPIERE-293-List of logged users -INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',1000006,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200602,'D','N','N','N','N',40,'Y',10,'N',200182,'992d57b8-76ef-45a8-8dd7-0226cb17b3e4','N','Y','N','ServerName','Server name',100,TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-11 18:13:29','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- Oct 11, 2012 6:13:32 PM PDT @@ -805,7 +806,399 @@ DELETE FROM AD_Reference_Trl WHERE AD_Reference_ID=200013 DELETE FROM AD_Reference WHERE AD_Reference_ID=200013 ; +-- Oct 19, 2012 1:35:06 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200705,'D','N','N','N','N',10,'N',19,'N',138,'f1336921-57f1-4fe8-8c12-543d2b4a49bf','N','N','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact',100,TO_TIMESTAMP('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 13:35:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; +-- Oct 19, 2012 1:35:07 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200705 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('login_org_id',200189,'D','login_org_id','login_org_id','a5353900-dd61-4d08-8a16-ff00125c61cd',0,TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 1:40:53 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200189 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200706,'D','N','N','N','N',10,'N',19,'N',200189,'f6a3b130-de25-4cbd-802f-560435d2cbab','N','N','N','login_org_id','login_org_id',100,TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 13:40:45','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 1:40:59 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200706 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Login Org', PrintName='Login Org',Updated=TO_TIMESTAMP('2012-10-19 13:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL, AD_Element_ID=200189 WHERE UPPER(ColumnName)='LOGIN_ORG_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_org_id', Name='Login Org', Description=NULL, Help=NULL WHERE AD_Element_ID=200189 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:02 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Login Org', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200189) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:03 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem SET PrintName='Login Org', Name='Login Org' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200189) +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element SET Name='Loing Client', PrintName='Loing Client',Updated=TO_TIMESTAMP('2012-10-19 13:44:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL, AD_Element_ID=200186 WHERE UPPER(ColumnName)='LOGIN_CLIENT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Process_Para SET ColumnName='login_client_id', Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Element_ID=200186 AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET Name='Loing Client', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200186) AND IsCentrallyMaintained='Y' +; + +-- Oct 19, 2012 1:44:52 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_PrintFormatItem SET PrintName='Loing Client', Name='Loing Client' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200186) +; + +-- Oct 19, 2012 1:46:13 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET IsKey='Y', IsUpdateable='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-10-19 13:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200706,'Y',200650,'N','D','Login Org','N','Y','b40af732-2db2-4cac-aa21-1149a50b106b',100,0,TO_TIMESTAMP('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 13:46:38','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:39 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200650 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,10,'N','N',200705,'Y',200651,'N','The User identifies a unique user in the system. This could be an internal user or a business partner contact','D','User within the system - Internal or Business Partner Contact','User/Contact','N','Y','4dc92524-ada7-4797-9501-54e662606e48',100,0,TO_TIMESTAMP('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 13:46:39','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 1:46:40 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200651 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200606 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=200647 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=110,IsDisplayedGrid='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:50:04 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=120,IsDisplayedGrid='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200608 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 1:51:55 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200609 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200610 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200651 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200611 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200607 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200646 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200614 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200604 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200613 +; + +-- Oct 19, 2012 2:01:01 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200605 +; + +-- Oct 19, 2012 2:02:21 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-10-19 14:02:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200650 +; + +-- Oct 19, 2012 2:04:08 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276, AD_Reference_ID=18,Updated=TO_TIMESTAMP('2012-10-19 14:04:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:04:49 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=130,Updated=TO_TIMESTAMP('2012-10-19 14:04:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:05:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Column SET AD_Reference_Value_ID=276,Updated=TO_TIMESTAMP('2012-10-19 14:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200706 +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_SessionInfo_v_ID',200190,'D','AD_SessionInfo_v','AD_SessionInfo_v','388c863c-f3a7-4645-8591-6e1604e725e8',0,TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:10:54 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200190 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200707,'D','N','N','N','N',10,'N',13,'Y',200190,'49302e65-9959-4cd4-8604-bc83ca508df0','N','N','N','AD_SessionInfo_v_ID','AD_SessionInfo_v',100,TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 14:10:47','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:10:55 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200707 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid) VALUES ('N',200025,10,'N','N',200707,'Y',200652,'N','D','AD_SessionInfo_v','N','N','d5552148-760e-4df8-a701-1c768670718f',100,0,TO_TIMESTAMP('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 14:12:45','YYYY-MM-DD HH24:MI:SS'),'Y','N') +; + +-- Oct 19, 2012 2:12:49 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200652 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('ad_sessioninfo_v_uu',200191,'D','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu','c84d427a-3b7b-479a-82e2-7dd40d061ff6',0,TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200191 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,200025,200708,'D','N','N','N','N',36,'N',10,'N',200191,'2aeb7648-a543-4a73-af45-87b3b6096a1a','N','N','N','ad_sessioninfo_v_uu','ad_sessioninfo_v_uu',100,TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-19 14:32:49','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Oct 19, 2012 2:32:50 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200708 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200025,36,'N','N',200708,'Y',200653,'N','D','ad_sessioninfo_v_uu','N','Y','008aae2b-0106-44a8-a6a1-bbec08dba31a',100,0,TO_TIMESTAMP('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-10-19 14:33:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Oct 19, 2012 2:33:58 PM IST +-- IDEMPIERE-293 List of Active Session +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200653 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:34:16 PM IST +-- IDEMPIERE-293 List of Active Session +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200653 SELECT register_migration_script('935_IDEMPIERE-293.sql') FROM dual ; From 44d6da7dd8c9e482f85299470cadfc68bb6e77a4 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 19 Oct 2012 20:44:11 +0800 Subject: [PATCH 6/9] iDempiere IDEMPIERE-234 Configure Toolbar. - Added AD_Column.IsToolbarButton to support column button as part of toolbar instead of as field. - Added API to support dialog implementation of AD_Form. --- db/ddlutils/oracle/views/AD_FIELD_V.sql | 2 +- db/ddlutils/oracle/views/AD_FIELD_VT.sql | 2 +- db/ddlutils/postgresql/views/AD_FIELD_V.sql | 2 +- db/ddlutils/postgresql/views/AD_FIELD_VT.sql | 2 +- .../oracle/938_IDEMPIERE-234.sql | 365 ++++++++++++++++++ .../postgresql/938_IDEMPIERE-234.sql | 351 +++++++++++++++++ .../src/org/adempiere/webui/WArchive.java | 2 +- .../adempiere/webui/adwindow/ADTabpanel.java | 44 +++ .../webui/adwindow/ADWindowToolbar.java | 11 + .../adwindow/AbstractADWindowContent.java | 25 +- .../webui/adwindow/CompositeADTabbox.java | 3 + .../adempiere/webui/adwindow/DetailPane.java | 75 +++- .../webui/adwindow/GridTabRowRenderer.java | 31 +- .../adempiere/webui/adwindow/GridView.java | 34 +- .../webui/adwindow/ProcessButtonPopup.java | 42 ++ .../adempiere/webui/apps/wf/WWFActivity.java | 3 +- .../org/adempiere/webui/component/Window.java | 28 +- .../webui/desktop/AbstractDesktop.java | 21 +- .../webui/desktop/TabbedDesktop.java | 17 +- .../adempiere/webui/editor/WButtonEditor.java | 11 + .../webui/event/ToolbarListener.java | 2 + .../src/org/adempiere/webui/panel/ADForm.java | 8 + 22 files changed, 1042 insertions(+), 39 deletions(-) create mode 100644 migration/360lts-release/oracle/938_IDEMPIERE-234.sql create mode 100644 migration/360lts-release/postgresql/938_IDEMPIERE-234.sql create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java diff --git a/db/ddlutils/oracle/views/AD_FIELD_V.sql b/db/ddlutils/oracle/views/AD_FIELD_V.sql index 7be05843f5..9d7ca395d9 100644 --- a/db/ddlutils/oracle/views/AD_FIELD_V.sql +++ b/db/ddlutils/oracle/views/AD_FIELD_V.sql @@ -19,7 +19,7 @@ CREATE OR REPLACE VIEW AD_FIELD_V AS c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, f.isdisplayedgrid, f.seqnogrid, - c.seqnoselection, f.xposition, f.columnspan, f.numlines + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton FROM AD_FIELD f INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID) LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID) diff --git a/db/ddlutils/oracle/views/AD_FIELD_VT.sql b/db/ddlutils/oracle/views/AD_FIELD_VT.sql index 550477edbc..b84f819d03 100644 --- a/db/ddlutils/oracle/views/AD_FIELD_VT.sql +++ b/db/ddlutils/oracle/views/AD_FIELD_VT.sql @@ -18,7 +18,7 @@ CREATE OR REPLACE VIEW AD_FIELD_VT AS c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, f.isdisplayedgrid, f.seqnogrid, - c.seqnoselection, f.xposition, f.columnspan, f.numlines + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton FROM AD_FIELD f INNER JOIN AD_FIELD_TRL trl ON (f.AD_Field_ID = trl.AD_Field_ID) INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID) diff --git a/db/ddlutils/postgresql/views/AD_FIELD_V.sql b/db/ddlutils/postgresql/views/AD_FIELD_V.sql index cf3bc20218..1b483d739a 100644 --- a/db/ddlutils/postgresql/views/AD_FIELD_V.sql +++ b/db/ddlutils/postgresql/views/AD_FIELD_V.sql @@ -15,7 +15,7 @@ CREATE OR REPLACE VIEW ad_field_v AS COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, f.isdisplayedgrid, f.seqnogrid, - c.seqnoselection, f.xposition, f.columnspan, f.numlines + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton FROM ad_field f JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id diff --git a/db/ddlutils/postgresql/views/AD_FIELD_VT.sql b/db/ddlutils/postgresql/views/AD_FIELD_VT.sql index 2d15d0a1fc..c206131551 100644 --- a/db/ddlutils/postgresql/views/AD_FIELD_VT.sql +++ b/db/ddlutils/postgresql/views/AD_FIELD_VT.sql @@ -10,7 +10,7 @@ CREATE OR REPLACE VIEW ad_field_vt AS COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, f.isdisplayedgrid, f.seqnogrid, - c.seqnoselection, f.xposition, f.columnspan, f.numlines + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton FROM ad_field f JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id diff --git a/migration/360lts-release/oracle/938_IDEMPIERE-234.sql b/migration/360lts-release/oracle/938_IDEMPIERE-234.sql new file mode 100644 index 0000000000..c544c66a5a --- /dev/null +++ b/migration/360lts-release/oracle/938_IDEMPIERE-234.sql @@ -0,0 +1,365 @@ +-- Oct 19, 2012 2:04:03 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Element (ColumnName,AD_Client_ID,Created,Updated,EntityType,PrintName,AD_Element_UU,AD_Element_ID,Help,Name,Description,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsToolbarButton',0,TO_DATE('2012-10-19 14:04:01','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-19 14:04:01','YYYY-MM-DD HH24:MI:SS'),'D','Toolbar Button','3c610247-e801-43ff-a7f7-9540f04150fa',200187,'There IsToolbarButton check box indicates if this column button is part of the toolbar''s process button popup list or render as field.','Toolbar Button','Add the column button to the toolbar',0,100,100,'Y') +; + +-- Oct 19, 2012 2:04:03 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, PO_Description,PO_Help,PrintName,PO_Name,PO_PrintName,Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.PO_Description,t.PO_Help,t.PrintName,t.PO_Name,t.PO_PrintName,t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200187 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:06:09 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Column (Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,CreatedBy,Updated,AD_Org_ID,IsActive,IsAutocomplete,IsAllowLogging,Created,IsUpdateable,AD_Column_UU,IsAlwaysUpdateable,Help,IsAllowCopy,UpdatedBy,DefaultValue,IsEncrypted,ColumnName,Description,Name,AD_Client_ID,AD_Column_ID,SeqNoSelection) VALUES (1,101,'D','Y','N','N',0,'N',1,'N',20,'N','N',200187,100,TO_DATE('2012-10-19 14:06:08','YYYY-MM-DD HH24:MI:SS'),0,'Y','N','Y',TO_DATE('2012-10-19 14:06:08','YYYY-MM-DD HH24:MI:SS'),'Y','0a289e70-0e89-449c-b748-f337a6bff84e','N','There IsToolbarButton check box indicates if this column button is part of the toolbar''s process button popup list or render as field.','Y',100,'Y','N','IsToolbarButton','Add the column button to the toolbar','Toolbar Button',0,200703,0) +; + +-- Oct 19, 2012 2:06:09 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200703 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:09:23 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,Help,CreatedBy,Updated,EntityType,IsDisplayed,IsFieldOnly,IsDisplayedGrid,SeqNoGrid,AD_Field_UU,DisplayLength,DisplayLogic,Description,Name,IsActive,XPosition,ColumnSpan,NumLines) VALUES (0,'N',101,'N','N',200703,420,'Y',200648,'N',100,0,TO_DATE('2012-10-19 14:09:21','YYYY-MM-DD HH24:MI:SS'),0,'There IsToolbarButton check box indicates if this column button is part of the toolbar''s process button popup list or render as field.',100,TO_DATE('2012-10-19 14:09:21','YYYY-MM-DD HH24:MI:SS'),'D','Y','N','Y',400,'452b8d03-a4f0-4597-a30c-24e525f90590',0,'@AD_Reference_ID@=28','Add the column button to the toolbar','Toolbar Button','Y',2,1,1) +; + +-- Oct 19, 2012 2:09:23 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200648 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:09:37 PM MYT +-- IDEMPIERE-234 Configure Toolbar +ALTER TABLE AD_Column ADD IsToolbarButton CHAR(1) DEFAULT 'Y' CHECK (IsToolbarButton IN ('Y','N')) NOT NULL +; + +UPDATE AD_Column SET IsToolbarButton='N' WHERE AD_Reference_ID != 28; + +CREATE OR REPLACE VIEW AD_FIELD_V AS + SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID, + f.NAME, f.Description, f.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength, + f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly, + f.IsEncrypted AS IsEncryptedField, f.ObscureType, + c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, + COALESCE(f.DefaultValue, c.DefaultValue) AS DefaultValue, + c.IsKey, c.IsParent, + COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory, + c.IsIdentifier, c.IsTranslated, COALESCE(f.AD_Reference_Value_ID, c.AD_Reference_Value_ID) AS AD_Reference_Value_ID, + c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID, + COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID) AS AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable, + c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, + c.IsSelectionColumn, + tbl.TableName, c.ValueMin, c.ValueMax, + fg.NAME AS FieldGroup, vr.Code AS ValidationCode, + f.Included_Tab_ID, fg.FieldGroupType, fg.IsCollapsedByDefault, + COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass, + c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, + f.isdisplayedgrid, + f.seqnogrid, + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton +FROM AD_FIELD f + INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID) + LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID) + LEFT OUTER JOIN AD_COLUMN c ON (f.AD_Column_ID = c.AD_Column_ID) + INNER JOIN AD_TABLE tbl ON (c.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_REFERENCE r ON (c.AD_Reference_ID = r.AD_Reference_ID) + LEFT OUTER JOIN AD_VAL_RULE vr ON (vr.AD_Val_Rule_ID = COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID)) +WHERE f.IsActive = 'Y' + AND c.IsActive = 'Y'; + +CREATE OR REPLACE VIEW AD_FIELD_VT AS + SELECT trl.AD_LANGUAGE, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID, + trl.NAME, trl.Description, trl.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength, + f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly, + f.IsEncrypted AS IsEncryptedField, f.ObscureType, + c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, + COALESCE(f.DefaultValue, c.DefaultValue) AS DefaultValue, + c.IsKey, c.IsParent, + COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory, + c.IsIdentifier, c.IsTranslated, COALESCE(f.AD_Reference_Value_ID, c.AD_Reference_Value_ID) AS AD_Reference_Value_ID, + c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID, + COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID) as AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable, + c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, c.IsSelectionColumn, + tbl.TableName, c.ValueMin, c.ValueMax, + fgt.NAME AS FieldGroup, vr.Code AS ValidationCode, + f.Included_Tab_ID, fg.FieldGroupType, fg.IsCollapsedByDefault, + COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass, + c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, + f.isdisplayedgrid, + f.seqnogrid, + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton + FROM AD_FIELD f + INNER JOIN AD_FIELD_TRL trl ON (f.AD_Field_ID = trl.AD_Field_ID) + INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID) + LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID) + LEFT OUTER JOIN AD_FIELDGROUP_TRL fgt ON + (f.AD_FieldGroup_ID = fgt.AD_FieldGroup_ID AND trl.AD_LANGUAGE=fgt.AD_LANGUAGE) + LEFT OUTER JOIN AD_COLUMN c ON (f.AD_Column_ID = c.AD_Column_ID) + INNER JOIN AD_TABLE tbl ON (c.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_REFERENCE r ON (c.AD_Reference_ID = r.AD_Reference_ID) + LEFT OUTER JOIN AD_VAL_RULE vr ON (vr.AD_Val_Rule_ID=COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID)) + WHERE f.IsActive = 'Y' + AND c.IsActive = 'Y'; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=200648 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=54403 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=2574 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=2573 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=160 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=161 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=162 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=166 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=2370 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=169 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=10128 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=4941 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=50188 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=168 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=159 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=825 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=4940 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=200288 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=167 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=5121 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56317 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=62467 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=5122 +; + +-- Oct 19, 2012 8:18:29 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET XPosition=1,Updated=TO_DATE('2012-10-19 20:18:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54403 +; + +-- Oct 19, 2012 8:24:01 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=200648 +; + +-- Oct 19, 2012 8:24:01 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=171 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=170,IsDisplayedGrid='Y' WHERE AD_Field_ID=56374 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y' WHERE AD_Field_ID=2526 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=190,IsDisplayedGrid='Y' WHERE AD_Field_ID=200648 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=200,IsDisplayedGrid='Y' WHERE AD_Field_ID=171 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=210,IsDisplayedGrid='Y' WHERE AD_Field_ID=54403 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=220,IsDisplayedGrid='Y' WHERE AD_Field_ID=2574 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=230,IsDisplayedGrid='Y' WHERE AD_Field_ID=2573 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=240,IsDisplayedGrid='Y' WHERE AD_Field_ID=160 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=250,IsDisplayedGrid='Y' WHERE AD_Field_ID=161 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=260,IsDisplayedGrid='Y' WHERE AD_Field_ID=162 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=270,IsDisplayedGrid='Y' WHERE AD_Field_ID=166 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=280,IsDisplayedGrid='Y' WHERE AD_Field_ID=2370 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=290,IsDisplayedGrid='Y' WHERE AD_Field_ID=169 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=300,IsDisplayedGrid='Y' WHERE AD_Field_ID=10128 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=310,IsDisplayedGrid='Y' WHERE AD_Field_ID=4941 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y' WHERE AD_Field_ID=50188 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y' WHERE AD_Field_ID=168 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y' WHERE AD_Field_ID=159 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y' WHERE AD_Field_ID=825 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y' WHERE AD_Field_ID=4940 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=167 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=5121 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=390,IsDisplayedGrid='Y' WHERE AD_Field_ID=56317 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=400,IsDisplayedGrid='Y' WHERE AD_Field_ID=62467 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=410,IsDisplayedGrid='Y' WHERE AD_Field_ID=5122 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=420,IsDisplayedGrid='Y' WHERE AD_Field_ID=200288 +; + +SELECT register_migration_script('938_IDEMPIERE-234.sql') FROM dual +; diff --git a/migration/360lts-release/postgresql/938_IDEMPIERE-234.sql b/migration/360lts-release/postgresql/938_IDEMPIERE-234.sql new file mode 100644 index 0000000000..10507120f0 --- /dev/null +++ b/migration/360lts-release/postgresql/938_IDEMPIERE-234.sql @@ -0,0 +1,351 @@ +-- Oct 19, 2012 2:04:03 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Element (ColumnName,AD_Client_ID,Created,Updated,EntityType,PrintName,AD_Element_UU,AD_Element_ID,Help,Name,Description,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsToolbarButton',0,TO_TIMESTAMP('2012-10-19 14:04:01','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-19 14:04:01','YYYY-MM-DD HH24:MI:SS'),'D','Toolbar Button','3c610247-e801-43ff-a7f7-9540f04150fa',200187,'There IsToolbarButton check box indicates if this column button is part of the toolbar''s process button popup list or render as field.','Toolbar Button','Add the column button to the toolbar',0,100,100,'Y') +; + +-- Oct 19, 2012 2:04:03 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, PO_Description,PO_Help,PrintName,PO_Name,PO_PrintName,Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.PO_Description,t.PO_Help,t.PrintName,t.PO_Name,t.PO_PrintName,t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200187 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 19, 2012 2:06:09 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Column (Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,CreatedBy,Updated,AD_Org_ID,IsActive,IsAutocomplete,IsAllowLogging,Created,IsUpdateable,AD_Column_UU,IsAlwaysUpdateable,Help,IsAllowCopy,UpdatedBy,DefaultValue,IsEncrypted,ColumnName,Description,Name,AD_Client_ID,AD_Column_ID,SeqNoSelection) VALUES (1,101,'D','Y','N','N',0,'N',1,'N',20,'N','N',200187,100,TO_TIMESTAMP('2012-10-19 14:06:08','YYYY-MM-DD HH24:MI:SS'),0,'Y','N','Y',TO_TIMESTAMP('2012-10-19 14:06:08','YYYY-MM-DD HH24:MI:SS'),'Y','0a289e70-0e89-449c-b748-f337a6bff84e','N','There IsToolbarButton check box indicates if this column button is part of the toolbar''s process button popup list or render as field.','Y',100,'Y','N','IsToolbarButton','Add the column button to the toolbar','Toolbar Button',0,200703,0) +; + +-- Oct 19, 2012 2:06:09 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200703 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 19, 2012 2:09:23 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,Help,CreatedBy,Updated,EntityType,IsDisplayed,IsFieldOnly,IsDisplayedGrid,SeqNoGrid,AD_Field_UU,DisplayLength,DisplayLogic,Description,Name,IsActive,XPosition,ColumnSpan,NumLines) VALUES (0,'N',101,'N','N',200703,420,'Y',200648,'N',100,0,TO_TIMESTAMP('2012-10-19 14:09:21','YYYY-MM-DD HH24:MI:SS'),0,'There IsToolbarButton check box indicates if this column button is part of the toolbar''s process button popup list or render as field.',100,TO_TIMESTAMP('2012-10-19 14:09:21','YYYY-MM-DD HH24:MI:SS'),'D','Y','N','Y',400,'452b8d03-a4f0-4597-a30c-24e525f90590',0,'@AD_Reference_ID@=28','Add the column button to the toolbar','Toolbar Button','Y',2,1,1) +; + +-- Oct 19, 2012 2:09:23 PM MYT +-- IDEMPIERE-234 Configure Toolbar +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200648 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 19, 2012 2:09:37 PM MYT +-- IDEMPIERE-234 Configure Toolbar +ALTER TABLE AD_Column ADD COLUMN IsToolbarButton CHAR(1) DEFAULT 'Y' CHECK (IsToolbarButton IN ('Y','N')) NOT NULL +; + +UPDATE AD_Column SET IsToolbarButton='N' WHERE AD_Reference_ID != 28; + +CREATE OR REPLACE VIEW ad_field_v AS + SELECT t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, + f.name, f.description, f.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno, + f.sortno, f.issameline, f.isheading, f.isfieldonly, f.isreadonly, f.isencrypted AS isencryptedfield, + f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, + COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue, c.iskey, c.isparent, + COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated, + COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id, c.callout, + COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id, + COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, + c.isalwaysupdateable, c.readonlylogic, c.mandatorylogic, c.isupdateable, + c.isencrypted AS isencryptedcolumn, c.isselectioncolumn, tbl.tablename, c.valuemin, c.valuemax, + fg.name AS fieldgroup, vr.code AS validationcode, f.included_tab_id, fg.fieldgrouptype, fg.iscollapsedbydefault, + COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete, + COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, + f.isdisplayedgrid, + f.seqnogrid, + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton + FROM ad_field f + JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id + LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id + LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id + JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id + JOIN ad_reference r ON c.ad_reference_id = r.ad_reference_id + LEFT JOIN ad_val_rule vr ON vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) + WHERE f.isactive = 'Y'::bpchar AND c.isactive = 'Y'::bpchar; + +CREATE OR REPLACE VIEW ad_field_vt AS + SELECT trl.ad_language, t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, trl.name, trl.description, + trl.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno, f.sortno, f.issameline, f.isheading, f.isfieldonly, f.isreadonly, + f.isencrypted AS isencryptedfield, f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue, + c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated, + COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id, c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id, + COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, c.isalwaysupdateable, c.readonlylogic, c.mandatorylogic, c.isupdateable, + c.isencrypted AS isencryptedcolumn, c.isselectioncolumn, tbl.tablename, c.valuemin, c.valuemax, fgt.name AS fieldgroup, vr.code AS validationcode, + f.included_tab_id, fg.fieldgrouptype, fg.iscollapsedbydefault, COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete, + COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy, + f.isdisplayedgrid, + f.seqnogrid, + c.seqnoselection, f.xposition, f.columnspan, f.numlines, c.isToolbarButton + FROM ad_field f + JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id + JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id + LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id + LEFT JOIN ad_fieldgroup_trl fgt ON f.ad_fieldgroup_id = fgt.ad_fieldgroup_id AND trl.ad_language::text = fgt.ad_language::text + LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id + JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id + JOIN ad_reference r ON c.ad_reference_id = r.ad_reference_id + LEFT JOIN ad_val_rule vr ON vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) + WHERE f.isactive = 'Y'::bpchar AND c.isactive = 'Y'::bpchar; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=200648 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=54403 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=2574 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=2573 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=160 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=161 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=162 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=166 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=2370 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=169 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=10128 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=4941 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=50188 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=168 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=159 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=825 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=4940 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=200288 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=167 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=5121 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56317 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=62467 +; + +-- Oct 19, 2012 8:15:51 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=5122 +; + +-- Oct 19, 2012 8:18:29 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET XPosition=1,Updated=TO_TIMESTAMP('2012-10-19 20:18:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54403 +; + +-- Oct 19, 2012 8:24:01 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=200648 +; + +-- Oct 19, 2012 8:24:01 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=171 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=170,IsDisplayedGrid='Y' WHERE AD_Field_ID=56374 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y' WHERE AD_Field_ID=2526 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=190,IsDisplayedGrid='Y' WHERE AD_Field_ID=200648 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=200,IsDisplayedGrid='Y' WHERE AD_Field_ID=171 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=210,IsDisplayedGrid='Y' WHERE AD_Field_ID=54403 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=220,IsDisplayedGrid='Y' WHERE AD_Field_ID=2574 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=230,IsDisplayedGrid='Y' WHERE AD_Field_ID=2573 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=240,IsDisplayedGrid='Y' WHERE AD_Field_ID=160 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=250,IsDisplayedGrid='Y' WHERE AD_Field_ID=161 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=260,IsDisplayedGrid='Y' WHERE AD_Field_ID=162 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=270,IsDisplayedGrid='Y' WHERE AD_Field_ID=166 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=280,IsDisplayedGrid='Y' WHERE AD_Field_ID=2370 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=290,IsDisplayedGrid='Y' WHERE AD_Field_ID=169 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=300,IsDisplayedGrid='Y' WHERE AD_Field_ID=10128 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=310,IsDisplayedGrid='Y' WHERE AD_Field_ID=4941 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=320,IsDisplayedGrid='Y' WHERE AD_Field_ID=50188 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y' WHERE AD_Field_ID=168 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y' WHERE AD_Field_ID=159 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y' WHERE AD_Field_ID=825 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y' WHERE AD_Field_ID=4940 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=167 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=5121 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=390,IsDisplayedGrid='Y' WHERE AD_Field_ID=56317 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=400,IsDisplayedGrid='Y' WHERE AD_Field_ID=62467 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=410,IsDisplayedGrid='Y' WHERE AD_Field_ID=5122 +; + +-- Oct 19, 2012 8:25:00 PM MYT +-- IDEMPIERE-234 Configure Toolbar +UPDATE AD_Field SET SeqNoGrid=420,IsDisplayedGrid='Y' WHERE AD_Field_ID=200288 +; + +SELECT register_migration_script('938_IDEMPIERE-234.sql') FROM dual +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java index f64cd1bb46..451c217a65 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java @@ -165,7 +165,7 @@ public class WArchive implements EventListener else // all Reports av.query(true, m_AD_Table_ID, 0); - form.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED); + form.setAttribute(Window.MODE_KEY, form.getWindowMode()); SessionManager.getAppDesktop().showWindow(form); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 6f4324e594..420c48cdfb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -102,6 +102,8 @@ DataStatusListener, IADTabpanel public static final String ON_ACTIVATE_EVENT = "onActivate"; + public static final String ON_DYNAMIC_DISPLAY_EVENT = "onDynamicDisplay"; + private static final String ATTR_ON_ACTIVATE_POSTED = "org.adempiere.webui.adwindow.ADTabpanel.onActivatePosted"; /** @@ -393,6 +395,22 @@ DataStatusListener, IADTabpanel if (!field.isDisplayed()) continue; + if (field.isToolbarButton()) { + WButtonEditor editor = (WButtonEditor) WebEditorFactory.getEditor(gridTab, field, false); + + if (editor != null) { + if (windowPanel != null) + editor.addActionListener(windowPanel); + editor.setGridTab(this.getGridTab()); + editor.setADTabpanel(this); + field.addPropertyChangeListener(editor); + editors.add(editor); + editorComps.add(editor.getComponent()); + + continue; + } + } + // field group String fieldGroup = field.getFieldGroup(); if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)) // group changed @@ -692,7 +710,12 @@ DataStatusListener, IADTabpanel for (Group group : collapsedGroups) { group.setOpen(false); } + + if (listPanel.isVisible()) { + listPanel.dynamicDisplay(col); + } + Events.sendEvent(this, new Event(ON_DYNAMIC_DISPLAY_EVENT, this)); logger.config(gridTab.toString() + " - fini - " + (col<=0 ? "complete" : "seletive")); } // dynamicDisplay @@ -1172,5 +1195,26 @@ DataStatusListener, IADTabpanel } listPanel.setDetailPaneMode(detailPaneMode, vflex); } + + /** + * Get all visible button editors + * @return List + */ + public List getToolbarButtons() { + List buttonList = new ArrayList(); + if (isGridView()) { + buttonList = listPanel.getToolbarButtons(); + } else { + for(WEditor editor : editors) { + if (editor instanceof WButtonEditor && editor.getComponent() != null + && editor.getComponent().isVisible() + && editor.getGridField() != null + && editor.getGridField().isToolbarButton()) { + buttonList.add((WButtonEditor) editor); + } + } + } + return buttonList; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java index 7d1a47ca06..d7a1fcb11f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java @@ -86,6 +86,8 @@ public class ADWindowToolbar extends FToolbar implements EventListener private ToolBarButton btnCustomize; private ToolBarButton btnExport; + + private ToolBarButton btnProcess; private HashMap buttons = new HashMap(); @@ -163,6 +165,9 @@ public class ADWindowToolbar extends FToolbar implements EventListener btnCustomize= createButton("Customize", "Customize", "Customize"); btnCustomize.setDisabled(false); + btnProcess= createButton("Process", "Process", "Process"); + btnProcess.setDisabled(false); + // Help and Exit should always be enabled btnHelp.setDisabled(false); @@ -574,4 +579,10 @@ public class ADWindowToolbar extends FToolbar implements EventListener ToolBarMenuRestictionLoaded = true; } + public void enableProcessButton(boolean b) { + if (btnProcess != null) { + btnProcess.setDisabled(!b); + } + } + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 5bc47062fe..74c82dc9ea 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -533,6 +533,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements else { ADTabpanel fTabPanel = new ADTabpanel(); + fTabPanel.addEventListener(ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT, this); gTab.addDataStatusListener(this); fTabPanel.init(this, curWindowNo, gTab, gridWindow); adTabbox.addTab(gTab, fTabPanel); @@ -943,6 +944,13 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements onModalClose(dialog.getProcessInfo()); onRefresh(false, false); } + else if (ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT.equals(event.getName())) + { + ADTabpanel adtab = (ADTabpanel) event.getTarget(); + if (adtab == adTabbox.getSelectedTabpanel()) { + toolbar.enableProcessButton(adtab.getToolbarButtons().size() > 0); + } + } } private void setActiveTab(final int newTabIndex, final Callback callback) { @@ -2444,7 +2452,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements pi.setAD_Client_ID (Env.getAD_Client_ID(ctx)); ADForm form = ADForm.openForm(adFormID); form.setProcessInfo(pi); - form.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED); + form.setAttribute(Window.MODE_KEY, form.getWindowMode()); form.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT); SessionManager.getAppDesktop().showWindow(form); onRefresh(false, false); @@ -2515,6 +2523,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements public IADTabpanel findADTabpanel(WButtonEditor button) { IADTabpanel adtab = null; + if (button.getADTabpanel() != null) + return button.getADTabpanel(); + Component c = button.getComponent(); while (c != null) { if (c instanceof IADTabpanel) { @@ -2637,4 +2648,16 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } CustomizeGridViewDialog.showCustomize(0, adTabbox.getSelectedGridTab().getAD_Tab_ID(), columnsWidth,gridFieldIds,tabPanel.getGridView()); } + + /** + * @see org.adempiere.webui.event.ToolbarListener#onProcess() + */ + @Override + public void onProcess() { + ProcessButtonPopup popup = new ProcessButtonPopup(); + ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel(); + popup.render(adtab.getToolbarButtons()); + + LayoutUtils.openPopupWindow(toolbar.getButton("Process"), popup, "after_start"); + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java index 043dde7ba4..692002cdcb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java @@ -417,6 +417,7 @@ public class CompositeADTabbox extends AbstractADTabbox adtabpanel.addDetails(detailPane); detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane())); detailPane.setSelectedIndex(0); + activateDetailADTabpanel(); } headerTab.setDetailPaneMode(false, isUseVflexForDetailPane()); @@ -644,6 +645,8 @@ public class CompositeADTabbox extends AbstractADTabbox if (tabPanel instanceof ADSortTab) { detailPane.invalidate(); detailPane.updateToolbar(false, true); + } else { + tabPanel.dynamicDisplay(0); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index d9fb1ce435..e035967e28 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -51,6 +51,7 @@ public class DetailPane extends Panel implements EventListener { private static final String DELETE_IMAGE = "/images/Delete16.png"; private static final String EDIT_IMAGE = "/images/EditRecord16.png"; private static final String NEW_IMAGE = "/images/New16.png"; + private static final String PROCESS_IMAGE = "/images/Process16.png"; /** * generated serial id @@ -143,6 +144,27 @@ public class DetailPane extends Panel implements EventListener { tab.setSclass("adwindow-detailpane-sub-tab"); } + tab.addEventListener(Events.ON_DOUBLE_CLICK, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + Tab tab = (Tab) event.getTarget(); + if (!tab.isSelected()) + return; + org.zkoss.zul.Tabpanel zkTabpanel = tab.getLinkedPanel(); + ADTabpanel adtab = null; + for(Component c : zkTabpanel.getChildren()) { + if (c instanceof ADTabpanel) { + adtab = (ADTabpanel) c; + break; + } + } + if (adtab != null && adtab.getGridView() != null + && adtab.getGridView().isDetailPaneMode()) { + onEdit(); + } + } + }); + Tabpanels tabpanels = tabbox.getTabpanels(); if (tabpanels == null) { tabpanels = new Tabpanels(); @@ -191,6 +213,17 @@ public class DetailPane extends Panel implements EventListener { }); button.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Delete"))); + button = new ToolBarButton(); + button.setImage(PROCESS_IMAGE); + toolbar.appendChild(button); + button.addEventListener(Events.ON_CLICK, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + onProcess(event.getTarget()); + } + }); + button.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Process"))); + Hbox messageContainer = new Hbox(); messageContainer.setPack("end"); messageContainer.setAlign("center"); @@ -203,9 +236,9 @@ public class DetailPane extends Panel implements EventListener { tabPanel.setAttribute("AD_Tab_ID", tabLabel.AD_Tab_ID); tp.appendChild(tabPanel); - if (tabPanel instanceof ADTabpanel) { - ADTabpanel adtab = (ADTabpanel) tabPanel; - adtab.getGridView().addEventListener(ON_EDIT_EVENT, new EventListener() { + if (tabPanel.getGridView() != null) { + tabPanel.addEventListener(ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT, this); + tabPanel.getGridView().addEventListener(ON_EDIT_EVENT, new EventListener() { @Override public void onEvent(Event event) throws Exception { GridView gridView = (GridView) event.getTarget(); @@ -216,6 +249,14 @@ public class DetailPane extends Panel implements EventListener { } } + protected void onProcess(Component button) { + ProcessButtonPopup popup = new ProcessButtonPopup(); + ADTabpanel adtab = (ADTabpanel) getSelectedADTabpanel(); + popup.render(adtab.getToolbarButtons()); + + LayoutUtils.openPopupWindow(button, popup, "after_start"); + } + public void setEventListener(EventListener listener) { eventListener = listener; } @@ -339,7 +380,9 @@ public class DetailPane extends Panel implements EventListener { createPopupContent(status); showPopup(error, messageContainer); - } + } else if (event.getName().equals(ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT)) { + updateProcessToolbar(); + } } protected void createPopupContent(String status) { @@ -416,6 +459,30 @@ public class DetailPane extends Panel implements EventListener { } } } + + private void updateProcessToolbar() { + int index = getSelectedIndex(); + if (index < 0 || index >= getTabcount()) return; + + Tabpanel tabpanel = tabbox.getTabpanel(index); + Toolbar toolbar = (Toolbar) tabpanel.getFirstChild(); + + IADTabpanel adtab = getADTabpanel(index); + + for(Component c : toolbar.getChildren()) { + if (c instanceof ToolBarButton) { + ToolBarButton btn = (ToolBarButton) c; + if (PROCESS_IMAGE.equals(btn.getImage())) { + if (adtab.getGridTab().isSortTab()) { + btn.setDisabled(true); + } else { + btn.setDisabled(((ADTabpanel)adtab).getToolbarButtons().isEmpty()); + } + break; + } + } + } + } public void onEdit() throws Exception { Event openEvent = new Event(ON_EDIT_EVENT, DetailPane.this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java index f5d56eba1b..0d63776195 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java @@ -76,6 +76,7 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt private int windowNo; private GridTabDataBinder dataBinder; private Map editors = new LinkedHashMap(); + private Map toolbarEditors = new LinkedHashMap(); private Paging paging; private Map> lookupCache = null; @@ -275,6 +276,13 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt return editorList; } + + public List getToolbarEditors() { + List editorList = new ArrayList(); + if (!toolbarEditors.isEmpty()) + editorList.addAll(toolbarEditors.values()); + return editorList; + } /** * @param paging @@ -411,10 +419,15 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt int colIndex = -1; for (int i = 0; i < columnCount; i++) { - if (editors.get(gridPanelFields[i]) == null) - editors.put(gridPanelFields[i], WebEditorFactory.getEditor(gridPanelFields[i], true)); + if (editors.get(gridPanelFields[i]) == null) { + WEditor editor = WebEditorFactory.getEditor(gridPanelFields[i], true); + editors.put(gridPanelFields[i], editor); + if (editor instanceof WButtonEditor) { + ((WButtonEditor)editor).addActionListener(buttonListener); + } + } - if (!gridPanelFields[i].isDisplayedGrid()) { + if (!gridPanelFields[i].isDisplayedGrid() || gridPanelFields[i].isToolbarButton()) { continue; } colIndex ++; @@ -443,6 +456,16 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt row.appendChild(div); } + for (GridField gridField : gridTabFields) { + if (gridField.isToolbarButton() && gridField.isDisplayed()) { + if (toolbarEditors.get(gridField) == null) { + WButtonEditor editor = (WButtonEditor) WebEditorFactory.getEditor(gridField, true); + toolbarEditors.put(gridField, editor); + editor.addActionListener(buttonListener); + } + } + } + if (rowIndex == gridTab.getCurrentRow()) { setCurrentRow(row); } @@ -506,7 +529,7 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt //skip indicator column int colIndex = 0; for (int i = 0; i < columnCount; i++) { - if (!gridPanelFields[i].isDisplayedGrid()) { + if (!gridPanelFields[i].isDisplayedGrid() || gridPanelFields[i].isToolbarButton()) { continue; } colIndex ++; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index b270602dee..e77074d15f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -28,6 +28,7 @@ import org.adempiere.webui.component.Columns; import org.adempiere.webui.component.EditorBox; import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.NumberBox; +import org.adempiere.webui.editor.WButtonEditor; import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.event.TouchEventHelper; import org.adempiere.webui.util.SortComparator; @@ -271,7 +272,7 @@ public class GridView extends Vbox implements EventListener int AD_Field_ID = Integer.parseInt(fieldIdStr); for(GridField gridField : tmpFields) { if (gridField.getAD_Field_ID() == AD_Field_ID) { - if(gridField.isDisplayedGrid()) + if(gridField.isDisplayedGrid() && !gridField.isToolbarButton()) fieldList.add(gridField); break; @@ -289,7 +290,7 @@ public class GridView extends Vbox implements EventListener ArrayList gridFieldList = new ArrayList(); for(GridField field:tmpFields){ - if(field.isDisplayedGrid()){ + if(field.isDisplayedGrid() && !field.isToolbarButton()) { gridFieldList.add(field); } } @@ -449,7 +450,7 @@ public class GridView extends Vbox implements EventListener int index = 0; for (int i = 0; i < numColumns; i++) { - if (gridField[i].isDisplayedGrid()) + if (gridField[i].isDisplayedGrid() && !gridField[i].isToolbarButton()) { colnames.put(index, gridField[i].getHeader()); index++; @@ -765,6 +766,9 @@ public class GridView extends Vbox implements EventListener { return; } + + if (renderer.getEditors().isEmpty()) + listbox.onInitRender(); // Selective if (col > 0) @@ -781,7 +785,13 @@ public class GridView extends Vbox implements EventListener boolean noData = gridTab.getRowCount() == 0; List list = renderer.getEditors(); - for (WEditor comp : list) + dynamicDisplayEditors(noData, list); + list = renderer.getToolbarEditors(); + dynamicDisplayEditors(noData, list); // all components + } + + private void dynamicDisplayEditors(boolean noData, List list) { + for (WEditor comp : list) { GridField mField = comp.getGridField(); if (mField != null) @@ -799,7 +809,7 @@ public class GridView extends Vbox implements EventListener comp.setVisible(mField.isDisplayedGrid()); } - } // all components + } } /** @@ -899,4 +909,18 @@ public class GridView extends Vbox implements EventListener } return details; } + + public List getToolbarButtons() { + List buttonList = new ArrayList(); + List editors = renderer.getToolbarEditors(); + for(WEditor editor : editors) { + if (editor instanceof WButtonEditor && editor.getComponent() != null && editor.getComponent().isVisible()) { + WButtonEditor btnEditor = (WButtonEditor) editor; + buttonList.add(btnEditor); + editor.setValue(editor.getGridField().getValue()); + btnEditor.setADTabpanel((IADTabpanel) this.getParent()); + } + } + return buttonList; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java new file mode 100644 index 0000000000..4bb1036351 --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ProcessButtonPopup.java @@ -0,0 +1,42 @@ +/** + * + */ +package org.adempiere.webui.adwindow; + +import java.util.List; + +import org.adempiere.webui.component.Window; +import org.adempiere.webui.editor.WButtonEditor; +import org.zkoss.zul.Vbox; + +/** + * @author hengsin + * + */ +public class ProcessButtonPopup extends Window { + + /** + * generated serial id + */ + private static final long serialVersionUID = 304878472233552113L; + + public void render(List editors) { + setSclass("toolbar-popup-window"); + //setWidth("250px"); + setHflex("min"); + setBorder("normal"); + + Vbox vbox = new Vbox(); + appendChild(vbox); + vbox.setSclass("toolbar-popup-window-cnt"); + vbox.setAlign("stretch"); + + for(WButtonEditor editor : editors) { + if (editor.getComponent().getPage() != null) { + editor.getComponent().detach(); + } + vbox.appendChild(editor.getComponent()); + } + } + +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index cba1db924b..1236352ed6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -587,7 +587,8 @@ public class WWFActivity extends ADForm implements EventListener { int AD_Form_ID = node.getAD_Form_ID(); - Window form = ADForm.openForm(AD_Form_ID); + ADForm form = ADForm.openForm(AD_Form_ID); + form.setAttribute(Window.MODE_KEY, form.getWindowMode()); AEnv.showWindow(form); } else diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Window.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Window.java index 410492b109..4a54f53044 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Window.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Window.java @@ -76,6 +76,30 @@ public class Window extends org.zkoss.zul.Window super.onPageDetached(page); Events.sendEvent(this, new Event(DialogEvents.ON_WINDOW_CLOSE, this, null)); } - - + + /** + * Get the window mode attribute + * @return Window.Mode + */ + public Mode getModeAttribute() { + Object modeValue = getAttribute(Window.MODE_KEY); + if (modeValue instanceof Mode) { + return (Mode) modeValue; + } + + final String mode = modeValue != null ? modeValue.toString() : Window.MODE_HIGHLIGHTED; + if (Window.MODE_EMBEDDED.equals(mode)) { + return Mode.EMBEDDED; + } else if (Window.MODE_HIGHLIGHTED.equals(mode)) { + return Mode.HIGHLIGHTED; + } else if (Window.MODE_MODAL.equals(mode)) { + return Mode.MODAL; + } else if (Window.MODE_OVERLAPPED.equals(mode)) { + return Mode.OVERLAPPED; + } else if (Window.MODE_POPUP.equals(mode)) { + return Mode.POPUP; + } else { + return Mode.HIGHLIGHTED; + } + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java index 7de1385727..86830f3b2c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java @@ -28,6 +28,7 @@ import org.compiere.util.Env; import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Window.Mode; /** * Base class for desktop implementation @@ -148,11 +149,9 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop */ public void showWindow(final Window win, final String pos) { - Object objMode = win.getAttribute(Window.MODE_KEY); - - final String mode = objMode != null ? objMode.toString() : Window.MODE_HIGHLIGHTED; + final Window.Mode windowMode = win.getModeAttribute(); - if (Window.MODE_MODAL.equals(mode)) + if (Mode.MODAL == windowMode) { if (pos != null) win.setPosition(pos); @@ -162,14 +161,14 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop { if (Executions.getCurrent() != null) { - showNonModalWindow(win, pos, mode); + showNonModalWindow(win, pos, windowMode); } else { Executions.schedule(getComponent().getDesktop(), new EventListener() { @Override public void onEvent(Event event) throws Exception { - showNonModalWindow(win, pos, mode); + showNonModalWindow(win, pos, windowMode); } }, new Event("onExecute")); } @@ -177,20 +176,20 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop } private void showNonModalWindow(final Window win, final String pos, - final String mode) { - if (Window.MODE_POPUP.equals(mode)) + final Mode mode) { + if (Mode.POPUP == mode) { showPopup(win, pos); } - else if (Window.MODE_OVERLAPPED.equals(mode)) + else if (Mode.OVERLAPPED == mode) { showOverlapped(win, pos); } - else if (Window.MODE_EMBEDDED.equals(mode)) + else if (Mode.EMBEDDED == mode) { showEmbedded(win); } - else if (Window.MODE_HIGHLIGHTED.equals(mode)) + else if (Mode.HIGHLIGHTED == mode) { showHighlighted(win, pos); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java index 73afe6ea71..8e09b54229 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java @@ -78,12 +78,17 @@ public abstract class TabbedDesktop extends AbstractDesktop { public ADForm openForm(int formId) { ADForm form = ADForm.openForm(formId); - DesktopTabpanel tabPanel = new DesktopTabpanel(); - form.setParent(tabPanel); - //do not show window title when open as tab - form.setTitle(null); - preOpenNewTab(); - windowContainer.addWindow(tabPanel, form.getFormName(), true); + if (Window.Mode.EMBEDDED == form.getWindowMode()) { + DesktopTabpanel tabPanel = new DesktopTabpanel(); + form.setParent(tabPanel); + //do not show window title when open as tab + form.setTitle(null); + preOpenNewTab(); + windowContainer.addWindow(tabPanel, form.getFormName(), true); + } else { + form.setAttribute(Window.MODE_KEY, form.getWindowMode()); + showWindow(form); + } return form; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java index 93b2c51d4d..87bdd3b169 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.logging.Level; +import org.adempiere.webui.adwindow.IADTabpanel; import org.adempiere.webui.component.Button; import org.adempiere.webui.event.ActionEvent; import org.adempiere.webui.event.ActionListener; @@ -71,6 +72,8 @@ public class WButtonEditor extends WEditor private GridField gridfield = null; private ArrayList actionListeners = new ArrayList(); + + private IADTabpanel adTabpanel; public WButtonEditor(GridField gridField) { @@ -284,4 +287,12 @@ public class WButtonEditor extends WEditor } } } + + public void setADTabpanel(IADTabpanel adTabpanel) { + this.adTabpanel = adTabpanel; + } + + public IADTabpanel getADTabpanel() { + return adTabpanel; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/event/ToolbarListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/event/ToolbarListener.java index ec53a8324a..cbb0d30787 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/event/ToolbarListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/event/ToolbarListener.java @@ -169,4 +169,6 @@ public interface ToolbarListener * Customize grid view. */ public void onCustomize(); + + public void onProcess(); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java index 07a91d9a1c..eeb1510c41 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ADForm.java @@ -397,4 +397,12 @@ public abstract class ADForm extends Window implements EventListener { return m_customForm; } + + /** + * Default to embedded mode, subclass may override this to open form in different mode + * @return Window mode + */ + public Mode getWindowMode() { + return Mode.EMBEDDED; + } } From c9c663dfa9ab2320284c6cb3cc5c7abffa8d9d3f Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 19 Oct 2012 20:45:19 +0800 Subject: [PATCH 7/9] iDempiere IDEMPIERE-234 Configure Toolbar. --- .../src/org/compiere/model/GridField.java | 5 ++ .../src/org/compiere/model/GridFieldVO.java | 4 ++ .../src/org/compiere/model/I_AD_Column.java | 26 ++++++++++ .../src/org/compiere/model/MColumn.java | 14 ++++-- .../src/org/compiere/model/X_AD_Column.java | 48 ++++++++++++++++++- 5 files changed, 93 insertions(+), 4 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index caf92e6aa1..a0ada2cd8f 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -1970,4 +1970,9 @@ public class GridField return m_vo.NumLines; } + public boolean isToolbarButton() + { + return m_vo.displayType == DisplayType.Button && m_vo.IsToolbarButton; + } + } // MField diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index eff9ee2293..3c62928b06 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -204,6 +204,8 @@ public class GridFieldVO implements Serializable vo.ColumnSpan=rs.getInt(i); else if (columnName.equalsIgnoreCase("NumLines")) vo.NumLines=rs.getInt(i); + else if (columnName.equalsIgnoreCase("IsToolbarButton")) + vo.IsToolbarButton = "Y".equals(rs.getString(i)); } if (vo.Header == null) vo.Header = vo.ColumnName; @@ -537,6 +539,8 @@ public class GridFieldVO implements Serializable public boolean IsAutocomplete = false; /* Allow copy - IDEMPIERE-67 - Carlos Ruiz - globalqss */ public boolean IsAllowCopy = false; + /** Toolbar Button **/ + public boolean IsToolbarButton = false; /** * Set Context including contained elements diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_Column.java b/org.adempiere.base/src/org/compiere/model/I_AD_Column.java index dca0298cfc..86b58bd9c0 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_Column.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_Column.java @@ -480,6 +480,19 @@ public interface I_AD_Column */ public String getIsSyncDatabase(); + /** Column name IsToolbarButton */ + public static final String COLUMNNAME_IsToolbarButton = "IsToolbarButton"; + + /** Set Toolbar Button. + * Add the column button to the toolbar + */ + public void setIsToolbarButton (boolean IsToolbarButton); + + /** Get Toolbar Button. + * Add the column button to the toolbar + */ + public boolean isToolbarButton(); + /** Column name IsTranslated */ public static final String COLUMNNAME_IsTranslated = "IsTranslated"; @@ -556,6 +569,19 @@ public interface I_AD_Column */ public int getSeqNo(); + /** Column name SeqNoSelection */ + public static final String COLUMNNAME_SeqNoSelection = "SeqNoSelection"; + + /** Set Selection Column Sequence. + * Selection Column Sequence + */ + public void setSeqNoSelection (int SeqNoSelection); + + /** Get Selection Column Sequence. + * Selection Column Sequence + */ + public int getSeqNoSelection(); + /** Column name Updated */ public static final String COLUMNNAME_Updated = "Updated"; diff --git a/org.adempiere.base/src/org/compiere/model/MColumn.java b/org.adempiere.base/src/org/compiere/model/MColumn.java index 624702cc6d..19faf0736d 100644 --- a/org.adempiere.base/src/org/compiere/model/MColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MColumn.java @@ -205,10 +205,18 @@ public class MColumn extends X_AD_Column else if (DisplayType.isDate (displayType)) setFieldLength(7); else - { - log.saveError("FillMandatory", Msg.getElement(getCtx(), "FieldLength")); - return false; + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), "FieldLength")); + return false; + } } + + if (displayType != DisplayType.Button) + { + if (isToolbarButton()) + { + setIsToolbarButton(false); + } } /** Views are not updateable diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_Column.java b/org.adempiere.base/src/org/compiere/model/X_AD_Column.java index 84d368c5e0..ca6a3748d5 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_Column.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_Column.java @@ -32,7 +32,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent /** * */ - private static final long serialVersionUID = 20110918L; + private static final long serialVersionUID = 20121019L; /** Standard Constructor */ public X_AD_Column (Properties ctx, int AD_Column_ID, String trxName) @@ -60,6 +60,8 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent setIsMandatory (false); setIsParent (false); setIsSelectionColumn (false); + setIsToolbarButton (true); +// Y setIsTranslated (false); setIsUpdateable (true); // Y @@ -742,6 +744,30 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent return (String)get_Value(COLUMNNAME_IsSyncDatabase); } + /** Set Toolbar Button. + @param IsToolbarButton + Add the column button to the toolbar + */ + public void setIsToolbarButton (boolean IsToolbarButton) + { + set_Value (COLUMNNAME_IsToolbarButton, Boolean.valueOf(IsToolbarButton)); + } + + /** Get Toolbar Button. + @return Add the column button to the toolbar + */ + public boolean isToolbarButton () + { + Object oo = get_Value(COLUMNNAME_IsToolbarButton); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set Translated. @param IsTranslated This column is translated @@ -858,6 +884,26 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent return ii.intValue(); } + /** Set Selection Column Sequence. + @param SeqNoSelection + Selection Column Sequence + */ + public void setSeqNoSelection (int SeqNoSelection) + { + set_Value (COLUMNNAME_SeqNoSelection, Integer.valueOf(SeqNoSelection)); + } + + /** Get Selection Column Sequence. + @return Selection Column Sequence + */ + public int getSeqNoSelection () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNoSelection); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Max. Value. @param ValueMax Maximum Value for a field From 1214a9a6c6b9b7e03c07fa173161f8b9422211c0 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 19 Oct 2012 23:24:19 +0800 Subject: [PATCH 8/9] iDempiere IDEMPIERE-234 Configurable Toolbar. Process button should be invisible for sort tab. --- .../adempiere/webui/adwindow/DetailPane.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index e035967e28..8a2a525aa6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -213,16 +213,18 @@ public class DetailPane extends Panel implements EventListener { }); button.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Delete"))); - button = new ToolBarButton(); - button.setImage(PROCESS_IMAGE); - toolbar.appendChild(button); - button.addEventListener(Events.ON_CLICK, new EventListener() { - @Override - public void onEvent(Event event) throws Exception { - onProcess(event.getTarget()); - } - }); - button.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Process"))); + if (!tabPanel.getGridTab().isSortTab()) { + button = new ToolBarButton(); + button.setImage(PROCESS_IMAGE); + toolbar.appendChild(button); + button.addEventListener(Events.ON_CLICK, new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + onProcess(event.getTarget()); + } + }); + button.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Process"))); + } Hbox messageContainer = new Hbox(); messageContainer.setPack("end"); From b3d3d04a51baeacd06a6f983e89e1b6aa867b9bd Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Sat, 20 Oct 2012 00:11:18 +0800 Subject: [PATCH 9/9] IDEMPIERE-369 Master Detail layout improvements. 1) Fixed selected tab in detailpane is wrong when navigate to parent tab that is more than 1 level up. 2) Fixed changes in sort tab not auto save when user navigate to another tab. 3) Fixed double click on sort tab doesn't maximized it. --- .../adempiere/webui/adwindow/ADSortTab.java | 30 +++++++++++++------ .../adempiere/webui/adwindow/ADTabpanel.java | 18 +++++++++++ .../adwindow/AbstractADWindowContent.java | 6 ++-- .../webui/adwindow/CompositeADTabbox.java | 23 +++++++------- .../adempiere/webui/adwindow/DetailPane.java | 9 +++--- .../adempiere/webui/adwindow/IADTabpanel.java | 6 ++++ 6 files changed, 61 insertions(+), 31 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index f5f69a7a88..a7e8f62084 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -139,6 +139,7 @@ public class ADSortTab extends Panel implements IADTabpanel private boolean uiCreated; private boolean active = false; private boolean isChanged; + private boolean detailPaneMode; /** * Dynamic Init @@ -698,15 +699,6 @@ public class ADSortTab extends Panel implements IADTabpanel } } // saveData - /* (non-Javadoc) - * @see org.compiere.grid.APanelTab#unregisterPanel() - */ - public void unregisterPanel () - { - saveData(); - adWindowPanel = null; - } // dispose - /** * List Item * @author Teo Sarca @@ -929,12 +921,32 @@ public class ADSortTab extends Panel implements IADTabpanel @Override public void setDetailPaneMode(boolean detailMode, boolean vflex) { + this.detailPaneMode = detailMode; this.setVflex(Boolean.toString(vflex)); } + + public boolean isDetailPaneMode() { + return this.detailPaneMode; + } @Override public GridView getGridView() { return null; } + + @Override + public boolean needSave(boolean rowChange, boolean onlyRealChange) { + return isChanged(); + } + + @Override + public boolean dataSave(boolean onSaveEvent) { + if (isChanged()) { + saveData(); + return isChanged() == false; + } else { + return true; + } + } } //ADSortTab diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 420c48cdfb..89eb939ee2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -159,6 +159,8 @@ DataStatusListener, IADTabpanel private Component detailPane; + private boolean detailPaneMode; + public static final String ON_TOGGLE_EVENT = "onToggle"; public ADTabpanel() @@ -1187,6 +1189,7 @@ DataStatusListener, IADTabpanel @Override public void setDetailPaneMode(boolean detailPaneMode, boolean vflex) { + this.detailPaneMode = detailPaneMode; if (detailPaneMode) { detailPane = null; this.setVflex("true"); @@ -1216,5 +1219,20 @@ DataStatusListener, IADTabpanel } return buttonList; } + + @Override + public boolean needSave(boolean rowChange, boolean onlyRealChange) { + return getGridTab().needSave(rowChange, onlyRealChange); + } + + @Override + public boolean dataSave(boolean onSaveEvent) { + return getGridTab().dataSave(onSaveEvent); + } + + @Override + public boolean isDetailPaneMode() { + return this.detailPaneMode; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 74c82dc9ea..d1bc076de0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -1627,10 +1627,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (dirtyTabpanel != null && dirtyTabpanel instanceof ADSortTab) { ADSortTab sortTab = (ADSortTab) dirtyTabpanel; - if (onNavigationEvent) - sortTab.unregisterPanel(); - else - sortTab.saveData(); + sortTab.saveData(); + if (!onNavigationEvent) { toolbar.enableSave(sortTab.isChanged()); // set explicitly diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java index 692002cdcb..9d51662cdc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java @@ -230,7 +230,7 @@ public class CompositeADTabbox extends AbstractADTabbox int oldIndex = (Integer) event.getData(); if (oldIndex != detailPane.getSelectedIndex()) { IADTabpanel prevTabPanel = detailPane.getADTabpanel(oldIndex); - if (prevTabPanel != null && prevTabPanel.getGridTab().needSave(true, true)) { + if (prevTabPanel != null && prevTabPanel.needSave(true, true)) { final int newIndex = detailPane.getSelectedIndex(); detailPane.setSelectedIndex(oldIndex); adWindowPanel.saveAndNavigate(new Callback() { @@ -243,6 +243,7 @@ public class CompositeADTabbox extends AbstractADTabbox } }); } else { + detailPane.setSelectedIndex(detailPane.getSelectedIndex()); onActivateDetail(tabPanel); } } else { @@ -571,13 +572,13 @@ public class CompositeADTabbox extends AbstractADTabbox @Override public boolean needSave(boolean rowChange, boolean onlyRealChange) { - boolean b = headerTab.getGridTab().needSave(rowChange, onlyRealChange); + boolean b = headerTab.needSave(rowChange, onlyRealChange); if (b) return b; IADTabpanel detailPanel = getSelectedDetailADTabpanel(); if (detailPanel != null) { - b = detailPanel.getGridTab().needSave(rowChange, onlyRealChange); + b = detailPanel.needSave(rowChange, onlyRealChange); } return b; @@ -601,14 +602,14 @@ public class CompositeADTabbox extends AbstractADTabbox @Override public boolean dataSave(boolean onSaveEvent) { IADTabpanel detail = getSelectedDetailADTabpanel(); - if (detail != null && !detail.getGridTab().isSortTab() && detail.getGridTab().needSave(true, true)) { + if (detail != null && detail.needSave(true, true)) { Execution execution = Executions.getCurrent(); if (execution != null) { execution.setAttribute(getClass().getName()+".dataAction", detail.getUuid()); } - return detail.getGridTab().dataSave(onSaveEvent); + return detail.dataSave(onSaveEvent); } - return headerTab.getGridTab().isSortTab() ? true : headerTab.getGridTab().dataSave(onSaveEvent); + return headerTab.dataSave(onSaveEvent); } @Override @@ -619,13 +620,9 @@ public class CompositeADTabbox extends AbstractADTabbox @Override public IADTabpanel getDirtyADTabpanel() { IADTabpanel detail = getSelectedDetailADTabpanel(); - if (detail != null && detail.getGridTab().needSave(true, true)) { + if (detail != null && detail.needSave(true, true)) { return detail; - } else if (detail != null && detail instanceof ADSortTab && ((ADSortTab)detail).isChanged()) { - return detail; - } else if (headerTab.getGridTab().needSave(true, true)) { - return headerTab; - } else if (headerTab instanceof ADSortTab && ((ADSortTab)headerTab).isChanged()) { + } else if (headerTab.needSave(true, true)) { return headerTab; } @@ -678,7 +675,7 @@ public class CompositeADTabbox extends AbstractADTabbox IADTabpanel adtab = detailPane.getADTabpanel(i); int index = (Integer) adtab.getAttribute(ADTAB_INDEX_ATTRIBUTE); if (index == tabIndex) { - if (!detailPane.isTabVisible(i)) { + if (!detailPane.isTabVisible(i) || !detailPane.isTabEnabled(i)) { return; } if (i != detailPane.getSelectedIndex()) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index 8a2a525aa6..dc08b2fefb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -151,15 +151,14 @@ public class DetailPane extends Panel implements EventListener { if (!tab.isSelected()) return; org.zkoss.zul.Tabpanel zkTabpanel = tab.getLinkedPanel(); - ADTabpanel adtab = null; + IADTabpanel adtab = null; for(Component c : zkTabpanel.getChildren()) { - if (c instanceof ADTabpanel) { - adtab = (ADTabpanel) c; + if (c instanceof IADTabpanel) { + adtab = (IADTabpanel) c; break; } } - if (adtab != null && adtab.getGridView() != null - && adtab.getGridView().isDetailPaneMode()) { + if (adtab != null && adtab.isDetailPaneMode()) { onEdit(); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java index 75a5a9b76c..3f86cc8ca1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java @@ -120,6 +120,12 @@ public interface IADTabpanel extends Component, Evaluatee { public boolean isActive(); public void setDetailPaneMode(boolean detailMode, boolean vflex); + + public boolean isDetailPaneMode(); public abstract GridView getGridView(); + + public boolean needSave(boolean rowChange, boolean onlyRealChange); + + public boolean dataSave(boolean onSaveEvent); }