hg merge release-4.1 (merge release4.1 into development)

This commit is contained in:
Carlos Ruiz 2017-09-08 16:05:42 +02:00
commit 84b9538c14
68 changed files with 1716 additions and 330 deletions

View File

@ -26,6 +26,13 @@ BEGIN
END;
$$ LANGUAGE plpgsql IMMUTABLE;
CREATE OR REPLACE FUNCTION trunc(datetime TIMESTAMP WITHOUT TIME ZONE)
RETURNS TIMESTAMP WITHOUT TIME ZONE AS $$
BEGIN
RETURN CAST(datetime AS DATE);
END;
$$ LANGUAGE plpgsql IMMUTABLE;
CREATE OR REPLACE FUNCTION trunc(datetime TIMESTAMP WITH TIME ZONE, format varchar)
RETURNS DATE AS $$
BEGIN

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3424 table m_movement / constraint cbpartnerlocation_mmovement incorrect
-- Jul 20, 2017 20:13:32 PM CEST
ALTER TABLE m_movement DROP CONSTRAINT cbpartnerlocation_mmovement
;
ALTER TABLE M_Movement ADD CONSTRAINT cbpartnerlocation_mmovement FOREIGN KEY (C_BPartner_Location_ID) REFERENCES c_bpartner_location(c_bpartner_location_id) DEFERRABLE INITIALLY DEFERRED
;
SELECT register_migration_script('201707202213_IDEMPIERE-3424.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- Jul 26, 2017 3:01:47 PM CEST
-- IDEMPIERE-1157 Adding functionality to add charts on the standard windows
UPDATE AD_Table SET AD_Window_ID=53124,Updated=TO_DATE('2017-07-26 15:01:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53282
;
SELECT register_migration_script('201707261502_ZoomDataSource.sql') FROM dual
;

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3443
-- Aug 3, 2017 2:01:39 PM CEST
UPDATE AD_Column SET Callout=NULL,Updated=TO_DATE('2017-08-03 14:01:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2187
;
-- Aug 3, 2017 2:02:05 PM CEST
UPDATE AD_Column SET Callout=NULL,Updated=TO_DATE('2017-08-03 14:02:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3500
;
SELECT register_migration_script('201708031402_IDEMPIERE-3443.sql') FROM dual
;

View File

@ -0,0 +1,245 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3446 Define the workflow approver dynamically
-- Aug 8, 2017 6:16:04 PM BRT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,Description,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200376,'Manual','Manual List',304,'M',0,0,'Y',TO_DATE('2017-08-08 18:16:03','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:03','YYYY-MM-DD HH24:MI:SS'),100,'D','a9c99476-070e-4377-960d-19dbe7dff024')
;
-- Aug 8, 2017 6:16:04 PM BRT
INSERT INTO AD_Table (AD_Table_ID,Name,Description,AD_Window_ID,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,IsChangeLog,ReplicationType,IsCentrallyMaintained,AD_Table_UU,Processing) VALUES (200226,'Workflow Activity Approver','Approvers of the Workflow Process Activity',298,'AD_WF_ActivityApprover',145,'7',0,0,'Y',TO_DATE('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','D','N','L','Y','e6e1ed38-4935-44cd-9740-b5c631062229','N')
;
-- Aug 8, 2017 6:16:05 PM BRT
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('AD_WF_ActivityApprover',1000000,'N','N','Table AD_WF_ActivityApprover','Y','Y',0,0,TO_DATE('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,200291,'Y',1000000,1,200000,'c6b5803d-773c-465c-8541-18c5e659bf44')
;
-- Aug 8, 2017 6:16:06 PM BRT
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203132,0,0,'Y',TO_DATE('2017-08-08 18:16:05','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:05','YYYY-MM-DD HH24:MI:SS'),100,'AD_WF_ActivityApprover_ID','Workflow Activity Approver','Workflow Activity Approver','D','559e0c04-8a72-42bf-a85f-37bb6cb2bbbd')
;
-- Aug 8, 2017 6:16:07 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213223,1,'Workflow Activity Approver',200226,'AD_WF_ActivityApprover_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_DATE('2017-08-08 18:16:07','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:07','YYYY-MM-DD HH24:MI:SS'),100,203132,'N','N','D','Y','N','N','Y','fee3c48f-1c60-4298-aac8-8bf8f028b13d','N','N','N','N')
;
-- Aug 8, 2017 6:16:08 PM BRT
CREATE TABLE AD_WF_ActivityApprover (AD_WF_ActivityApprover_ID NUMBER(10) NOT NULL, CONSTRAINT AD_WF_ActivityApprover_Key PRIMARY KEY (AD_WF_ActivityApprover_ID))
;
-- Aug 8, 2017 6:16:09 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213224,1,'Client','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.',200226,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_DATE('2017-08-08 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','D','Y','N','N','Y','78b69227-4782-40e4-ba68-2161894ec669','N','N','N','D')
;
-- Aug 8, 2017 6:16:09 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD AD_Client_ID NUMBER(10) NOT NULL
;
-- Aug 8, 2017 6:16:09 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213225,1,'Organization','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.',200226,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_DATE('2017-08-08 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','D','Y','N','N','Y','3f24f5a5-6841-4774-867b-58500aff75c8','N','N','N','D')
;
-- Aug 8, 2017 6:16:09 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD AD_Org_ID NUMBER(10) NOT NULL
;
-- Aug 8, 2017 6:16:10 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213226,1,'Created','Date this record was created','The Created field indicates the date that this record was created.',200226,'Created','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_DATE('2017-08-08 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','D','Y','N','N','Y','d47875c9-fbd3-49f9-a593-103918b68a51','N','N','N','N')
;
-- Aug 8, 2017 6:16:11 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD Created DATE DEFAULT SYSDATE NOT NULL
;
-- Aug 8, 2017 6:16:11 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213227,1,'Created By','User who created this records','The Created By field indicates the user who created this record.',200226,'CreatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_DATE('2017-08-08 18:16:11','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:11','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','D','Y','N','N','Y','4c14993e-fa5c-4680-be68-816680dbbd92','N','N','N','D')
;
-- Aug 8, 2017 6:16:11 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CreatedBy NUMBER(10) NOT NULL
;
-- Aug 8, 2017 6:16:12 PM BRT
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203133,0,0,'Y',TO_DATE('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,'AD_WF_ActivityApprover_UU','AD_WF_ActivityApprover_UU','AD_WF_ActivityApprover_UU','D','3d203220-d98b-4e35-bfb3-981bb8a31aee')
;
-- Aug 8, 2017 6:16:13 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213228,1.00,'AD_WF_ActivityApprover_UU',200226,'AD_WF_ActivityApprover_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_DATE('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,203133,'Y','N','D','Y','N','N','Y','ad670aa0-2b6a-484e-9696-7c922e6c4d62','N','N','N','N')
;
-- Aug 8, 2017 6:16:13 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD AD_WF_ActivityApprover_UU VARCHAR2(36) DEFAULT NULL
;
-- Aug 8, 2017 6:16:13 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CONSTRAINT AD_WF_ActivityApprover_UU_idx UNIQUE (AD_WF_ActivityApprover_UU)
;
-- Aug 8, 2017 6:16:14 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213229,1,'Active','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.',200226,'IsActive','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_DATE('2017-08-08 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','D','Y','N','N','Y','44103c1a-bb91-43d2-9a84-f129f784fc06','N','N','N','N')
;
-- Aug 8, 2017 6:16:14 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- Aug 8, 2017 6:16:15 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213230,1,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200226,'Updated','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_DATE('2017-08-08 18:16:14','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:14','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','D','Y','N','N','Y','c14b694f-2fd6-45cb-bf36-7c2911955e59','N','N','N','N')
;
-- Aug 8, 2017 6:16:15 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD Updated DATE DEFAULT SYSDATE NOT NULL
;
-- Aug 8, 2017 6:16:16 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213231,1,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200226,'UpdatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_DATE('2017-08-08 18:16:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:15','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','D','Y','N','N','Y','26992d33-c633-4372-80de-7b584316625e','N','N','N','D')
;
-- Aug 8, 2017 6:16:16 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD UpdatedBy NUMBER(10) NOT NULL
;
-- Aug 8, 2017 6:16:17 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintName,FKConstraintType) VALUES (213232,0,'Workflow Activity','Workflow Activity','The Workflow Activity is the actual Workflow Node in a Workflow Process instance',200226,'AD_WF_Activity_ID',22,'N','Y','Y','N','N',0,'N',19,0,0,'Y',TO_DATE('2017-08-08 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,2307,'N','N','D','Y','N','N','Y','5382008f-687c-4828-86cb-16226e32432c','Y',0,'N','N','ADWFActivity_ADWFActivityAppro','C')
;
-- Aug 8, 2017 6:16:17 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD AD_WF_Activity_ID NUMBER(10) NOT NULL
;
-- Aug 8, 2017 6:16:18 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintName,FKConstraintType) VALUES (213233,0,'User/Contact','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',200226,164,'AD_User_ID',22,'N','N','Y','N','N',0,'N',30,0,0,'Y',TO_DATE('2017-08-08 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,138,'Y','N','D','Y','N','N','Y','02bffd80-4df3-46fc-a426-1bc5b8fca3a9','Y',0,'N','N','ADUser_ADWFActivityApprover','N')
;
-- Aug 8, 2017 6:16:18 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD AD_User_ID NUMBER(10) NOT NULL
;
-- Aug 8, 2017 6:16:19 PM BRT
INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201058,'91502b94-7f41-4bc5-b7c7-08417ccf3ed1',TO_DATE('2017-08-08 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_WF_ActivityApprover01',TO_DATE('2017-08-08 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,200226,'N','Y','N','N','N')
;
-- Aug 8, 2017 6:16:19 PM BRT
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201345,'27b2b5cb-3191-4fb0-8ea1-36b843084fee',TO_DATE('2017-08-08 18:16:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-08 18:16:19','YYYY-MM-DD HH24:MI:SS'),100,213232,201058,10)
;
-- Aug 8, 2017 6:16:20 PM BRT
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201346,'bb95cfc3-7eaf-4b60-98bf-8ae309ce55a2',TO_DATE('2017-08-08 18:16:20','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-08 18:16:20','YYYY-MM-DD HH24:MI:SS'),100,213233,201058,20)
;
-- Aug 8, 2017 6:16:20 PM BRT
CREATE UNIQUE INDEX AD_WF_ActivityApprover01 ON AD_WF_ActivityApprover (AD_WF_Activity_ID,AD_User_ID)
;
-- Aug 8, 2017 6:16:21 PM BRT
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200230,'Approver',298,20,'Y',200226,0,0,'Y',TO_DATE('2017-08-08 18:16:21','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:21','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',1,'N','D','Y','N','4c965421-0c87-4703-b433-243991bd1628','B')
;
-- Aug 8, 2017 6:16:23 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205207,'AD_WF_ActivityApprover_UU',200230,213228,'N',36,0,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:22','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','04c2a8fc-dc5f-41e1-aa27-81a141d4c3f2','N',1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:24 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205208,'Workflow Activity Approver',200230,213223,'N',22,0,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:23','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:23','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f60eb7d8-0f3c-4ec7-bae6-51ae45e815fa','N',1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:25 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205209,'Client','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.',200230,213224,'Y',22,10,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','92ce5bb5-6a37-4091-b310-de5dcd9ce603','N',10,1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:26 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205210,'Organization','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.',200230,213225,'Y',22,20,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','50c4e884-caf0-4138-8bb3-280046ac0dc6','Y','N',20,4,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:27 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205211,'Workflow Activity','Workflow Activity','The Workflow Activity is the actual Workflow Node in a Workflow Process instance',200230,213232,'Y',22,30,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:26','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','448533e5-3dde-4782-a77b-f0c95ede180f','Y',30,1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:27 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205212,'User/Contact','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',200230,213233,'Y',22,40,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','cc73baef-8a0e-4dcd-b544-2ee9f1c419f3','Y',40,4,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:28 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205213,'Active','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.',200230,213229,'Y',1,50,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-08 18:16:28','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-08 18:16:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','194ceea8-bf9f-419b-b96d-6b7f16197e9c','Y',50,2,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:29 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CONSTRAINT ADWFActivity_ADWFActivityAppro FOREIGN KEY (AD_WF_Activity_ID) REFERENCES ad_wf_activity(ad_wf_activity_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
;
-- Aug 8, 2017 6:16:29 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CONSTRAINT ADUser_ADWFActivityApprover FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
;
-- Aug 8, 2017 6:39:27 PM BRT
UPDATE PA_DocumentStatus SET WhereClause='AD_WF_Activity.Processed=''N'' AND AD_WF_Activity.WFState=''OS'' AND (
/* Owner of Activity */
AD_WF_Activity.AD_User_ID=@#AD_User_ID@
/* Invoker (if no invoker = all) */
OR EXISTS (SELECT * FROM AD_WF_Responsible r WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID
AND r.ResponsibleType=''H'' AND COALESCE(r.AD_User_ID,0)=0 AND COALESCE(r.AD_Role_ID,0)=0 AND (AD_WF_Activity.AD_User_ID=@#AD_User_ID@ OR AD_WF_Activity.AD_User_ID IS NULL))
/* Responsible User */
OR EXISTS (SELECT * FROM AD_WF_Responsible r WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID
AND r.ResponsibleType=''H'' AND r.AD_User_ID=@#AD_User_ID@)
/* Responsible Role */
OR EXISTS (SELECT * FROM AD_WF_Responsible r INNER JOIN AD_User_Roles ur ON (r.AD_Role_ID=ur.AD_Role_ID)
WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND r.ResponsibleType=''R'' AND ur.AD_User_ID=@#AD_User_ID@ AND ur.isActive=''Y'')
/* Manual Responsible */
OR EXISTS (SELECT * FROM AD_WF_ActivityApprover r WHERE AD_WF_Activity.AD_WF_Activity_ID=r.AD_WF_Activity_ID AND r.AD_User_ID=@#AD_User_ID@ AND r.isActive=''Y'')
) AND AD_WF_Activity.AD_Client_ID=@#AD_Client_ID@',Updated=TO_DATE('2017-08-08 18:39:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200004
;
-- Aug 10, 2017 10:42:59 AM BRT
UPDATE AD_Tab SET SeqNo=40, AD_Column_ID=NULL, AD_Process_ID=NULL, AD_Image_ID=NULL, AD_ColumnSortYesNo_ID=NULL, AD_ColumnSortOrder_ID=NULL, Included_Tab_ID=NULL, Parent_Column_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_DATE('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=581
;
-- Aug 10, 2017 10:42:59 AM BRT
UPDATE AD_Tab SET SeqNo=50, AD_Process_ID=NULL, AD_Image_ID=NULL, AD_ColumnSortYesNo_ID=NULL, AD_ColumnSortOrder_ID=NULL, Included_Tab_ID=NULL, Parent_Column_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_DATE('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=582
;
-- Aug 10, 2017 10:43:00 AM BRT
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,DisplayLogic,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200231,'Approver',297,30,'Y',200226,0,0,'Y',TO_DATE('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','Y','N','N',2,'N','D','1=1','N','N','805402e4-3226-4e52-9926-0217c1af2c4c','B')
;
-- Aug 10, 2017 10:43:01 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205214,'AD_WF_ActivityApprover_UU',200231,213228,'N',36,0,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:00','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:00','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f37c320b-b7cb-46f3-a5f3-d66d4e26a8bd','N',1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:02 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205215,'Workflow Activity Approver',200231,213223,'N',22,0,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:01','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:01','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','eca0834e-a6b5-4d88-a80c-7c4115717154','N',1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:02 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205216,'Client','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.',200231,213224,'Y',22,10,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','7a92cab3-567a-4f67-b67e-48fcf561e8f5','Y',10,1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:03 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205217,'Organization','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.',200231,213225,'Y',22,20,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','f34baace-c472-475e-999c-623ae4449608','Y','Y',20,4,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:04 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205218,'Workflow Activity','Workflow Activity','The Workflow Activity is the actual Workflow Node in a Workflow Process instance',200231,213232,'Y',22,30,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0e4a2b1a-03f4-4af2-8cea-1497f31d1d0f','Y',30,1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:04 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205219,'User/Contact','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',200231,213233,'Y',22,40,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','16f0f237-049a-4ccd-a146-97f1909d986f','Y',40,4,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:05 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205220,'Active','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.',200231,213229,'Y',1,50,'N','N','N','N',0,0,'Y',TO_DATE('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','b62672fe-d27a-4ba7-a048-b344d74d6404','Y',50,2,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:05 AM BRT
UPDATE AD_Tab SET SeqNo=60, AD_Column_ID=NULL, AD_Process_ID=NULL, AD_Image_ID=NULL, AD_ColumnSortYesNo_ID=NULL, AD_ColumnSortOrder_ID=NULL, Included_Tab_ID=NULL, Parent_Column_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_DATE('2017-08-10 10:43:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=580
;
SELECT register_migration_script('201708081830_IDEMPIERE-3446.sql') FROM dual
;

View File

@ -0,0 +1,31 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3453
-- Aug 25, 2017 12:23:30 PM CEST
UPDATE AD_IndexColumn SET ColumnSQL='TRUNC(DateAcct)',Updated=TO_DATE('2017-08-25 12:23:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=200741
;
-- Aug 25, 2017 12:23:35 PM CEST
DROP INDEX fact_acct_trunc_dateacct
;
-- Aug 25, 2017 12:23:35 PM CEST
CREATE INDEX fact_acct_trunc_dateacct ON Fact_Acct (TRUNC(DateAcct))
;
-- Aug 25, 2017 12:27:32 PM CEST
UPDATE AD_IndexColumn SET ColumnSQL='upper(columnname)',Updated=TO_DATE('2017-08-25 12:27:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=200079
;
-- Aug 25, 2017 12:27:46 PM CEST
DROP INDEX ad_element_uppercolumnname
;
-- Aug 25, 2017 12:27:46 PM CEST
CREATE UNIQUE INDEX ad_element_uppercolumnname ON AD_Element (upper(columnname))
;
SELECT register_migration_script('201708251228_IDEMPIERE-3453.sql') FROM dual
;

View File

@ -0,0 +1,35 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3396
-- Aug 27, 2017 11:52:21 AM CEST
INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201059,'6a6f51d9-b636-48f8-ae98-33204895c8f4',TO_DATE('2017-08-27 11:52:20','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_pinstance_last_ix',TO_DATE('2017-08-27 11:52:20','YYYY-MM-DD HH24:MI:SS'),100,282,'N','N','N','N','N')
;
-- Aug 27, 2017 11:52:37 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201347,'c9cc1891-e41b-4d3e-8c36-f746e5b0fe39',TO_DATE('2017-08-27 11:52:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-27 11:52:37','YYYY-MM-DD HH24:MI:SS'),100,5951,201059,1)
;
-- Aug 27, 2017 11:52:45 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201348,'7b63fe78-7d25-49a8-a64c-1ab5b9fa90d1',TO_DATE('2017-08-27 11:52:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-27 11:52:45','YYYY-MM-DD HH24:MI:SS'),100,2781,201059,2)
;
-- Aug 27, 2017 11:53:49 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201349,'50e5ad46-685a-470b-a42c-239f2a104246',TO_DATE('2017-08-27 11:53:49','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-27 11:53:49','YYYY-MM-DD HH24:MI:SS'),100,8221,201059,3)
;
-- Aug 27, 2017 11:53:56 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201350,'f65ee789-904b-433f-b4c9-bbc1fde9ca8a',TO_DATE('2017-08-27 11:53:55','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-27 11:53:55','YYYY-MM-DD HH24:MI:SS'),100,8225,201059,4)
;
-- Aug 27, 2017 11:54:02 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201351,'1875c8e6-f900-4486-8c22-b6bda65e751a',TO_DATE('2017-08-27 11:54:02','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2017-08-27 11:54:02','YYYY-MM-DD HH24:MI:SS'),100,210890,201059,5)
;
-- Aug 27, 2017 11:54:08 AM CEST
CREATE INDEX ad_pinstance_last_ix ON AD_PInstance (AD_User_ID,AD_Process_ID,AD_Client_ID,IsActive,Name)
;
SELECT register_migration_script('201708271154_IDEMPIERE-3396.sql') FROM dual
;

View File

@ -0,0 +1,14 @@
-- IDEMPIERE-3424 table m_movement / constraint cbpartnerlocation_mmovement incorrect
-- Jul 20, 2017 20:13:32 PM CEST
ALTER TABLE m_movement DROP CONSTRAINT cbpartnerlocation_mmovement
;
ALTER TABLE m_movement ADD CONSTRAINT cbpartnerlocation_mmovement FOREIGN KEY (c_bpartner_location_id)
REFERENCES c_bpartner_location (c_bpartner_location_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
;
SELECT register_migration_script('201707202213_IDEMPIERE-3424.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- Jul 26, 2017 3:01:47 PM CEST
-- IDEMPIERE-1157 Adding functionality to add charts on the standard windows
UPDATE AD_Table SET AD_Window_ID=53124,Updated=TO_TIMESTAMP('2017-07-26 15:01:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53282
;
SELECT register_migration_script('201707261502_ZoomDataSource.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- IDEMPIERE-3443
-- Aug 3, 2017 2:01:39 PM CEST
UPDATE AD_Column SET Callout=NULL,Updated=TO_TIMESTAMP('2017-08-03 14:01:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2187
;
-- Aug 3, 2017 2:02:05 PM CEST
UPDATE AD_Column SET Callout=NULL,Updated=TO_TIMESTAMP('2017-08-03 14:02:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3500
;
SELECT register_migration_script('201708031402_IDEMPIERE-3443.sql') FROM dual
;

View File

@ -0,0 +1,242 @@
-- IDEMPIERE-3446 Define the workflow approver dynamically
-- Aug 8, 2017 6:16:04 PM BRT
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,Description,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200376,'Manual','Manual List',304,'M',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:03','YYYY-MM-DD HH24:MI:SS'),100,'D','a9c99476-070e-4377-960d-19dbe7dff024')
;
-- Aug 8, 2017 6:16:04 PM BRT
INSERT INTO AD_Table (AD_Table_ID,Name,Description,AD_Window_ID,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,IsChangeLog,ReplicationType,IsCentrallyMaintained,AD_Table_UU,Processing) VALUES (200226,'Workflow Activity Approver','Approvers of the Workflow Process Activity',298,'AD_WF_ActivityApprover',145,'7',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','D','N','L','Y','e6e1ed38-4935-44cd-9740-b5c631062229','N')
;
-- Aug 8, 2017 6:16:05 PM BRT
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('AD_WF_ActivityApprover',1000000,'N','N','Table AD_WF_ActivityApprover','Y','Y',0,0,TO_TIMESTAMP('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,200291,'Y',1000000,1,200000,'c6b5803d-773c-465c-8541-18c5e659bf44')
;
-- Aug 8, 2017 6:16:06 PM BRT
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203132,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:05','YYYY-MM-DD HH24:MI:SS'),100,'AD_WF_ActivityApprover_ID','Workflow Activity Approver','Workflow Activity Approver','D','559e0c04-8a72-42bf-a85f-37bb6cb2bbbd')
;
-- Aug 8, 2017 6:16:07 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213223,1,'Workflow Activity Approver',200226,'AD_WF_ActivityApprover_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:07','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:07','YYYY-MM-DD HH24:MI:SS'),100,203132,'N','N','D','Y','N','N','Y','fee3c48f-1c60-4298-aac8-8bf8f028b13d','N','N','N','N')
;
-- Aug 8, 2017 6:16:08 PM BRT
CREATE TABLE AD_WF_ActivityApprover (AD_WF_ActivityApprover_ID NUMERIC(10) NOT NULL, CONSTRAINT AD_WF_ActivityApprover_Key PRIMARY KEY (AD_WF_ActivityApprover_ID))
;
-- Aug 8, 2017 6:16:09 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213224,1,'Client','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.',200226,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','D','Y','N','N','Y','78b69227-4782-40e4-ba68-2161894ec669','N','N','N','D')
;
-- Aug 8, 2017 6:16:09 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN AD_Client_ID NUMERIC(10) NOT NULL
;
-- Aug 8, 2017 6:16:09 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213225,1,'Organization','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.',200226,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','D','Y','N','N','Y','3f24f5a5-6841-4774-867b-58500aff75c8','N','N','N','D')
;
-- Aug 8, 2017 6:16:09 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN AD_Org_ID NUMERIC(10) NOT NULL
;
-- Aug 8, 2017 6:16:10 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213226,1,'Created','Date this record was created','The Created field indicates the date that this record was created.',200226,'Created','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','D','Y','N','N','Y','d47875c9-fbd3-49f9-a593-103918b68a51','N','N','N','N')
;
-- Aug 8, 2017 6:16:11 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN Created TIMESTAMP DEFAULT statement_timestamp() NOT NULL
;
-- Aug 8, 2017 6:16:11 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213227,1,'Created By','User who created this records','The Created By field indicates the user who created this record.',200226,'CreatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:11','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:11','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','D','Y','N','N','Y','4c14993e-fa5c-4680-be68-816680dbbd92','N','N','N','D')
;
-- Aug 8, 2017 6:16:11 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN CreatedBy NUMERIC(10) NOT NULL
;
-- Aug 8, 2017 6:16:12 PM BRT
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203133,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,'AD_WF_ActivityApprover_UU','AD_WF_ActivityApprover_UU','AD_WF_ActivityApprover_UU','D','3d203220-d98b-4e35-bfb3-981bb8a31aee')
;
-- Aug 8, 2017 6:16:13 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213228,1.00,'AD_WF_ActivityApprover_UU',200226,'AD_WF_ActivityApprover_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:12','YYYY-MM-DD HH24:MI:SS'),100,203133,'Y','N','D','Y','N','N','Y','ad670aa0-2b6a-484e-9696-7c922e6c4d62','N','N','N','N')
;
-- Aug 8, 2017 6:16:13 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN AD_WF_ActivityApprover_UU VARCHAR(36) DEFAULT NULL
;
-- Aug 8, 2017 6:16:13 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CONSTRAINT AD_WF_ActivityApprover_UU_idx UNIQUE (AD_WF_ActivityApprover_UU)
;
-- Aug 8, 2017 6:16:14 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213229,1,'Active','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.',200226,'IsActive','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','D','Y','N','N','Y','44103c1a-bb91-43d2-9a84-f129f784fc06','N','N','N','N')
;
-- Aug 8, 2017 6:16:14 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL
;
-- Aug 8, 2017 6:16:15 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213230,1,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200226,'Updated','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:14','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','D','Y','N','N','Y','c14b694f-2fd6-45cb-bf36-7c2911955e59','N','N','N','N')
;
-- Aug 8, 2017 6:16:15 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN Updated TIMESTAMP DEFAULT statement_timestamp() NOT NULL
;
-- Aug 8, 2017 6:16:16 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213231,1,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200226,'UpdatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:15','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','D','Y','N','N','Y','26992d33-c633-4372-80de-7b584316625e','N','N','N','D')
;
-- Aug 8, 2017 6:16:16 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN UpdatedBy NUMERIC(10) NOT NULL
;
-- Aug 8, 2017 6:16:17 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintName,FKConstraintType) VALUES (213232,0,'Workflow Activity','Workflow Activity','The Workflow Activity is the actual Workflow Node in a Workflow Process instance',200226,'AD_WF_Activity_ID',22,'N','Y','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,2307,'N','N','D','Y','N','N','Y','5382008f-687c-4828-86cb-16226e32432c','Y',0,'N','N','ADWFActivity_ADWFActivityAppro','C')
;
-- Aug 8, 2017 6:16:17 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN AD_WF_Activity_ID NUMERIC(10) NOT NULL
;
-- Aug 8, 2017 6:16:18 PM BRT
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintName,FKConstraintType) VALUES (213233,0,'User/Contact','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',200226,164,'AD_User_ID',22,'N','N','Y','N','N',0,'N',30,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,138,'Y','N','D','Y','N','N','Y','02bffd80-4df3-46fc-a426-1bc5b8fca3a9','Y',0,'N','N','ADUser_ADWFActivityApprover','N')
;
-- Aug 8, 2017 6:16:18 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD COLUMN AD_User_ID NUMERIC(10) NOT NULL
;
-- Aug 8, 2017 6:16:19 PM BRT
INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201058,'91502b94-7f41-4bc5-b7c7-08417ccf3ed1',TO_TIMESTAMP('2017-08-08 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_WF_ActivityApprover01',TO_TIMESTAMP('2017-08-08 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,200226,'N','Y','N','N','N')
;
-- Aug 8, 2017 6:16:19 PM BRT
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201345,'27b2b5cb-3191-4fb0-8ea1-36b843084fee',TO_TIMESTAMP('2017-08-08 18:16:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-08 18:16:19','YYYY-MM-DD HH24:MI:SS'),100,213232,201058,10)
;
-- Aug 8, 2017 6:16:20 PM BRT
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201346,'bb95cfc3-7eaf-4b60-98bf-8ae309ce55a2',TO_TIMESTAMP('2017-08-08 18:16:20','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-08 18:16:20','YYYY-MM-DD HH24:MI:SS'),100,213233,201058,20)
;
-- Aug 8, 2017 6:16:20 PM BRT
CREATE UNIQUE INDEX AD_WF_ActivityApprover01 ON AD_WF_ActivityApprover (AD_WF_Activity_ID,AD_User_ID)
;
-- Aug 8, 2017 6:16:21 PM BRT
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200230,'Approver',298,20,'Y',200226,0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:21','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',1,'N','D','Y','N','4c965421-0c87-4703-b433-243991bd1628','B')
;
-- Aug 8, 2017 6:16:23 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205207,'AD_WF_ActivityApprover_UU',200230,213228,'N',36,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:22','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','04c2a8fc-dc5f-41e1-aa27-81a141d4c3f2','N',1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:24 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205208,'Workflow Activity Approver',200230,213223,'N',22,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:23','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f60eb7d8-0f3c-4ec7-bae6-51ae45e815fa','N',1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:25 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205209,'Client','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.',200230,213224,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','92ce5bb5-6a37-4091-b310-de5dcd9ce603','N',10,1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:26 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205210,'Organization','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.',200230,213225,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','50c4e884-caf0-4138-8bb3-280046ac0dc6','Y','N',20,4,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:27 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205211,'Workflow Activity','Workflow Activity','The Workflow Activity is the actual Workflow Node in a Workflow Process instance',200230,213232,'Y',22,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:26','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','448533e5-3dde-4782-a77b-f0c95ede180f','Y',30,1,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:27 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205212,'User/Contact','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',200230,213233,'Y',22,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:27','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','cc73baef-8a0e-4dcd-b544-2ee9f1c419f3','Y',40,4,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:28 PM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205213,'Active','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.',200230,213229,'Y',1,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-08 18:16:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-08 18:16:28','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','194ceea8-bf9f-419b-b96d-6b7f16197e9c','Y',50,2,2,1,'N','N','N')
;
-- Aug 8, 2017 6:16:29 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CONSTRAINT ADWFActivity_ADWFActivityAppro FOREIGN KEY (AD_WF_Activity_ID) REFERENCES ad_wf_activity(ad_wf_activity_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
;
-- Aug 8, 2017 6:16:29 PM BRT
ALTER TABLE AD_WF_ActivityApprover ADD CONSTRAINT ADUser_ADWFActivityApprover FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
;
-- Aug 8, 2017 6:39:27 PM BRT
UPDATE PA_DocumentStatus SET WhereClause='AD_WF_Activity.Processed=''N'' AND AD_WF_Activity.WFState=''OS'' AND (
/* Owner of Activity */
AD_WF_Activity.AD_User_ID=@#AD_User_ID@
/* Invoker (if no invoker = all) */
OR EXISTS (SELECT * FROM AD_WF_Responsible r WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID
AND r.ResponsibleType=''H'' AND COALESCE(r.AD_User_ID,0)=0 AND COALESCE(r.AD_Role_ID,0)=0 AND (AD_WF_Activity.AD_User_ID=@#AD_User_ID@ OR AD_WF_Activity.AD_User_ID IS NULL))
/* Responsible User */
OR EXISTS (SELECT * FROM AD_WF_Responsible r WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID
AND r.ResponsibleType=''H'' AND r.AD_User_ID=@#AD_User_ID@)
/* Responsible Role */
OR EXISTS (SELECT * FROM AD_WF_Responsible r INNER JOIN AD_User_Roles ur ON (r.AD_Role_ID=ur.AD_Role_ID)
WHERE AD_WF_Activity.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND r.ResponsibleType=''R'' AND ur.AD_User_ID=@#AD_User_ID@ AND ur.isActive=''Y'')
/* Manual Responsible */
OR EXISTS (SELECT * FROM AD_WF_ActivityApprover r WHERE AD_WF_Activity.AD_WF_Activity_ID=r.AD_WF_Activity_ID AND r.AD_User_ID=@#AD_User_ID@ AND r.isActive=''Y'')
) AND AD_WF_Activity.AD_Client_ID=@#AD_Client_ID@',Updated=TO_TIMESTAMP('2017-08-08 18:39:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200004
;
-- Aug 10, 2017 10:42:59 AM BRT
UPDATE AD_Tab SET SeqNo=40, AD_Column_ID=NULL, AD_Process_ID=NULL, AD_Image_ID=NULL, AD_ColumnSortYesNo_ID=NULL, AD_ColumnSortOrder_ID=NULL, Included_Tab_ID=NULL, Parent_Column_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_TIMESTAMP('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=581
;
-- Aug 10, 2017 10:42:59 AM BRT
UPDATE AD_Tab SET SeqNo=50, AD_Process_ID=NULL, AD_Image_ID=NULL, AD_ColumnSortYesNo_ID=NULL, AD_ColumnSortOrder_ID=NULL, Included_Tab_ID=NULL, Parent_Column_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_TIMESTAMP('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=582
;
-- Aug 10, 2017 10:43:00 AM BRT
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,DisplayLogic,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200231,'Approver',297,30,'Y',200226,0,0,'Y',TO_TIMESTAMP('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:42:59','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','Y','N','N',2,'N','D','1=1','N','N','805402e4-3226-4e52-9926-0217c1af2c4c','B')
;
-- Aug 10, 2017 10:43:01 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205214,'AD_WF_ActivityApprover_UU',200231,213228,'N',36,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:00','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f37c320b-b7cb-46f3-a5f3-d66d4e26a8bd','N',1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:02 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205215,'Workflow Activity Approver',200231,213223,'N',22,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:01','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','eca0834e-a6b5-4d88-a80c-7c4115717154','N',1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:03 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205216,'Client','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.',200231,213224,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','7a92cab3-567a-4f67-b67e-48fcf561e8f5','Y',10,1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:03 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205217,'Organization','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.',200231,213225,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','D','f34baace-c472-475e-999c-623ae4449608','Y','Y',20,4,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:04 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205218,'Workflow Activity','Workflow Activity','The Workflow Activity is the actual Workflow Node in a Workflow Process instance',200231,213232,'Y',22,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0e4a2b1a-03f4-4af2-8cea-1497f31d1d0f','Y',30,1,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:04 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205219,'User/Contact','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',200231,213233,'Y',22,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','16f0f237-049a-4ccd-a146-97f1909d986f','Y',40,4,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:05 AM BRT
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (205220,'Active','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.',200231,213229,'Y',1,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-08-10 10:43:04','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','b62672fe-d27a-4ba7-a048-b344d74d6404','Y',50,2,2,1,'N','N','N')
;
-- Aug 10, 2017 10:43:05 AM BRT
UPDATE AD_Tab SET SeqNo=60, AD_Column_ID=NULL, AD_Process_ID=NULL, AD_Image_ID=NULL, AD_ColumnSortYesNo_ID=NULL, AD_ColumnSortOrder_ID=NULL, Included_Tab_ID=NULL, Parent_Column_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_TIMESTAMP('2017-08-10 10:43:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=580
;
SELECT register_migration_script('201708081830_IDEMPIERE-3446.sql') FROM dual
;

View File

@ -0,0 +1,36 @@
-- IDEMPIERE-3453
CREATE OR REPLACE FUNCTION trunc(datetime TIMESTAMP WITHOUT TIME ZONE)
RETURNS TIMESTAMP WITHOUT TIME ZONE AS $$
BEGIN
RETURN CAST(datetime AS DATE);
END;
$$ LANGUAGE plpgsql IMMUTABLE;
-- Aug 25, 2017 12:23:30 PM CEST
UPDATE AD_IndexColumn SET ColumnSQL='TRUNC(DateAcct)',Updated=TO_TIMESTAMP('2017-08-25 12:23:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=200741
;
-- Aug 25, 2017 12:23:35 PM CEST
DROP INDEX fact_acct_trunc_dateacct
;
-- Aug 25, 2017 12:23:35 PM CEST
CREATE INDEX fact_acct_trunc_dateacct ON Fact_Acct (TRUNC(DateAcct))
;
-- Aug 25, 2017 12:27:32 PM CEST
UPDATE AD_IndexColumn SET ColumnSQL='upper(columnname)',Updated=TO_TIMESTAMP('2017-08-25 12:27:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=200079
;
-- Aug 25, 2017 12:27:46 PM CEST
DROP INDEX ad_element_uppercolumnname
;
-- Aug 25, 2017 12:27:46 PM CEST
CREATE UNIQUE INDEX ad_element_uppercolumnname ON AD_Element (upper(columnname))
;
SELECT register_migration_script('201708251228_IDEMPIERE-3453.sql') FROM dual
;

View File

@ -0,0 +1,32 @@
-- IDEMPIERE-3396
-- Aug 27, 2017 11:52:21 AM CEST
INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201059,'6a6f51d9-b636-48f8-ae98-33204895c8f4',TO_TIMESTAMP('2017-08-27 11:52:20','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_pinstance_last_ix',TO_TIMESTAMP('2017-08-27 11:52:20','YYYY-MM-DD HH24:MI:SS'),100,282,'N','N','N','N','N')
;
-- Aug 27, 2017 11:52:37 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201347,'c9cc1891-e41b-4d3e-8c36-f746e5b0fe39',TO_TIMESTAMP('2017-08-27 11:52:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-27 11:52:37','YYYY-MM-DD HH24:MI:SS'),100,5951,201059,1)
;
-- Aug 27, 2017 11:52:45 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201348,'7b63fe78-7d25-49a8-a64c-1ab5b9fa90d1',TO_TIMESTAMP('2017-08-27 11:52:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-27 11:52:45','YYYY-MM-DD HH24:MI:SS'),100,2781,201059,2)
;
-- Aug 27, 2017 11:53:49 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201349,'50e5ad46-685a-470b-a42c-239f2a104246',TO_TIMESTAMP('2017-08-27 11:53:49','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-27 11:53:49','YYYY-MM-DD HH24:MI:SS'),100,8221,201059,3)
;
-- Aug 27, 2017 11:53:56 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201350,'f65ee789-904b-433f-b4c9-bbc1fde9ca8a',TO_TIMESTAMP('2017-08-27 11:53:55','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-27 11:53:55','YYYY-MM-DD HH24:MI:SS'),100,8225,201059,4)
;
-- Aug 27, 2017 11:54:02 AM CEST
INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201351,'1875c8e6-f900-4486-8c22-b6bda65e751a',TO_TIMESTAMP('2017-08-27 11:54:02','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2017-08-27 11:54:02','YYYY-MM-DD HH24:MI:SS'),100,210890,201059,5)
;
-- Aug 27, 2017 11:54:08 AM CEST
CREATE INDEX ad_pinstance_last_ix ON AD_PInstance (AD_User_ID,AD_Process_ID,AD_Client_ID,IsActive,Name)
;
SELECT register_migration_script('201708271154_IDEMPIERE-3396.sql') FROM dual
;

View File

@ -146,7 +146,7 @@ public class CalloutRMA extends CalloutEngine {
return "";
MRMA rma = new MRMA(ctx, M_RMA_ID, null);
MProductPricing pp = new MProductPricing(M_Product_ID, rma.getC_BPartner_ID(), Env.ONE, rma.isSOTrx());
MProductPricing pp = new MProductPricing(M_Product_ID, rma.getC_BPartner_ID(), Env.ONE, rma.isSOTrx(), null);
int taxId = 0;
int precision = 0;

View File

@ -275,7 +275,9 @@ public class CalloutInvoice extends CalloutEngine
* @param mField field
* @param value value
* @return null or error message
* @Deprecated - business logic moved to MInvoice.beforeSave - must not create/delete external records with callouts
*/
@Deprecated
public String paymentTerm (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
Integer C_PaymentTerm_ID = (Integer)value;
@ -290,7 +292,6 @@ public class CalloutInvoice extends CalloutEngine
boolean valid = pt.apply (C_Invoice_ID);
mTab.setValue("IsPayScheduleValid", valid ? "Y" : "N");
return "";
} // paymentTerm
@ -326,7 +327,7 @@ public class CalloutInvoice extends CalloutEngine
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
int C_BPartner_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_ID");
BigDecimal Qty = (BigDecimal)mTab.getValue("QtyInvoiced");
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx);
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx, null);
//
int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID");
pp.setM_PriceList_ID(M_PriceList_ID);
@ -563,7 +564,7 @@ public class CalloutInvoice extends CalloutEngine
if (QtyInvoiced == null)
QtyInvoiced = QtyEntered;
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
MProductPricing pp = new MProductPricing (M_Product_ID, C_BPartner_ID, QtyInvoiced, IsSOTrx);
MProductPricing pp = new MProductPricing (M_Product_ID, C_BPartner_ID, QtyInvoiced, IsSOTrx, null);
pp.setM_PriceList_ID(M_PriceList_ID);
int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID");
pp.setM_PriceList_Version_ID(M_PriceList_Version_ID);
@ -844,7 +845,7 @@ public class CalloutInvoice extends CalloutEngine
int C_BPartner_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_ID");
BigDecimal Qty = (BigDecimal)mTab.getValue("QtyOrdered");
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx);
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx, null);
//
int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID");
pp.setM_PriceList_ID(M_PriceList_ID);

View File

@ -745,7 +745,9 @@ public class CalloutOrder extends CalloutEngine
* @param mField field
* @param value value
* @return null or error message
* @Deprecated - business logic moved to MOrder.beforeSave - must not create/delete external records with callouts
*/
@Deprecated
public String paymentTerm (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
Integer C_PaymentTerm_ID = (Integer)value;
@ -798,7 +800,7 @@ public class CalloutOrder extends CalloutEngine
int C_BPartner_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_ID");
BigDecimal Qty = (BigDecimal)mTab.getValue("QtyOrdered");
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx);
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx, null);
//
int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID");
pp.setM_PriceList_ID(M_PriceList_ID);
@ -1094,7 +1096,7 @@ public class CalloutOrder extends CalloutEngine
if (QtyOrdered == null)
QtyOrdered = QtyEntered;
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
MProductPricing pp = new MProductPricing (M_Product_ID, C_BPartner_ID, QtyOrdered, IsSOTrx);
MProductPricing pp = new MProductPricing (M_Product_ID, C_BPartner_ID, QtyOrdered, IsSOTrx, null);
pp.setM_PriceList_ID(M_PriceList_ID);
int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID");
pp.setM_PriceList_Version_ID(M_PriceList_Version_ID);
@ -1423,7 +1425,7 @@ public class CalloutOrder extends CalloutEngine
int C_BPartner_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_ID");
BigDecimal Qty = (BigDecimal)mTab.getValue("QtyOrdered");
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx);
MProductPricing pp = new MProductPricing (M_Product_ID.intValue(), C_BPartner_ID, Qty, IsSOTrx, null);
//
int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID");
pp.setM_PriceList_ID(M_PriceList_ID);

View File

@ -100,7 +100,7 @@ public class CalloutRequisition extends CalloutEngine
int C_BPartner_ID = line.getC_BPartner_ID();
BigDecimal Qty = line.getQty();
boolean isSOTrx = false;
MProductPricing pp = new MProductPricing (line.getM_Product_ID(), C_BPartner_ID, Qty, isSOTrx);
MProductPricing pp = new MProductPricing (line.getM_Product_ID(), C_BPartner_ID, Qty, isSOTrx, null);
//
int M_PriceList_ID = req.getM_PriceList_ID();
pp.setM_PriceList_ID(M_PriceList_ID);

View File

@ -72,7 +72,7 @@ public class ProjectLinePricing extends SvrProcess
//
boolean isSOTrx = true;
MProductPricing pp = new MProductPricing (projectLine.getM_Product_ID(),
project.getC_BPartner_ID(), projectLine.getPlannedQty(), isSOTrx);
project.getC_BPartner_ID(), projectLine.getPlannedQty(), isSOTrx, get_TrxName());
pp.setM_PriceList_ID(project.getM_PriceList_ID());
pp.setPriceDate(project.getDateContract());
//

View File

@ -361,7 +361,7 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
}
}
if (X_AD_User.NOTIFICATIONTYPE_Notice.equals(NotificationType)
&& AD_Role_ID >= 0)
&& AD_Role_ID < 0)
{
if (s_log.isLoggable(Level.CONFIG)) s_log.config("No internal User: " + Name);
continue;

View File

@ -38,6 +38,7 @@ import org.compiere.model.GridTab;
import org.compiere.model.GridTable;
import org.compiere.model.GridWindow;
import org.compiere.model.GridWindowVO;
import org.compiere.model.I_AD_EntityType;
import org.compiere.model.MColumn;
import org.compiere.model.MLocation;
import org.compiere.model.MQuery;
@ -479,10 +480,14 @@ public class GridTabCSVExporter implements IGridTabExporter
if (DisplayType.isLookup(column.getAD_Reference_ID())) {
// resolve to identifier - search for value first, if not search for name - if not use the ID
String foreignTable = column.getReferenceTableName();
if ( ! ("AD_Language".equals(foreignTable) || "AD_EntityType".equals(foreignTable) || "AD_Ref_List".equals(foreignTable))) {
if ("AD_EntityType".equals(foreignTable) && I_AD_EntityType.COLUMNNAME_AD_EntityType_ID.equals(column.getColumnName())){
name.append("[EntityType]"); // ColumnName is unique value IDEMPIERE-3375
}else if ( ! ("AD_Language".equals(foreignTable) || "AD_EntityType".equals(foreignTable) || "AD_Ref_List".equals(foreignTable))) {
MTable fTable = MTable.get(Env.getCtx(), foreignTable);
// Hardcoded / do not check for Value on AD_Org, AD_User and AD_Ref_List, must use name for these two tables
if (! ("AD_Org".equals(foreignTable) || "AD_User".equals(foreignTable)) && fTable.getColumn("Value") != null) {
if ("AD_Element".equals(foreignTable)){
name.append("[ColumnName]"); // ColumnName is unique value IDEMPIERE-3375
}else if (! ("AD_Org".equals(foreignTable) || "AD_User".equals(foreignTable)) && fTable.getColumn("Value") != null) {
name.append("[Value]"); // fully qualified
} else if (fTable.getColumn("Name") != null) {
name.append("[Name]");

View File

@ -2361,54 +2361,42 @@ public class GridField
/**
* Returns a list containing all existing entries of this field
* with the actual AD_Org_ID and AD_Client_ID.
* with the actual AD_Client_ID.
* @return List of existing entries for this field
*/
public List<String> getEntries() {
/* TODO: consider caching the list to avoid repeating queries on every window open (twice, for find and for field) */
MColumn column = MColumn.get(Env.getCtx(), getAD_Column_ID());
MTable table = MTable.get(Env.getCtx(), column.getAD_Table_ID());
String tableName = table.getTableName();
String columnName = column.getColumnName();
ArrayList<String> list = new ArrayList<String>();
PreparedStatement pstmt1;
PreparedStatement pstmt2;
String sql = "";
try
{
String tableName = null;
String columnName = null;
int AD_Org_ID = Env.getAD_Org_ID(Env.getCtx());
if (tableName != null && columnName != null) {
int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx());
sql = "SELECT t.TableName, c.ColumnName " +
" FROM AD_COLUMN c INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID)" +
" WHERE AD_Column_ID=?";
pstmt1 = DB.prepareStatement(sql, null);
pstmt1.setInt(1, getAD_Column_ID());
ResultSet rs1 = pstmt1.executeQuery();
if (rs1.next())
{
tableName = rs1.getString(1);
columnName = rs1.getString(2);
}
DB.close(rs1, pstmt1);
PreparedStatement pstmt = null;
ResultSet rs = null;
StringBuilder sql = new StringBuilder()
.append("SELECT DISTINCT ")
.append(columnName)
.append(" FROM ")
.append(tableName)
.append(" WHERE AD_Client_ID=? AND ")
.append(columnName)
.append(" IS NOT NULL ORDER BY 1");
try {
pstmt = DB.prepareStatement(sql.toString(), null);
pstmt.setInt(1, AD_Client_ID);
if (tableName != null && columnName != null) {
sql = "SELECT DISTINCT " + columnName + " FROM " + tableName + " WHERE AD_Client_ID=? "
+ " AND AD_Org_ID=?";
pstmt2 = DB.prepareStatement(sql, null);
pstmt2.setInt(1, AD_Client_ID);
pstmt2.setInt(2, AD_Org_ID);
ResultSet rs2 = pstmt2.executeQuery();
while (rs2.next())
{
list.add(rs2.getString(1));
rs = pstmt.executeQuery();
while (rs.next()) {
list.add(rs.getString(1));
}
DB.close(rs2, pstmt2);
} catch (Exception e) {
log.log(Level.SEVERE, sql.toString(), e);
} finally {
DB.close(rs, pstmt);
}
}
catch (Exception e)
{
log.log(Level.SEVERE, sql, e);
}
return list;
}

View File

@ -0,0 +1,157 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_WF_ActivityApprover
* @author iDempiere (generated)
* @version Release 4.1
*/
public interface I_AD_WF_ActivityApprover
{
/** TableName=AD_WF_ActivityApprover */
public static final String Table_Name = "AD_WF_ActivityApprover";
/** AD_Table_ID=200226 */
public static final int Table_ID = 200226;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name AD_User_ID */
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
/** Set User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public void setAD_User_ID (int AD_User_ID);
/** Get User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID();
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
/** Column name AD_WF_ActivityApprover_ID */
public static final String COLUMNNAME_AD_WF_ActivityApprover_ID = "AD_WF_ActivityApprover_ID";
/** Set Workflow Activity Approver */
public void setAD_WF_ActivityApprover_ID (int AD_WF_ActivityApprover_ID);
/** Get Workflow Activity Approver */
public int getAD_WF_ActivityApprover_ID();
/** Column name AD_WF_ActivityApprover_UU */
public static final String COLUMNNAME_AD_WF_ActivityApprover_UU = "AD_WF_ActivityApprover_UU";
/** Set AD_WF_ActivityApprover_UU */
public void setAD_WF_ActivityApprover_UU (String AD_WF_ActivityApprover_UU);
/** Get AD_WF_ActivityApprover_UU */
public String getAD_WF_ActivityApprover_UU();
/** Column name AD_WF_Activity_ID */
public static final String COLUMNNAME_AD_WF_Activity_ID = "AD_WF_Activity_ID";
/** Set Workflow Activity.
* Workflow Activity
*/
public void setAD_WF_Activity_ID (int AD_WF_Activity_ID);
/** Get Workflow Activity.
* Workflow Activity
*/
public int getAD_WF_Activity_ID();
public org.compiere.model.I_AD_WF_Activity getAD_WF_Activity() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -51,7 +51,7 @@ public class MColumn extends X_AD_Column
/**
*
*/
private static final long serialVersionUID = 3082823885314140209L;
private static final long serialVersionUID = -6914331394933196295L;
public static MColumn get (Properties ctx, int AD_Column_ID)
{
@ -1133,4 +1133,19 @@ public class MColumn extends X_AD_Column
return "";
}
/**
* Is Advanced
* @return true if the column has any field marked as advanced or part of an advanced tab
*/
public boolean isAdvanced() {
final String sql = ""
+ "SELECT COUNT(*) "
+ "FROM AD_Tab t "
+ " JOIN AD_Field f ON ( f.AD_Tab_ID = t.AD_Tab_ID ) "
+ "WHERE f.AD_Column_ID = ? "
+ " AND ( t.IsAdvancedTab = 'Y' OR f.IsAdvancedField = 'Y' )";
int cnt = DB.getSQLValueEx(get_TrxName(), sql, getAD_Column_ID());
return cnt > 0;
}
} // MColumn

View File

@ -40,7 +40,7 @@ public class MDistribution extends X_GL_Distribution
/**
*
*/
private static final long serialVersionUID = -906547096682610205L;
private static final long serialVersionUID = 3782058638272715005L;
/**
* Get Distribution for combination
@ -90,7 +90,7 @@ public class MDistribution extends X_GL_Distribution
int C_SalesRegion_ID, int C_LocTo_ID, int C_LocFrom_ID,
int User1_ID, int User2_ID)
{
MDistribution[] acctList = get (ctx, Account_ID);
MDistribution[] acctList = getAll(ctx);
if (acctList == null || acctList.length == 0)
return null;
//
@ -157,11 +157,16 @@ public class MDistribution extends X_GL_Distribution
MDistribution[] retValue = (MDistribution[])s_accounts.get(key);
if (retValue != null)
return retValue;
final String whereClause = "Account_ID=?";
String whereClause = "";
Object[] parameters = null;
if (Account_ID >= 0) {
whereClause = "Account_ID=?";
parameters = new Object[]{Account_ID};
}
List<MDistribution> list = new Query(ctx,I_GL_Distribution.Table_Name,whereClause,null)
.setParameters(Account_ID)
.list();
.setClient_ID()
.setParameters(parameters)
.list();
//
retValue = new MDistribution[list.size ()];
list.toArray (retValue);
@ -169,6 +174,17 @@ public class MDistribution extends X_GL_Distribution
return retValue;
} // get
/**
* Get All Distributions
* @param ctx context
* @param Account_ID id
* @return array of distributions
*/
public static MDistribution[] getAll (Properties ctx)
{
return get(ctx, -1);
} // get
/** Static Logger */
@SuppressWarnings("unused")
private static CLogger s_log = CLogger.getCLogger (MDistribution.class);

View File

@ -710,7 +710,6 @@ public class MInventory extends X_M_Inventory implements DocAction
MInventoryLineMA lineMA = new MInventoryLineMA(line, storage.getM_AttributeSetInstance_ID(), maQty.negate(), storage.getDateMaterialPolicy(),true);
lineMA.saveEx();
qtyDiff = qtyDiff.subtract(maQty);
storage.addQtyOnHand(maQty.negate());
if (qtyDiff.compareTo(Env.ZERO)==0)
break;

View File

@ -927,6 +927,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
} // validatePaySchedule
private volatile static boolean recursiveCall = false;
/**************************************************************************
* Before Save
* @param newRecord new
@ -1028,6 +1029,19 @@ public class MInvoice extends X_C_Invoice implements DocAction
}
}
if (! recursiveCall && (!newRecord && is_ValueChanged(COLUMNNAME_C_PaymentTerm_ID))) {
recursiveCall = true;
try {
MPaymentTerm pt = new MPaymentTerm (getCtx(), getC_PaymentTerm_ID(), get_TrxName());
boolean valid = pt.apply(this);
setIsPayScheduleValid(valid);
} catch (Exception e) {
throw e;
} finally {
recursiveCall = false;
}
}
return true;
} // beforeSave

View File

@ -379,7 +379,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
//
if (log.isLoggable(Level.FINE)) log.fine("M_PriceList_ID=" + M_PriceList_ID);
m_productPricing = new MProductPricing (getM_Product_ID(),
C_BPartner_ID, getQtyInvoiced(), m_IsSOTrx);
C_BPartner_ID, getQtyInvoiced(), m_IsSOTrx, get_TrxName());
m_productPricing.setM_PriceList_ID(M_PriceList_ID);
m_productPricing.setPriceDate(m_DateInvoiced);
//

View File

@ -71,7 +71,7 @@ public class MOrder extends X_C_Order implements DocAction
/**
*
*/
private static final long serialVersionUID = -4032643956656204341L;
private static final long serialVersionUID = -7784588474522162502L;
/**
* Create new Order by copying
@ -921,6 +921,7 @@ public class MOrder extends X_C_Order implements DocAction
} // validatePaySchedule
private volatile static boolean recursiveCall = false;
/**************************************************************************
* Before Save
* @param newRecord new
@ -1089,6 +1090,19 @@ public class MOrder extends X_C_Order implements DocAction
}
}
if (! recursiveCall && (!newRecord && is_ValueChanged(COLUMNNAME_C_PaymentTerm_ID))) {
recursiveCall = true;
try {
MPaymentTerm pt = new MPaymentTerm (getCtx(), getC_PaymentTerm_ID(), get_TrxName());
boolean valid = pt.applyOrder(this);
setIsPayScheduleValid(valid);
} catch (Exception e) {
throw e;
} finally {
recursiveCall = false;
}
}
return true;
} // beforeSave
@ -2454,6 +2468,8 @@ public class MOrder extends X_C_Order implements DocAction
if (m_processMsg != null)
return false;
setTotalLines(Env.ZERO);
setGrandTotal(Env.ZERO);
setProcessed(true);
setDocAction(DOCACTION_None);
return true;

View File

@ -324,7 +324,7 @@ public class MOrderLine extends X_C_OrderLine
protected MProductPricing getProductPricing (int M_PriceList_ID)
{
m_productPrice = new MProductPricing (getM_Product_ID(),
getC_BPartner_ID(), getQtyOrdered(), m_IsSOTrx);
getC_BPartner_ID(), getQtyOrdered(), m_IsSOTrx, get_TrxName());
m_productPrice.setM_PriceList_ID(M_PriceList_ID);
m_productPrice.setPriceDate(getDateOrdered());
//

View File

@ -406,6 +406,7 @@ public class MPInstance extends X_AD_PInstance
int cnt = 0;
try {
pstmt = DB.prepareStatement(sql, null);
pstmt.setFetchSize(lastRunCount);
pstmt.setInt(1, AD_Process_ID);
pstmt.setInt(2, AD_User_ID);
pstmt.setInt(3, Env.getAD_Client_ID(ctx));

View File

@ -36,25 +36,45 @@ import org.compiere.util.Trace;
public class MProductPricing
{
private String trxName=null;
/**
* Constructor
* @param M_Product_ID product
* @param C_BPartner_ID partner
* @param Qty quantity
* @param isSOTrx SO or PO
* @param trxName the transaction
*/
public MProductPricing (int M_Product_ID, int C_BPartner_ID,
BigDecimal Qty, boolean isSOTrx)
BigDecimal Qty, boolean isSOTrx, String trxName)
{
this.trxName=trxName;
m_M_Product_ID = M_Product_ID;
m_C_BPartner_ID = C_BPartner_ID;
if (Qty != null && Env.ZERO.compareTo(Qty) != 0)
m_Qty = Qty;
m_isSOTrx = isSOTrx;
int thereAreVendorBreakRecords = DB.getSQLValue(null,
int thereAreVendorBreakRecords = DB.getSQLValue(trxName,
"SELECT count(M_Product_ID) FROM M_ProductPriceVendorBreak WHERE M_Product_ID=? AND (C_BPartner_ID=? OR C_BPartner_ID is NULL)",
m_M_Product_ID, m_C_BPartner_ID);
m_useVendorBreak = thereAreVendorBreakRecords > 0;
}
/**
* Constructor
* @param M_Product_ID product
* @param C_BPartner_ID partner
* @param Qty quantity
* @param isSOTrx SO or PO
* @deprecated Use constructor with explicit trxName parameter
*/
public MProductPricing (int M_Product_ID, int C_BPartner_ID,
BigDecimal Qty, boolean isSOTrx)
{
this(M_Product_ID,C_BPartner_ID,Qty,isSOTrx,null);
} // MProductPricing
private int m_M_Product_ID;
@ -167,7 +187,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt = DB.prepareStatement(sql, trxName);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, m_M_PriceList_Version_ID);
rs = pstmt.executeQuery();
@ -286,7 +306,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt = DB.prepareStatement(sql, trxName);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, m_M_PriceList_ID);
rs = pstmt.executeQuery();
@ -367,7 +387,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt = DB.prepareStatement(sql, trxName);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, m_M_PriceList_ID);
rs = pstmt.executeQuery();
@ -448,7 +468,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt = DB.prepareStatement(sql, trxName);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, m_M_PriceList_Version_ID);
pstmt.setInt(3, m_C_BPartner_ID);
@ -571,7 +591,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt = DB.prepareStatement(sql, trxName);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, m_M_PriceList_ID);
pstmt.setInt(3, m_C_BPartner_ID);
@ -656,7 +676,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt = DB.prepareStatement(sql, trxName);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, m_M_PriceList_ID);
pstmt.setInt(3, m_C_BPartner_ID);
@ -755,7 +775,7 @@ public class MProductPricing
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement (sql, null);
pstmt = DB.prepareStatement (sql, trxName);
pstmt.setInt (1, m_C_BPartner_ID);
rs = pstmt.executeQuery ();
if (rs.next ())

View File

@ -148,7 +148,7 @@ public class MProjectLine extends X_C_ProjectLine
return limitPrice;
boolean isSOTrx = true;
MProductPricing pp = new MProductPricing (getM_Product_ID(),
m_parent.getC_BPartner_ID(), getPlannedQty(), isSOTrx);
m_parent.getC_BPartner_ID(), getPlannedQty(), isSOTrx, get_TrxName());
pp.setM_PriceList_ID(m_parent.getM_PriceList_ID());
if (pp.calculatePrice())
limitPrice = pp.getPriceLimit();

View File

@ -147,7 +147,7 @@ public class MRMALine extends X_M_RMALine
}
else if (getM_Product_ID() != 0)
{
MProductPricing pp = new MProductPricing (getM_Product_ID(), getParent().getC_BPartner_ID(), Env.ONE, getParent().isSOTrx());
MProductPricing pp = new MProductPricing (getM_Product_ID(), getParent().getC_BPartner_ID(), Env.ONE, getParent().isSOTrx(), get_TrxName());
MInvoice invoice = getParent().getOriginalInvoice();
if (invoice != null)

View File

@ -234,7 +234,7 @@ public class MRequisitionLine extends X_M_RequisitionLine
if (log.isLoggable(Level.FINE)) log.fine("M_PriceList_ID=" + M_PriceList_ID);
boolean isSOTrx = false;
MProductPricing pp = new MProductPricing (getM_Product_ID(),
getC_BPartner_ID(), getQty(), isSOTrx);
getC_BPartner_ID(), getQty(), isSOTrx, get_TrxName());
pp.setM_PriceList_ID(M_PriceList_ID);
// pp.setPriceDate(getDateOrdered());
//

View File

@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
/**
*
*/
private static final long serialVersionUID = -5006794875155447942L;
private static final long serialVersionUID = -1378971388226313818L;
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
@ -160,6 +160,7 @@ public class MSysConfig extends X_AD_SysConfig
public static final String ZK_FOOTER_SERVER_MSG = "ZK_FOOTER_SERVER_MSG";
public static final String ZK_GRID_EDIT_MODELESS = "ZK_GRID_EDIT_MODELESS";
public static final String ZK_INFO_NUM_PAGE_PRELOAD = "ZK_INFO_NUM_PAGE_PRELOAD";
public static final String ZK_LOGIN_ALLOW_CHROME_SAVE_PASSWORD = "ZK_LOGIN_ALLOW_CHROME_SAVE_PASSWORD";
public static final String ZK_LOGIN_ALLOW_REMEMBER_ME = "ZK_LOGIN_ALLOW_REMEMBER_ME";
public static final String ZK_LOGO_LARGE = "ZK_LOGO_LARGE";
public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL";

View File

@ -0,0 +1,28 @@
package org.compiere.model;
import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
public class MWFActivityApprover extends X_AD_WF_ActivityApprover {
private static final long serialVersionUID = -7135169624317070006L;
public MWFActivityApprover(Properties ctx, int AD_WF_ActivityApprover_ID, String trxName) {
super(ctx, AD_WF_ActivityApprover_ID, trxName);
}
public MWFActivityApprover(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
}
public static MWFActivityApprover[] getOfActivity(Properties ctx, int ad_WF_Activity_ID, String trxName) {
final String whereClause = I_AD_WF_ActivityApprover.COLUMNNAME_AD_WF_Activity_ID+"=?";
List<MWFActivityApprover> list = new Query(ctx,I_AD_WF_ActivityApprover.Table_Name,whereClause,trxName)
.setParameters(ad_WF_Activity_ID)
.list();
MWFActivityApprover[] retValue = new MWFActivityApprover[list.size ()];
list.toArray (retValue);
return retValue;
}
}

View File

@ -52,6 +52,7 @@ import org.adempiere.exceptions.DBException;
import org.adempiere.process.UUIDGenerator;
import org.compiere.Adempiere;
import org.compiere.acct.Doc;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.CCache;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
@ -1000,7 +1001,7 @@ public abstract class PO
{
int index = p_info.getColumnIndex(AD_Column_ID);
if (index < 0)
log.log(Level.SEVERE, "Not found - AD_Column_ID=" + AD_Column_ID);
throw new AdempiereUserError("Not found - AD_Column_ID=" + AD_Column_ID);
String ColumnName = p_info.getColumnName(index);
if (ColumnName.equals("IsApproved"))
return set_ValueNoCheck(ColumnName, value);

View File

@ -0,0 +1,163 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/** Generated Model for AD_WF_ActivityApprover
* @author iDempiere (generated)
* @version Release 4.1 - $Id$ */
public class X_AD_WF_ActivityApprover extends PO implements I_AD_WF_ActivityApprover, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20170809L;
/** Standard Constructor */
public X_AD_WF_ActivityApprover (Properties ctx, int AD_WF_ActivityApprover_ID, String trxName)
{
super (ctx, AD_WF_ActivityApprover_ID, trxName);
/** if (AD_WF_ActivityApprover_ID == 0)
{
setAD_User_ID (0);
setAD_WF_ActivityApprover_ID (0);
setAD_WF_Activity_ID (0);
} */
}
/** Load Constructor */
public X_AD_WF_ActivityApprover (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_WF_ActivityApprover[")
.append(get_ID()).append("]");
return sb.toString();
}
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
{
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
.getPO(getAD_User_ID(), get_TrxName()); }
/** Set User/Contact.
@param AD_User_ID
User within the system - Internal or Business Partner Contact
*/
public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 1)
set_Value (COLUMNNAME_AD_User_ID, null);
else
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
}
/** Get User/Contact.
@return User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Workflow Activity Approver.
@param AD_WF_ActivityApprover_ID Workflow Activity Approver */
public void setAD_WF_ActivityApprover_ID (int AD_WF_ActivityApprover_ID)
{
if (AD_WF_ActivityApprover_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_WF_ActivityApprover_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_WF_ActivityApprover_ID, Integer.valueOf(AD_WF_ActivityApprover_ID));
}
/** Get Workflow Activity Approver.
@return Workflow Activity Approver */
public int getAD_WF_ActivityApprover_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_ActivityApprover_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set AD_WF_ActivityApprover_UU.
@param AD_WF_ActivityApprover_UU AD_WF_ActivityApprover_UU */
public void setAD_WF_ActivityApprover_UU (String AD_WF_ActivityApprover_UU)
{
set_Value (COLUMNNAME_AD_WF_ActivityApprover_UU, AD_WF_ActivityApprover_UU);
}
/** Get AD_WF_ActivityApprover_UU.
@return AD_WF_ActivityApprover_UU */
public String getAD_WF_ActivityApprover_UU ()
{
return (String)get_Value(COLUMNNAME_AD_WF_ActivityApprover_UU);
}
public org.compiere.model.I_AD_WF_Activity getAD_WF_Activity() throws RuntimeException
{
return (org.compiere.model.I_AD_WF_Activity)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Activity.Table_Name)
.getPO(getAD_WF_Activity_ID(), get_TrxName()); }
/** Set Workflow Activity.
@param AD_WF_Activity_ID
Workflow Activity
*/
public void setAD_WF_Activity_ID (int AD_WF_Activity_ID)
{
if (AD_WF_Activity_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_WF_Activity_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_WF_Activity_ID, Integer.valueOf(AD_WF_Activity_ID));
}
/** Get Workflow Activity.
@return Workflow Activity
*/
public int getAD_WF_Activity_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_Activity_ID);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -30,7 +30,7 @@ public class X_AD_WF_Responsible extends PO implements I_AD_WF_Responsible, I_Pe
/**
*
*/
private static final long serialVersionUID = 20161030L;
private static final long serialVersionUID = 20170809L;
/** Standard Constructor */
public X_AD_WF_Responsible (Properties ctx, int AD_WF_Responsible_ID, String trxName)
@ -41,7 +41,7 @@ public class X_AD_WF_Responsible extends PO implements I_AD_WF_Responsible, I_Pe
setAD_Role_ID (0);
setAD_WF_Responsible_ID (0);
setEntityType (null);
// U
// @SQL=select get_sysconfig('DEFAULT_ENTITYTYPE','U',0,0) from dual
setName (null);
setResponsibleType (null);
} */
@ -240,6 +240,8 @@ public class X_AD_WF_Responsible extends PO implements I_AD_WF_Responsible, I_Pe
public static final String RESPONSIBLETYPE_Role = "R";
/** System Resource = S */
public static final String RESPONSIBLETYPE_SystemResource = "S";
/** Manual = M */
public static final String RESPONSIBLETYPE_Manual = "M";
/** Set Responsible Type.
@param ResponsibleType
Type of the Responsibility for a workflow

View File

@ -1,6 +1,5 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* Product: ADempiereLBR - ADempiere Localization Brazil *
* 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 *
@ -10,18 +9,18 @@
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.util;
import java.math.BigDecimal;
/**
* Portuguese Amount in Words
*
* @author Jorg Janke - http://www.rgagnon.com/javadetails/java-0426.html
* @translator emontenegro
* @version $Id: AmtInWords_PT.java,v 1.0 2008/01/07 00:54:36 jjanke Exp $
* @translator emontenegro, ralexsander
* @contributor mgrigioni - UTF-8 Code
* @version $Id: AmtInWords_PT.java,v 1.0 2008/01/07 00:54:36 ralexsander Exp $
*/
public class AmtInWords_PT implements AmtInWords
{
@ -33,24 +32,48 @@ public class AmtInWords_PT implements AmtInWords
super ();
} // AmtInWords_PT
private static final String[] centsNames = {
"",
"",
"",
" D\u00e9cimo de",
" Cent\u00e9simo de",
" Mil\u00e9simo de",
" Milion\u00e9simo de",
" Bilion\u00e9simo de",
" Trilion\u00e9simo de"
};
private static final String[] centsNamesPlural = {
"",
"",
"",
" D\u00e9cimos de",
" Cent\u00e9simos de",
" Mil\u00e9simos de",
" Milion\u00e9simos de",
" Bilion\u00e9simos de",
" Trilion\u00e9simos de"
};
private static final String[] majorNames = {
"",
" Mil",
" Milhão",
" Bilhão",
" Trilhão",
" Quatrilhão",
" Quinquilhão"
" Milh\u00e3o",
" Bilh\u00e3o",
" Trilh\u00e3o",
" Quatrilh\u00e3o",
" Quinquilh\u00e3o"
};
private static final String[] majorNamesPlural = {
"",
" Mil",
" Milhões",
" Bilhões",
" Trilhões",
" Quatrilhões",
" Quinquilhões"
" Milh\u00f5es",
" Bilh\u00f5es",
" Trilh\u00f5es",
" Quatrilh\u00f5es",
" Quinquilh\u00f5es"
};
private static final String[] tensNames = {
@ -59,7 +82,7 @@ public class AmtInWords_PT implements AmtInWords
" Vinte",
" Trinta",
" Quarenta",
" Cinqüenta",
" Cinq\u00fcenta",
" Sessenta",
" Setenta",
" Oitenta",
@ -70,7 +93,7 @@ public class AmtInWords_PT implements AmtInWords
"",
" Um",
" Dois",
" Três",
" Tr\u00eas",
" Quatro",
" Cinco",
" Seis",
@ -111,7 +134,7 @@ public class AmtInWords_PT implements AmtInWords
if (s.endsWith ("2") && !soFar.equals(""))
soFar = " Vinte e " + soFar.trim ();
else if (soFar.equals(""))
soFar = tensNames[number % 10] + " e" + soFar;
soFar = tensNames[number % 10] + soFar;
else
soFar = tensNames[number % 10] + " e" + soFar;
number /= 10;
@ -134,29 +157,31 @@ public class AmtInWords_PT implements AmtInWords
* @param number
* @return amt
*/
private String convert (int number)
private String convert (BigDecimal number)
{
/* special case */
if (number == 0)
if (number.compareTo(Env.ZERO) == 0)
return "";
if (number == 1)
if (number.compareTo(Env.ONE) == 0)
return "Um";
if (number == -1)
if (number.compareTo(Env.ONE.negate()) == 0)
return "Menos Um";
String prefix = "";
if (number < 0)
if (number.compareTo(Env.ZERO) == -1)
{
number = -number;
number = number.negate();
prefix = "Menos";
}
if (number > 1000000 && number < 2000000){
/*if ((number >= 1000000 && number < 2000000)
|| (number >= 1000000000 && number < 2000000000)){
prefix = "Um";
}
}*/
String soFar = "";
int place = 0;
do
{
int n = number % 1000;
int n = number.divideAndRemainder(new BigDecimal(1000))[1].intValue();/// % 1000;
if (n != 0)
{
String s = convertLessThanOneThousand (n);
@ -168,9 +193,9 @@ public class AmtInWords_PT implements AmtInWords
{
s = s.replaceFirst ("Dois Cento es", "Duzentos");
}
if (s.startsWith ("Três Cento es", 1))
if (s.startsWith ("Tr\u00eas Cento es", 1))
{
s = s.replaceFirst ("Três Cento es", "Trezentos");
s = s.replaceFirst ("Tr\u00eas Cento es", "Trezentos");
}
if (s.startsWith ("Quatro Cento es", 1))
{
@ -198,23 +223,39 @@ public class AmtInWords_PT implements AmtInWords
}
if (s.equals(" Um"))
{
soFar = majorNames[place] + soFar;
soFar = s + majorNames[place] + (soFar.equals("") ? "" : " e" + soFar);
}
else {
if (n > 1) {
soFar = s + majorNamesPlural[place] + soFar;
} else {
soFar = s + majorNames[place] + soFar;
}
if (n > 1)
{
soFar = s + majorNamesPlural[place] + (soFar.equals("") ? "" : " e" + soFar);
//soFar = s + majorNamesPlural[place] + soFar;
}
else
{
soFar = s + majorNames[place] + (soFar.equals("") ? "" : " e" + soFar);
}
}
}
place++;
number /= 1000;
number = number.divideAndRemainder(new BigDecimal(1000))[0];
}
while (number > 0);
return (prefix + soFar).trim ();
while (number.compareTo(Env.ZERO) == 1);
return (prefix + soFar)
.replaceAll(" e Mil", " Mil")
.trim ();
} // convert
public String getAmtInWords (BigDecimal amount) throws Exception
{
amount = amount.setScale(2, BigDecimal.ROUND_HALF_UP);
String samount = amount.toString();
samount = samount.replaceAll("\\.", ",");
return getAmtInWords(samount);
}
/**************************************************************************
* Get Amount in Words
@ -227,130 +268,184 @@ public class AmtInWords_PT implements AmtInWords
if (amount == null)
return amount;
//
StringBuilder sb = new StringBuilder ();
// int pos = amount.lastIndexOf ('.'); // Old
int pos = amount.lastIndexOf (',');
// int pos2 = amount.lastIndexOf (','); // Old
int pos2 = amount.lastIndexOf ('.');
StringBuffer sb = new StringBuffer ();
int pos = amount.lastIndexOf ('.'); // Old
// int pos = amount.lastIndexOf (',');
int pos2 = amount.lastIndexOf (','); // Old
// int pos2 = amount.lastIndexOf ('.');
if (pos2 > pos)
pos = pos2;
String oldamt = amount;
// amount = amount.replaceAll (",", ""); // Old
amount = amount.replaceAll ("\\.", "").replaceAll (",", "."); // Old
String vlr = amount.replaceAll (",", ".");
amount = amount.replaceAll( "\\.","");
// int newpos = amount.lastIndexOf ('.'); // Old
int newpos = amount.lastIndexOf (',');
int pesos = Integer.parseInt (amount.substring (0, newpos));
int newpos = amount.lastIndexOf ('.'); // Old
// int newpos = amount.lastIndexOf (',');
if (newpos == -1) newpos = amount.length();
BigDecimal reais = new BigDecimal(amount.substring (0, newpos));
double valor = Double.parseDouble(vlr);
sb.append (convert (pesos));
sb.append (convert (reais));
for (int i = 0; i < oldamt.length (); i++)
{
if (pos == i) // we are done
{
String cents = oldamt.substring (i + 1);
if (valor > 0 && valor < 1) {
if (Integer.parseInt(cents) > 0)
String cents = oldamt.substring (i + 1);
do
{
if (Integer.parseInt(cents) > 1)
if(cents.endsWith("0") && cents.length() > 2)
cents = cents.substring(0, cents.length() -1);
}
while (cents.endsWith("0") && cents.length() > 2);
if (valor > 0 && valor < 1)
{
if (Integer.parseInt(cents) > 0)
{
//sb.append (' ')
//.append("e ")
sb.append (convert(Integer.parseInt(cents)))
.append(" Centavos");
// .append ("/100");
// .append ("/100 PESOS");
if (Integer.parseInt(cents) > 1)
{
sb.append (convert(new BigDecimal(cents)))
.append(" Centavos");
}
else
{
sb.append (convert(new BigDecimal(cents)))
.append(" Centavo");
}
}
else {
//sb.append (' ')
//.append("e ")
sb.append (convert(Integer.parseInt(cents)))
.append(" Centavo");
// .append ("/100");
// .append ("/100 PESOS");
}
}
}
else if ((valor > 1 && valor < 2) || (valor > -2 && valor < -1)){
if (Integer.parseInt(cents) > 0)
{
if (Integer.parseInt(cents) > 1)
{
sb.append (' ')
.append("Real e ")
.append (convert(Integer.parseInt(cents)))
.append(" Centavos");
// .append ("/100");
// .append ("/100 PESOS");
}
else {
sb.append (' ')
.append("Real e ")
.append (convert(Integer.parseInt(cents)))
.append(" Centavo");
// .append ("/100");
// .append ("/100 PESOS");
}
break;
}
}
else if (valor > -1 && valor < 0){
if (Integer.parseInt(cents) > 0)
else if ((valor > 1 && valor < 2) || (valor > -2 && valor < -1))
{
if (Integer.parseInt(cents) > 1)
if (Integer.parseInt(cents) > 0)
{
sb.append ("Menos ")
// .append("Real e ")
.append (convert(Integer.parseInt(cents)))
.append(" Centavos");
// .append ("/100");
// .append ("/100 PESOS");
if (Integer.parseInt(cents) > 1)
{
sb.append (' ')
.append("Real e ")
.append (convert(new BigDecimal(cents)))
.append(" Centavos");
}
else
{
sb.append (' ')
.append("Real e ")
.append (convert(new BigDecimal(cents)))
.append(" Centavo");
}
break;
}
else {
sb.append ("Menos ")
//.append("Real e ")
.append (convert(Integer.parseInt(cents)))
.append(" Centavo");
// .append ("/100");
// .append ("/100 PESOS");
}
break;
}
}
else {
if (Integer.parseInt(cents) > 0)
else if (valor > -1 && valor < 0)
{
if (Integer.parseInt(cents) > 1)
if (Integer.parseInt(cents) > 0)
{
sb.append (' ')
.append("Reais e ")
.append (convert(Integer.parseInt(cents)))
.append(" Centavos");
// .append ("/100");
// .append ("/100 PESOS");
if (Integer.parseInt(cents) > 1)
{
sb.append ("Menos ")
.append (convert(new BigDecimal(cents)))
.append(centsNamesPlural[cents.length()])
.append(centsNamesPlural[cents.length()].equals("") ? " Centavos" : " Centavo");
}
else
{
sb.append ("Menos ")
.append (convert(new BigDecimal(cents)))
.append(centsNames[cents.length()])
.append(" Centavo");
}
break;
}
else {
sb.append (' ')
.append("Reais e ")
.append (convert(Integer.parseInt(cents)))
.append(" Centavo");
// .append ("/100");
// .append ("/100 PESOS");
}
break;
}
else
{
if (!cents.equals("") && Integer.parseInt(cents) > 0)
{
if (Integer.parseInt(cents) > 1)
{
sb.append (' ')
.append("Reais e ")
.append (convert(new BigDecimal(cents)))
.append(centsNamesPlural[cents.length()])
.append(centsNamesPlural[cents.length()].equals("") ? " Centavos" : " Centavo");
}
else
{
sb.append (' ')
.append("Reais e ")
.append (convert(new BigDecimal(cents)))
.append(centsNames[cents.length()])
.append(" Centavo");
}
break;
}
else
{
if (reais.abs().compareTo(Env.ONE) == 0)
sb.append(" Real");
else
sb.append(" Reais");
}
}
}
}
return sb.toString ();
if (pos == -1){
if (reais.abs().compareTo(Env.ONE) == 0)
sb.append(" Real");
else
sb.append(" Reais");
}
/** Corre\u00e7\u00f5es */
String result;
result = sb.toString ()
.replaceAll(" e Quinquilh", " Quinquilh")
.replaceAll(" e Quatrilh", " Quatrilh")
.replaceAll(" e Trilh", " Trilh")
.replaceAll(" e Bilh", " Bilh")
.replaceAll(" e Milh", " Milh")
.replaceAll("\u00f5es Reais", "\u00f5es de Reais")
.replaceAll("\u00e3o Reais", "\u00e3o de Reais")
.replaceAll(" e Reais", " Reais")
.replaceAll(", de", " de");
if (result.indexOf("Quinquilh") > 0 && result.indexOf("Quatrilh") > 0 && result.indexOf("Quatrilh\u00f5es de Rea") == -1 && result.indexOf("Quatrilh\u00e3o de Rea") == -1)
result = result.replaceAll("Quinquilh\u00f5es e", "Quinquilh\u00f5es,").replaceAll("Quinquilh\u00e3o e", "Quinquilh\u00e3o,");
if (result.indexOf("Quatrilh") > 0 && result.indexOf("Trilh") > 0 && result.indexOf("Trilh\u00f5es de Rea") == -1 && result.indexOf("Trilh\u00e3o de Rea") == -1)
result = result.replaceAll("Quatrilh\u00f5es e", "Quatrilh\u00f5es,").replaceAll("Quatrilh\u00e3o e", "Quatrilh\u00e3o,");
if (result.indexOf("Trilh") > 0 && result.indexOf("Bilh") > 0 && result.indexOf("Bilh\u00f5es de Rea") == -1 && result.indexOf("Bilh\u00e3o de Rea") == -1)
result = result.replaceAll("Trilh\u00f5es e", "Trilh\u00f5es,").replaceAll("Trilh\u00e3o e", "Trilh\u00e3o,");
if (result.indexOf("Bilh") > 0 && result.indexOf("Milh") > 0 && result.indexOf("Milh\u00f5es de Rea") == -1 && result.indexOf("Milh\u00e3o de Rea") == -1)
result = result.replaceAll("Bilh\u00f5es e", "Bilh\u00f5es,").replaceAll("Bilh\u00e3o e", "Bilh\u00e3o,");
if (result.indexOf("Milh") > 0 && result.indexOf(" de Rea") == -1 && result.indexOf("Mil e") > 0)
result = result.replaceAll("Milh\u00f5es e", "Milh\u00f5es,").replaceAll("Milh\u00e3o e", "Milh\u00e3o,");
return result ;
} // getAmtInWords
public static void main(String[] args) throws Exception {
public static void main(String[] args) throws Exception
{
AmtInWords_PT aiw = new AmtInWords_PT();
// for (int i=0; i<=2147000000; i++)
// System.out.println(aiw.getAmtInWords(i+",00"));
System.out.println(aiw.getAmtInWords("134502932,01"));
System.out.println(aiw.getAmtInWords("42"));
System.out.println(aiw.getAmtInWords("0,42"));
System.out.println(aiw.getAmtInWords("100"));
System.out.println(aiw.getAmtInWords("100,00"));
System.out.println(aiw.getAmtInWords("1003,00"));
System.out.println(aiw.getAmtInWords("5715,13"));
System.out.println(aiw.getAmtInWords("5715,11"));
System.out.println(aiw.getAmtInWords("5715,20"));
System.out.println(aiw.getAmtInWords("5715,30"));
System.out.println(aiw.getAmtInWords("5715,44"));
System.out.println(aiw.getAmtInWords("5715,55"));
System.out.println(aiw.getAmtInWords("5715,60"));
System.out.println(aiw.getAmtInWords("5715,79"));
System.out.println(aiw.getAmtInWords("5715,82"));
System.out.println(aiw.getAmtInWords("5715,90"));
System.out.println(aiw.getAmtInWords(new BigDecimal(51.34)));
}
} // AmtInWords_PT

View File

@ -1673,6 +1673,13 @@ public final class Env
outStr.append("@");
}
}
else if (keepUnparseable)
{
outStr.append("@"+token);
if (format.length() > 0)
outStr.append("<"+format+">");
outStr.append("@");
}
inStr = inStr.substring(j+1, inStr.length()); // from second @
i = inStr.indexOf('@');

View File

@ -992,8 +992,6 @@ public class Login
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
//
Ini.saveProperties(Ini.isClient());
// Country
Env.setContext(m_ctx, "#C_Country_ID", MCountry.getDefault(m_ctx).getC_Country_ID());
// Call ModelValidators afterLoadPreferences - teo_sarca FR [ 1670025 ]

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.wf;
import static org.compiere.model.SystemIDs.MESSAGE_WORKFLOWRESULT;
import java.io.File;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
@ -49,14 +51,15 @@ import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.MUser;
import org.compiere.model.MUserRoles;
import org.compiere.model.MWFActivityApprover;
import org.compiere.model.PO;
import org.compiere.model.Query;
import static org.compiere.model.SystemIDs.*;
import org.compiere.model.X_AD_WF_Activity;
import org.compiere.print.ReportEngine;
import org.compiere.process.DocAction;
import org.compiere.process.ProcessInfo;
import org.compiere.process.StateEngine;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -1218,6 +1221,17 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
}
}
}
else if(resp.isManual()) {
MWFActivityApprover[] approvers = MWFActivityApprover.getOfActivity(getCtx(), getAD_WF_Activity_ID(), get_TrxName());
for (int i = 0; i < approvers.length; i++)
{
if(approvers[i].getAD_User_ID() == Env.getAD_User_ID(getCtx()))
{
autoApproval = true;
break;
}
}
}
else if(resp.isOrganization())
{
throw new AdempiereException("Support not implemented for "+resp);
@ -1274,9 +1288,43 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
dbValue = new Boolean("Y".equals(value));
else if (DisplayType.isNumeric(displayType))
dbValue = new BigDecimal (value);
else if (DisplayType.isID(displayType)) {
MColumn column = MColumn.get(Env.getCtx(), getNode().getAD_Column_ID());
String referenceTableName = column.getReferenceTableName();
if (referenceTableName != null) {
MTable refTable = MTable.get(Env.getCtx(), referenceTableName);
dbValue = Integer.valueOf(value);
boolean validValue = true;
PO po = refTable.getPO((Integer)dbValue, trx.getTrxName());
if (po == null || po.get_ID() == 0) {
// foreign key does not exist
validValue = false;
}
if (validValue && po.getAD_Client_ID() != Env.getAD_Client_ID(Env.getCtx())) {
validValue = false;
if (po.getAD_Client_ID() == 0) {
String accessLevel = refTable.getAccessLevel();
if ( MTable.ACCESSLEVEL_All.equals(accessLevel)
|| MTable.ACCESSLEVEL_SystemPlusClient.equals(accessLevel)) {
// client foreign keys are OK if the table has reference All or System+Client
validValue = true;
}
}
}
if (! validValue) {
throw new Exception("Persistent Object not updated - AD_Table_ID="
+ getAD_Table_ID() + ", Record_ID=" + getRecord_ID()
+ " - Value=" + value + " is not valid for a foreign key");
}
}
}
else
dbValue = value;
m_po.set_ValueOfColumn(getNode().getAD_Column_ID(), dbValue);
if (!m_po.set_ValueOfColumnReturningBoolean(getNode().getAD_Column_ID(), dbValue)) {
throw new Exception("Persistent Object not updated - AD_Table_ID="
+ getAD_Table_ID() + ", Record_ID=" + getRecord_ID()
+ " - Value=" + value + " error : " + CLogger.retrieveErrorString("check logs"));
}
m_po.saveEx();
if (dbValue != null && !dbValue.equals(m_po.get_ValueOfColumn(getNode().getAD_Column_ID())))
throw new Exception("Persistent Object not updated - AD_Table_ID="

View File

@ -22,6 +22,7 @@ import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.PO;
import org.compiere.util.Env;
import org.compiere.model.X_AD_WF_NextCondition;
/**
@ -130,15 +131,20 @@ public class MWFNextCondition extends X_AD_WF_NextCondition
{
String sRet = sValue;
if(sValue != null && sValue.startsWith("@"))
if (sValue == null)
;
else if (sValue.startsWith("@COL="))
{
if(sValue.startsWith("@COL="))
{
Object o = po.get_Value(sValue.substring(5));
if(o != null)
sRet = o.toString();
}
Object o = po.get_Value(sValue.substring(5));
//
if(o != null)
sRet = o.toString();
}
else if (sValue.startsWith("@")
&& sValue.endsWith("@")
&& sValue.length() > 1)
{
sRet = Env.parseVariable (sValue, po, null, false);
}
return sRet;

View File

@ -30,6 +30,7 @@ import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.compiere.model.MColumn;
import org.compiere.model.MRole;
import org.compiere.model.Query;
import org.compiere.model.X_AD_WF_Node;
import org.compiere.util.CCache;
@ -603,6 +604,16 @@ public class MWFNode extends X_AD_WF_Node
log.saveError("FillMandatory", Msg.getElement(getCtx(), "AttributeValue"));
return false;
}
if (getAD_Column_ID() > 0) {
// validate that just advanced roles can manipulate secure content via workflows
MColumn column = MColumn.get(getCtx(), getAD_Column_ID());
if (column.isSecure() || column.isAdvanced()) {
if (! MRole.getDefault().isAccessAdvanced()) {
log.saveError("AccessTableNoUpdate", Msg.getElement(getCtx(), column.getColumnName()));
return false;
}
}
}
}
else if (action.equals(ACTION_SubWorkflow))
{

View File

@ -25,6 +25,7 @@ import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.model.X_AD_WF_NodeNext;
import org.compiere.process.DocAction;
import org.compiere.util.Env;
/**
* Workflow Node Next - Transition
@ -127,9 +128,9 @@ public class MWFNodeNext extends X_AD_WF_NodeNext
if (!requery && m_conditions != null)
return m_conditions;
//
final String whereClause = MWFNextCondition.COLUMNNAME_AD_WF_NodeNext_ID+"=?";
final String whereClause = "AD_WF_NodeNext_ID=? AND AD_Client_ID IN (0,?)";
List<MWFNextCondition> list = new Query(getCtx(), MWFNextCondition.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{getAD_WF_NodeNext_ID()})
.setParameters(new Object[]{getAD_WF_NodeNext_ID(), Env.getAD_Client_ID(Env.getCtx())})
.setOnlyActiveRecords(true)
.setOrderBy(MWFNextCondition.COLUMNNAME_SeqNo)
.list();

View File

@ -34,12 +34,11 @@ import org.compiere.util.Msg;
public class MWFResponsible extends X_AD_WF_Responsible
{
/**
*
*/
private static final long serialVersionUID = 8662580480797818563L;
* long - serialVersionUID.
*/
private static final long serialVersionUID = 4167967243996935999L;
/**
/**
* Get WF Responsible from Cache
* @param ctx context
* @param AD_WF_Responsible_ID id
@ -89,7 +88,7 @@ public class MWFResponsible extends X_AD_WF_Responsible
*/
public boolean isInvoker()
{
return getAD_User_ID() == 0 && getAD_Role_ID() == 0;
return getAD_User_ID() == 0 && getAD_Role_ID() == 0 && !isManual();
} // isInvoker
/**
@ -157,6 +156,10 @@ public class MWFResponsible extends X_AD_WF_Responsible
if (!RESPONSIBLETYPE_Role.equals(getResponsibleType()) && getAD_Role_ID() > 0)
setAD_Role_ID(0);
if (RESPONSIBLETYPE_Manual.equals(getResponsibleType())) {
setAD_User_ID(0);
setAD_Role_ID(0);
}
return true;
} // beforeSave
@ -178,4 +181,8 @@ public class MWFResponsible extends X_AD_WF_Responsible
return sb.toString ();
} // toString
public boolean isManual() {
return RESPONSIBLETYPE_Manual.equals(getResponsibleType());
}
} // MWFResponsible

View File

@ -463,25 +463,25 @@ public class ConfigurationConsole {
{
writer.println("Database Type ["+(dbTypeSelected+1)+"]");
String input = reader.readLine();
if (input != null && input.trim().length() > 0)
try
{
try
if (input == null || input.trim().length() == 0)
{
int inputIndex = Integer.parseInt(input);
if (inputIndex <= 0 || inputIndex > ConfigurationData.DBTYPE.length)
{
writer.println("Invalid input, please enter numeric value of 1 to " + ConfigurationData.DBTYPE.length);
continue;
}
data.initDatabase(ConfigurationData.DBTYPE[inputIndex-1]);
data.setDatabaseType(ConfigurationData.DBTYPE[inputIndex-1]);
break;
input = Integer.toString(dbTypeSelected+1);
}
catch (NumberFormatException e){
int inputIndex = Integer.parseInt(input);
if (inputIndex <= 0 || inputIndex > ConfigurationData.DBTYPE.length)
{
writer.println("Invalid input, please enter numeric value of 1 to " + ConfigurationData.DBTYPE.length);
continue;
}
data.initDatabase(ConfigurationData.DBTYPE[inputIndex-1]);
data.setDatabaseType(ConfigurationData.DBTYPE[inputIndex-1]);
break;
}
catch (NumberFormatException e){
writer.println("Invalid input, please enter numeric value of 1 to " + ConfigurationData.DBTYPE.length);
}
break;
}
}
}

View File

@ -55,7 +55,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
String language = getStringValue(element, "AD_Language");
MLanguage lang = MLanguage.get(ctx.ctx, language);
// skip if not system installed language
if (! lang.isSystemLanguage())
if (lang == null || ! lang.isSystemLanguage())
return;
if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+getStringValue(element, "Name"));

View File

@ -17,5 +17,21 @@ goto START
@Echo Starting iDempiere Server ...
@Echo =======================================
CALL utils\myEnvironment.bat Server
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
@"%JAVA%" -Dosgi.console=localhost:12612 -Djetty.home=jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-selector.xml,etc/jetty-ssl.xml,etc/jetty-https.xml,etc/jetty-deployer.xml -XX:MaxPermSize=192m -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -jar %JARFILE% -application org.adempiere.server.application
@Set VMOPTS=-Xbootclasspath/p:alpn-boot.jar
@Set VMOPTS=%VMOPTS% -Xbootclasspath/p:alpn-boot.jar
@Set VMOPTS=%VMOPTS% -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.eclipse.jetty.alpn
@Set VMOPTS=%VMOPTS% -Dosgi.compatibility.bootdelegation=true
@Set VMOPTS=%VMOPTS% -Djetty.home=jettyhome
@Set VMOPTS=%VMOPTS% -Djetty.base=jettyhome
@Set VMOPTS=%VMOPTS% -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml
@Set VMOPTS=%VMOPTS% -Dosgi.console=localhost:12612
@Set VMOPTS=%VMOPTS% -Dmail.mime.encodefilename=true
@Set VMOPTS=%VMOPTS% -Dmail.mime.decodefilename=true
@Set VMOPTS=%VMOPTS% -Dmail.mime.encodeparameters=true
@Set VMOPTS=%VMOPTS% -Dmail.mime.decodeparameters=true
@"%JAVA%" %IDEMPIERE_JAVA_OPTIONS% %VMOPTS% -jar %JARFILE% -application org.adempiere.server.application

View File

@ -18,5 +18,19 @@ echo Starting iDempiere Server
echo ===================================
unset DISPLAY
BASE=`dirname $( readlink -f idempiere-server.sh )`
$JAVA ${DEBUG} -Xbootclasspath/p:alpn-boot.jar -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.eclipse.jetty.alpn -Dosgi.compatibility.bootdelegation=true -Djetty.home=$BASE/jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml -Dosgi.console=localhost:12612 -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -jar $BASE/plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.server.application
BASE=`dirname $( readlink -f $0 )`
. $BASE/utils/myEnvironment.sh Server
VMOPTS="-Xbootclasspath/p:alpn-boot.jar
-Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.eclipse.jetty.alpn
-Dosgi.compatibility.bootdelegation=true
-Djetty.home=$BASE/jettyhome
-Djetty.base=$BASE/jettyhome
-Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml
-Dosgi.console=localhost:12612
-Dmail.mime.encodefilename=true
-Dmail.mime.decodefilename=true
-Dmail.mime.encodeparameters=true
-Dmail.mime.decodeparameters=true"
$JAVA ${DEBUG} $IDEMPIERE_JAVA_OPTIONS $VMOPTS -jar $BASE/plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.server.application

View File

@ -64,10 +64,10 @@ export ADEMPIERE_KEYSTOREPASS
# Java
ADEMPIERE_JAVA=$JAVA_HOME/bin/java
export ADEMPIERE_JAVA
ADEMPIERE_JAVA_OPTIONS="@ADEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=$IDEMPIERE_HOME"
export ADEMPIERE_JAVA_OPTIONS
IDEMPIERE_JAVA_OPTIONS="@IDEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=$IDEMPIERE_HOME"
export IDEMPIERE_JAVA_OPTIONS
if [ $DOLLAR$# -eq 0 ]
then
cp myEnvironment.sh myEnvironment.sav
cp $IDEMPIERE_HOME/utils/myEnvironment.sh $IDEMPIERE_HOME/utils/myEnvironment.sav
fi

View File

@ -46,9 +46,9 @@
@Rem Java
@SET ADEMPIERE_JAVA=@JAVA_HOME@\bin\java
@SET ADEMPIERE_JAVA_OPTIONS=@ADEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=@IDEMPIERE_HOME@
@SET IDEMPIERE_JAVA_OPTIONS=@IDEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=@IDEMPIERE_HOME@
@SET CLASSPATH="@IDEMPIERE_HOME@\lib\Adempiere.jar;@IDEMPIERE_HOME@\lib\AdempiereCLib.jar;"
@Rem Save Environment file
@if (%1) == () copy myEnvironment.bat myEnvironment_%RANDOM%.bat /Y
@if (%1) == () copy utils\myEnvironment.bat utils\myEnvironment_%RANDOM%.bat /Y

View File

@ -266,15 +266,8 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
//update session context
currSess.setAttribute(SessionContextListener.SESSION_CTX, ServerContext.getCurrentInstance());
if ("Y".equalsIgnoreCase(Env.getContext(ctx, BrowserToken.REMEMBER_ME)) && MSystem.isZKRememberUserAllowed())
{
MUser user = MUser.get(ctx);
BrowserToken.save(mSession, user);
}
else
{
BrowserToken.remove();
}
MUser user = MUser.get(ctx);
BrowserToken.save(mSession, user);
Env.setContext(ctx, "#UIClient", "zk");
StringBuilder localHttpAddr = new StringBuilder(Executions.getCurrent().getScheme());
@ -508,7 +501,6 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
Env.setContext(properties, Env.AD_ROLE_ID, Env.getAD_Role_ID(Env.getCtx()));
Env.setContext(properties, Env.AD_ORG_NAME, Env.getContext(Env.getCtx(), Env.AD_ORG_NAME));
Env.setContext(properties, Env.M_WAREHOUSE_ID, Env.getContext(Env.getCtx(), Env.M_WAREHOUSE_ID));
Env.setContext(properties, BrowserToken.REMEMBER_ME, Env.getContext(Env.getCtx(), BrowserToken.REMEMBER_ME));
Env.setContext(properties, UserPreference.LANGUAGE_NAME, Env.getContext(Env.getCtx(), UserPreference.LANGUAGE_NAME));
Env.setContext(properties, Env.LANGUAGE, Env.getContext(Env.getCtx(), Env.LANGUAGE));
Env.setContext(properties, AEnv.LOCALE, Env.getContext(Env.getCtx(), AEnv.LOCALE));

View File

@ -27,20 +27,32 @@ public class WindowValidatorManager implements BundleActivator, ServiceTrackerCu
public WindowValidator addingService(
ServiceReference<WindowValidator> reference) {
WindowValidator service = context.getService(reference);
String uuid = (String) reference.getProperty("AD_Window_UU");
if (uuid == null || "*".equals(uuid)) {
globalValidators.add(service);
return service;
}
Object obj = reference.getProperty("AD_Window_UU");
if (obj instanceof String) {
String uuid = (String) reference.getProperty("AD_Window_UU");
if (uuid == null || "*".equals(uuid)) {
globalValidators.add(service);
return service;
}
addService(service, uuid);
}
else if (obj instanceof String []) {
String[] uuids = (String []) reference.getProperty("AD_Window_UU");
for (String uuid : uuids)
addService(service, uuid);
}
return service;
}
void addService(WindowValidator service, String uuid) {
List<WindowValidator> list = validatorMap.get(uuid);
if (list == null) {
list = new ArrayList<WindowValidator>();
validatorMap.put(uuid, list);
}
list.add(service);
return service;
}
@Override
@ -51,14 +63,28 @@ public class WindowValidatorManager implements BundleActivator, ServiceTrackerCu
@Override
public void removedService(ServiceReference<WindowValidator> reference,
WindowValidator service) {
String uuid = (String) reference.getProperty("AD_Window_UU");
if (uuid == null || "*".equals(uuid)) {
globalValidators.remove(service);
} else {
List<WindowValidator> list = validatorMap.get(uuid);
if (list != null) {
list.remove(service);
Object obj = reference.getProperty("AD_Window_UU");
if (obj instanceof String) {
String uuid = (String) reference.getProperty("AD_Window_UU");
if (uuid == null || "*".equals(uuid)) {
globalValidators.remove(service);
}
else
removeService(service, uuid);
}
else if (obj instanceof String []) {
String[] uuids = (String []) reference.getProperty("AD_Window_UU");
for (String uuid : uuids)
removeService(service, uuid);
}
}
void removeService(WindowValidator service, String uuid) {
List<WindowValidator> list = validatorMap.get(uuid);
if (list != null) {
list.remove(service);
}
}

View File

@ -329,7 +329,8 @@ public class WWFActivity extends ADForm implements EventListener<Event>
pstmt.setInt (2, AD_User_ID);
pstmt.setInt (3, AD_User_ID);
pstmt.setInt (4, AD_User_ID);
pstmt.setInt (5, AD_Client_ID);
pstmt.setInt (5, AD_User_ID);
pstmt.setInt (6, AD_Client_ID);
rs = pstmt.executeQuery ();
if (rs.next ()) {
count = rs.getInt(1);
@ -378,8 +379,10 @@ public class WWFActivity extends ADForm implements EventListener<Event>
pstmt.setInt (2, AD_User_ID);
pstmt.setInt (3, AD_User_ID);
pstmt.setInt (4, AD_User_ID);
pstmt.setInt (5, AD_Client_ID);
rs = pstmt.executeQuery ();
pstmt.setInt (5, AD_User_ID);
pstmt.setInt (6, AD_Client_ID);
rs = pstmt.executeQuery();
while (rs.next ())
{
MWFActivity activity = new MWFActivity(Env.getCtx(), rs, null);
@ -449,8 +452,10 @@ public class WWFActivity extends ADForm implements EventListener<Event>
+ " AND r.ResponsibleType='H' AND r.AD_User_ID=?)" // #3
// Responsible Role
+ " OR EXISTS (SELECT * FROM AD_WF_Responsible r INNER JOIN AD_User_Roles ur ON (r.AD_Role_ID=ur.AD_Role_ID)"
+ " WHERE a.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND r.ResponsibleType='R' AND ur.AD_User_ID=?)" // #4
//
+ " WHERE a.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND r.ResponsibleType='R' AND ur.AD_User_ID=? AND ur.isActive = 'Y')" // #4
///* Manual Responsible */
+ " OR EXISTS (SELECT * FROM AD_WF_ActivityApprover r "
+ " WHERE a.AD_WF_Activity_ID=r.AD_WF_Activity_ID AND r.AD_User_ID=? AND r.isActive = 'Y')"
+ ") AND a.AD_Client_ID=?"; // #5
return where;
}

View File

@ -124,6 +124,7 @@ public class Textbox extends org.zkoss.zul.Textbox implements EventListener<Even
if ("password".equals(type))
setObscureType(Obscure.OBSCURETYPE_ObscureMaskMax10Asterisk);
super.setType(type);
setClientAttribute("autocomplete", "new-password");
}
}

