hg merge release-1.0c (forward-porting)

This commit is contained in:
Carlos Ruiz 2013-07-29 20:46:47 -05:00
commit e6442936b4
86 changed files with 6814 additions and 691 deletions

View File

@ -0,0 +1,13 @@
-- Jul 18, 2013 9:41:34 AM COT
-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','You''re trying to close this tab.',200208,'D','2955ff22-87ac-401a-b5f8-66be72ad82a2','CloseTabFromBrowser?','Y',TO_DATE('2013-07-18 09:41:33','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-07-18 09:41:33','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Jul 18, 2013 9:41:34 AM COT
-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200208 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('20130718094134_IDEMPIERE-984.sql') FROM dual
;

View File

@ -0,0 +1,599 @@
-- Feb 28, 2013 9:10:46 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Table (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Table_UU,AccessLevel,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsCentrallyMaintained,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES (0,0,200066,'7017f8ca-58d1-49a3-958e-e480afac19b7','6','N',TO_DATE('2013-02-28 09:10:44','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','N','Y','N','N','N',0,'AD_ZoomCondition','L','AD_ZoomCondition',TO_DATE('2013-02-28 09:10:44','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:10:47 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200066 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- Feb 28, 2013 9:10:48 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,AD_Sequence_UU,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,200061,'9b7528dd-6a23-4d7b-9f0c-cd1187f6ee61',TO_DATE('2013-02-28 09:10:47','YYYY-MM-DD HH24:MI:SS'),100,1000000,200000,'Table AD_ZoomCondition',1,'Y','N','Y','Y','AD_ZoomCondition','N',1000000,TO_DATE('2013-02-28 09:10:47','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:11:20 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,ReadOnlyLogic,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208597,'7693c30c-ed90-4904-90e7-cdcdfd24bdd1',102,0,19,200066,'AD_Client_ID',TO_DATE('2013-02-28 09:11:20','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',10,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Client','1=1',0,0,TO_DATE('2013-02-28 09:11:20','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:11:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208597 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:12:54 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208599,'22446ae7-86ed-4394-a4c3-9a117a68a6a9',113,0,19,200066,'AD_Org_ID',TO_DATE('2013-02-28 09:12:53','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Org_ID@','Organizational entity within client','D',10,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Organization',0,0,TO_DATE('2013-02-28 09:12:53','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:12:54 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208599 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:13:12 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208600,'18655836-ca9e-484d-98bf-82fa89852f53',126,0,19,200066,'AD_Table_ID',TO_DATE('2013-02-28 09:13:11','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Y','Table',0,0,TO_DATE('2013-02-28 09:13:11','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:13:12 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208600 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:13:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208601,'abf3c6ba-7603-4461-8869-fb3ce02ef8c8',143,0,19,200066,'AD_Window_ID',TO_DATE('2013-02-28 09:13:23','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window','D',10,'The Window field identifies a unique Window in the system.','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Y','Window',0,0,TO_DATE('2013-02-28 09:13:23','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:13:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208601 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:14:00 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Element_UU,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,202220,'702a0568-b6d2-4a03-bd40-ebd5553c0e87',0,'AD_ZoomCondition_ID',TO_DATE('2013-02-28 09:13:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Zoom condition','Zoom Condition',TO_DATE('2013-02-28 09:13:59','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:14:00 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202220 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Feb 28, 2013 9:14:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208602,'8cd799e3-79e0-46f1-97ce-fb70d8b5ce42',202220,0,13,200066,'AD_ZoomCondition_ID',TO_DATE('2013-02-28 09:14:20','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','Y','N','N','N','N','Y','Y','N','N','N','N','N','N','Zoom condition',0,0,TO_DATE('2013-02-28 09:14:20','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:14:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208602 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:14:37 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208603,'5da090fc-fcc1-4e8d-a3b5-4349e15eecc8',245,0,16,200066,'Created',TO_DATE('2013-02-28 09:14:36','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Created',0,0,TO_DATE('2013-02-28 09:14:36','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:14:37 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208603 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:14:56 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208604,'912511e6-6c78-4c95-97c3-ba10c6f52f78',246,0,30,110,200066,'CreatedBy',TO_DATE('2013-02-28 09:14:56','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',10,'The Created By field indicates the user who created this record.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Created By',0,0,TO_DATE('2013-02-28 09:14:56','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:14:56 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208604 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:15:15 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208605,'a885d497-ffa3-4af9-9f66-3aa8f4d9d913',275,0,10,200066,'Description',TO_DATE('2013-02-28 09:15:14','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','N','N','Y','N','N','N','Y','Description',0,0,TO_DATE('2013-02-28 09:15:14','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:15:15 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208605 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:15:45 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208606,'0ebeff27-20ce-4fe4-af1d-8bc15bdba33d',348,0,20,200066,'IsActive',TO_DATE('2013-02-28 09:15:45','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','Y','Active',0,0,TO_DATE('2013-02-28 09:15:45','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:15:45 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208606 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:16:01 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202221 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Feb 28, 2013 9:16:44 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208609,'172a5e9f-9349-4cb9-ac36-e30c8084cad6',607,0,16,200066,'Updated',TO_DATE('2013-02-28 09:16:44','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','Y','Updated',0,0,TO_DATE('2013-02-28 09:16:44','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:16:44 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208609 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:17:02 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208610,'7ec0064d-79a7-40c8-8b63-56c250c511e7',608,0,30,110,200066,'UpdatedBy',TO_DATE('2013-02-28 09:17:01','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',10,'The Updated By field indicates the user who updated this record.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','Y','Updated By',0,0,TO_DATE('2013-02-28 09:17:01','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:17:02 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208610 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:19:31 AM CET
-- IDEMPIERE 528
CREATE TABLE AD_ZoomCondition (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Table_ID NUMBER(10) NOT NULL , AD_Window_ID NUMBER(10) NOT NULL , AD_ZoomCondition_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT AD_ZoomCondition_Key PRIMARY KEY (AD_ZoomCondition_ID))
;
-- Feb 28, 2013 9:21:18 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Tab_UU,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,200077,'a0a70dd0-c734-480f-8747-f214b664434f',200066,100,TO_DATE('2013-02-28 09:21:17','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Zoom Condition','N',50,1,TO_DATE('2013-02-28 09:21:17','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:18 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- Feb 28, 2013 9:21:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208606,201828,'95c4eb2d-402e-4c90-8de6-645894be94ee',0,200077,TO_DATE('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201828 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:22 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208597,201829,'4329192c-9678-40e0-9fca-47998707d6e5',0,200077,TO_DATE('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',10,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:22 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201829 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208605,201831,'48a9f52f-9e36-4b6f-91cd-2625054b0e2c',0,200077,TO_DATE('2013-02-28 09:21:22','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2013-02-28 09:21:22','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201831 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:24 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201833 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:25 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208599,201834,'fdb09527-c0d3-4890-90bf-0718a4cef97c',0,200077,TO_DATE('2013-02-28 09:21:24','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',10,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2013-02-28 09:21:24','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:25 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201834 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208600,201836,'81d602d3-8103-4cad-9fb6-ef6d140bc287',0,200077,TO_DATE('2013-02-28 09:21:25','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',TO_DATE('2013-02-28 09:21:25','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201836 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208601,201837,'88383714-5074-4fc2-aaeb-9bd26bb05f62',0,200077,TO_DATE('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window',10,'D','The Window field identifies a unique Window in the system.','Y','Y','Y','N','N','N','N','N','Window',TO_DATE('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201837 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:27 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208602,201838,'0b3e75c7-d953-4c10-8a0a-a24c65fa3c44',0,200077,TO_DATE('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','N','N','N','N','N','N','N','Zoom condition',TO_DATE('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:27 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201838 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=201829
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=201828
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=201831
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=201836
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=201833
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201829
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=201828
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=201831
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201836
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=201833
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:23:47 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2013-02-28 09:23:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:24:07 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2013-02-28 09:24:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:24:13 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2013-02-28 09:24:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:31:41 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, XPosition=3,Updated=TO_DATE('2013-02-28 09:31:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=2,Updated=TO_DATE('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201828
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=3,Updated=TO_DATE('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, XPosition=3,Updated=TO_DATE('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, XPosition=3,Updated=TO_DATE('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=0,Updated=TO_DATE('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201838
;
-- Feb 28, 2013 9:33:54 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2013-02-28 09:33:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:34:54 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsCentrallyMaintained='N',Updated=TO_DATE('2013-02-28 09:34:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:35:13 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET Name='Standard Window (from AD_Table)',Updated=TO_DATE('2013-02-28 09:35:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:35:13 AM CET
-- IDEMPIERE 528
UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=201837
;
-- Mar 6, 2013 3:42:43 PM COT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable,IsEncrypted) VALUES (0,'N',0,200066,208802,'D','N','N','N',0,'N',22,'N',11,'N',566,'N','Y','e92a35b8-c042-44b8-ad1a-24b7c248f736','Y','SeqNo','Method of ordering records; lowest number comes first',NULL,'The Sequence indicates the order of records','Sequence','N',TO_DATE('2013-03-06 15:42:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-03-06 15:42:26','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N','N')
;
-- Mar 6, 2013 3:42:43 PM COT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208802 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 6, 2013 3:43:06 PM COT
-- IDEMPIERE-528 Determine Zoom window depending on record
ALTER TABLE AD_ZoomCondition ADD SeqNo NUMBER(10) DEFAULT NULL
;
-- Jul 19, 2013 5:06:58 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID) VALUES (0,'N',0,200066,210659,'Y','N','N',0,'N',2000,'N',14,'N','N','Y','441569aa-fb87-46dd-a0f4-a1716a815a56','Y','WhereClause','Fully qualified SQL WHERE clause','The Where Clause indicates the SQL WHERE clause to use for record selection. The WHERE clause is added to the query. Fully qualified means "tablename.columnname".','Sql WHERE','Y',TO_DATE('2013-07-19 17:06:41','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-07-19 17:06:41','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',630)
;
-- Jul 19, 2013 5:06:58 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210659 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Jul 19, 2013 5:07:02 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
ALTER TABLE AD_ZoomCondition ADD WhereClause NVARCHAR2(2000) NOT NULL
;
-- Jul 19, 2013 5:07:15 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2013-07-19 17:07:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208600
;
-- Jul 19, 2013 5:07:26 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2013-07-19 17:07:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208601
;
-- Jul 19, 2013 5:09:40 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET Name='Window',IsCentrallyMaintained='Y',Updated=TO_DATE('2013-07-19 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 19, 2013 5:10:20 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines) VALUES (0,'N',200077,0,'N','N',210659,80,'Y',202337,'N','The Where Clause indicates the SQL WHERE clause to use for record selection. The WHERE clause is added to the query. Fully qualified means "tablename.columnname".','D','Fully qualified SQL WHERE clause','Sql WHERE','0fe4d6d4-6156-413f-9ea4-95f769abfe7e','Y','N',100,0,TO_DATE('2013-07-19 17:10:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-07-19 17:10:04','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,1,'N',0,1,1)
;
-- Jul 19, 2013 5:10:20 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202337 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=40, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201836
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=50,Updated=TO_DATE('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=60, IsDisplayed='Y', XPosition=1, ColumnSpan=3, NumLines=3,Updated=TO_DATE('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202337
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1, ColumnSpan=2,Updated=TO_DATE('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201831
;
-- Jul 22, 2013 11:48:27 AM MYT
-- IDEMPIERE-1042 Role Data Access
UPDATE AD_SysConfig SET Value='IDEMPIERE-528 Determine Zoom window depending on record',Updated=TO_DATE('2013-07-22 11:48:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50003
;
-- Jul 22, 2013 11:50:07 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID) VALUES (0,'N',1,200066,210660,'Y','N','Y',0,'N',60,'Y',10,'N','N','Y','45deb4e7-a2a4-4aa5-9f32-05c2066e72cd','Y','Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Name','Y',TO_DATE('2013-07-22 11:50:03','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-07-22 11:50:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',469)
;
-- Jul 22, 2013 11:50:07 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210660 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Jul 22, 2013 11:50:16 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
ALTER TABLE AD_ZoomCondition ADD Name NVARCHAR2(60) NOT NULL
;
-- Jul 22, 2013 11:50:29 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET IsParent='Y', IsUpdateable='N',Updated=TO_DATE('2013-07-22 11:50:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208600
;
-- Jul 22, 2013 11:51:35 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field (NumLines,SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan) VALUES (1,0,'N',200077,0,'N','N',210660,80,'Y',202338,'N','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','D','Alphanumeric identifier of the entity','Name','Y','N','7fe3177c-2c44-4f58-944d-6f921646eb7d',100,0,TO_DATE('2013-07-22 11:51:33','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-07-22 11:51:33','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70,1,'N',0,1)
;
-- Jul 22, 2013 11:51:35 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202338 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Jul 22, 2013 11:54:03 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_ZoomCondition WHERE AD_Table_ID=@AD_Table_ID@',Updated=TO_DATE('2013-07-22 11:54:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208802
;
-- Jul 22, 2013 11:54:50 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=30, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-07-22 11:54:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201836
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=40,Updated=TO_DATE('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201828
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202338
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=60, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201831
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202337
;
-- Jul 22, 2013 12:03:45 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET IsReadOnly='Y', IsAllowCopy='Y',Updated=TO_DATE('2013-07-22 12:03:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201834
;
-- Jul 22, 2013 12:05:46 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field (NumLines,SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan) VALUES (1,0,'N',200077,0,'N','N',208802,90,'Y',202339,'N','The Sequence indicates the order of records','D','Method of ordering records; lowest number comes first','Sequence','Y','N','01de863d-b0b4-4745-b85f-4fde583761de',100,0,TO_DATE('2013-07-22 12:05:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-07-22 12:05:44','YYYY-MM-DD HH24:MI:SS'),'Y','Y',80,1,'N',0,1)
;
-- Jul 22, 2013 12:05:46 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202339 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202339
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=60,Updated=TO_DATE('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202338
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201831
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=90,Updated=TO_DATE('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202337
;
-- Jul 22, 2013 1:02:14 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Tab SET SeqNo=60,Updated=TO_DATE('2013-07-22 13:02:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53069
;
-- Jul 22, 2013 1:02:25 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Tab SET SeqNo=70,Updated=TO_DATE('2013-07-22 13:02:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=673
;
SELECT register_migration_script('201307190835_IDEMPIERE-528.sql') FROM dual
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
-- Jul 23, 2013 7:43:57 AM MYT
-- IDEMPIERE-1168
UPDATE AD_Tab SET AD_Column_ID=200042, WhereClause='M_CostMovement_v.AD_Client_ID=@AD_Client_ID@ AND M_CostMovement_v.M_Product_ID=@M_Product_ID@ AND M_CostMovement_v.M_CostType_ID=@M_CostType_ID@ AND M_CostMovement_v.C_AcctSchema_ID=@C_AcctSchema_ID@ AND M_CostMovement_v.M_CostElement_ID=@M_CostElement_ID@ AND M_CostMovement_v.M_AttributeSetInstance_ID=@M_AttributeSetInstance_ID@',Updated=TO_DATE('2013-07-23 07:43:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200000
;
SELECT register_migration_script('201307230308_IDEMPIERE-1168.sql') FROM dual
;

View File

@ -0,0 +1,13 @@
-- Jul 29, 2013 5:05:15 PM MYT
-- IDEMPIERE-1207 Fixed inconsistent error message for well known database exception
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','The database operation timed out. Please try again later.',200217,'D','bfc4529a-0ec2-4e8b-92d4-f86ca829cd4d','DatabaseOperationTimeout','Y',TO_DATE('2013-07-29 17:05:02','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-07-29 17:05:02','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Jul 29, 2013 5:05:15 PM MYT
-- IDEMPIERE-1207 Fixed inconsistent error message for well known database exception
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200217 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('201307290906_IDEMPIERE-1207.sql') FROM dual
;

View File

@ -0,0 +1,13 @@
-- Jul 18, 2013 9:41:34 AM COT
-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','You''re trying to close this tab.',200208,'D','2955ff22-87ac-401a-b5f8-66be72ad82a2','CloseTabFromBrowser?','Y',TO_TIMESTAMP('2013-07-18 09:41:33','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-07-18 09:41:33','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Jul 18, 2013 9:41:34 AM COT
-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200208 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('20130718094134_IDEMPIERE-984.sql') FROM dual
;

View File

@ -0,0 +1,594 @@
-- Feb 28, 2013 9:10:46 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Table (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Table_UU,AccessLevel,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsCentrallyMaintained,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES (0,0,200066,'7017f8ca-58d1-49a3-958e-e480afac19b7','6','N',TO_TIMESTAMP('2013-02-28 09:10:44','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','N','Y','N','N','N',0,'AD_ZoomCondition','L','AD_ZoomCondition',TO_TIMESTAMP('2013-02-28 09:10:44','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:10:47 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200066 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID)
;
-- Feb 28, 2013 9:10:48 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,AD_Sequence_UU,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,200061,'9b7528dd-6a23-4d7b-9f0c-cd1187f6ee61',TO_TIMESTAMP('2013-02-28 09:10:47','YYYY-MM-DD HH24:MI:SS'),100,1000000,200000,'Table AD_ZoomCondition',1,'Y','N','Y','Y','AD_ZoomCondition','N',1000000,TO_TIMESTAMP('2013-02-28 09:10:47','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:11:20 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,ReadOnlyLogic,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208597,'7693c30c-ed90-4904-90e7-cdcdfd24bdd1',102,0,19,200066,'AD_Client_ID',TO_TIMESTAMP('2013-02-28 09:11:20','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',10,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Client','1=1',0,0,TO_TIMESTAMP('2013-02-28 09:11:20','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:11:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208597 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:12:54 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208599,'22446ae7-86ed-4394-a4c3-9a117a68a6a9',113,0,19,200066,'AD_Org_ID',TO_TIMESTAMP('2013-02-28 09:12:53','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Org_ID@','Organizational entity within client','D',10,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Organization',0,0,TO_TIMESTAMP('2013-02-28 09:12:53','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:12:54 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208599 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:13:12 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208600,'18655836-ca9e-484d-98bf-82fa89852f53',126,0,19,200066,'AD_Table_ID',TO_TIMESTAMP('2013-02-28 09:13:11','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Y','Table',0,0,TO_TIMESTAMP('2013-02-28 09:13:11','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:13:12 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208600 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:13:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208601,'abf3c6ba-7603-4461-8869-fb3ce02ef8c8',143,0,19,200066,'AD_Window_ID',TO_TIMESTAMP('2013-02-28 09:13:23','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window','D',10,'The Window field identifies a unique Window in the system.','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','Y','Window',0,0,TO_TIMESTAMP('2013-02-28 09:13:23','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:13:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208601 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:14:00 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Element_UU,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,202220,'702a0568-b6d2-4a03-bd40-ebd5553c0e87',0,'AD_ZoomCondition_ID',TO_TIMESTAMP('2013-02-28 09:13:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Zoom condition','Zoom Condition',TO_TIMESTAMP('2013-02-28 09:13:59','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:14:00 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202220 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Feb 28, 2013 9:14:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208602,'8cd799e3-79e0-46f1-97ce-fb70d8b5ce42',202220,0,13,200066,'AD_ZoomCondition_ID',TO_TIMESTAMP('2013-02-28 09:14:20','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','Y','N','N','N','N','Y','Y','N','N','N','N','N','N','Zoom condition',0,0,TO_TIMESTAMP('2013-02-28 09:14:20','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:14:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208602 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:14:37 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208603,'5da090fc-fcc1-4e8d-a3b5-4349e15eecc8',245,0,16,200066,'Created',TO_TIMESTAMP('2013-02-28 09:14:36','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Created',0,0,TO_TIMESTAMP('2013-02-28 09:14:36','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:14:37 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208603 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:14:56 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208604,'912511e6-6c78-4c95-97c3-ba10c6f52f78',246,0,30,110,200066,'CreatedBy',TO_TIMESTAMP('2013-02-28 09:14:56','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',10,'The Created By field indicates the user who created this record.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','N','Created By',0,0,TO_TIMESTAMP('2013-02-28 09:14:56','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:14:56 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208604 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:15:15 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208605,'a885d497-ffa3-4af9-9f66-3aa8f4d9d913',275,0,10,200066,'Description',TO_TIMESTAMP('2013-02-28 09:15:14','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','N','N','Y','N','N','N','Y','Description',0,0,TO_TIMESTAMP('2013-02-28 09:15:14','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:15:15 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208605 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:15:45 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208606,'0ebeff27-20ce-4fe4-af1d-8bc15bdba33d',348,0,20,200066,'IsActive',TO_TIMESTAMP('2013-02-28 09:15:45','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','Y','Active',0,0,TO_TIMESTAMP('2013-02-28 09:15:45','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:15:45 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208606 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:16:44 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208609,'172a5e9f-9349-4cb9-ac36-e30c8084cad6',607,0,16,200066,'Updated',TO_TIMESTAMP('2013-02-28 09:16:44','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','Y','Updated',0,0,TO_TIMESTAMP('2013-02-28 09:16:44','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:16:44 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208609 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:17:02 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,208610,'7ec0064d-79a7-40c8-8b63-56c250c511e7',608,0,30,110,200066,'UpdatedBy',TO_TIMESTAMP('2013-02-28 09:17:01','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',10,'The Updated By field indicates the user who updated this record.','Y','N','Y','N','N','N','N','N','Y','N','N','N','N','N','Y','Updated By',0,0,TO_TIMESTAMP('2013-02-28 09:17:01','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Feb 28, 2013 9:17:02 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208610 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Feb 28, 2013 9:19:31 AM CET
-- IDEMPIERE 528
CREATE TABLE AD_ZoomCondition (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Table_ID NUMERIC(10) NOT NULL , AD_Window_ID NUMERIC(10) DEFAULT NULL , AD_ZoomCondition_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT AD_ZoomCondition_Key PRIMARY KEY (AD_ZoomCondition_ID))
;
-- Feb 28, 2013 9:21:18 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Tab_UU,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,200077,'a0a70dd0-c734-480f-8747-f214b664434f',200066,100,TO_TIMESTAMP('2013-02-28 09:21:17','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Zoom Condition','N',50,1,TO_TIMESTAMP('2013-02-28 09:21:17','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:18 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200077 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID)
;
-- Feb 28, 2013 9:21:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208606,201828,'95c4eb2d-402e-4c90-8de6-645894be94ee',0,200077,TO_TIMESTAMP('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
There are two reasons for de-activating and not deleting records:
(1) The system requires the record for audit purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:21 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201828 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:22 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208597,201829,'4329192c-9678-40e0-9fca-47998707d6e5',0,200077,TO_TIMESTAMP('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',10,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2013-02-28 09:21:21','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:22 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201829 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208605,201831,'48a9f52f-9e36-4b6f-91cd-2625054b0e2c',0,200077,TO_TIMESTAMP('2013-02-28 09:21:22','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2013-02-28 09:21:22','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:23 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201831 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:24 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201833 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:25 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208599,201834,'fdb09527-c0d3-4890-90bf-0718a4cef97c',0,200077,TO_TIMESTAMP('2013-02-28 09:21:24','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',10,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2013-02-28 09:21:24','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:25 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201834 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208600,201836,'81d602d3-8103-4cad-9fb6-ef6d140bc287',0,200077,TO_TIMESTAMP('2013-02-28 09:21:25','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',TO_TIMESTAMP('2013-02-28 09:21:25','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201836 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208601,201837,'88383714-5074-4fc2-aaeb-9bd26bb05f62',0,200077,TO_TIMESTAMP('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window',10,'D','The Window field identifies a unique Window in the system.','Y','Y','Y','N','N','N','N','N','Window',TO_TIMESTAMP('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:26 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201837 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:27 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,208602,201838,'0b3e75c7-d953-4c10-8a0a-a24c65fa3c44',0,200077,TO_TIMESTAMP('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','N','N','N','N','N','N','N','Zoom condition',TO_TIMESTAMP('2013-02-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Feb 28, 2013 9:21:27 AM CET
-- IDEMPIERE 528
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201838 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=201829
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=201828
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=201831
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=201836
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=201833
;
-- Feb 28, 2013 9:21:56 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201829
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=201828
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=201831
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201836
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=201833
;
-- Feb 28, 2013 9:22:30 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:23:47 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2013-02-28 09:23:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:24:07 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2013-02-28 09:24:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:24:13 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2013-02-28 09:24:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:31:41 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, XPosition=3,Updated=TO_TIMESTAMP('2013-02-28 09:31:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201834
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=2,Updated=TO_TIMESTAMP('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201828
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=3,Updated=TO_TIMESTAMP('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, XPosition=3,Updated=TO_TIMESTAMP('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201830
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, XPosition=3,Updated=TO_TIMESTAMP('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201835
;
-- Feb 28, 2013 9:31:42 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2013-02-28 09:31:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201838
;
-- Feb 28, 2013 9:33:55 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2013-02-28 09:33:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201832
;
-- Feb 28, 2013 9:34:54 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET IsCentrallyMaintained='N',Updated=TO_TIMESTAMP('2013-02-28 09:34:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:35:13 AM CET
-- IDEMPIERE 528
UPDATE AD_Field SET Name='Standard Window (from AD_Table)',Updated=TO_TIMESTAMP('2013-02-28 09:35:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Feb 28, 2013 9:35:13 AM CET
-- IDEMPIERE 528
UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=201837
;
-- Mar 6, 2013 3:42:43 PM COT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable,IsEncrypted) VALUES (0,'N',0,200066,208802,'D','N','N','N',0,'N',22,'N',11,'N',566,'N','Y','e92a35b8-c042-44b8-ad1a-24b7c248f736','Y','SeqNo','Method of ordering records; lowest number comes first',NULL,'The Sequence indicates the order of records','Sequence','N',TO_TIMESTAMP('2013-03-06 15:42:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-03-06 15:42:26','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N','N')
;
-- Mar 6, 2013 3:42:43 PM COT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208802 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 6, 2013 3:43:06 PM COT
-- IDEMPIERE-528 Determine Zoom window depending on record
ALTER TABLE AD_ZoomCondition ADD COLUMN SeqNo NUMERIC(10) DEFAULT NULL
;
-- Jul 19, 2013 5:06:58 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID) VALUES (0,'N',0,200066,210659,'Y','N','N',0,'N',2000,'N',14,'N','N','Y','441569aa-fb87-46dd-a0f4-a1716a815a56','Y','WhereClause','Fully qualified SQL WHERE clause','The Where Clause indicates the SQL WHERE clause to use for record selection. The WHERE clause is added to the query. Fully qualified means "tablename.columnname".','Sql WHERE','Y',TO_TIMESTAMP('2013-07-19 17:06:41','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-07-19 17:06:41','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',630)
;
-- Jul 19, 2013 5:06:58 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210659 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Jul 19, 2013 5:07:02 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
ALTER TABLE AD_ZoomCondition ADD COLUMN WhereClause VARCHAR(2000) NOT NULL
;
-- Jul 19, 2013 5:07:15 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2013-07-19 17:07:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208600
;
-- Jul 19, 2013 5:07:26 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2013-07-19 17:07:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208601
;
-- Jul 19, 2013 5:09:40 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET Name='Window',IsCentrallyMaintained='Y',Updated=TO_TIMESTAMP('2013-07-19 17:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 19, 2013 5:10:20 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines) VALUES (0,'N',200077,0,'N','N',210659,80,'Y',202337,'N','The Where Clause indicates the SQL WHERE clause to use for record selection. The WHERE clause is added to the query. Fully qualified means "tablename.columnname".','D','Fully qualified SQL WHERE clause','Sql WHERE','0fe4d6d4-6156-413f-9ea4-95f769abfe7e','Y','N',100,0,TO_TIMESTAMP('2013-07-19 17:10:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-07-19 17:10:04','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,1,'N',0,1,1)
;
-- Jul 19, 2013 5:10:20 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202337 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=40, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201836
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=60, IsDisplayed='Y', XPosition=1, ColumnSpan=3, NumLines=3,Updated=TO_TIMESTAMP('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202337
;
-- Jul 19, 2013 5:12:29 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-07-19 17:12:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201831
;
-- Jul 22, 2013 11:48:27 AM MYT
-- IDEMPIERE-1042 Role Data Access
UPDATE AD_SysConfig SET Value='IDEMPIERE-528 Determine Zoom window depending on record',Updated=TO_TIMESTAMP('2013-07-22 11:48:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50003
;
-- Jul 22, 2013 11:50:07 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID) VALUES (0,'N',1,200066,210660,'Y','N','Y',0,'N',60,'Y',10,'N','N','Y','45deb4e7-a2a4-4aa5-9f32-05c2066e72cd','Y','Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Name','Y',TO_TIMESTAMP('2013-07-22 11:50:03','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-07-22 11:50:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',469)
;
-- Jul 22, 2013 11:50:07 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=210660 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Jul 22, 2013 11:50:16 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
ALTER TABLE AD_ZoomCondition ADD COLUMN Name VARCHAR(60) NOT NULL
;
-- Jul 22, 2013 11:50:29 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET IsParent='Y', IsUpdateable='N',Updated=TO_TIMESTAMP('2013-07-22 11:50:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208600
;
-- Jul 22, 2013 11:51:35 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field (NumLines,SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan) VALUES (1,0,'N',200077,0,'N','N',210660,80,'Y',202338,'N','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','D','Alphanumeric identifier of the entity','Name','Y','N','7fe3177c-2c44-4f58-944d-6f921646eb7d',100,0,TO_TIMESTAMP('2013-07-22 11:51:33','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-07-22 11:51:33','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70,1,'N',0,1)
;
-- Jul 22, 2013 11:51:35 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202338 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Jul 22, 2013 11:54:03 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_ZoomCondition WHERE AD_Table_ID=@AD_Table_ID@',Updated=TO_TIMESTAMP('2013-07-22 11:54:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208802
;
-- Jul 22, 2013 11:54:50 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=30, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-07-22 11:54:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201836
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201828
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202338
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=60, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201831
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 22, 2013 11:54:51 AM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2013-07-22 11:54:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202337
;
-- Jul 22, 2013 12:03:45 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET IsReadOnly='Y', IsAllowCopy='Y',Updated=TO_TIMESTAMP('2013-07-22 12:03:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201834
;
-- Jul 22, 2013 12:05:46 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field (NumLines,SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan) VALUES (1,0,'N',200077,0,'N','N',208802,90,'Y',202339,'N','The Sequence indicates the order of records','D','Method of ordering records; lowest number comes first','Sequence','Y','N','01de863d-b0b4-4745-b85f-4fde583761de',100,0,TO_TIMESTAMP('2013-07-22 12:05:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-07-22 12:05:44','YYYY-MM-DD HH24:MI:SS'),'Y','Y',80,1,'N',0,1)
;
-- Jul 22, 2013 12:05:46 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=202339 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202339
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=60,Updated=TO_TIMESTAMP('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202338
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201831
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201837
;
-- Jul 22, 2013 12:06:10 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Field SET SeqNo=90,Updated=TO_TIMESTAMP('2013-07-22 12:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202337
;
-- Jul 22, 2013 1:02:14 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Tab SET SeqNo=60,Updated=TO_TIMESTAMP('2013-07-22 13:02:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53069
;
-- Jul 22, 2013 1:02:25 PM MYT
-- IDEMPIERE-528 Determine Zoom window depending on record
UPDATE AD_Tab SET SeqNo=70,Updated=TO_TIMESTAMP('2013-07-22 13:02:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=673
;
SELECT register_migration_script('201307190835_IDEMPIERE-528.sql') FROM dual
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
-- Jul 23, 2013 7:43:57 AM MYT
-- IDEMPIERE-1168
UPDATE AD_Tab SET AD_Column_ID=200042, WhereClause='M_CostMovement_v.AD_Client_ID=@AD_Client_ID@ AND M_CostMovement_v.M_Product_ID=@M_Product_ID@ AND M_CostMovement_v.M_CostType_ID=@M_CostType_ID@ AND M_CostMovement_v.C_AcctSchema_ID=@C_AcctSchema_ID@ AND M_CostMovement_v.M_CostElement_ID=@M_CostElement_ID@ AND M_CostMovement_v.M_AttributeSetInstance_ID=@M_AttributeSetInstance_ID@',Updated=TO_TIMESTAMP('2013-07-23 07:43:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200000
;
SELECT register_migration_script('201307230308_IDEMPIERE-1168.sql') FROM dual
;

View File

@ -0,0 +1,13 @@
-- Jul 29, 2013 5:05:15 PM MYT
-- IDEMPIERE-1207 Fixed inconsistent error message for well known database exception
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('E','The database operation timed out. Please try again later.',200217,'D','bfc4529a-0ec2-4e8b-92d4-f86ca829cd4d','DatabaseOperationTimeout','Y',TO_TIMESTAMP('2013-07-29 17:05:02','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-07-29 17:05:02','YYYY-MM-DD HH24:MI:SS'),0)
;
-- Jul 29, 2013 5:05:15 PM MYT
-- IDEMPIERE-1207 Fixed inconsistent error message for well known database exception
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200217 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('201307290906_IDEMPIERE-1207.sql') FROM dual
;

View File

@ -20,6 +20,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>

View File

@ -6,4 +6,6 @@ Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.adempiere.base;bundle-version="1.0.0"
Eclipse-RegisterBuddy: org.adempiere.base
Service-Component: OSGI-INF/costadjustmentcalloutfactory.xml
Bundle-ActivationPolicy: lazy

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.adempiere.base.callout.CostAdjustmentCalloutFactory">
<implementation class="org.adempiere.base.callout.CostAdjustmentCalloutFactory"/>
<service>
<provide interface="org.adempiere.base.IColumnCalloutFactory"/>
</service>
</scr:component>

View File

@ -1,4 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
OSGI-INF/costadjustmentcalloutfactory.xml,\
OSGI-INF/
source.. = src/

View File

@ -0,0 +1,128 @@
/******************************************************************************
* Copyright (C) 2013 Heng Sin Low *
* Copyright (C) 2013 Trek Global *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.adempiere.base.callout;
import java.math.BigDecimal;
import java.util.Properties;
import org.adempiere.base.IColumnCallout;
import org.adempiere.base.IColumnCalloutFactory;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.I_M_InventoryLine;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MClient;
import org.compiere.model.MCost;
import org.compiere.model.MCostElement;
import org.compiere.model.MDocType;
import org.compiere.model.MInventory;
import org.compiere.model.MProduct;
import org.compiere.util.Env;
import org.compiere.util.Msg;
/**
* @author hengsin
*
*/
public class CostAdjustmentCalloutFactory implements IColumnCalloutFactory {
/**
*
*/
public CostAdjustmentCalloutFactory() {
}
/* (non-Javadoc)
* @see org.adempiere.base.IColumnCalloutFactory#getColumnCallouts(java.lang.String, java.lang.String)
*/
@Override
public IColumnCallout[] getColumnCallouts(String tableName,
String columnName) {
if (tableName.equalsIgnoreCase(I_M_InventoryLine.Table_Name)) {
if (columnName.equalsIgnoreCase(I_M_InventoryLine.COLUMNNAME_M_Product_ID))
return new IColumnCallout[]{new CostAdjustmentLineProduct()};
else if (columnName.equalsIgnoreCase(I_M_InventoryLine.COLUMNNAME_M_AttributeSetInstance_ID))
return new IColumnCallout[]{new CostAdjustmentLineASI()};
}
return null;
}
/**
* callout for m_product_id
*/
private static class CostAdjustmentLineProduct implements IColumnCallout {
@Override
public String start(Properties ctx, int WindowNo, GridTab mTab,
GridField mField, Object value, Object oldValue) {
MInventory inventory = MInventory.get(ctx, (Integer) mTab.getValue("M_Inventory_ID"));
if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(inventory.getC_DocType().getDocSubTypeInv())) {
String costingMethod = inventory.getCostingMethod();
if (value == null) {
mTab.setValue(I_M_InventoryLine.COLUMNNAME_CurrentCostPrice, BigDecimal.ZERO);
mTab.setValue(I_M_InventoryLine.COLUMNNAME_NewCostPrice, BigDecimal.ZERO);
} else {
MProduct product = MProduct.get(ctx, (Integer) value);
MClient client = MClient.get(ctx);
MAcctSchema as = client.getAcctSchema();
Object asiValue = mTab.getValue(I_M_InventoryLine.COLUMNNAME_M_AttributeSetInstance_ID);
int M_ASI_ID = asiValue != null ? (Integer)asiValue : 0;
int AD_Org_ID = inventory.getAD_Org_ID();
MCost cost = product.getCostingRecord(as, AD_Org_ID, M_ASI_ID, costingMethod);
if (cost == null) {
if (!MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod)) {
mTab.setValue(mField, null);
return Msg.getMsg(Env.getCtx(), "NoCostingRecord");
}
}
mTab.setValue(I_M_InventoryLine.COLUMNNAME_CurrentCostPrice, cost.getCurrentCostPrice());
mTab.setValue(I_M_InventoryLine.COLUMNNAME_NewCostPrice, cost.getCurrentCostPrice());
}
}
return null;
}
}
/**
* callout for m_attributesetinstance_id
*/
private class CostAdjustmentLineASI implements IColumnCallout {
@Override
public String start(Properties ctx, int WindowNo, GridTab mTab,
GridField mField, Object value, Object oldValue) {
MInventory inventory = MInventory.get(ctx, (Integer) mTab.getValue("M_Inventory_ID"));
if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(inventory.getC_DocType().getDocSubTypeInv())) {
String costingMethod = inventory.getCostingMethod();
Object productValue = mTab.getValue(I_M_InventoryLine.COLUMNNAME_M_Product_ID);
if (productValue == null || ((Integer)productValue).intValue() == 0) return null;
MProduct product = MProduct.get(ctx, (Integer)productValue);
int M_ASI_ID = value != null ? (Integer)value : 0;
int AD_Org_ID = inventory.getAD_Org_ID();
MClient client = MClient.get(ctx);
MAcctSchema as = client.getAcctSchema();
MCost cost = product.getCostingRecord(as, AD_Org_ID, M_ASI_ID, costingMethod);
if (cost != null) {
BigDecimal currentCost = (BigDecimal) mTab.getValue(I_M_InventoryLine.COLUMNNAME_CurrentCostPrice);
if (currentCost == null || currentCost.compareTo(cost.getCurrentCostPrice())==0) return null;
mTab.setValue(I_M_InventoryLine.COLUMNNAME_CurrentCostPrice, cost.getCurrentCostPrice());
mTab.setValue(I_M_InventoryLine.COLUMNNAME_NewCostPrice, cost.getCurrentCostPrice());
}
}
return null;
}
}
}

View File

@ -193,7 +193,17 @@ public class CalloutInOut extends CalloutEngine
String DocBaseType = rs.getString("DocBaseType");
// BF [2708789] Read IsSOTrx from C_DocType
String trxFlag = rs.getString("IsSOTrx");
if (!(trxFlag.equals(mTab.getValue("IsSOTrx"))))
Object isSOTrxValue = mTab.getValue("IsSOTrx");
String isSOTrxValueStr = null;
if (isSOTrxValue != null)
{
if (isSOTrxValue instanceof Boolean)
isSOTrxValueStr = (Boolean)isSOTrxValue ? "Y" : "N";
else
isSOTrxValueStr = (String)isSOTrxValue;
}
if (!(trxFlag.equals(isSOTrxValueStr)))
mTab.setValue("IsSOTrx", trxFlag);
if (DocBaseType.equals("MMS")) // Material Shipments
/**solve 1648131 bug vpj-cd e-evolution */

View File

@ -122,9 +122,17 @@ public class CalloutMovement extends CalloutEngine
return;
int M_AttributeSetInstance_ID = Env.getContextAsInt(ctx, WindowNo, "M_AttributeSetInstance_ID");
BigDecimal available = Env.ZERO;
if (M_AttributeSetInstance_ID > 0) {
MStorageOnHand oh = MStorageOnHand.get(ctx, M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID, null);
if (oh != null)
available = oh.getQtyOnHand();
} else {
MStorageOnHand[] ohs = MStorageOnHand.getAll(ctx, M_Product_ID, M_Locator_ID, null);
for (MStorageOnHand oh : ohs) {
available = available.add(oh.getQtyOnHand());
}
}
if (available == null)
available = Env.ZERO;
if (available.signum() == 0)

View File

@ -19,17 +19,27 @@ package org.compiere.process;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Level;
import org.compiere.model.I_C_DocType;
import org.compiere.model.I_M_Inventory;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MClient;
import org.compiere.model.MCost;
import org.compiere.model.MCostElement;
import org.compiere.model.MDocType;
import org.compiere.model.MInventory;
import org.compiere.model.MInventoryLine;
import org.compiere.model.MProduct;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
/**
* Standard Cost Update
@ -48,6 +58,8 @@ public class CostUpdate extends SvrProcess
/** PLV */
private int p_M_PriceList_Version_ID = 0;
private int p_C_DocType_ID = 0;
private static final String TO_AveragePO = "A";
private static final String TO_AverageInvoiceHistory = "DI";
@ -67,6 +79,7 @@ public class CostUpdate extends SvrProcess
private MAcctSchema[] m_ass = null;
/** Map of Cost Elements */
private HashMap<String,MCostElement> m_ces = new HashMap<String,MCostElement>();
private MDocType m_docType = null;
/**
@ -89,6 +102,8 @@ public class CostUpdate extends SvrProcess
p_SetStandardCostTo = (String)para[i].getParameter();
else if (name.equals("M_PriceList_Version_ID"))
p_M_PriceList_Version_ID = para[i].getParameterAsInt();
else if (name.equals("C_DocType_ID"))
p_C_DocType_ID = para[i].getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
@ -114,6 +129,13 @@ public class CostUpdate extends SvrProcess
{
return "-";
}
if (!Util.isEmpty(p_SetStandardCostTo))
{
if (p_C_DocType_ID <= 0)
throw new AdempiereUserError ("@FillMandatory@ @C_DocType_ID@");
else
m_docType = MDocType.get(getCtx(), p_C_DocType_ID);
}
// PLV required
if (p_M_PriceList_Version_ID == 0
&& (p_SetFutureCostTo.equals(TO_PriceListLimit) || p_SetStandardCostTo.equals(TO_PriceListLimit)))
@ -253,6 +275,10 @@ public class CostUpdate extends SvrProcess
ResultSet rs = null;
try
{
List<MInventoryLine> lines = new ArrayList<MInventoryLine>();
MClient client = MClient.get(getCtx());
MAcctSchema primarySchema = client.getAcctSchema();
MInventory inventoryDoc = null;
pstmt = DB.prepareStatement (sql, null);
pstmt.setInt (1, m_ce.getM_CostElement_ID());
if (p_M_Product_Category_ID != 0)
@ -267,15 +293,65 @@ public class CostUpdate extends SvrProcess
if (m_ass[i].getC_AcctSchema_ID() == cost.getC_AcctSchema_ID()
&& m_ass[i].getM_CostType_ID() == cost.getM_CostType_ID())
{
if (update (cost))
if (m_ass[i].getC_AcctSchema_ID() == primarySchema.getC_AcctSchema_ID())
{
if (update (cost, lines))
counter++;
}
else
{
if (update (cost, null))
counter++;
}
}
}
}
if (lines.size() > 0)
{
inventoryDoc = new MInventory(getCtx(), 0, get_TrxName());
inventoryDoc.setC_DocType_ID(p_C_DocType_ID);
inventoryDoc.setCostingMethod(MCostElement.COSTINGMETHOD_StandardCosting);
inventoryDoc.setDocAction(DocAction.ACTION_Complete);
inventoryDoc.saveEx();
for(MInventoryLine line : lines)
{
line.setM_Inventory_ID(inventoryDoc.getM_Inventory_ID());
line.saveEx();
}
if (!DocumentEngine.processIt(inventoryDoc, DocAction.ACTION_Complete))
{
StringBuilder msg = new StringBuilder();
msg.append(Msg.getMsg(getCtx(), "ProcessFailed")).append(": ");
if (Env.isBaseLanguage(getCtx(), I_C_DocType.Table_Name))
msg.append(m_docType.getName());
else
msg.append(m_docType.get_Translation(I_C_DocType.COLUMNNAME_Name));
throw new AdempiereUserError(msg.toString());
}
else
{
inventoryDoc.saveEx();
StringBuilder msg = new StringBuilder();
if (Env.isBaseLanguage(getCtx(), I_C_DocType.Table_Name))
msg.append(m_docType.getName()).append(" ").append(inventoryDoc.getDocumentNo());
else
msg.append(m_docType.get_Translation(I_C_DocType.COLUMNNAME_Name)).append(" ").append(inventoryDoc.getDocumentNo());
addLog(getAD_PInstance_ID(), null, null, msg.toString(), I_M_Inventory.Table_ID, inventoryDoc.getM_Inventory_ID());
}
}
}
catch (Exception e)
{
log.log (Level.SEVERE, sql, e);
if (e instanceof RuntimeException)
{
throw (RuntimeException)e;
}
else
{
throw new RuntimeException(e);
}
}
finally
{
@ -291,10 +367,11 @@ public class CostUpdate extends SvrProcess
/**
* Update Cost Records
* @param cost cost
* @param inventoryDoc
* @return true if updated
* @throws Exception
*/
private boolean update (MCost cost) throws Exception
private boolean update (MCost cost, List<MInventoryLine> lines) throws Exception
{
boolean updated = false;
if (p_SetFutureCostTo.equals(p_SetStandardCostTo))
@ -303,21 +380,37 @@ public class CostUpdate extends SvrProcess
if (costs != null && costs.signum() != 0)
{
cost.setFutureCostPrice(costs);
cost.setCurrentCostPrice(costs);
updated = true;
}
if (lines != null)
{
MInventoryLine line = new MInventoryLine(getCtx(), 0, get_TrxName());
line.setM_Product_ID(cost.getM_Product_ID());
line.setCurrentCostPrice(cost.getCurrentCostPrice());
line.setNewCostPrice(costs);
line.setM_Locator_ID(0);
lines.add(line);
}
}
else
{
if (p_SetStandardCostTo.length() > 0)
{
if (lines != null)
{
BigDecimal costs = getCosts(cost, p_SetStandardCostTo);
if (costs != null && costs.signum() != 0)
{
cost.setCurrentCostPrice(costs);
MInventoryLine line = new MInventoryLine(getCtx(), 0, get_TrxName());
line.setM_Product_ID(cost.getM_Product_ID());
line.setCurrentCostPrice(cost.getCurrentCostPrice());
line.setNewCostPrice(costs);
line.setM_Locator_ID(0);
lines.add(line);
updated = true;
}
}
}
if (p_SetFutureCostTo.length() > 0)
{
BigDecimal costs = getCosts(cost, p_SetFutureCostTo);

View File

@ -0,0 +1,66 @@
/******************************************************************************
* Copyright (C) 2013 Heng Sin Low *
* Copyright (C) 2013 Trek Global *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.idempiere.process;
import java.math.BigDecimal;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MClient;
import org.compiere.model.MCost;
import org.compiere.model.MInventoryLine;
import org.compiere.model.MProduct;
import org.compiere.process.SvrProcess;
/**
* @author hengsin
*
*/
public class CostAdjustmentLineRefreshCost extends SvrProcess {
/**
*
*/
public CostAdjustmentLineRefreshCost() {
}
/* (non-Javadoc)
* @see org.compiere.process.SvrProcess#prepare()
*/
@Override
protected void prepare() {
}
/* (non-Javadoc)
* @see org.compiere.process.SvrProcess#doIt()
*/
@Override
protected String doIt() throws Exception {
MInventoryLine line = new MInventoryLine(getCtx(), getRecord_ID(), null);
MProduct product = line.getProduct();
MClient client = MClient.get(getCtx(), line.getAD_Client_ID());
MAcctSchema as = client.getAcctSchema();
MCost cost = product.getCostingRecord(as, line.getAD_Org_ID(), line.getM_AttributeSetInstance_ID(), line.getM_Inventory().getCostingMethod());
if (cost != null) {
line.setCurrentCostPrice(cost.getCurrentCostPrice());
line.setNewCostPrice(cost.getCurrentCostPrice());
line.saveEx();
} else {
line.setCurrentCostPrice(BigDecimal.ZERO);
line.setNewCostPrice(BigDecimal.ZERO);
line.saveEx();
}
return "@Ok@";
}
}

View File

@ -36,6 +36,9 @@ import org.compiere.util.DB;
*/
public class DBException extends AdempiereException
{
public static final String DATABASE_OPERATION_TIMEOUT_MSG = "DatabaseOperationTimeout";
public static final String DELETE_ERROR_DEPENDENT_MSG = "DeleteErrorDependent";
public static final String SAVE_ERROR_NOT_UNIQUE_MSG = "SaveErrorNotUnique";
/**
*
*/
@ -198,4 +201,19 @@ public class DBException extends AdempiereException
return isSQLState(e, "57014");
return isErrorCode(e, 1013);
}
/**
* @param e
*/
public static String getDefaultDBExceptionMessage(Exception e) {
if (isUniqueContraintError(e)) {
return SAVE_ERROR_NOT_UNIQUE_MSG;
} else if (isChildRecordFoundError(e)) {
return DELETE_ERROR_DEPENDENT_MSG;
} else if (isTimeout(e)) {
return DATABASE_OPERATION_TIMEOUT_MSG;
} else {
return null;
}
}
} // DBException

View File

@ -23,11 +23,17 @@ import java.util.logging.Level;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MClient;
import org.compiere.model.MConversionRate;
import org.compiere.model.MCost;
import org.compiere.model.MCostDetail;
import org.compiere.model.MCostElement;
import org.compiere.model.MDocType;
import org.compiere.model.MInventory;
import org.compiere.model.MInventoryLine;
import org.compiere.model.MProduct;
import org.compiere.model.ProductCost;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Util;
@ -49,6 +55,7 @@ public class Doc_Inventory extends Doc
private int m_Reversal_ID = 0;
@SuppressWarnings("unused")
private String m_DocStatus = "";
private String parentDocSubTypeInv;
/**
* Constructor
@ -67,12 +74,23 @@ public class Doc_Inventory extends Doc
*/
protected String loadDocumentDetails()
{
setC_Currency_ID (NO_CURRENCY);
MInventory inventory = (MInventory)getPO();
setDateDoc (inventory.getMovementDate());
setDateAcct(inventory.getMovementDate());
m_Reversal_ID = inventory.getReversal_ID();//store original (voided/reversed) document
m_DocStatus = inventory.getDocStatus();
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
parentDocSubTypeInv = dt.getDocSubTypeInv();
if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(parentDocSubTypeInv))
{
MClient client = MClient.get(getCtx(), inventory.getAD_Client_ID());
int C_Currency_ID = client.getAcctSchema().getC_Currency_ID();
setC_Currency_ID(C_Currency_ID);
}
else
{
setC_Currency_ID (NO_CURRENCY);
}
// Contained Objects
p_lines = loadLines(inventory);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
@ -86,8 +104,6 @@ public class Doc_Inventory extends Doc
*/
private DocLine[] loadLines(MInventory inventory)
{
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
String parentDocSubTypeInv = dt.getDocSubTypeInv();
ArrayList<DocLine> list = new ArrayList<DocLine>();
MInventoryLine[] lines = inventory.getLines(false);
for (int i = 0; i < lines.length; i++)
@ -106,16 +122,23 @@ public class Doc_Inventory extends Doc
}
BigDecimal qtyDiff = Env.ZERO;
BigDecimal amtDiff = Env.ZERO;
if (MDocType.DOCSUBTYPEINV_InternalUseInventory.equals(docSubTypeInv))
qtyDiff = line.getQtyInternalUse().negate();
else if (MDocType.DOCSUBTYPEINV_PhysicalInventory.equals(docSubTypeInv))
qtyDiff = line.getQtyCount().subtract(line.getQtyBook());
else if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(docSubTypeInv))
amtDiff = line.getNewCostPrice().subtract(line.getCurrentCostPrice());
// nothing to post
if (qtyDiff.signum() == 0)
if (qtyDiff.signum() == 0 && amtDiff.signum() == 0)
continue;
//
DocLine docLine = new DocLine (line, this);
docLine.setQty (qtyDiff, false); // -5 => -5
if (amtDiff.signum() != 0)
{
docLine.setAmount(amtDiff);
}
docLine.setReversalLine_ID(line.getReversalLine_ID());
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
list.add (docLine);
@ -158,10 +181,54 @@ public class Doc_Inventory extends Doc
FactLine dr = null;
FactLine cr = null;
MInventory inventory = (MInventory) getPO();
boolean costAdjustment = MDocType.DOCSUBTYPEINV_CostAdjustment.equals(parentDocSubTypeInv);
String docCostingMethod = inventory.getCostingMethod();
for (int i = 0; i < p_lines.length; i++)
{
DocLine line = p_lines[i];
boolean doPosting = true;
String costingLevel = null;
MProduct product = null;
if (costAdjustment)
{
product = line.getProduct();
String productCostingMethod = product.getCostingMethod(as);
costingLevel = product.getCostingLevel(as);
if (!docCostingMethod.equals(productCostingMethod))
{
doPosting = false;
}
}
BigDecimal costs = null;
BigDecimal adjustmentDiff = null;
if (costAdjustment)
{
costs = line.getAmtSource();
int orgId = line.getAD_Org_ID();
int asiId = line.getM_AttributeSetInstance_ID();
if (MAcctSchema.COSTINGLEVEL_Client.equals(costingLevel))
{
orgId = 0;
asiId = 0;
}
else if (MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel))
asiId = 0;
else if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(costingLevel))
orgId = 0;
MCostElement ce = MCostElement.getMaterialCostElement(getCtx(), docCostingMethod, orgId);
MCost cost = MCost.get(product, asiId, as,
orgId, ce.getM_CostElement_ID(), getTrxName());
DB.getDatabase().forUpdate(cost, 120);
BigDecimal currentQty = cost.getCurrentQty();
adjustmentDiff = costs;
costs = costs.multiply(currentQty);
}
else
{
if (!isReversal(line))
{
// MZ Goodwill
@ -176,15 +243,21 @@ public class Doc_Inventory extends Doc
}
else
{
costs = BigDecimal.ZERO;
//updated below
costs = Env.ONE;
}
}
if (doPosting)
{
int C_Currency_ID = getC_Currency_ID() > 0 ? getC_Currency_ID() : as.getC_Currency_ID();
// Inventory DR CR
dr = fact.createLine(line,
line.getAccount(ProductCost.ACCTTYPE_P_Asset, as),
as.getC_Currency_ID(), costs);
C_Currency_ID, costs);
// may be zero difference - no line created.
if (dr == null)
continue;
if (dr != null)
{
dr.setM_Locator_ID(line.getM_Locator_ID());
if (isReversal(line))
{
@ -208,11 +281,20 @@ public class Doc_Inventory extends Doc
}
if (invDiff == null)
{
if (costAdjustment)
{
invDiff = line.getProductCost().getAccount(ProductCost.ACCTTYPE_P_CostAdjustment, as);
}
else
{
invDiff = getAccount(Doc.ACCTTYPE_InvDifferences, as);
}
}
cr = fact.createLine(line, invDiff,
as.getC_Currency_ID(), costs.negate());
if (cr == null)
continue;
C_Currency_ID, costs.negate());
if (cr != null)
{
cr.setM_Locator_ID(line.getM_Locator_ID());
cr.setQty(line.getQty().negate());
if (line.getC_Charge_ID() != 0) // explicit overwrite for charge
@ -229,18 +311,31 @@ public class Doc_Inventory extends Doc
}
costs = cr.getAcctBalance(); //get original cost
}
}
}
}
if (doPosting || costAdjustment)
{
BigDecimal costDetailAmt = costAdjustment ? adjustmentDiff : costs;
if (costAdjustment && getC_Currency_ID() > 0 && getC_Currency_ID() != as.getC_Currency_ID())
{
costDetailAmt = MConversionRate.convert (getCtx(),
costDetailAmt, getC_Currency_ID(), as.getC_Currency_ID(),
getDateAcct(), 0, getAD_Client_ID(), getAD_Org_ID());
}
// Cost Detail
if (!MCostDetail.createInventory(as, line.getAD_Org_ID(),
line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
line.get_ID(), 0,
costs, line.getQty(),
costDetailAmt, line.getQty(),
line.getDescription(), getTrxName()))
{
p_Error = "Failed to create cost detail record";
return null;
}
}
}
//
ArrayList<Fact> facts = new ArrayList<Fact>();
facts.add(fact);

View File

@ -322,15 +322,6 @@ public interface AdempiereDatabase
*/
public String addPagingSQL(String sql, int start, int end);
/**
* set statement/query timeout for connection
* @param conn
* @param timeout
* @return original timeout setting
* @throws SQLException
*/
public int setStatementTimeout(Connection conn, int timeout) throws SQLException;
/**
* Lock PO for update
* @param po

View File

@ -102,6 +102,12 @@ public class GridField
private GridTab m_gridTab;
/**
* Use by lookup editor to indicate setting of new value is in progress.
* GridTab.processDependentFields will check this flag to avoid clearing of lookup field value that just have been set.
**/
private boolean m_lookupEditorSettingValue = false;
/**
* Dispose
*/
@ -884,7 +890,15 @@ public class GridField
if( m_vo.TabNo == 0)
return Env.getContext (ctx, m_vo.WindowNo, variableName, true);
else
return Env.getContext (ctx, m_vo.WindowNo, m_vo.TabNo, variableName, false, true);
{
boolean tabOnly = false;
if (variableName.startsWith("~"))
{
variableName = variableName.substring(1);
tabOnly = true;
}
return Env.getContext (ctx, m_vo.WindowNo, m_vo.TabNo, variableName, tabOnly, true);
}
} // get_ValueAsString
@ -1997,15 +2011,14 @@ public class GridField
{
if (m_gridTab == null)
return false;
// this functionality must preserve the value of the parent tab JUST when is an included tab
// not included tabs can have Processed fields and is valid to add records in details on these cases
// like the Payment Schedule tab on Invoice (Customer) window
if (!m_gridTab.isIncluded())
return false;
GridTab parentTab = m_gridTab.getParentTab();
if (parentTab == null)
while (parentTab != null)
{
if (parentTab.getField(columnName) != null)
return true;
parentTab = parentTab.getParentTab();
}
return false;
return parentTab.getField(columnName) != null;
}
/**
@ -2054,4 +2067,20 @@ public class GridField
}
/**
* @param b
*/
public void setLookupEditorSettingValue(boolean b)
{
m_lookupEditorSettingValue = b;
}
/**
* @return true if the setting value of this field by UI is in progress
*/
public boolean isLookupEditorSettingValue()
{
return m_lookupEditorSettingValue;
}
} // GridField

View File

@ -2676,8 +2676,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// Get dependent MFields (may be because of display or dynamic lookup)
for (GridField dependentField : getDependantFields(columnName))
{
if (dependentField == null || dependentField.isLookupEditorSettingValue()) continue;
// if the field has a lookup
if (dependentField != null && dependentField.getLookup() instanceof MLookup)
if (dependentField.getLookup() instanceof MLookup)
{
MLookup mLookup = (MLookup)dependentField.getLookup();
// if the lookup is dynamic (i.e. contains this columnName as variable)

View File

@ -60,6 +60,7 @@ import org.compiere.util.MSort;
import org.compiere.util.Msg;
import org.compiere.util.SecureEngine;
import org.compiere.util.Trx;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
/**
@ -1501,6 +1502,7 @@ public class GridTable extends AbstractTableModel
{
log.log(Level.SEVERE, "Persistency Issue - "
+ m_tableName + ": " + e.getLocalizedMessage(), e);
log.saveError("Error", e.getLocalizedMessage());
return SAVE_ERROR;
}
}
@ -2028,10 +2030,11 @@ public class GridTable extends AbstractTableModel
{
String msg = "SaveError";
if (DBException.isUniqueContraintError(e)) // Unique Constraint
String dbException = DBException.getDefaultDBExceptionMessage(e);
if (!Util.isEmpty(dbException))
{
log.log(Level.SEVERE, "Key Not Unique", e);
msg = "SaveErrorNotUnique";
log.log(Level.SEVERE, dbException, e);
msg = dbException;
}
else
log.log(Level.SEVERE, select.toString(), e);
@ -2174,9 +2177,6 @@ public class GridTable extends AbstractTableModel
info = ppE.getName();
if ("DBExecuteError".equals(msg))
info = "DBExecuteError:" + info;
// Unique Constraint
if (DBException.isUniqueContraintError(CLogger.retrieveException()))
msg = "SaveErrorNotUnique";
}
fireDataStatusEEvent(msg, info, true);
return SAVE_ERROR;
@ -2667,8 +2667,9 @@ public class GridTable extends AbstractTableModel
{
log.log(Level.SEVERE, sql.toString(), e);
String msg = "DeleteError";
if (DBException.isChildRecordFoundError(e))
msg = "DeleteErrorDependent";
String dbMsg = DBException.getDefaultDBExceptionMessage(e);
if (!Util.isEmpty(dbMsg))
msg = dbMsg;
fireDataStatusEEvent(msg, e.getLocalizedMessage(), true);
return false;
}

View File

@ -0,0 +1,202 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_ZoomCondition
* @author iDempiere (generated)
* @version Release 1.0c
*/
public interface I_AD_ZoomCondition
{
/** TableName=AD_ZoomCondition */
public static final String Table_Name = "AD_ZoomCondition";
/** AD_Table_ID=200066 */
public static final int Table_ID = 200066;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 6 - System - Client
*/
BigDecimal accessLevel = BigDecimal.valueOf(6);
/** 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_Table_ID */
public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";
/** Set Table.
* Database Table information
*/
public void setAD_Table_ID (int AD_Table_ID);
/** Get Table.
* Database Table information
*/
public int getAD_Table_ID();
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException;
/** Column name AD_Window_ID */
public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID";
/** Set Window.
* Data entry or display window
*/
public void setAD_Window_ID (int AD_Window_ID);
/** Get Window.
* Data entry or display window
*/
public int getAD_Window_ID();
public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException;
/** Column name AD_ZoomCondition_ID */
public static final String COLUMNNAME_AD_ZoomCondition_ID = "AD_ZoomCondition_ID";
/** Set Zoom condition */
public void setAD_ZoomCondition_ID (int AD_ZoomCondition_ID);
/** Get Zoom condition */
public int getAD_ZoomCondition_ID();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name SeqNo */
public static final String COLUMNNAME_SeqNo = "SeqNo";
/** Set Sequence.
* Method of ordering records;
lowest number comes first
*/
public void setSeqNo (int SeqNo);
/** Get Sequence.
* Method of ordering records;
lowest number comes first
*/
public int getSeqNo();
/** 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();
/** Column name WhereClause */
public static final String COLUMNNAME_WhereClause = "WhereClause";
/** Set Sql WHERE.
* Fully qualified SQL WHERE clause
*/
public void setWhereClause (String WhereClause);
/** Get Sql WHERE.
* Fully qualified SQL WHERE clause
*/
public String getWhereClause();
}

View File

@ -133,6 +133,19 @@ public interface I_M_Inventory
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException;
/** Column name CostingMethod */
public static final String COLUMNNAME_CostingMethod = "CostingMethod";
/** Set Costing Method.
* Indicates how Costs will be calculated
*/
public void setCostingMethod (String CostingMethod);
/** Get Costing Method.
* Indicates how Costs will be calculated
*/
public String getCostingMethod();
/** Column name C_Project_ID */
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";

View File

@ -93,6 +93,19 @@ public interface I_M_InventoryLine
*/
public int getCreatedBy();
/** Column name CurrentCostPrice */
public static final String COLUMNNAME_CurrentCostPrice = "CurrentCostPrice";
/** Set Current Cost Price.
* The currently used cost price
*/
public void setCurrentCostPrice (BigDecimal CurrentCostPrice);
/** Get Current Cost Price.
* The currently used cost price
*/
public BigDecimal getCurrentCostPrice();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
@ -227,6 +240,19 @@ public interface I_M_InventoryLine
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException;
/** Column name NewCostPrice */
public static final String COLUMNNAME_NewCostPrice = "NewCostPrice";
/** Set New Cost Price.
* New current cost price after processing of M_CostDetail
*/
public void setNewCostPrice (BigDecimal NewCostPrice);
/** Get New Cost Price.
* New current cost price after processing of M_CostDetail
*/
public BigDecimal getNewCostPrice();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";

View File

@ -28,6 +28,7 @@ import java.util.Locale;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
@ -276,7 +277,7 @@ public class MColumn extends X_AD_Column
new Object[] {getAD_Table_ID(), getAD_Column_ID(), getSeqNo()});
if (cnt>0)
{
log.saveError("SaveErrorNotUnique", Msg.getElement(getCtx(), COLUMNNAME_SeqNo));
log.saveError(DBException.SAVE_ERROR_NOT_UNIQUE_MSG, Msg.getElement(getCtx(), COLUMNNAME_SeqNo));
return false;
}
}

View File

@ -1037,13 +1037,22 @@ public class MCostDetail extends X_M_CostDetail
|| getPP_Cost_Collector_ID() != 0)
{
boolean addition = qty.signum() > 0;
boolean adjustment = getM_InventoryLine_ID() > 0 && qty.signum() == 0 && amt.signum() != 0;
boolean isVendorRMA = isVendorRMA();
//
if (ce.isAverageInvoice())
{
if (!isVendorRMA)
{
if (addition)
if (adjustment)
{
String costingMethod = getM_InventoryLine().getM_Inventory().getCostingMethod();
if (MCostElement.COSTINGMETHOD_AverageInvoice.equals(costingMethod))
{
cost.setWeightedAverage(amt.multiply(cost.getCurrentQty()), qty);
}
}
else if (addition)
{
cost.setWeightedAverage(amt, qty);
//shouldn't accumulate reversal of customer shipment qty and amt
@ -1060,7 +1069,15 @@ public class MCostDetail extends X_M_CostDetail
}
else if (ce.isAveragePO())
{
if (addition)
if (adjustment)
{
String costingMethod = getM_InventoryLine().getM_Inventory().getCostingMethod();
if (MCostElement.COSTINGMETHOD_AveragePO.equals(costingMethod))
{
cost.setWeightedAverage(amt.multiply(cost.getCurrentQty()), qty);
}
}
else if (addition)
{
cost.setWeightedAverage(amt, qty);
//shouldn't accumulate reversal of customer shipment qty and amt
@ -1085,7 +1102,7 @@ public class MCostDetail extends X_M_CostDetail
}
else if (ce.isFifo() || ce.isLifo())
{
if (!isVendorRMA)
if (!isVendorRMA && !adjustment)
{
if (addition)
{
@ -1110,19 +1127,28 @@ public class MCostDetail extends X_M_CostDetail
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - FiFo/Lifo - " + cost);
}
}
else if (ce.isLastInvoice() && !isVendorRMA)
else if (ce.isLastInvoice() && !isVendorRMA && !adjustment)
{
cost.setCurrentQty(cost.getCurrentQty().add(qty));
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - LastInv - " + cost);
}
else if (ce.isLastPOPrice() && !isVendorRMA)
else if (ce.isLastPOPrice() && !isVendorRMA && !adjustment)
{
cost.setCurrentQty(cost.getCurrentQty().add(qty));
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - LastPO - " + cost);
}
else if (ce.isStandardCosting() && !isVendorRMA)
{
if (addition)
if (adjustment)
{
String costingMethod = getM_InventoryLine().getM_Inventory().getCostingMethod();
if (MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod))
{
cost.add(amt.multiply(cost.getCurrentQty()), qty);
cost.setCurrentCostPrice(cost.getCurrentCostPrice().add(amt));
}
}
else if (addition)
{
cost.add(amt, qty);
// Initial
@ -1140,7 +1166,7 @@ public class MCostDetail extends X_M_CostDetail
}
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - Standard - " + cost);
}
else if (ce.isUserDefined() && !isVendorRMA)
else if (ce.isUserDefined() && !isVendorRMA && !adjustment)
{
// Interface
if (addition)
@ -1151,7 +1177,7 @@ public class MCostDetail extends X_M_CostDetail
}
else if (!ce.isCostingMethod())
{
// Should not happen
//Should not happen
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - ?none? - " + cost);
}
else

View File

@ -105,6 +105,27 @@ public class MCostElement extends X_M_CostElement
return retValue;
} // getMaterialCostElement
/**
* Get first Material Cost Element
* @param ctx context
* @param CostingMethod costing method
* @return Cost Element or null
*/
public static MCostElement getMaterialCostElement(Properties ctx, String CostingMethod, int AD_Org_ID)
{
final String whereClause = "AD_Client_ID=? AND CostingMethod=? AND CostElementType=? AND AD_Org_ID In (0, ?)";
List<MCostElement> list = new Query(ctx, I_M_CostElement.Table_Name, whereClause, null)
.setParameters(Env.getAD_Client_ID(ctx),CostingMethod,COSTELEMENTTYPE_Material,AD_Org_ID)
.setOrderBy(I_M_CostElement.COLUMNNAME_AD_Org_ID + " Desc")
.list();
MCostElement retValue = null;
if (list.size() > 0)
retValue = list.get(0);
if (list.size() > 1)
if (s_log.isLoggable(Level.INFO)) s_log.info("More then one Material Cost Element for CostingMethod=" + CostingMethod);
return retValue;
} // getMaterialCostElement
/**
* Get active Material Cost Element for client
* @param po parent

View File

@ -412,6 +412,21 @@ public class MInventory extends X_M_Inventory implements DocAction
qtyDiff = line.getQtyInternalUse().negate();
else if (MDocType.DOCSUBTYPEINV_PhysicalInventory.equals(docSubTypeInv))
qtyDiff = line.getQtyCount().subtract(line.getQtyBook());
else if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(docSubTypeInv))
{
if (!isReversal())
{
BigDecimal currentCost = line.getCurrentCostPrice();
MClient client = MClient.get(getCtx(), getAD_Client_ID());
MAcctSchema as = client.getAcctSchema();
MCost cost = product.getCostingRecord(as, getAD_Org_ID(), line.getM_AttributeSetInstance_ID(), getCostingMethod());
if (cost != null && cost.getCurrentCostPrice().compareTo(currentCost) != 0)
{
m_processMsg = "Current Cost for Line " + line.getLine() + " have changed.";
return DocAction.STATUS_Invalid;
}
}
}
//If Quantity Count minus Quantity Book = Zero, then no change in Inventory
if (qtyDiff.signum() == 0)

View File

@ -346,7 +346,34 @@ public class MInventoryLine extends X_M_InventoryLine
log.saveError("Quantity", Msg.getElement(getCtx(), COLUMNNAME_QtyInternalUse));
return false;
}
} else if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(docSubTypeInv)) {
if (getNewCostPrice().signum() == 0) {
log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_NewCostPrice));
return false;
}
int M_ASI_ID = getM_AttributeSetInstance_ID();
MProduct product = getProduct();
MClient client = MClient.get(getCtx());
MAcctSchema as = client.getAcctSchema();
String costingLevel = product.getCostingLevel(as);
if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(costingLevel)) {
if (M_ASI_ID == 0) {
log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_M_AttributeSetInstance_ID));
return false;
}
}
String costingMethod = getParent().getCostingMethod();
int AD_Org_ID = getAD_Org_ID();
MCost cost = product.getCostingRecord(as, AD_Org_ID, M_ASI_ID, costingMethod);
if (cost == null) {
if (!MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod)) {
log.saveError("NoCostingRecord", "");
return false;
}
}
setM_Locator_ID(0);
} else {
log.saveError("Error", "Document inventory subtype not configured, cannot complete");
return false;

View File

@ -21,14 +21,19 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.process.DocAction;
import org.compiere.process.DocumentEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.ValueNamePair;
import org.compiere.wf.MWorkflow;
/**
@ -130,6 +135,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
private MInventory m_inventoryTo = null;
/** Physical Inventory Info */
private String m_inventoryInfo = null;
private List<MInventory> m_inventoryDoc = null;
/**
* Get Lines
@ -372,6 +378,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
approveIt();
if (log.isLoggable(Level.INFO)) log.info("completeIt - " + toString());
//
m_inventoryDoc = new ArrayList<MInventory>();
MMovement move = new MMovement (getCtx(), getM_Movement_ID(), get_TrxName());
MMovementLineConfirm[] lines = getLines(false);
for (int i = 0; i < lines.length; i++)
@ -383,7 +390,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
m_processMsg = "ShipLine not saved - " + confirm;
return DocAction.STATUS_Invalid;
}
if (confirm.isFullyConfirmed())
if (confirm.isFullyConfirmed() && confirm.getScrappedQty().signum() == 0)
{
confirm.setProcessed(true);
confirm.saveEx(get_TrxName());
@ -400,24 +407,51 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
log.log(Level.SEVERE, "completeIt - Scrapped=" + confirm.getScrappedQty()
+ " - Difference=" + confirm.getDifferenceQty());
if (m_processMsg == null)
m_processMsg = "Differnce Doc not created";
return DocAction.STATUS_Invalid;
}
}
} // for all lines
//complete movement
setProcessed(true);
saveEx();
ProcessInfo processInfo = MWorkflow.runDocumentActionWorkflow(move, DocAction.ACTION_Complete);
if (processInfo.isError())
{
m_processMsg = processInfo.getSummary();
setProcessed(false);
return DocAction.STATUS_Invalid;
}
if (m_inventoryInfo != null)
{
//complete inventory doc
for(MInventory inventory : m_inventoryDoc)
{
processInfo = MWorkflow.runDocumentActionWorkflow(inventory, DocAction.ACTION_Complete);
if (processInfo.isError())
{
m_processMsg = processInfo.getSummary();
setProcessed(false);
return DocAction.STATUS_Invalid;
}
}
m_processMsg = " @M_Inventory_ID@: " + m_inventoryInfo;
addDescription(Msg.translate(getCtx(), "M_Inventory_ID")
+ ": " + m_inventoryInfo);
}
m_inventoryDoc = null;
// User Validation
String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
if (valid != null)
{
m_processMsg = valid;
setProcessed(false);
return DocAction.STATUS_Invalid;
}
@ -451,9 +485,10 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
MWarehouse wh = MWarehouse.get(getCtx(), loc.getM_Warehouse_ID());
m_inventoryFrom = new MInventory (wh, get_TrxName());
m_inventoryFrom.setDescription(Msg.translate(getCtx(), "M_MovementConfirm_ID") + " " + getDocumentNo());
setInventoryDocType(m_inventoryFrom);
if (!m_inventoryFrom.save(get_TrxName()))
{
m_processMsg += "Inventory not created";
updateProcessMsg("Inventory not created");
return false;
}
// First Inventory
@ -464,6 +499,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
}
else
m_inventoryInfo += "," + m_inventoryFrom.getDocumentNo();
m_inventoryDoc.add(m_inventoryFrom);
}
if (log.isLoggable(Level.INFO)) log.info("createDifferenceDoc - Difference=" + confirm.getDifferenceQty());
@ -473,7 +509,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
line.setDescription(Msg.translate(getCtx(), "DifferenceQty"));
if (!line.save(get_TrxName()))
{
m_processMsg += "Inventory Line not created";
updateProcessMsg("Inventory Line not created");
return false;
}
confirm.setM_InventoryLine_ID(line.getM_InventoryLine_ID());
@ -493,9 +529,10 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
MWarehouse wh = MWarehouse.get(getCtx(), loc.getM_Warehouse_ID());
m_inventoryTo = new MInventory (wh, get_TrxName());
m_inventoryTo.setDescription(Msg.translate(getCtx(), "M_MovementConfirm_ID") + " " + getDocumentNo());
setInventoryDocType(m_inventoryTo);
if (!m_inventoryTo.save(get_TrxName()))
{
m_processMsg += "Inventory not created";
updateProcessMsg("Inventory not created");
return false;
}
// First Inventory
@ -506,6 +543,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
}
else
m_inventoryInfo += "," + m_inventoryTo.getDocumentNo();
m_inventoryDoc.add(m_inventoryTo);
}
if (log.isLoggable(Level.INFO)) log.info("createDifferenceDoc - Scrapped=" + confirm.getScrappedQty());
@ -515,7 +553,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
line.setDescription(Msg.translate(getCtx(), "ScrappedQty"));
if (!line.save(get_TrxName()))
{
m_processMsg += "Inventory Line not created";
updateProcessMsg("Inventory Line not created");
return false;
}
confirm.setM_InventoryLine_ID(line.getM_InventoryLine_ID());
@ -524,6 +562,36 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
return true;
} // createDifferenceDoc
/**
*
*/
private void updateProcessMsg(String msg) {
if (m_processMsg != null)
m_processMsg = m_processMsg + " " + msg;
else
m_processMsg = msg;
ValueNamePair error = CLogger.retrieveError();
if (error != null)
m_processMsg = m_processMsg + ": " + Msg.getMsg(Env.getCtx(), error.getValue()) + " " + error.getName();
}
/**
* @param inventory
*/
private void setInventoryDocType(MInventory inventory) {
MDocType[] doctypes = MDocType.getOfDocBaseType(Env.getCtx(), X_C_DocType.DOCBASETYPE_MaterialPhysicalInventory);
for(MDocType doctype : doctypes)
{
if (X_C_DocType.DOCSUBTYPEINV_PhysicalInventory.equals(doctype.getDocSubTypeInv()))
{
inventory.setC_DocType_ID(doctype.getC_DocType_ID());
break;
}
}
}
/**
* Void Document.
* @return false

View File

@ -148,10 +148,9 @@ public class MMovementLineConfirm extends X_M_MovementLineConfirm
*/
protected boolean beforeSave (boolean newRecord)
{
// Calculate Difference = Target - Confirmed - Scrapped
// Calculate Difference = Target - Confirmed
BigDecimal difference = getTargetQty();
difference = difference.subtract(getConfirmedQty());
difference = difference.subtract(getScrappedQty());
setDifferenceQty(difference);
//
return true;

View File

@ -869,4 +869,34 @@ public class MProduct extends X_M_Product
}
return costingMethod;
}
public MCost getCostingRecord(MAcctSchema as, int AD_Org_ID, int M_ASI_ID)
{
return getCostingRecord(as, AD_Org_ID, M_ASI_ID, getCostingMethod(as));
}
public MCost getCostingRecord(MAcctSchema as, int AD_Org_ID, int M_ASI_ID, String costingMethod)
{
String costingLevel = getCostingLevel(as);
if (MAcctSchema.COSTINGLEVEL_Client.equals(costingLevel))
{
AD_Org_ID = 0;
M_ASI_ID = 0;
}
else if (MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel))
M_ASI_ID = 0;
else if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(costingLevel))
{
AD_Org_ID = 0;
if (M_ASI_ID == 0)
return null;
}
MCostElement ce = MCostElement.getMaterialCostElement(getCtx(), costingMethod, AD_Org_ID);
if (ce == null) {
return null;
}
MCost cost = MCost.get(this, M_ASI_ID, as, AD_Org_ID, ce.getM_CostElement_ID(), (String)null);
return cost.is_new() ? null : cost;
}
} // MProduct

View File

@ -24,7 +24,6 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
@ -127,7 +126,6 @@ public class MSequence extends X_AD_Sequence
}
Connection conn = null;
Statement timeoutStatement = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
for (int i = 0; i < 3; i++)
@ -143,13 +141,7 @@ public class MSequence extends X_AD_Sequence
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
pstmt.setString(1, TableName);
//
//postgresql use special syntax instead of the setQueryTimeout method
if (DB.isPostgreSQL())
{
timeoutStatement = conn.createStatement();
timeoutStatement.execute("SET LOCAL statement_timeout TO " + ( QUERY_TIME_OUT * 1000 ));
}
else if (DB.getDatabase().isQueryTimeoutSupported())
if (DB.getDatabase().isQueryTimeoutSupported())
{
pstmt.setQueryTimeout(QUERY_TIME_OUT);
}
@ -267,8 +259,6 @@ public class MSequence extends X_AD_Sequence
{
DB.close(rs, pstmt);
pstmt = null;rs = null;
DB.close(timeoutStatement);
timeoutStatement = null;
if (conn != null)
{
@ -384,7 +374,6 @@ public class MSequence extends X_AD_Sequence
int docOrg_ID = 0;
int next = -1;
Statement timeoutStatement = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
@ -434,13 +423,7 @@ public class MSequence extends X_AD_Sequence
}
//
//postgresql use special syntax instead of the setQueryTimeout method
if (DB.isPostgreSQL())
{
timeoutStatement = conn.createStatement();
timeoutStatement.execute("SET LOCAL statement_timeout TO " + ( QUERY_TIME_OUT * 1000 ));
}
else if (DB.getDatabase().isQueryTimeoutSupported())
if (DB.getDatabase().isQueryTimeoutSupported())
{
pstmt.setQueryTimeout(QUERY_TIME_OUT);
}
@ -517,8 +500,6 @@ public class MSequence extends X_AD_Sequence
{
DB.close(rs, pstmt);
pstmt = null;rs = null;
DB.close(timeoutStatement);
timeoutStatement = null;
// Finish
try
{
@ -702,7 +683,7 @@ public class MSequence extends X_AD_Sequence
if (tableID && SYSTEM_NATIVE_SEQUENCE)
{
int next_id = DB.getSQLValue(trxName, "SELECT CurrentNext FROM AD_Sequence WHERE Name=? AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'", TableName);
int next_id = DB.getSQLValueEx(trxName, "SELECT CurrentNext FROM AD_Sequence WHERE Name=? AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'", TableName);
if (next_id == -1)
{
MSequence seq = new MSequence (ctx, 0, trxName);
@ -793,7 +774,7 @@ public class MSequence extends X_AD_Sequence
}
catch (Exception e)
{
s_log.log(Level.SEVERE, "get", e);
throw new DBException(e);
}
finally
{

View File

@ -683,11 +683,15 @@ public final class MSetup
createDocType("Material Movement", Msg.getElement(m_ctx, "M_Movement_ID", false),
MDocType.DOCBASETYPE_MaterialMovement, null, 0, 0, 610000, GL_MM, false);
createDocType("Physical Inventory", Msg.getElement(m_ctx, "M_Inventory_ID", false),
MDocType.DOCBASETYPE_MaterialPhysicalInventory, null, 0, 0, 620000, GL_MM, false);
MDocType.DOCBASETYPE_MaterialPhysicalInventory, MDocType.DOCSUBTYPEINV_PhysicalInventory, 0, 0, 620000, GL_MM, false);
createDocType("Material Production", Msg.getElement(m_ctx, "M_Production_ID", false),
MDocType.DOCBASETYPE_MaterialProduction, null, 0, 0, 630000, GL_MM, false);
createDocType("Project Issue", Msg.getElement(m_ctx, "C_ProjectIssue_ID", false),
MDocType.DOCBASETYPE_ProjectIssue, null, 0, 0, 640000, GL_MM, false);
createDocType("Internal Use Inventory", "Internal Use Inventory",
MDocType.DOCBASETYPE_MaterialPhysicalInventory, MDocType.DOCSUBTYPEINV_InternalUseInventory, 0, 0, 650000, GL_MM, false);
createDocType("Cost Adjustment", "Cost Adjustment",
MDocType.DOCBASETYPE_MaterialPhysicalInventory, MDocType.DOCSUBTYPEINV_CostAdjustment, 0, 0, 660000, GL_MM, false);
// Order Entry
createDocType("Binding offer", "Quotation",
@ -891,7 +895,16 @@ public final class MSetup
if (PrintName != null && PrintName.length() > 0)
dt.setPrintName(PrintName); // Defaults to Name
if (DocSubTypeSO != null)
{
if (MDocType.DOCBASETYPE_MaterialPhysicalInventory.equals(DocBaseType))
{
dt.setDocSubTypeInv(DocSubTypeSO);
}
else
{
dt.setDocSubTypeSO(DocSubTypeSO);
}
}
if (C_DocTypeShipment_ID != 0)
dt.setC_DocTypeShipment_ID(C_DocTypeShipment_ID);
if (C_DocTypeInvoice_ID != 0)

View File

@ -33,6 +33,7 @@ import java.util.logging.Level;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import org.adempiere.exceptions.DBException;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
@ -910,7 +911,7 @@ public class MUser extends X_AD_User
"SELECT COUNT(*) FROM AD_User WHERE Password IS NOT NULL AND EMail=? AND AD_Client_ID=? AND AD_User_ID!=?",
getEMail(), getAD_Client_ID(), getAD_User_ID());
if (cnt > 0) {
log.saveError("SaveError", Msg.getMsg(getCtx(), "SaveErrorNotUnique", true) + Msg.getElement(getCtx(), COLUMNNAME_EMail));
log.saveError("SaveError", Msg.getMsg(getCtx(), DBException.SAVE_ERROR_NOT_UNIQUE_MSG, true) + Msg.getElement(getCtx(), COLUMNNAME_EMail));
return false;
}
}

View File

@ -0,0 +1,210 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import org.compiere.util.DB;
import org.compiere.util.Env;
/**
* Zoom Condition model
*
* @author Nico
* @version $Id: MZoomCondition.java
*/
public class MZoomCondition extends X_AD_ZoomCondition
{
/**
* generated serial id
*/
private static final long serialVersionUID = -4615781101317341203L;
/**************************************************************************
* Standard Constructor
* @param ctx context
* @param XXA_PostIt_ID id
* @param trxName transaction
*/
public MZoomCondition (Properties ctx, int AD_ZoomCondition_ID, String trxName)
{
super (ctx, AD_ZoomCondition_ID, trxName);
} // MZoomCondition
/**
* Load Constructor
* @param ctx context
* @param rs result set
* @param trxName transaction
*/
public MZoomCondition (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MZoomCondition
/**
* Retrieve zoom condition record by AD_Table_ID
* @param AD_Table_ID
* @return array of zoom condition record
*/
public static MZoomCondition[] getConditions(int AD_Table_ID)
{
final String whereClauseFinal = "AD_Table_ID=?";
List<MZoomCondition> list = new Query(Env.getCtx(), MZoomCondition.Table_Name, whereClauseFinal, null)
.setParameters(AD_Table_ID)
.setOnlyActiveRecords(true)
.setOrderBy(MZoomCondition.COLUMNNAME_SeqNo)
.list();
return list.toArray(new MZoomCondition[list.size()]);
} // getCondition
private static int findZoomWindowByTableId(int AD_Table_ID, MQuery query)
{
MZoomCondition[] conditions = MZoomCondition.getConditions(AD_Table_ID);
if (conditions.length > 0)
{
for (MZoomCondition condition : conditions)
{
boolean evaluation = condition.evaluate(query.getWhereClause(true));
if (evaluation)
{
return condition.getAD_Window_ID();
}
}
}
return 0;
}
/**
* find first AD_Window_ID from matching zoom condition record
* @param query
* @return AD_Window_ID
*/
public static int findZoomWindow(MQuery query)
{
String tableName = query.getTableName();
MTable table = MTable.get(Env.getCtx(), tableName);
return findZoomWindowByTableId(table.getAD_Table_ID(), query);
}
/**
* find first AD_Window_ID from matching zoom condition record
* @param AD_Window_ID Zoom AD_Window_ID from MLookup
* @param query
* @return AD_Window_ID
*/
public static int findZoomWindowByWindowId(int AD_Window_ID, MQuery query)
{
GridWindow window = GridWindow.get(Env.getCtx(), -1, AD_Window_ID);
if (window == null || window.getTabCount() == 0)
return 0;
if (window.getTab(0).getTableName().equals(query.getZoomTableName())) {
return findZoomWindowByTableId(window.getTab(0).getAD_Table_ID(), query);
}
else
{
//resolve zoom to detail
int size = window.getTabCount();
GridTab gTab = null;
for(int i = 0; i < size; i++)
{
if (window.getTab(i).getTableName().equals(query.getZoomTableName()))
{
gTab = window.getTab(i);
break;
}
}
if (gTab != null)
{
window.initTab(gTab.getTabNo());
GridTab parentTab = gTab.getParentTab();
int parentId = DB.getSQLValue(null, "SELECT " + gTab.getLinkColumnName() + " FROM " + gTab.getTableName() + " WHERE " + query.getWhereClause());
if (parentId <= 0)return 0;
while (parentTab != null)
{
window.initTab(parentTab.getTabNo());
if (parentTab.getParentTab() != null)
{
parentId = DB.getSQLValue(null, "SELECT " + parentTab.getLinkColumnName() + " FROM " + parentTab.getTableName() + " WHERE "
+ parentTab.getTableName()+"_ID="+parentId);
if (parentId <= 0) return 0;
parentTab = parentTab.getParentTab();
}
else
{
if (parentTab == window.getTab(0))
{
return findZoomWindowByTableId(parentTab.getAD_Table_ID(), parentId);
}
}
}
}
}
return 0;
}
/**
* find AD_Window_ID from matching zoom condition record
* @param AD_Table_ID
* @param recordID
* @return AD_Window_ID
*/
public static int findZoomWindowByTableId(int AD_Table_ID, int recordID)
{
MTable table = MTable.get(Env.getCtx(), AD_Table_ID);
MZoomCondition[] conditions = MZoomCondition.getConditions(AD_Table_ID);
if (conditions.length > 0)
{
String whereClause = table.getTableName() + "_ID="+recordID;
for (MZoomCondition condition : conditions)
{
boolean evaluation = condition.evaluate(whereClause);
if (evaluation)
{
return condition.getAD_Window_ID();
}
}
}
return 0;
}
/**
* @param whereClause mandatory filter to get record for evaluation
* @return true if the condition is true for the record
*/
public boolean evaluate(String whereClause)
{
MTable table = MTable.get(Env.getCtx(), getAD_Table_ID());
String tableName = table.getTableName();
StringBuilder builder = new StringBuilder("SELECT Count(*) FROM ");
builder.append(tableName)
.append(" WHERE ")
.append(whereClause)
.append(" AND ")
.append(getWhereClause());
int no = DB.getSQLValue(null, builder.toString());
return no == 1;
}
} // MZoomCondition

View File

@ -20,6 +20,7 @@ import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -192,7 +193,7 @@ public class M_Element extends X_AD_Element
sql.append(" AND AD_Element_ID<>").append(get_ID());
int no = DB.getSQLValue(null, sql.toString(), columnName.toUpperCase());
if (no > 0) {
log.saveError("SaveErrorNotUnique", Msg.getElement(getCtx(), COLUMNNAME_ColumnName));
log.saveError(DBException.SAVE_ERROR_NOT_UNIQUE_MSG, Msg.getElement(getCtx(), COLUMNNAME_ColumnName));
return false;
}
}

View File

@ -1963,7 +1963,6 @@ public abstract class PO
* To reload call load() - not updated
* @return true if saved
*/
@SuppressWarnings("unused")
public boolean save()
{
CLogger.resetLast();
@ -2061,7 +2060,8 @@ public abstract class PO
catch (Exception e)
{
log.log(Level.WARNING, "beforeSave - " + toString(), e);
log.saveError("Error", e, false);
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : "Error", e, false);
if (localTrx != null)
{
localTrx.rollback();
@ -2141,9 +2141,11 @@ public abstract class PO
}
}
}
catch (SQLException e)
catch (Exception e)
{
log.log(Level.WARNING, "afterSave - " + toString(), e);
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : "Error", e);
if (localTrx != null)
{
localTrx.rollback();
@ -3112,6 +3114,8 @@ public abstract class PO
}
Trx localTrx = null;
Trx trx = null;
Savepoint savepoint = null;
boolean success = false;
try
{
@ -3123,20 +3127,58 @@ public abstract class PO
localTrx = Trx.get(localTrxName, true);
m_trxName = localTrxName;
}
else
{
trx = Trx.get(m_trxName, false);
if (trx == null)
{
// Using a trx that was previously closed or never opened
// Creating and starting the transaction right here, but please note
// that this is not a good practice
trx = Trx.get(m_trxName, true);
log.severe("Transaction closed or never opened ("+m_trxName+") => starting now --> " + toString());
}
}
try
{
// If not a localTrx we need to set a savepoint for rollback
if (localTrx == null)
savepoint = trx.setSavepoint(null);
if (!beforeDelete())
{
log.warning("beforeDelete failed");
if (localTrx != null)
{
localTrx.rollback();
}
else if (savepoint != null)
{
try {
trx.rollback(savepoint);
} catch (SQLException e) {}
savepoint = null;
}
return false;
}
}
catch (Exception e)
{
log.log(Level.WARNING, "beforeDelete", e);
log.saveError("Error", e, false);
// throw new DBException(e);
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : "Error", e, false);
if (localTrx != null)
{
localTrx.rollback();
}
else if (savepoint != null)
{
try {
trx.rollback(savepoint);
} catch (SQLException e1) {}
savepoint = null;
}
return false;
}
// Delete Restrict AD_Table_ID/Record_ID (Requests, ..)
@ -3144,6 +3186,17 @@ public abstract class PO
if (errorMsg != null)
{
log.saveError("CannotDelete", errorMsg);
if (localTrx != null)
{
localTrx.rollback();
}
else if (savepoint != null)
{
try {
trx.rollback(savepoint);
} catch (SQLException e) {}
savepoint = null;
}
return false;
}
// Call ModelValidators TYPE_DELETE
@ -3153,9 +3206,22 @@ public abstract class PO
if (errorMsg != null)
{
log.saveError("Error", errorMsg);
if (localTrx != null)
{
localTrx.rollback();
}
else if (savepoint != null)
{
try {
trx.rollback(savepoint);
} catch (SQLException e) {}
savepoint = null;
}
return false;
}
try
{
//
deleteTranslations(localTrxName);
// Delete Cascade AD_Table_ID/Record_ID (Attachments, ..)
@ -3172,6 +3238,13 @@ public abstract class PO
else
no = DB.executeUpdate(sql.toString(), localTrxName);
success = no == 1;
}
catch (Exception e)
{
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : e.getLocalizedMessage(), e);
success = false;
}
// Save ID
m_idOld = get_ID();
@ -3180,8 +3253,17 @@ public abstract class PO
{
log.warning("Not deleted");
if (localTrx != null)
{
localTrx.rollback();
}
else if (savepoint != null)
{
try {
trx.rollback(savepoint);
} catch (SQLException e) {}
savepoint = null;
}
}
else
{
if (success)
@ -3239,7 +3321,8 @@ public abstract class PO
catch (Exception e)
{
log.log(Level.WARNING, "afterDelete", e);
log.saveError("Error", e, false);
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : "Error", e, false);
success = false;
// throw new DBException(e);
}
@ -3256,8 +3339,17 @@ public abstract class PO
if (!success)
{
if (localTrx != null)
{
localTrx.rollback();
}
else if (savepoint != null)
{
try {
trx.rollback(savepoint);
} catch (SQLException e) {}
savepoint = null;
}
}
else
{
if (localTrx != null)
@ -3265,7 +3357,8 @@ public abstract class PO
try {
localTrx.commit(true);
} catch (SQLException e) {
log.saveError("Error", e);
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : "Error", e);
success = false;
}
}
@ -3292,8 +3385,20 @@ public abstract class PO
localTrx.close();
m_trxName = null;
}
else
{
if (savepoint != null)
{
try {
trx.releaseSavepoint(savepoint);
} catch (SQLException e) {
e.printStackTrace();
}
}
savepoint = null;
trx = null;
}
}
// log.info("" + success);
return success;
} // delete

View File

@ -118,8 +118,6 @@ public abstract class PaymentProcessor
*/
public String validate() throws IllegalArgumentException {
String msg = null;
if (p_mp.getC_BP_BankAccount_ID() != 0 || p_mp.getCustomerPaymentProfileID() != null)
return msg;
if (MPayment.TENDERTYPE_CreditCard.equals(p_mp.getTenderType())) {
msg = validateCreditCard();
} else if (MPayment.TENDERTYPE_Check.equals(p_mp.getTenderType())) {
@ -143,7 +141,10 @@ public abstract class PaymentProcessor
}
public String validateCreditCard() throws IllegalArgumentException {
String msg = MPaymentValidate.validateCreditCardNumber(p_mp.getCreditCardNumber(), p_mp.getCreditCardType());
String msg = null;
if (p_mp.getC_BP_BankAccount_ID() != 0 || (p_mp.getCustomerPaymentProfileID() != null && p_mp.getCustomerPaymentProfileID().length() > 0))
return msg;
msg = MPaymentValidate.validateCreditCardNumber(p_mp.getCreditCardNumber(), p_mp.getCreditCardType());
if (msg != null && msg.length() > 0)
throw new IllegalArgumentException(Msg.getMsg(Env.getCtx(), msg));
msg = MPaymentValidate.validateCreditCardExp(p_mp.getCreditCardExpMM(), p_mp.getCreditCardExpYY());

View File

@ -0,0 +1,222 @@
/******************************************************************************
* 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_ZoomCondition
* @author iDempiere (generated)
* @version Release 1.0c - $Id$ */
public class X_AD_ZoomCondition extends PO implements I_AD_ZoomCondition, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20130722L;
/** Standard Constructor */
public X_AD_ZoomCondition (Properties ctx, int AD_ZoomCondition_ID, String trxName)
{
super (ctx, AD_ZoomCondition_ID, trxName);
/** if (AD_ZoomCondition_ID == 0)
{
setAD_Table_ID (0);
setAD_Window_ID (0);
setAD_ZoomCondition_ID (0);
setName (null);
setWhereClause (null);
} */
}
/** Load Constructor */
public X_AD_ZoomCondition (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 6 - System - Client
*/
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_ZoomCondition[")
.append(get_ID()).append("]");
return sb.toString();
}
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
{
return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_Name)
.getPO(getAD_Table_ID(), get_TrxName()); }
/** Set Table.
@param AD_Table_ID
Database Table information
*/
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Table_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID));
}
/** Get Table.
@return Database Table information
*/
public int getAD_Table_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException
{
return (org.compiere.model.I_AD_Window)MTable.get(getCtx(), org.compiere.model.I_AD_Window.Table_Name)
.getPO(getAD_Window_ID(), get_TrxName()); }
/** Set Window.
@param AD_Window_ID
Data entry or display window
*/
public void setAD_Window_ID (int AD_Window_ID)
{
if (AD_Window_ID < 1)
set_Value (COLUMNNAME_AD_Window_ID, null);
else
set_Value (COLUMNNAME_AD_Window_ID, Integer.valueOf(AD_Window_ID));
}
/** Get Window.
@return Data entry or display window
*/
public int getAD_Window_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Window_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Zoom condition.
@param AD_ZoomCondition_ID Zoom condition */
public void setAD_ZoomCondition_ID (int AD_ZoomCondition_ID)
{
if (AD_ZoomCondition_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_ZoomCondition_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_ZoomCondition_ID, Integer.valueOf(AD_ZoomCondition_ID));
}
/** Get Zoom condition.
@return Zoom condition */
public int getAD_ZoomCondition_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_ZoomCondition_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Sql WHERE.
@param WhereClause
Fully qualified SQL WHERE clause
*/
public void setWhereClause (String WhereClause)
{
set_Value (COLUMNNAME_WhereClause, WhereClause);
}
/** Get Sql WHERE.
@return Fully qualified SQL WHERE clause
*/
public String getWhereClause ()
{
return (String)get_Value(COLUMNNAME_WhereClause);
}
}

View File

@ -30,7 +30,7 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130717L;
/** Standard Constructor */
public X_C_DocType (Properties ctx, int C_DocType_ID, String trxName)
@ -429,6 +429,8 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
public static final String DOCSUBTYPEINV_PhysicalInventory = "PI";
/** Internal Use Inventory = IU */
public static final String DOCSUBTYPEINV_InternalUseInventory = "IU";
/** Cost Adjustment = CA */
public static final String DOCSUBTYPEINV_CostAdjustment = "CA";
/** Set Inv Sub Type.
@param DocSubTypeInv
Inventory Sub Type

View File

@ -33,7 +33,7 @@ public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130717L;
/** Standard Constructor */
public X_M_Inventory (Properties ctx, int M_Inventory_ID, String trxName)
@ -212,6 +212,44 @@ public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent
return ii.intValue();
}
/** CostingMethod AD_Reference_ID=122 */
public static final int COSTINGMETHOD_AD_Reference_ID=122;
/** Standard Costing = S */
public static final String COSTINGMETHOD_StandardCosting = "S";
/** Average PO = A */
public static final String COSTINGMETHOD_AveragePO = "A";
/** Lifo = L */
public static final String COSTINGMETHOD_Lifo = "L";
/** Fifo = F */
public static final String COSTINGMETHOD_Fifo = "F";
/** Last PO Price = p */
public static final String COSTINGMETHOD_LastPOPrice = "p";
/** Average Invoice = I */
public static final String COSTINGMETHOD_AverageInvoice = "I";
/** Last Invoice = i */
public static final String COSTINGMETHOD_LastInvoice = "i";
/** User Defined = U */
public static final String COSTINGMETHOD_UserDefined = "U";
/** _ = x */
public static final String COSTINGMETHOD__ = "x";
/** Set Costing Method.
@param CostingMethod
Indicates how Costs will be calculated
*/
public void setCostingMethod (String CostingMethod)
{
set_Value (COLUMNNAME_CostingMethod, CostingMethod);
}
/** Get Costing Method.
@return Indicates how Costs will be calculated
*/
public String getCostingMethod ()
{
return (String)get_Value(COLUMNNAME_CostingMethod);
}
public org.compiere.model.I_C_Project getC_Project() throws RuntimeException
{
return (org.compiere.model.I_C_Project)MTable.get(getCtx(), org.compiere.model.I_C_Project.Table_Name)

View File

@ -32,7 +32,7 @@ public class X_M_InventoryLine extends PO implements I_M_InventoryLine, I_Persis
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20130717L;
/** Standard Constructor */
public X_M_InventoryLine (Properties ctx, int M_InventoryLine_ID, String trxName)
@ -111,6 +111,26 @@ public class X_M_InventoryLine extends PO implements I_M_InventoryLine, I_Persis
return ii.intValue();
}
/** Set Current Cost Price.
@param CurrentCostPrice
The currently used cost price
*/
public void setCurrentCostPrice (BigDecimal CurrentCostPrice)
{
set_ValueNoCheck (COLUMNNAME_CurrentCostPrice, CurrentCostPrice);
}
/** Get Current Cost Price.
@return The currently used cost price
*/
public BigDecimal getCurrentCostPrice ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Description.
@param Description
Optional short description of the record
@ -329,6 +349,26 @@ public class X_M_InventoryLine extends PO implements I_M_InventoryLine, I_Persis
return ii.intValue();
}
/** Set New Cost Price.
@param NewCostPrice
New current cost price after processing of M_CostDetail
*/
public void setNewCostPrice (BigDecimal NewCostPrice)
{
set_Value (COLUMNNAME_NewCostPrice, NewCostPrice);
}
/** Get New Cost Price.
@return New current cost price after processing of M_CostDetail
*/
public BigDecimal getNewCostPrice ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_NewCostPrice);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Processed.
@param Processed
The document has been processed

View File

@ -625,6 +625,9 @@ public class MPrintFormatItem extends X_AD_PrintFormatItem
*/
protected boolean beforeSave (boolean newRecord)
{
if (!isPrinted()) {
setIsOrderBy(false);
}
// Order
if (!isOrderBy())
{

View File

@ -23,6 +23,7 @@ import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import org.compiere.model.PO;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Ini;
@ -140,6 +141,8 @@ public class ProcessInfo implements Serializable
/** Row count */
private int m_rowCount;
private transient PO m_po = null;
/**
* String representation
* @return String representation
@ -773,4 +776,11 @@ public class ProcessInfo implements Serializable
return m_rowCount;
}
public void setPO(PO po) {
m_po = po;
}
public PO getPO() {
return m_po;
}
} // ProcessInfo

View File

@ -20,6 +20,8 @@ import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@ -47,6 +49,7 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
private String m_tableName;
@SuppressWarnings("unused")
private boolean m_distributed;
public CCache (String name, int initialCapacity)
@ -87,7 +90,6 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
*/
public CCache (String tableName, String name, int initialCapacity, int expireMinutes, boolean distributed)
{
// super(initialCapacity);
m_name = name;
m_tableName = tableName;
setExpireMinutes(expireMinutes);
@ -99,6 +101,10 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
nullList = provider.getSet(name);
}
}
if (nullList == null) {
nullList = Collections.synchronizedSet(new HashSet<K>());
}
} // CCache
/** Name */
@ -181,7 +187,7 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
*/
public int reset()
{
int no = cache.size();
int no = cache.size()+nullList.size();
clear();
return no;
} // reset
@ -229,6 +235,7 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
}
// Clear
cache.clear();
nullList.clear();
if (m_expire != 0)
{
long addMS = 60000L * m_expire;
@ -244,14 +251,7 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
public boolean containsKey(Object key)
{
expire();
if (nullList != null)
{
return cache.containsKey(key) || nullList.contains(key);
}
else
{
return cache.containsKey(key);
}
} // containsKey
/**
@ -264,6 +264,7 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
} // containsValue
/**
* The return entry set exclude entries that contains null value
* @see java.util.Map#entrySet()
*/
public Set<Map.Entry<K,V>> entrySet()
@ -291,11 +292,12 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
{
expire();
m_justReset = false;
if (value == null && m_distributed && nullList != null) {
if (value == null) {
cache.remove(key);
if (!nullList.contains(key))
nullList.add(key);
return null;
} else if (!nullList.isEmpty()) {
nullList.remove(key);
}
return cache.put (key, value);
} // put
@ -317,10 +319,11 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
public boolean isEmpty()
{
expire();
return cache.isEmpty();
return cache.isEmpty() && nullList.isEmpty();
} // isEmpty
/**
* The return key set excludes key that map to null value
* @see java.util.Map#keySet()
*/
public Set<K> keySet()
@ -335,7 +338,7 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
public int size()
{
expire();
return cache.size();
return cache.size()+nullList.size();
} // size
/**
@ -345,10 +348,11 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
*/
public int sizeNoExpire()
{
return cache.size();
return cache.size()+nullList.size();
} // size
/**
* The return values collection exclude null value entries
* @see java.util.Map#values()
*/
public Collection<V> values()
@ -383,6 +387,9 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
@Override
public V remove(Object key) {
if (!nullList.isEmpty()) {
if (nullList.remove(key)) return null;
}
return cache.remove(key);
}
@ -391,6 +398,9 @@ public class CCache<K,V> implements CacheInterface, Map<K, V>, Serializable
if (recordId <= 0)
return reset();
if (!nullList.isEmpty()) {
if (nullList.remove(recordId)) return 1;
}
V removed = cache.remove(recordId);
return removed != null ? 1 : 0;
}

View File

@ -18,8 +18,8 @@ package org.compiere.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.logging.Level;
@ -93,7 +93,7 @@ public class CacheMgt
if (map == null)
{
map = new HashMap<K, V>();
map = new ConcurrentHashMap<K, V>();
}
return map;
} // register

View File

@ -1017,16 +1017,12 @@ public final class DB
CPreparedStatement cs = ProxyFactory.newCPreparedStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE, sql, trxName); // converted in call
int currentTimeout = -1;
try
{
setParameters(cs, params);
//set timeout
if (timeOut > 0)
{
if (DB.isPostgreSQL())
currentTimeout = DB.getDatabase().setStatementTimeout(cs.getConnection(), timeOut);
else
cs.setQueryTimeout(timeOut);
}
no = cs.executeUpdate();
@ -1044,20 +1040,13 @@ public final class DB
else
{
log.log(Level.SEVERE, cs.getSql() + " [" + trxName + "]", e);
log.saveError ("DBExecuteError", e);
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError (msg != null ? msg : "DBExecuteError", e);
}
// throw new DBException(e);
}
finally
{
if (DB.isPostgreSQL() && timeOut > 0)
{
try
{
DB.getDatabase().setStatementTimeout(cs.getConnection(), currentTimeout);
}
catch (SQLException e) {}
}
// Always close cursor
close(cs);
cs = null;
@ -1097,52 +1086,11 @@ public final class DB
CPreparedStatement cs = ProxyFactory.newCPreparedStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE, sql, trxName); // converted in call
boolean autoCommit = false;
int currentTimeout = 0;
try
{
autoCommit = cs.getConnection().getAutoCommit();
setParameters(cs, params);
if (timeOut > 0)
{
if (DB.isPostgreSQL())
{
Statement timeoutStatement = null;
try
{
Connection conn = cs.getConnection();
if (autoCommit)
{
conn.setAutoCommit(false);
}
else
{
ResultSet rs = null;
try
{
rs = conn.createStatement().executeQuery("select current_setting('statement_timeout')");
if (rs.next())
currentTimeout = rs.getInt(1);
}
finally
{
close(rs.getStatement());
close(rs);rs = null;
}
}
timeoutStatement = conn.createStatement();
timeoutStatement.execute("SET LOCAL statement_timeout TO " + ( timeOut * 1000 ));
if (log.isLoggable(Level.FINEST))
{
log.finest("Set statement timeout to " + timeOut);
}
} catch (SQLException e) {}
finally{
DB.close(timeoutStatement);
timeoutStatement = null;
}
}
else
{
cs.setQueryTimeout(timeOut);
}
@ -1160,43 +1108,6 @@ public final class DB
}
finally
{
if (DB.isPostgreSQL() && timeOut > 0)
{
Statement timeoutStatement = null;
try {
if (autoCommit)
{
cs.getConnection().setAutoCommit(true);
}
else
{
if (currentTimeout > 0)
{
timeoutStatement = cs.getConnection().createStatement();
timeoutStatement.execute("SET LOCAL statement_timeout TO " + ( currentTimeout * 1000 ));
if (log.isLoggable(Level.FINEST))
{
log.finest("Reset statement timeout to " + currentTimeout);
}
}
else
{
timeoutStatement = cs.getConnection().createStatement();
timeoutStatement.execute("SET LOCAL statement_timeout TO Default");
if (log.isLoggable(Level.FINEST))
{
log.finest("Reset statement timeout to default");
}
}
}
} catch (SQLException e) {
}
finally{
close(timeoutStatement);
timeoutStatement = null;
}
}
close(cs);
cs = null;
}

View File

@ -171,6 +171,10 @@ public class Evaluator
firstEval = defaultValue;
}
}
//NPE sanity check
if (firstEval == null)
firstEval = "";
firstEval = firstEval.replace('\'', ' ').replace('"', ' ').trim(); // strip ' and "
// Comperator
@ -283,6 +287,8 @@ public class Evaluator
String variable = s.substring(0, pos);
s = s.substring(pos+1);
// log.fine( variable);
if (variable.startsWith("~"))
variable = variable.substring(1);
list.add(variable);
}
} // parseDepends

View File

@ -1363,7 +1363,7 @@ public class Login
.append(" WHERE ur.IsActive='Y'")
.append(" AND u.IsActive='Y'")
.append(" AND cli.IsActive='Y'")
.append(" AND ur.AD_User_ID=?");
.append(" AND ur.AD_User_ID=? ORDER BY cli.Name");
PreparedStatement pstmt=null;
ResultSet rs=null;
try{
@ -1496,7 +1496,9 @@ public class Login
else
sql.append("COALESCE(u.LDAPUser,u.Name)=?");
sql.append(" AND r.IsMasterRole='N'");
sql.append(" AND u.IsActive='Y'").append(" AND EXISTS (SELECT * FROM AD_Client c WHERE u.AD_Client_ID=c.AD_Client_ID AND c.IsActive='Y')");
sql.append(" AND u.IsActive='Y' AND EXISTS (SELECT * FROM AD_Client c WHERE u.AD_Client_ID=c.AD_Client_ID AND c.IsActive='Y')");
// don't show roles without org access
sql.append(" AND (r.isaccessallorgs='Y' OR EXISTS (SELECT 1 FROM AD_Role_OrgAccess ro WHERE ro.AD_Role_ID=r.AD_Role_ID AND ro.IsActive='Y'))");
sql.append(" ORDER BY r.Name");
PreparedStatement pstmt = null;
@ -1565,7 +1567,7 @@ public class Login
.append(" WHERE ur.IsActive='Y'")
.append(" AND cli.IsActive='Y'")
.append(" AND u.IsActive='Y'")
.append(" AND u.AD_User_ID=?");
.append(" AND u.AD_User_ID=? ORDER BY cli.Name");
PreparedStatement pstmt = null;
ResultSet rs = null;
try {

View File

@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.compiere.Adempiere;
import org.compiere.model.PO;
@ -369,6 +370,11 @@ public class Trx
fireAfterCommitEvent(false);
throw e;
}
else
{
String msg = DBException.getDefaultDBExceptionMessage(e);
log.saveError(msg != null ? msg : e.getLocalizedMessage(), e);
}
}
m_active = false;
fireAfterCommitEvent(false);

View File

@ -108,6 +108,8 @@ public class MWFProcess extends X_AD_WF_Process
// Document
setAD_Table_ID(wf.getAD_Table_ID());
setRecord_ID(pi.getRecord_ID());
if (pi.getPO() != null)
m_po = pi.getPO();
if (getPO() == null)
{
setTextMsg("No PO with ID=" + pi.getRecord_ID());

View File

@ -27,11 +27,16 @@ import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException;
import org.compiere.model.MColumn;
import org.compiere.model.MMenu;
import org.compiere.model.MProduct;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.model.X_AD_Workflow;
import org.compiere.process.DocAction;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ServerProcessCtl;
import org.compiere.process.StateEngine;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
@ -951,4 +956,27 @@ public class MWorkflow extends X_AD_Workflow
return true;
}
/**
*
* @param po
* @param docAction
* @return ProcessInfo
*/
public static ProcessInfo runDocumentActionWorkflow(PO po, String docAction)
{
int AD_Table_ID = po.get_Table_ID();
MTable table = MTable.get(Env.getCtx(), AD_Table_ID);
MColumn column = table.getColumn("DocAction");
if (column == null)
return null;
if (!docAction.equals(po.get_Value(column.getColumnName())))
{
po.set_ValueOfColumn(column.getColumnName(), docAction);
}
ProcessInfo processInfo = new ProcessInfo (((DocAction)po).getDocumentInfo(),column.getAD_Process_ID(),po.get_Table_ID(),po.get_ID());
processInfo.setTransactionName(po.get_TrxName());
processInfo.setPO(po);
ServerProcessCtl.process(processInfo, Trx.get(processInfo.getTransactionName(), false));
return processInfo;
}
} // MWorkflow_ID

View File

@ -16,6 +16,9 @@
*****************************************************************************/
package org.compiere.apps;
import static org.compiere.model.SystemIDs.TABLE_AD_WF_ACTIVITY;
import static org.compiere.model.SystemIDs.TABLE_AD_WF_PROCESS;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
@ -51,7 +54,8 @@ import org.compiere.interfaces.Server;
import org.compiere.model.MMenu;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import static org.compiere.model.SystemIDs.*;
import org.compiere.model.MTable;
import org.compiere.model.MZoomCondition;
import org.compiere.process.DocumentEngine;
import org.compiere.swing.CButton;
import org.compiere.swing.CFrame;
@ -631,51 +635,30 @@ public final class AEnv
*/
public static void zoom (int AD_Table_ID, int Record_ID)
{
String TableName = null;
int AD_Window_ID = 0;
int PO_Window_ID = 0;
String sql = "SELECT TableName, AD_Window_ID, PO_Window_ID FROM AD_Table WHERE AD_Table_ID=?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
int AD_Window_ID = MZoomCondition.findZoomWindowByTableId(AD_Table_ID, Record_ID);
MTable table = MTable.get(Env.getCtx(), AD_Table_ID);
if (AD_Window_ID <= 0)
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, AD_Table_ID);
rs = pstmt.executeQuery();
if (rs.next())
{
TableName = rs.getString(1);
AD_Window_ID = rs.getInt(2);
PO_Window_ID = rs.getInt(3);
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
AD_Window_ID = table.getAD_Window_ID();
// Nothing to Zoom to
if (TableName == null || AD_Window_ID == 0)
if (AD_Window_ID == 0)
return;
// PO Zoom ?
boolean isSOTrx = true;
if (PO_Window_ID != 0)
if (table.getPO_Window_ID() != 0)
{
String whereClause = TableName + "_ID=" + Record_ID;
isSOTrx = DB.isSOTrx(TableName, whereClause);
String whereClause = table.getTableName() + "_ID=" + Record_ID;
isSOTrx = DB.isSOTrx(table.getTableName(), whereClause);
if (!isSOTrx)
AD_Window_ID = PO_Window_ID;
AD_Window_ID = table.getPO_Window_ID();
}
if (log.isLoggable(Level.CONFIG)) log.config(table.getTableName() + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")");
}
if (log.isLoggable(Level.CONFIG)) log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")");
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(table.getTableName() + "_ID", Record_ID)))
return;
addToWindowManager(frame);
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
@ -697,8 +680,11 @@ public final class AEnv
{
if (query == null || query.getTableName() == null || query.getTableName().length() == 0)
return;
int AD_Window_ID = MZoomCondition.findZoomWindow(query);
if (AD_Window_ID <= 0)
{
String TableName = query.getTableName();
int AD_Window_ID = 0;
int PO_Window_ID = 0;
String sql = "SELECT AD_Window_ID, PO_Window_ID FROM AD_Table WHERE TableName=?";
PreparedStatement pstmt = null;
@ -738,6 +724,7 @@ public final class AEnv
}
if (log.isLoggable(Level.CONFIG)) log.config(query + " (IsSOTrx=" + isSOTrx + ")");
}
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, query))
return;

View File

@ -816,6 +816,7 @@ public abstract class Info extends CDialog
{
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
final AWindow frame = new AWindow(null);
// AD_Window_ID = AEnv.specialZoom (AD_Window_ID, -1, zoomQuery, ""); // ZoomCondition TODO
if (!frame.initWindow(AD_Window_ID, zoomQuery))
return;
AEnv.addToWindowManager(frame);

View File

@ -274,7 +274,7 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
ValueNamePair vp = (ValueNamePair)kTypeCombo.getSelectedItem();
String CCType = vp.getValue();
boolean ok = processOnline(CCType, kNumberField.getText(), kExpField.getText());
boolean ok = processOnline(CCType, kNumberField.getText(), kApprovalField.getText(), kExpField.getText());
if (!ok)
ADialog.error(getWindowNo(), dialog, "PaymentError", processMsg);
else

View File

@ -66,6 +66,7 @@ import org.compiere.model.MLookupFactory;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.MZoomCondition;
import org.compiere.swing.CButton;
import org.compiere.swing.CMenuItem;
import org.compiere.swing.CTextField;
@ -1484,6 +1485,10 @@ public class VLookup extends JComponent
}
int AD_Window_ID = m_lookup.getZoom(zoomQuery);
int zoomId = MZoomCondition.findZoomWindowByWindowId(AD_Window_ID, zoomQuery);
if (zoomId > 0) AD_Window_ID = zoomId;
//
if (log.isLoggable(Level.INFO)) log.info(m_columnName + " - AD_Window_ID=" + AD_Window_ID
+ " - Query=" + zoomQuery + " - Value=" + value);

View File

@ -86,7 +86,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
/**
*
*/
private static final long serialVersionUID = -208259686238044047L;
private static final long serialVersionUID = 6505634026383902627L;
private static final String SAVED_CONTEXT = "saved.context";
@ -411,6 +411,14 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
//redirect to login page
Executions.sendRedirect("index.zul");
}
public void logoutAfterTabDestroyed(){
Session session = logout0();
//clear context, invalidate session
Env.getCtx().clear();
session.invalidate();
}
protected Session logout0() {
Session session = Executions.getCurrent().getDesktop().getSession();

View File

@ -34,6 +34,11 @@ public interface IWebClient {
*/
public void logout();
/**
* logout after browser destroyed
*/
public void logoutAfterTabDestroyed();
/**
*
* @return IDesktop

View File

@ -52,6 +52,8 @@ import org.compiere.model.MAcctSchema;
import org.compiere.model.MLookup;
import org.compiere.model.MQuery;
import org.compiere.model.MSession;
import org.compiere.model.MTable;
import org.compiere.model.MZoomCondition;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.CacheMgt;
@ -153,51 +155,25 @@ public final class AEnv
*/
public static void zoom (int AD_Table_ID, int Record_ID)
{
String TableName = null;
int AD_Window_ID = 0;
int PO_Window_ID = 0;
String sql = "SELECT TableName, AD_Window_ID, PO_Window_ID FROM AD_Table WHERE AD_Table_ID=?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, AD_Table_ID);
rs = pstmt.executeQuery();
if (rs.next())
{
TableName = rs.getString(1);
AD_Window_ID = rs.getInt(2);
PO_Window_ID = rs.getInt(3);
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);
}
finally
int AD_Window_ID = MZoomCondition.findZoomWindowByTableId(AD_Table_ID, Record_ID);
MTable table = MTable.get(Env.getCtx(), AD_Table_ID);
if (AD_Window_ID <= 0)
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
// Nothing to Zoom to
if (TableName == null || AD_Window_ID == 0)
return;
AD_Window_ID = table.getAD_Window_ID();
// PO Zoom ?
boolean isSOTrx = true;
if (PO_Window_ID != 0)
if (table.getPO_Window_ID() != 0)
{
String whereClause = TableName + "_ID=" + Record_ID;
isSOTrx = DB.isSOTrx(TableName, whereClause);
String whereClause = table.getTableName() + "_ID=" + Record_ID;
isSOTrx = DB.isSOTrx(table.getTableName(), whereClause);
if (!isSOTrx)
AD_Window_ID = PO_Window_ID;
AD_Window_ID = table.getPO_Window_ID();
}
if (log.isLoggable(Level.CONFIG)) log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")");
zoom(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID));
if (log.isLoggable(Level.CONFIG)) log.config(table.getTableName() + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")");
}
zoom(AD_Window_ID, MQuery.getEqualQuery(table.getKeyColumns()[0], Record_ID));
} // zoom
/**
@ -427,7 +403,8 @@ public final class AEnv
zoomQuery.setRecordCount(1); // guess
}
int windowId = lookup.getZoom(zoomQuery);
zoom(windowId, zoomQuery);
int zoomId = MZoomCondition.findZoomWindowByWindowId(windowId, zoomQuery);
zoom(zoomId > 0 ? zoomId : windowId, zoomQuery);
}
/**
@ -454,8 +431,11 @@ public final class AEnv
{
if (query == null || query.getTableName() == null || query.getTableName().length() == 0)
return;
int AD_Window_ID = MZoomCondition.findZoomWindow(query);
if (AD_Window_ID <= 0)
{
String TableName = query.getTableName();
int AD_Window_ID = 0;
int PO_Window_ID = 0;
String sql = "SELECT AD_Window_ID, PO_Window_ID FROM AD_Table WHERE TableName=?";
PreparedStatement pstmt = null;
@ -495,6 +475,7 @@ public final class AEnv
}
if (log.isLoggable(Level.CONFIG)) log.config(query + " (IsSOTrx=" + isSOTrx + ")");
}
zoom(AD_Window_ID, query);
}

View File

@ -76,8 +76,12 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
public void init() {
Grid kLayout = GridFactory.newGridLayout();
window.getPanel().appendChild(kLayout);
kNumberField.setMaxlength(16);
kNumberField.setCols(16);
kExpField.setMaxlength(4);
kExpField.setCols(4);
kApprovalField.setMaxlength(4);
kApprovalField.setCols(4);
kApprovalField.setType("password");
kTypeLabel.setText(Msg.translate(Env.getCtx(), "CreditCardType"));
@ -291,7 +295,7 @@ public class WPaymentFormCreditCard extends PaymentFormCreditCard implements Eve
ValueNamePair vp = kTypeCombo.getSelectedItem().toValueNamePair();
String CCType = vp.getValue();
boolean ok = processOnline(CCType, kNumberField.getText(), kExpField.getText());
boolean ok = processOnline(CCType, kNumberField.getText(), kApprovalField.getText(), kExpField.getText());
if (!ok)
FDialog.error(getWindowNo(), window, "PaymentNotProcessed", processMsg);
else

View File

@ -450,6 +450,11 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
if (log.isLoggable(Level.FINE))
log.fine("Value=" + value);
try
{
if (gridField != null)
gridField.setLookupEditorSettingValue(true);
ValueChangeEvent evt = new ValueChangeEvent(this, this.getColumnName(), getValue(), value);
// -> ADTabpanel - valuechange
fireValueChange(evt);
@ -468,15 +473,12 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
if (!updated)
{
setValue(value);
if (gridTab != null && gridField != null) {
if (value == null && gridField.getValue() != null) {
gridTab.setValue(gridField, value);
} else if (value != null && gridField.getValue() == null) {
gridTab.setValue(gridField, value);
} else if (value != null && !value.equals(gridField.getValue())) {
gridTab.setValue(gridField, value);
}
}
finally
{
if (gridField != null)
gridField.setLookupEditorSettingValue(false);
}
} // actionCombo

View File

@ -399,10 +399,17 @@ ContextMenuListener, IZoomableEditor
onselecting = true;
Object newValue = getValue();
if (isValueChange(newValue)) {
try {
if (gridField != null)
gridField.setLookupEditorSettingValue(true);
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
super.fireValueChange(changeEvent);
oldValue = newValue;
getComponent().setValue(newValue);
} finally {
if (gridField != null)
gridField.setLookupEditorSettingValue(false);
}
}
} finally {
onselecting = false;
@ -422,9 +429,16 @@ ContextMenuListener, IZoomableEditor
{
Object newValue = getValue();
if (isValueChange(newValue)) {
try {
if (gridField != null)
gridField.setLookupEditorSettingValue(true);
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
super.fireValueChange(changeEvent);
oldValue = newValue;
} finally {
if (gridField != null)
gridField.setLookupEditorSettingValue(false);
}
}
}
}

View File

@ -38,6 +38,7 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.KeyEvent;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zk.ui.util.Composer;
import org.zkoss.zul.Menuitem;
import org.zkoss.zul.impl.LabelImageElement;
@ -76,6 +77,8 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
protected void onCreate()
{
String s = Msg.getMsg(Env.getCtx(), "CloseTabFromBrowser?").replace("\n", "<br>");
Clients.confirmClose(s);
lblUserNameValue = (Label) component.getFellowIfAny("loginUserAndRole", true);
lblUserNameValue.setValue(getUserName() + "@" + getClientName() + "." + getOrgName()+"/"+this.getRoleName());
lblUserNameValue.addEventListener(Events.ON_CLICK, this);
@ -239,11 +242,13 @@ public class UserPanel implements EventListener<Event>, Composer<Component>
}
else if (ON_DEFER_LOGOUT.equals(event.getName()))
{
Clients.confirmClose(null);
SessionManager.logoutSession();
}
else if (ON_DEFER_CHANGE_ROLE.equals(event.getName()))
{
MUser user = MUser.get(ctx);
Clients.confirmClose(null);
SessionManager.changeRole(user);
}

View File

@ -339,6 +339,7 @@ public class SessionContextListener implements ExecutionInit,
mSession.setProcessed(true);
mSession.saveEx();
}
SessionManager.logoutSessionAfterBrowserDestroyed();
}
}

View File

@ -101,6 +101,13 @@ public class SessionManager
app.logout();
}
public static void logoutSessionAfterBrowserDestroyed()
{
IWebClient app = getSessionApplication();
if (app != null)
app.logoutAfterTabDestroyed();
}
public static void changeRole(MUser user){
IWebClient app = getSessionApplication();
if (app != null)

View File

@ -26,6 +26,7 @@ import org.compiere.model.MOrder;
import org.compiere.model.MPayment;
import org.compiere.model.MPaymentProcessor;
import org.compiere.model.MPaymentTransaction;
import org.compiere.model.MPaymentValidate;
import org.compiere.process.DocAction;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -392,12 +393,12 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
return true;
}
public boolean processOnline(String CCType, String CCNumber, String CCExp)
public boolean processOnline(String CCType, String CCNumber, String CCVV, String CCExp)
{
return processOnline(CCType, CCNumber, CCExp, 0);
return processOnline(CCType, CCNumber, CCVV, CCExp, 0);
}
public boolean processOnline(String CCType, String CCNumber, String CCExp, int C_PaymentProcessor_ID)
public boolean processOnline(String CCType, String CCNumber, String CCVV, String CCExp, int C_PaymentProcessor_ID)
{
processMsg = null;
boolean error = false;
@ -430,7 +431,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
MPaymentTransaction mpt = new MPaymentTransaction(Env.getCtx(), 0, null);
mpt.setAD_Org_ID(m_AD_Org_ID);
mpt.setCreditCard(MPayment.TRXTYPE_Sales, CCType, CCNumber, "", CCExp);
mpt.setCreditCard(MPayment.TRXTYPE_Sales, CCType, CCNumber, CCVV != null ? CCVV : "", CCExp);
mpt.setAmount(m_C_Currency_ID, payAmount);
mpt.setC_PaymentProcessor_ID(C_PaymentProcessor_ID);
mpt.setPaymentProcessor();
@ -461,10 +462,20 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
mpt.setC_Invoice_ID(C_Invoice_ID);
mpt.setDateTrx(m_DateAcct);
setCustomizeValues(mpt);
// validate credit card
String msg = validateCreditCard(CCType, CCNumber, CCVV != null ? CCVV : "", CCExp, mpt.getC_BP_BankAccount_ID(), mpt.getCustomerPaymentProfileID());
if (msg != null && msg.trim().length() > 0)
{
processMsg = Msg.getMsg(Env.getCtx(), msg);
return false;
}
if (!mpt.save()) {
processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCreated");
return false;
} else {
mpt.setCreditCardVV(CCVV != null ? CCVV : "");
approved = mpt.processOnline();
mpt.saveEx();
@ -507,4 +518,23 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
public boolean isApproved() {
return m_mPayment.isApproved();
}
public String validateCreditCard(String CCType, String CCNumber, String CCVV, String CCExp, int C_BP_BankAccount_ID, String CustomerPaymentProfileID) throws IllegalArgumentException {
String msg = null;
if (C_BP_BankAccount_ID != 0 || (CustomerPaymentProfileID != null && CustomerPaymentProfileID.length() > 0))
return msg;
msg = MPaymentValidate.validateCreditCardNumber(CCNumber, CCType);
if (msg != null && msg.length() > 0)
return Msg.getMsg(Env.getCtx(), msg);
msg = MPaymentValidate.validateCreditCardExp(MPaymentValidate.getCreditCardExpMM(CCExp), MPaymentValidate.getCreditCardExpYY(CCExp));
if (msg != null && msg.length() > 0)
return Msg.getMsg(Env.getCtx(), msg);
if (CCVV != null && CCVV.length() > 0)
{
msg = MPaymentValidate.validateCreditCardVV(CCVV, CCType);
if (msg != null && msg.length() > 0)
return Msg.getMsg(Env.getCtx(), msg);
}
return msg;
}
}

View File

@ -1239,7 +1239,7 @@ public class DB_Oracle implements AdempiereDatabase
}
public int getNextID(String Name) {
int m_sequence_id = DB.getSQLValue(null, "SELECT "+Name.toUpperCase()+".nextval FROM DUAL");
int m_sequence_id = DB.getSQLValueEx(null, "SELECT "+Name.toUpperCase()+".nextval FROM DUAL");
return m_sequence_id;
}
@ -1319,12 +1319,6 @@ public class DB_Oracle implements AdempiereDatabase
return b;
}
@Override
public int setStatementTimeout(Connection conn, int timeout) throws SQLException {
//not supported by oracle
return -1;
}
@Override
public boolean forUpdate(PO po, int timeout) {
//only can lock for update if using trx

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="postgresql-9.2-1004.jdbc4.jar"/>
<classpathentry exported="true" kind="lib" path="mchange-commons-java-0.2.3.3.jar"/>
<classpathentry exported="true" kind="lib" path="c3p0-0.9.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="postgresql.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -5,7 +5,7 @@ Bundle-SymbolicName: org.compiere.db.postgresql.provider;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
postgresql.jar,
postgresql-9.2-1004.jdbc4.jar,
c3p0-0.9.2.jar,
mchange-commons-java-0.2.3.3.jar
Require-Bundle: org.adempiere.base;bundle-version="1.0.0",

View File

@ -1,10 +1,10 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
postgresql.jar,\
plugin.xml,\
OSGI-INF/pgprovider.xml,\
OSGI-INF/,\
c3p0-0.9.2.jar,\
mchange-commons-java-0.2.3.3.jar
mchange-commons-java-0.2.3.3.jar,\
postgresql-9.2-1004.jdbc4.jar
source.. = src/

View File

@ -948,7 +948,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
public int getNextID(String name) {
int m_sequence_id = DB.getSQLValue(null, "SELECT nextval('"+name.toLowerCase()+"')");
int m_sequence_id = DB.getSQLValueEx(null, "SELECT nextval('"+name.toLowerCase()+"')");
return m_sequence_id;
}
@ -1036,46 +1036,6 @@ public class DB_PostgreSQL implements AdempiereDatabase
return b;
}
@Override
public int setStatementTimeout(Connection conn, int timeOut) throws SQLException {
int currentTimeout = 0;
boolean autoCommit = conn.getAutoCommit();
ResultSet rs = null;
try
{
rs = conn.createStatement().executeQuery("select extract(epoch from current_setting('statement_timeout')::interval)*1000");
if (rs.next()) {
currentTimeout = rs.getInt(1) / 1000;
}
}
finally
{
if (rs != null)
DB.close(rs.getStatement());
DB.close(rs);
rs = null;
}
Statement timeoutStatement = null;
try
{
timeoutStatement = conn.createStatement();
String sql = "SET " + (autoCommit ? "SESSION" : "LOCAL") + " statement_timeout TO " + ( timeOut > 0 ? Integer.toString(timeOut * 1000) : " DEFAULT ");
timeoutStatement.execute(sql);
}
finally
{
DB.close(timeoutStatement);
timeoutStatement = null;
}
if (log.isLoggable(Level.FINEST))
{
log.finest("Set statement timeout to " + timeOut);
}
return currentTimeout;
}
@Override
public boolean forUpdate(PO po, int timeout) {
//only can lock for update if using trx
@ -1110,14 +1070,13 @@ public class DB_PostgreSQL implements AdempiereDatabase
PreparedStatement stmt = null;
ResultSet rs = null;
int currentTimeout = -1;
try {
stmt = DB.prepareStatement(sqlBuffer.toString(),
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE, po.get_TrxName());
for(int i = 0; i < keyColumns.length; i++) {
stmt.setObject(i+1, parameters[i]);
}
currentTimeout = setStatementTimeout(stmt.getConnection(), (timeout > 0 ? timeout : LOCK_TIME_OUT));
stmt.setQueryTimeout(timeout > 0 ? timeout : LOCK_TIME_OUT);
rs = stmt.executeQuery();
if (rs.next()) {
@ -1129,9 +1088,6 @@ public class DB_PostgreSQL implements AdempiereDatabase
if (log.isLoggable(Level.INFO))log.log(Level.INFO, e.getLocalizedMessage(), e);
throw new DBException("Could not lock record for " + po.toString() + " caused by " + e.getLocalizedMessage());
} finally {
try {
if(stmt!=null)setStatementTimeout(stmt.getConnection(), currentTimeout);
} catch (SQLException e) {}
DB.close(rs, stmt);
rs = null;stmt = null;
}

View File

@ -22,5 +22,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="WEB-INF/src"/>
<classpathentry kind="lib" path="WEB-INF/lib/jsr311-api-1.1.jar"/>
<classpathentry kind="output" path="WEB-INF/classes/"/>
</classpath>

View File

@ -78,8 +78,12 @@ Bundle-ClassPath: .,
WEB-INF/lib/aopalliance-1.0.jar,
WEB-INF/lib/idempiere-xmlbeans-1.0.jar,
WEB-INF/lib/axis.jar,
WEB-INF/lib/commons-discovery-0.5.jar
Export-Package: javax.wsdl,
WEB-INF/lib/commons-discovery-0.5.jar,
WEB-INF/lib/jsr311-api-1.1.jar
Export-Package: javax.ws.rs,
javax.ws.rs.core,
javax.ws.rs.ext,
javax.wsdl,
javax.wsdl.extensions,
javax.wsdl.extensions.http,
javax.wsdl.extensions.mime,

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- JAX-RS -->
<jaxrs:server id="idempiereRest" address="/rest">
<jaxrs:serviceBeans>
<ref bean="ModelADServiceBean" />
<ref bean="CompositeServiceBean" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="xmlBeansProvider" />
</jaxrs:providers>
</jaxrs:server>
<bean id="ModelADServiceBean" class="org.idempiere.adinterface.ModelADServiceImpl" />
<bean id="CompositeServiceBean" class="com.trekglobal.ws.CompositeServiceImpl" />
<bean id="xmlBeansProvider"
class="org.apache.cxf.jaxrs.provider.xmlbeans.XMLBeansElementProvider" />
</beans>

View File

@ -5,10 +5,17 @@ import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import org.idempiere.adInterface.x10.CompositeRequestDocument;
import org.idempiere.adInterface.x10.CompositeResponsesDocument;
@Path("/composite_service/")
@Consumes("application/xml")
@Produces("application/xml")
@WebService(targetNamespace="http://idempiere.org/ADInterface/1_0")
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
public interface CompositeService {
@ -18,5 +25,7 @@ public interface CompositeService {
* @param reqs
* @return CompositeResponsesDocument
*/
@POST
@Path("/composite_operation")
public CompositeResponsesDocument compositeOperation(CompositeRequestDocument reqs);
}

View File

@ -87,7 +87,8 @@ public class CompositeServiceImpl extends AbstractService implements CompositeSe
return ret;
}
ModelADServiceImpl modelADService = new ModelADServiceImpl(ctx);
ModelADServiceImpl modelADService = new ModelADServiceImpl(jaxwsContext, jaxrsContext);
String trxName = Trx.createTrxName(webServiceName);

View File

@ -35,6 +35,10 @@ import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import org.idempiere.adInterface.x10.ModelCRUDRequestDocument;
import org.idempiere.adInterface.x10.ModelGetListRequestDocument;
@ -44,28 +48,49 @@ import org.idempiere.adInterface.x10.RunProcessResponseDocument;
import org.idempiere.adInterface.x10.StandardResponseDocument;
import org.idempiere.adInterface.x10.WindowTabDataDocument;
@Path("/model_adservice/")
@Consumes("application/xml")
@Produces("application/xml")
@WebService(targetNamespace="http://idempiere.org/ADInterface/1_0")
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
public interface ModelADService {
/* Model oriented web services */
@POST
@Path("/set_docaction")
public StandardResponseDocument setDocAction(ModelSetDocActionRequestDocument req);
@POST
@Path("/run_process")
public RunProcessResponseDocument runProcess(ModelRunProcessRequestDocument req);
@POST
@Path("/get_list")
public WindowTabDataDocument getList(ModelGetListRequestDocument req);
@POST
@Path("/create_data")
public StandardResponseDocument createData(ModelCRUDRequestDocument req);
@POST
@Path("/update_data")
public StandardResponseDocument updateData(ModelCRUDRequestDocument req);
@POST
@Path("/delete_data")
public StandardResponseDocument deleteData(ModelCRUDRequestDocument req);
@POST
@Path("/read_data")
public WindowTabDataDocument readData(ModelCRUDRequestDocument req);
@POST
@Path("/query_data")
public WindowTabDataDocument queryData(ModelCRUDRequestDocument req);
@POST
@Path("/create_update_data")
public StandardResponseDocument createUpdateData(ModelCRUDRequestDocument req);
}

View File

@ -42,6 +42,7 @@ import javax.jws.WebService;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceContext;
import org.apache.cxf.jaxrs.ext.MessageContext;
import org.apache.xmlbeans.StringEnumAbstractBase.Table;
import org.compiere.model.Lookup;
import org.compiere.model.MColumn;
@ -147,9 +148,10 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
log.info("Creating session object ADService");
}
public ModelADServiceImpl(WebServiceContext ctx)
public ModelADServiceImpl(WebServiceContext soapContext, MessageContext jaxrsContext)
{
this.ctx =ctx;
this.jaxwsContext = soapContext;
this.jaxrsContext = jaxrsContext;
log.info("Creating session object ADService");
}

View File

@ -25,6 +25,7 @@ import java.util.Properties;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
@ -68,7 +69,10 @@ public class AbstractService {
+ "AND WS_WebServiceType_ID=?";
private static final String COMPIERE_SERVICE = "CompiereService";
@Resource
protected WebServiceContext ctx;
protected WebServiceContext jaxwsContext; //soap context
@Context
protected org.apache.cxf.jaxrs.ext.MessageContext jaxrsContext ; //rest context
/**
* Login to web Services
@ -193,8 +197,6 @@ public class AbstractService {
*/
protected String authenticate(String webServiceValue, String methodValue, String serviceTypeValue, CompiereService m_cs) {
HttpServletRequest req = (HttpServletRequest) ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
MWebService m_webservice = MWebService.get(m_cs.getCtx(), webServiceValue);
if (m_webservice == null || !m_webservice.isActive())
return "Web Service " + webServiceValue + " not registered";
@ -229,7 +231,7 @@ public class AbstractService {
if (m_webservicetype == null)
return "Service type " + serviceTypeValue + " not configured";
req.setAttribute("MWebServiceType", m_webservicetype);
getHttpServletRequest().setAttribute("MWebServiceType", m_webservicetype);
// Check if role has access on web-service
String hasAccess = DB.getSQLValueStringEx(null, ROLE_ACCESS_SQL,
@ -271,7 +273,9 @@ public class AbstractService {
* @return Compiere Service object for current request
*/
protected CompiereService getCompiereService() {
HttpServletRequest req = (HttpServletRequest) ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
HttpServletRequest req = getHttpServletRequest();
CompiereService m_cs = (CompiereService) req.getAttribute(COMPIERE_SERVICE);
if (m_cs == null) {
m_cs = new CompiereService();
@ -285,9 +289,8 @@ public class AbstractService {
* @return
*/
protected MWebServiceType getWebServiceType() {
HttpServletRequest req = (HttpServletRequest) ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
return (MWebServiceType) req.getAttribute("MWebServiceType");
return (MWebServiceType) getHttpServletRequest().getAttribute("MWebServiceType");
}
@ -296,7 +299,7 @@ public class AbstractService {
* @return
*/
protected Map<String, Object> getRequestCtx() {
HttpServletRequest req = (HttpServletRequest) ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
HttpServletRequest req = getHttpServletRequest();
@SuppressWarnings("unchecked")
Map<String,Object> reqCtx= (Map<String,Object>)req.getAttribute("RequestCtx");
@ -631,5 +634,18 @@ public class AbstractService {
return null;
}
/**
* Get HttpServletRequest object
* @return HttpServletRequest
*/
private HttpServletRequest getHttpServletRequest() {
HttpServletRequest req;
if (jaxrsContext != null) {
req = (HttpServletRequest) jaxrsContext.getHttpServletRequest();
} else
req = (HttpServletRequest) jaxwsContext.getMessageContext().get(
MessageContext.SERVLET_REQUEST);
return req;
}
}

View File

@ -9,6 +9,7 @@
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/META-INF/cxf/services.xml
classpath:/META-INF/cxf/rest-context.xml
</param-value>
</context-param>

View File

@ -24,7 +24,8 @@ bin.includes = META-INF/,\
WEB-INF/lib/idempiere-xmlbeans-1.0.jar,\
plugin.xml,\
WEB-INF/lib/axis.jar,\
WEB-INF/lib/commons-discovery-0.5.jar
WEB-INF/lib/commons-discovery-0.5.jar,\
WEB-INF/lib/jsr311-api-1.1.jar
src.includes = WEB-INF/classes/,\
WEB-INF/lib/,\
WEB-INF/web.xml,\