View File

@ -125,7 +125,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
int winID = lookup.getZoom();
int winIDPO = lookup.getZoom(false) ;
Boolean canAccess = MRole.getDefault().getWindowAccess(winID);
if (winID <= 0 || canAccess == null) {
Boolean canAccessPO = null;
if (winIDPO > 0)
canAccessPO = MRole.getDefault().getWindowAccess(winIDPO);
if ((winID <= 0 || canAccess == null) && (canAccessPO == null || canAccessPO == false)) {
this.zoomEnabled = false;
this.newEnabled = false;
this.updateEnabled = false;

View File

@ -145,7 +145,8 @@ public class WStringEditor extends WEditor implements ContextMenuListener
}
else
getComponent().setMultiline(false);
getComponent().setRows(gridField.getNumLines() <= 0 || tableEditor ? 1 : gridField.getNumLines());
if (! gridField.isAutocomplete()) // avoid -> Combobox doesn't support multiple rows
getComponent().setRows(gridField.getNumLines() <= 0 || tableEditor ? 1 : gridField.getNumLines());
if (getComponent().getRows() > 1)
ZKUpdateUtil.setHeight(getComponent(), "100%");
@ -154,7 +155,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
if(!(this instanceof WPasswordEditor)){ // check password field
popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu = new WEditorPopupMenu(false, gridField.isAutocomplete(), isShowPreference());
addTextEditorMenu(popupMenu);
addChangeLogMenu(popupMenu);
}
@ -289,23 +290,28 @@ public class WStringEditor extends WEditor implements ContextMenuListener
{
WFieldRecordInfo.start(gridField);
}
else if (WEditorPopupMenu.REQUERY_EVENT.equals(evt.getContextEvent()))
{
actionRefresh();
}
}
@Override
public void dynamicDisplay() {
super.dynamicDisplay();
//referesh auto complete list
actionRefresh();
}
public void actionRefresh() {
//refresh auto complete list
if (gridField.isAutocomplete()) {
Combobox combo = (Combobox)getComponent();
List<String> items = gridField.getEntries();
if (items.size() != combo.getItemCount())
{
combo.removeAllItems();
for(String s : items) {
combo.appendItem(s);
}
}
}
Combobox combo = (Combobox)getComponent();
List<String> items = gridField.getEntries();
combo.removeAllItems();
for(String s : items) {
combo.appendItem(s);
}
}
}
private AbstractADWindowContent findADWindowContent() {

View File

@ -164,6 +164,7 @@ public class LoginPanel extends Window implements EventListener<Event>
String token = data[1];
if (BrowserToken.validateToken(session, user, token))
{
onUserIdChange(AD_User_ID);
if (MSystem.isZKRememberUserAllowed()) {
if (email_login) {
txtUserId.setValue(user.getEMail());
@ -174,7 +175,6 @@ public class LoginPanel extends Window implements EventListener<Event>
txtUserId.setValue(user.getName());
}
}
onUserIdChange(AD_User_ID);
chkRememberMe.setChecked(true);
}
if (MSystem.isZKRememberPasswordAllowed()) {
@ -365,10 +365,11 @@ public class LoginPanel extends Window implements EventListener<Event>
txtPassword = new Textbox();
txtPassword.setId("txtPassword");
txtPassword.setType("password");
txtPassword.setCols(25);
// txtPassword.setMaxlength(40);
ZKUpdateUtil.setWidth(txtPassword, "220px");
if (MSysConfig.getBooleanValue(MSysConfig.ZK_LOGIN_ALLOW_CHROME_SAVE_PASSWORD, true))
txtPassword.setClientAttribute("autocomplete", null);
lstLanguage = new Combobox();
lstLanguage.setAutocomplete(true);
@ -567,8 +568,6 @@ public class LoginPanel extends Window implements EventListener<Event>
}
}
Env.setContext(ctx, BrowserToken.REMEMBER_ME, chkRememberMe.isChecked());
Session currSess = Executions.getCurrent().getDesktop().getSession();
KeyNamePair clientsKNPairs[] = login.getClients(userId, userPassword);

View File

@ -143,6 +143,14 @@ public class RolePanel extends Window implements EventListener<Event>, Deferrabl
this.setId("rolePanel");
this.setSclass("login-box");
if (! m_show) {
// check if all mandatory fields are ok to not show
if ( lstRole.getSelectedItem() == null || lstRole.getSelectedItem().getValue() == null
|| lstClient.getSelectedItem() == null || lstClient.getSelectedItem().getValue() == null
|| lstOrganisation.getSelectedItem() == null || lstOrganisation.getSelectedItem().getValue() == null) {
m_show = true;
}
}
if (m_show) {
AuFocus auf = null;
if (lstClient.getItemCount() > 1) {

View File

@ -40,7 +40,6 @@ public final class BrowserToken {
private BrowserToken() {}
public final static String REMEMBER_ME = "Login.RememberMe";
/**
* save session and user as client side token for future auto login
* @param session

View File

@ -1,20 +1,20 @@
bin.includes = feature.xml
root.folder.director=director
root.linux.gtk.x86_64=file:director.sh,file:update.sh
root.linux.gtk.x86_64=file:director.sh,file:update.sh,file:update-prd.sh
root.linux.gtk.x86_64.permissions.755=*.sh,**/*.sh
root.linux.gtk.x86=file:director.sh,file:update.sh
root.linux.gtk.x86=file:director.sh,file:update.sh,file:update-prd.sh
root.linux.gtk.x86.permissions.755=*.sh,**/*.sh
root.macosx.cocoa.x86=file:director.sh,file:update.sh
root.macosx.cocoa.x86=file:director.sh,file:update.sh,file:update-prd.sh
root.macosx.cocoa.x86.permissions.755=*.sh,**/*.sh
root.macosx.cocoa.x86_64=file:director.sh,file:update.sh
root.macosx.cocoa.x86_64=file:director.sh,file:update.sh,file:update-prd.sh
root.macosx.cocoa.x86_64.permissions.755=*.sh,**/*.sh
root.win32.win32.x86=file:director.bat,file:update.bat
root.win32.win32.x86_64=file:director.bat,file:update.bat
root.win32.win32.x86=file:director.bat,file:update.bat,file:update-prd.bat
root.win32.win32.x86_64=file:director.bat,file:update.bat,file:update-prd.bat
root.solaris.gtk.x86=file:director.sh,file:update.sh
root.solaris.gtk.x86=file:director.sh,file:update.sh,file:update-prd.sh
root.solaris.gtk.x86.permissions.755=*.sh,**/*.sh

View File

@ -0,0 +1,11 @@
@Title ... p2 director
@Echo on
cd %~dp0
set DESTINATION=%cd%
@echo %DESTINATION%
@echo %1%
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -u %2%
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -i %2%

View File

@ -0,0 +1,9 @@
#!/bin/sh
#
cd $(dirname "${0}")
DESTINATION=$(pwd)
VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true"
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u $2
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i $2

View File

@ -23,9 +23,7 @@ if exist jettyhome\etc\jetty-selector.xml (
copy jettyhome\etc\jetty-selector.xml jetty-selector.xml.sav
)
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -u org.adempiere.server.product
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -i org.adempiere.server.product
@call %DESTINATION%\update-prd %1% org.adempiere.server.product
copy idempiere.ini.sav idempiere.ini
@ -43,4 +41,3 @@ if exist jetty-selector.xml.sav (
copy jetty-selector.xml.sav jettyhome\etc\jetty-selector.xml
del /q jetty-selector.xml.sav
)

View File

@ -33,9 +33,7 @@ then
cp jettyhome/etc/jetty-selector.xml jetty-selector.xml.sav
fi
VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true"
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u org.adempiere.server.product
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i org.adempiere.server.product
$DESTINATION/update-prd.sh $1 org.adempiere.server.product
cp idempiere.ini.sav idempiere.ini