IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation. Still pending migration of existing custom InfoPanel implementation.

This commit is contained in:
Heng Sin Low 2013-01-04 16:59:50 +08:00
parent bf3f098726
commit 06362405e1
36 changed files with 3487 additions and 232 deletions

View File

@ -0,0 +1,660 @@
-- Dec 27, 2012 4:09:41 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-12-27 16:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54358
;
-- Dec 27, 2012 4:10:13 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-12-27 16:10:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54359
;
-- Dec 27, 2012 4:11:59 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET IsDisplayedGrid='N', IsDisplayed='N', IsActive='N',Updated=TO_DATE('2012-12-27 16:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200275
;
-- Dec 27, 2012 4:14:32 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET IsDisplayedGrid='N', IsDisplayed='N', IsActive='N',Updated=TO_DATE('2012-12-27 16:14:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54403
;
-- Dec 28, 2012 7:46:43 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,Updated,UpdatedBy,EntityType,Name,AD_Val_Rule_UU,Type,CreatedBy,Created,AD_Client_ID,IsActive,AD_Org_ID) VALUES ('AD_InfoWindow.AD_Table_ID=@AD_Table_ID@',200019,TO_DATE('2012-12-28 07:46:39','YYYY-MM-DD HH24:MI:SS'),100,'U','AD_InfoWindow of Table','e9d81675-ce1f-4d7c-9354-9b8d5a23ced9','S',100,TO_DATE('2012-12-28 07:46:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',0)
;
-- Dec 28, 2012 7:47:24 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,103,'U','N','N','N',0,'N',10,'N',19,200019,'N',3068,TO_DATE('2012-12-28 07:47:23','YYYY-MM-DD HH24:MI:SS'),'N','Y','069cc811-f05e-4d64-9d22-322f6a15a7b5','Y','AD_InfoWindow_ID','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.','Info Window','Y','Y',100,TO_DATE('2012-12-28 07:47:23','YYYY-MM-DD HH24:MI:SS'),0,100,0,208343,'N',0)
;
-- Dec 28, 2012 7:47:34 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_Ref_Table ADD AD_InfoWindow_ID NUMBER(10) DEFAULT NULL
;
-- Dec 28, 2012 8:15:11 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,895,'U','N','N','N',0,'N',2000,'N',14,'N',630,TO_DATE('2012-12-28 08:15:10','YYYY-MM-DD HH24:MI:SS'),'N','Y','23771259-ec7c-4111-b0d1-64d90bfe3242','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','Y',100,TO_DATE('2012-12-28 08:15:10','YYYY-MM-DD HH24:MI:SS'),0,100,0,208344,'N',0)
;
-- Dec 28, 2012 8:16:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoWindow ADD WhereClause NVARCHAR2(2000) DEFAULT NULL
;
-- Dec 28, 2012 8:23:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D',53330,'N','N','N',0,'N',10,'N',18,115,'N',121,TO_DATE('2012-12-28 08:23:45','YYYY-MM-DD HH24:MI:SS'),'N','Y','65aee3e9-d2d5-4993-8815-2166a5942bb2','Y','AD_Reference_Value_ID','Required to specify, if data type is Table or List','The Reference Value indicates where the reference values are stored. It must be specified if the data type is Table or List. ','Reference Key','Y','Y',100,TO_DATE('2012-12-28 08:23:45','YYYY-MM-DD HH24:MI:SS'),0,100,0,208346,'N',0)
;
-- Dec 28, 2012 8:24:35 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET AD_Reference_Value_ID=4,Updated=TO_DATE('2012-12-28 08:24:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208346
;
-- Dec 28, 2012 8:24:39 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD AD_Reference_Value_ID NUMBER(10) DEFAULT NULL
;
-- Dec 28, 2012 8:25:27 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-12-28 08:25:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208345
;
-- Dec 28, 2012 8:25:36 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-12-28 08:25:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208344
;
-- Dec 28, 2012 8:32:22 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','N','N','N',0,'N',10,'N',19,'N',139,TO_DATE('2012-12-28 08:32:20','YYYY-MM-DD HH24:MI:SS'),'N','Y','49a4d4cd-7fa4-437e-80c1-1f05513d5b23','Y','AD_Val_Rule_ID','Dynamic Validation Rule','These rules define how an entry is determined to valid. You can use variables for dynamic (context sensitive) validation.','Dynamic Validation','Y','Y',100,TO_DATE('2012-12-28 08:32:20','YYYY-MM-DD HH24:MI:SS'),0,100,0,208347,'N',0)
;
-- Dec 28, 2012 8:32:29 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD AD_Val_Rule_ID NUMBER(10) DEFAULT NULL
;
-- Dec 28, 2012 8:34:33 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,DefaultValue,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','Y','N','N',0,'N',1,'N',20,'N',362,TO_DATE('2012-12-28 08:34:32','YYYY-MM-DD HH24:MI:SS'),'N','Y','ffddca95-c0ec-430d-be98-035ac95d35df','Y','Y','IsCentrallyMaintained','Information maintained in System Element table','The Centrally Maintained checkbox indicates if the Name, Description and Help maintained in ''System Element'' table or ''Window'' table.','Centrally maintained','Y','Y',100,TO_DATE('2012-12-28 08:34:32','YYYY-MM-DD HH24:MI:SS'),0,100,0,208348,'N',0)
;
-- Dec 28, 2012 8:34:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD IsCentrallyMaintained CHAR(1) DEFAULT 'Y' CHECK (IsCentrallyMaintained IN ('Y','N')) NOT NULL
;
-- Dec 28, 2012 8:36:34 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','N','N','N',0,'N',2000,'N',14,'N',283,TO_DATE('2012-12-28 08:36:33','YYYY-MM-DD HH24:MI:SS'),'N','Y','ed45c16a-6427-4fb9-b68f-7cf64b1546a7','Y','DisplayLogic','If the Field is displayed, the result determines if the field is actually displayed','format := {expression} [{logic} {expression}]<br>
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
logic := {|}|{&}<br>
context := any global or window context <br>
value := strings or numbers<br>
logic operators := AND or OR with the previous result from left to right <br>
operand := eq{=}, gt{&gt;}, le{&lt;}, not{~^!} <br>
Examples: <br>
@AD_Table_ID@=14 | @Language@!GERGER <br>
@PriceLimit@>10 | @PriceList@>@PriceActual@<br>
@Name@>J<br>
Strings may be in single quotes (optional)','Display Logic','Y','Y',100,TO_DATE('2012-12-28 08:36:33','YYYY-MM-DD HH24:MI:SS'),0,100,0,208349,'N',0)
;
-- Dec 28, 2012 8:36:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD DisplayLogic NVARCHAR2(2000) DEFAULT NULL
;
-- Dec 28, 2012 8:40:39 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (2,1,'N',0,'N',103,'N','N',208343,130,'Y',201620,'N','The Info window is used to search and select records as well as display information relevant to the selection.',0,TO_DATE('2012-12-28 08:40:38','YYYY-MM-DD HH24:MI:SS'),'N',130,'D',0,'Info and search/select Window','Y','N','823993ba-87be-430e-b4a8-19c4e0061b3d',100,TO_DATE('2012-12-28 08:40:38','YYYY-MM-DD HH24:MI:SS'),0,'Info Window',100,'Y',1)
;
-- Dec 28, 2012 8:45:00 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (5,3,'N',0,'N',842,'N','N',208344,95,'Y',201621,'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".',0,TO_DATE('2012-12-28 08:44:59','YYYY-MM-DD HH24:MI:SS'),'N',95,'D',0,'Fully qualified SQL WHERE clause','Y','N','8e6453b7-db4b-42d7-ac6a-76f9ee34de63',100,TO_DATE('2012-12-28 08:44:59','YYYY-MM-DD HH24:MI:SS'),0,'Sql WHERE',100,'Y',1)
;
-- Dec 31, 2012 11:42:23 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','Y','N','N',0,'N',30,'N',10,'N',228,TO_DATE('2012-12-31 23:42:20','YYYY-MM-DD HH24:MI:SS'),'N','Y','07a7935b-2a59-48e3-a80a-f11b785afed3','Y','ColumnName','Name of the column in the database','The Column Name indicates the name of a column on a table as defined in the database.','DB Column Name','Y','Y',100,TO_DATE('2012-12-31 23:42:20','YYYY-MM-DD HH24:MI:SS'),0,100,0,208350,'N',0)
;
-- Dec 31, 2012 11:42:33 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD ColumnName NVARCHAR2(30) NOT NULL
;
-- Dec 31, 2012 11:46:58 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,DisplayLogic,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208346,150,'Y',201622,'N','The Reference Value indicates where the reference values are stored. It must be specified if the data type is Table or List. ',0,TO_DATE('2012-12-31 23:46:56','YYYY-MM-DD HH24:MI:SS'),'Y',150,'D',0,'Required to specify, if data type is Table or List','Y','N','e4bcdb5e-998d-43b1-84f3-46ade9370a71',100,TO_DATE('2012-12-31 23:46:56','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28','Reference Key',100,'Y',1)
;
-- Dec 31, 2012 11:48:15 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,DisplayLogic,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208347,160,'Y',201623,'N','These rules define how an entry is determined to valid. You can use variables for dynamic (context sensitive) validation.',0,TO_DATE('2012-12-31 23:48:14','YYYY-MM-DD HH24:MI:SS'),'N',160,'D',0,'Dynamic Validation Rule','Y','N','6de8a2af-30ec-452b-8420-050fb5c39fb1',100,TO_DATE('2012-12-31 23:48:14','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012','Dynamic Validation',100,'Y',1)
;
-- Dec 31, 2012 11:48:37 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208350,170,'Y',201624,'N','The Column Name indicates the name of a column on a table as defined in the database.',0,TO_DATE('2012-12-31 23:48:36','YYYY-MM-DD HH24:MI:SS'),'Y',170,'U',0,'Name of the column in the database','Y','N','03b13bf8-d2f8-4d2d-b3a5-68a9ef3df63c',100,TO_DATE('2012-12-31 23:48:36','YYYY-MM-DD HH24:MI:SS'),0,'DB Column Name',100,'Y',1)
;
-- Dec 31, 2012 11:52:45 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208349,180,'Y',201625,'N','format := {expression} [{logic} {expression}]<br>
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
logic := {|}|{&}<br>
context := any global or window context <br>
value := strings or numbers<br>
logic operators := AND or OR with the previous result from left to right <br>
operand := eq{=}, gt{&gt;}, le{&lt;}, not{~^!} <br>
Examples: <br>
@AD_Table_ID@=14 | @Language@!GERGER <br>
@PriceLimit@>10 | @PriceList@>@PriceActual@<br>
@Name@>J<br>
Strings may be in single quotes (optional)',0,TO_DATE('2012-12-31 23:52:44','YYYY-MM-DD HH24:MI:SS'),'N',180,'D',0,'If the Field is displayed, the result determines if the field is actually displayed','Y','N','538692f6-ff16-4157-ac9e-df7beca9eecb',100,TO_DATE('2012-12-31 23:52:44','YYYY-MM-DD HH24:MI:SS'),0,'Display Logic',100,'Y',1)
;
-- Dec 31, 2012 11:58:10 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET DisplayLogic='@IsDisplayed@=Y',Updated=TO_DATE('2012-12-31 23:58:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 1, 2013 9:14:55 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2013-01-01 09:14:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15788
;
-- Jan 1, 2013 9:15:11 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2013-01-01 09:15:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15776
;
-- Jan 1, 2013 9:15:49 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_DATE('2013-01-01 09:15:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15790
;
-- Jan 1, 2013 9:30:54 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208348,190,'Y',201626,'N','The Centrally Maintained checkbox indicates if the Name, Description and Help maintained in ''System Element'' table or ''Window'' table.',0,TO_DATE('2013-01-01 09:30:52','YYYY-MM-DD HH24:MI:SS'),'Y',190,'D',0,'Information maintained in System Element table','Y','N','ae37e609-8640-453f-b1be-e2bfcbd099cc',100,TO_DATE('2013-01-01 09:30:52','YYYY-MM-DD HH24:MI:SS'),0,'Centrally maintained',100,'Y',1)
;
-- Jan 1, 2013 9:35:57 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET DefaultValue='@SQL=SELECT NVL(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_InfoColumn WHERE AD_InfoWindow_ID=@AD_InfoWindow_ID@',Updated=TO_DATE('2013-01-01 09:35:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15787
;
-- Jan 1, 2013 12:11:44 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET SeqNo=40,Updated=TO_DATE('2013-01-01 00:11:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=843
;
-- Jan 1, 2013 12:12:02 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET SeqNo=20,Updated=TO_DATE('2013-01-01 00:12:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=844
;
-- Jan 1, 2013 12:12:10 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET SeqNo=30,Updated=TO_DATE('2013-01-01 00:12:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=845
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=10, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13599
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=20, XPosition=4,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13593
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=30, XPosition=7,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13601
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=40, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13600
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=50, XPosition=7,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13604
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=60, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13595
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=70, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13594
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=80, XPosition=2,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13592
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=90, XPosition=3,Updated=TO_DATE('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13596
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=100, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=110, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13605
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120, XPosition=8,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=130, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201624
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=140, XPosition=4,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13606
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=150, XPosition=8,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=160, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13603
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=170, XPosition=4,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=180, XPosition=7,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=190, XPosition=1,Updated=TO_DATE('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13597
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100, IsDisplayed='Y', XPosition=5,Updated=TO_DATE('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=110,Updated=TO_DATE('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120,Updated=TO_DATE('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13605
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=150, IsDisplayed='Y', XPosition=7,Updated=TO_DATE('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 2, 2013 8:35:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=80,Updated=TO_DATE('2013-01-02 08:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13592
;
-- Jan 2, 2013 8:35:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=90, XPosition=4,Updated=TO_DATE('2013-01-02 08:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13596
;
-- Jan 2, 2013 8:35:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100, XPosition=6,Updated=TO_DATE('2013-01-02 08:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 4, 2013 10:03:29 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,DefaultValue,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,895,'D','Y','N','N',0,'N',1,'N',20,'N',1103,TO_DATE('2013-01-04 10:03:27','YYYY-MM-DD HH24:MI:SS'),'N','Y','34ce8949-69ce-49f3-add5-9a4b073e9abb','N','Y','IsDefault','Default value','The Default Checkbox indicates if this record will be used as a default value.','Default','Y','Y',100,TO_DATE('2013-01-04 10:03:27','YYYY-MM-DD HH24:MI:SS'),0,100,0,208351,'N',0)
;
-- Jan 4, 2013 10:03:35 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoWindow ADD IsDefault CHAR(1) DEFAULT 'N' CHECK (IsDefault IN ('Y','N')) NOT NULL
;
-- Jan 4, 2013 10:05:30 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Element (AD_Element_UU,EntityType,ColumnName,Name,Description,PrintName,Created,CreatedBy,UpdatedBy,AD_Org_ID,AD_Element_ID,AD_Client_ID,Updated,IsActive) VALUES ('f201cb26-043b-42c3-8e46-847801008534','D','IsDistinct','Distinct','Select Distinct','Distinct',TO_DATE('2013-01-04 10:05:28','YYYY-MM-DD HH24:MI:SS'),100,100,0,202186,0,TO_DATE('2013-01-04 10:05:28','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Jan 4, 2013 10:06:11 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,DefaultValue,IsUpdateable,ColumnName,Description,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,895,'U','Y','N','N',0,'N',1,'N',20,'N',202186,TO_DATE('2013-01-04 10:06:10','YYYY-MM-DD HH24:MI:SS'),'N','Y','773fd373-deca-44a4-bbdf-5f9c07d16c9f','N','Y','IsDistinct','Select Distinct','Distinct','Y','Y',100,TO_DATE('2013-01-04 10:06:10','YYYY-MM-DD HH24:MI:SS'),0,100,0,208352,'N',0)
;
-- Jan 4, 2013 10:06:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoWindow ADD IsDistinct CHAR(1) DEFAULT 'N' CHECK (IsDistinct IN ('Y','N')) NOT NULL
;
-- Jan 4, 2013 10:07:12 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',842,'N','N',208352,120,'Y',201627,'N',0,TO_DATE('2013-01-04 10:07:10','YYYY-MM-DD HH24:MI:SS'),'N',120,'D',0,'Select Distinct','Y','N','b7862f66-669e-49a4-8c5d-73b1f0962ed1',100,TO_DATE('2013-01-04 10:07:10','YYYY-MM-DD HH24:MI:SS'),0,'Distinct',100,'Y',1)
;
-- Jan 4, 2013 10:07:28 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',842,'N','N',208351,130,'Y',201628,'N','The Default Checkbox indicates if this record will be used as a default value.',0,TO_DATE('2013-01-04 10:07:27','YYYY-MM-DD HH24:MI:SS'),'Y',130,'D',0,'Default value','Y','N','b938a746-41d4-4f3e-9e35-2fefa5461cee',100,TO_DATE('2013-01-04 10:07:27','YYYY-MM-DD HH24:MI:SS'),0,'Default',100,'Y',1)
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100,Updated=TO_DATE('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201621
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=110,Updated=TO_DATE('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13579
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120,Updated=TO_DATE('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13580
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=130, IsDisplayed='Y', XPosition=2,Updated=TO_DATE('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201627
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=140, IsDisplayed='Y', XPosition=4,Updated=TO_DATE('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201628
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=40, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13606
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=4,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201624
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=60, IsDisplayed='Y', XPosition=7,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13604
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13605
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13600
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=90,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13595
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13594
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=110,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13592
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13596
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=130,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=140,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=150,Updated=TO_DATE('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 4, 2013 1:36:51 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET IsSingleRow='Y',Updated=TO_DATE('2013-01-04 13:36:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=842
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=50,Updated=TO_DATE('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201624
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=140, IsDisplayed='Y', XPosition=8,Updated=TO_DATE('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=170,Updated=TO_DATE('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=180,Updated=TO_DATE('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623
;
-- Jan 4, 2013 3:35:26 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
DELETE FROM AD_InfoWindow_Trl WHERE AD_InfoWindow_ID=1000000
;
-- Jan 4, 2013 3:35:26 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
DELETE FROM AD_InfoWindow WHERE AD_InfoWindow_ID=1000000
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13572
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201627
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13575
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13578
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13579
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13581
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201621
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13580
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=13577
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=13574
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=13573
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=13582
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201628
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201626
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13593
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13594
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13595
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201625
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201623
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13597
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13601
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201622
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=13599
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=13604
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=13600
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=13606
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201624
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=13605
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=13603
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=13596
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=13602
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=13592
;
-- Jan 4, 2013 4:37:01 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=13580
;
SELECT register_migration_script('201301040851_IDEMPIERE-325.sql') FROM dual
;

View File

@ -0,0 +1,660 @@
-- Dec 27, 2012 4:09:41 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-12-27 16:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54358
;
-- Dec 27, 2012 4:10:13 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-12-27 16:10:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=54359
;
-- Dec 27, 2012 4:11:59 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET IsDisplayedGrid='N', IsDisplayed='N', IsActive='N',Updated=TO_TIMESTAMP('2012-12-27 16:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200275
;
-- Dec 27, 2012 4:14:32 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET IsDisplayedGrid='N', IsDisplayed='N', IsActive='N',Updated=TO_TIMESTAMP('2012-12-27 16:14:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54403
;
-- Dec 28, 2012 7:46:43 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,Updated,UpdatedBy,EntityType,Name,AD_Val_Rule_UU,Type,CreatedBy,Created,AD_Client_ID,IsActive,AD_Org_ID) VALUES ('AD_InfoWindow.AD_Table_ID=@AD_Table_ID@',200019,TO_TIMESTAMP('2012-12-28 07:46:39','YYYY-MM-DD HH24:MI:SS'),100,'U','AD_InfoWindow of Table','e9d81675-ce1f-4d7c-9354-9b8d5a23ced9','S',100,TO_TIMESTAMP('2012-12-28 07:46:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',0)
;
-- Dec 28, 2012 7:47:24 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,103,'U','N','N','N',0,'N',10,'N',19,200019,'N',3068,TO_TIMESTAMP('2012-12-28 07:47:23','YYYY-MM-DD HH24:MI:SS'),'N','Y','069cc811-f05e-4d64-9d22-322f6a15a7b5','Y','AD_InfoWindow_ID','Info and search/select Window','The Info window is used to search and select records as well as display information relevant to the selection.','Info Window','Y','Y',100,TO_TIMESTAMP('2012-12-28 07:47:23','YYYY-MM-DD HH24:MI:SS'),0,100,0,208343,'N',0)
;
-- Dec 28, 2012 7:47:34 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_Ref_Table ADD COLUMN AD_InfoWindow_ID NUMERIC(10) DEFAULT NULL
;
-- Dec 28, 2012 8:15:11 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,895,'U','N','N','N',0,'N',2000,'N',14,'N',630,TO_TIMESTAMP('2012-12-28 08:15:10','YYYY-MM-DD HH24:MI:SS'),'N','Y','23771259-ec7c-4111-b0d1-64d90bfe3242','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','Y',100,TO_TIMESTAMP('2012-12-28 08:15:10','YYYY-MM-DD HH24:MI:SS'),0,100,0,208344,'N',0)
;
-- Dec 28, 2012 8:16:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoWindow ADD COLUMN WhereClause VARCHAR(2000) DEFAULT NULL
;
-- Dec 28, 2012 8:23:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D',53330,'N','N','N',0,'N',10,'N',18,115,'N',121,TO_TIMESTAMP('2012-12-28 08:23:45','YYYY-MM-DD HH24:MI:SS'),'N','Y','65aee3e9-d2d5-4993-8815-2166a5942bb2','Y','AD_Reference_Value_ID','Required to specify, if data type is Table or List','The Reference Value indicates where the reference values are stored. It must be specified if the data type is Table or List. ','Reference Key','Y','Y',100,TO_TIMESTAMP('2012-12-28 08:23:45','YYYY-MM-DD HH24:MI:SS'),0,100,0,208346,'N',0)
;
-- Dec 28, 2012 8:24:35 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET AD_Reference_Value_ID=4,Updated=TO_TIMESTAMP('2012-12-28 08:24:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208346
;
-- Dec 28, 2012 8:24:39 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD COLUMN AD_Reference_Value_ID NUMERIC(10) DEFAULT NULL
;
-- Dec 28, 2012 8:25:27 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-12-28 08:25:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208345
;
-- Dec 28, 2012 8:25:36 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-12-28 08:25:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208344
;
-- Dec 28, 2012 8:32:22 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','N','N','N',0,'N',10,'N',19,'N',139,TO_TIMESTAMP('2012-12-28 08:32:20','YYYY-MM-DD HH24:MI:SS'),'N','Y','49a4d4cd-7fa4-437e-80c1-1f05513d5b23','Y','AD_Val_Rule_ID','Dynamic Validation Rule','These rules define how an entry is determined to valid. You can use variables for dynamic (context sensitive) validation.','Dynamic Validation','Y','Y',100,TO_TIMESTAMP('2012-12-28 08:32:20','YYYY-MM-DD HH24:MI:SS'),0,100,0,208347,'N',0)
;
-- Dec 28, 2012 8:32:29 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD COLUMN AD_Val_Rule_ID NUMERIC(10) DEFAULT NULL
;
-- Dec 28, 2012 8:34:33 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,DefaultValue,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','Y','N','N',0,'N',1,'N',20,'N',362,TO_TIMESTAMP('2012-12-28 08:34:32','YYYY-MM-DD HH24:MI:SS'),'N','Y','ffddca95-c0ec-430d-be98-035ac95d35df','Y','Y','IsCentrallyMaintained','Information maintained in System Element table','The Centrally Maintained checkbox indicates if the Name, Description and Help maintained in ''System Element'' table or ''Window'' table.','Centrally maintained','Y','Y',100,TO_TIMESTAMP('2012-12-28 08:34:32','YYYY-MM-DD HH24:MI:SS'),0,100,0,208348,'N',0)
;
-- Dec 28, 2012 8:34:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD COLUMN IsCentrallyMaintained CHAR(1) DEFAULT 'Y' CHECK (IsCentrallyMaintained IN ('Y','N')) NOT NULL
;
-- Dec 28, 2012 8:36:34 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','N','N','N',0,'N',2000,'N',14,'N',283,TO_TIMESTAMP('2012-12-28 08:36:33','YYYY-MM-DD HH24:MI:SS'),'N','Y','ed45c16a-6427-4fb9-b68f-7cf64b1546a7','Y','DisplayLogic','If the Field is displayed, the result determines if the field is actually displayed','format := {expression} [{logic} {expression}]<br>
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
logic := {|}|{&}<br>
context := any global or window context <br>
value := strings or numbers<br>
logic operators := AND or OR with the previous result from left to right <br>
operand := eq{=}, gt{&gt;}, le{&lt;}, not{~^!} <br>
Examples: <br>
@AD_Table_ID@=14 | @Language@!GERGER <br>
@PriceLimit@>10 | @PriceList@>@PriceActual@<br>
@Name@>J<br>
Strings may be in single quotes (optional)','Display Logic','Y','Y',100,TO_TIMESTAMP('2012-12-28 08:36:33','YYYY-MM-DD HH24:MI:SS'),0,100,0,208349,'N',0)
;
-- Dec 28, 2012 8:36:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD COLUMN DisplayLogic VARCHAR(2000) DEFAULT NULL
;
-- Dec 28, 2012 8:40:39 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (2,1,'N',0,'N',103,'N','N',208343,130,'Y',201620,'N','The Info window is used to search and select records as well as display information relevant to the selection.',0,TO_TIMESTAMP('2012-12-28 08:40:38','YYYY-MM-DD HH24:MI:SS'),'N',130,'D',0,'Info and search/select Window','Y','N','823993ba-87be-430e-b4a8-19c4e0061b3d',100,TO_TIMESTAMP('2012-12-28 08:40:38','YYYY-MM-DD HH24:MI:SS'),0,'Info Window',100,'Y',1)
;
-- Dec 28, 2012 8:45:00 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (5,3,'N',0,'N',842,'N','N',208344,95,'Y',201621,'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".',0,TO_TIMESTAMP('2012-12-28 08:44:59','YYYY-MM-DD HH24:MI:SS'),'N',95,'D',0,'Fully qualified SQL WHERE clause','Y','N','8e6453b7-db4b-42d7-ac6a-76f9ee34de63',100,TO_TIMESTAMP('2012-12-28 08:44:59','YYYY-MM-DD HH24:MI:SS'),0,'Sql WHERE',100,'Y',1)
;
-- Dec 31, 2012 11:42:23 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,897,'D','Y','N','N',0,'N',30,'N',10,'N',228,TO_TIMESTAMP('2012-12-31 23:42:20','YYYY-MM-DD HH24:MI:SS'),'N','Y','07a7935b-2a59-48e3-a80a-f11b785afed3','Y','ColumnName','Name of the column in the database','The Column Name indicates the name of a column on a table as defined in the database.','DB Column Name','Y','Y',100,TO_TIMESTAMP('2012-12-31 23:42:20','YYYY-MM-DD HH24:MI:SS'),0,100,0,208350,'N',0)
;
-- Dec 31, 2012 11:42:33 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoColumn ADD COLUMN ColumnName VARCHAR(30) NOT NULL
;
-- Dec 31, 2012 11:46:58 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,DisplayLogic,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208346,150,'Y',201622,'N','The Reference Value indicates where the reference values are stored. It must be specified if the data type is Table or List. ',0,TO_TIMESTAMP('2012-12-31 23:46:56','YYYY-MM-DD HH24:MI:SS'),'Y',150,'D',0,'Required to specify, if data type is Table or List','Y','N','e4bcdb5e-998d-43b1-84f3-46ade9370a71',100,TO_TIMESTAMP('2012-12-31 23:46:56','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=30 | @AD_Reference_ID@=28','Reference Key',100,'Y',1)
;
-- Dec 31, 2012 11:48:15 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,DisplayLogic,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208347,160,'Y',201623,'N','These rules define how an entry is determined to valid. You can use variables for dynamic (context sensitive) validation.',0,TO_TIMESTAMP('2012-12-31 23:48:14','YYYY-MM-DD HH24:MI:SS'),'N',160,'D',0,'Dynamic Validation Rule','Y','N','6de8a2af-30ec-452b-8420-050fb5c39fb1',100,TO_TIMESTAMP('2012-12-31 23:48:14','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Reference_ID@=17 | @AD_Reference_ID@=18 | @AD_Reference_ID@=19 | @AD_Reference_ID@=28 | @AD_Reference_ID@=30 | @AD_Reference_ID@=200012','Dynamic Validation',100,'Y',1)
;
-- Dec 31, 2012 11:48:37 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208350,170,'Y',201624,'N','The Column Name indicates the name of a column on a table as defined in the database.',0,TO_TIMESTAMP('2012-12-31 23:48:36','YYYY-MM-DD HH24:MI:SS'),'Y',170,'U',0,'Name of the column in the database','Y','N','03b13bf8-d2f8-4d2d-b3a5-68a9ef3df63c',100,TO_TIMESTAMP('2012-12-31 23:48:36','YYYY-MM-DD HH24:MI:SS'),0,'DB Column Name',100,'Y',1)
;
-- Dec 31, 2012 11:52:45 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208349,180,'Y',201625,'N','format := {expression} [{logic} {expression}]<br>
expression := @{context}@{operand}{value} or @{context}@{operand}{value}<br>
logic := {|}|{&}<br>
context := any global or window context <br>
value := strings or numbers<br>
logic operators := AND or OR with the previous result from left to right <br>
operand := eq{=}, gt{&gt;}, le{&lt;}, not{~^!} <br>
Examples: <br>
@AD_Table_ID@=14 | @Language@!GERGER <br>
@PriceLimit@>10 | @PriceList@>@PriceActual@<br>
@Name@>J<br>
Strings may be in single quotes (optional)',0,TO_TIMESTAMP('2012-12-31 23:52:44','YYYY-MM-DD HH24:MI:SS'),'N',180,'D',0,'If the Field is displayed, the result determines if the field is actually displayed','Y','N','538692f6-ff16-4157-ac9e-df7beca9eecb',100,TO_TIMESTAMP('2012-12-31 23:52:44','YYYY-MM-DD HH24:MI:SS'),0,'Display Logic',100,'Y',1)
;
-- Dec 31, 2012 11:58:10 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET DisplayLogic='@IsDisplayed@=Y',Updated=TO_TIMESTAMP('2012-12-31 23:58:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 1, 2013 12:11:44 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET SeqNo=40,Updated=TO_TIMESTAMP('2013-01-01 00:11:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=843
;
-- Jan 1, 2013 12:12:02 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET SeqNo=20,Updated=TO_TIMESTAMP('2013-01-01 00:12:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=844
;
-- Jan 1, 2013 12:12:10 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET SeqNo=30,Updated=TO_TIMESTAMP('2013-01-01 00:12:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=845
;
-- Jan 1, 2013 9:14:55 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2013-01-01 09:14:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15788
;
-- Jan 1, 2013 9:15:11 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2013-01-01 09:15:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15776
;
-- Jan 1, 2013 9:15:49 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2013-01-01 09:15:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15790
;
-- Jan 1, 2013 9:30:54 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',844,'N','N',208348,190,'Y',201626,'N','The Centrally Maintained checkbox indicates if the Name, Description and Help maintained in ''System Element'' table or ''Window'' table.',0,TO_TIMESTAMP('2013-01-01 09:30:52','YYYY-MM-DD HH24:MI:SS'),'Y',190,'D',0,'Information maintained in System Element table','Y','N','ae37e609-8640-453f-b1be-e2bfcbd099cc',100,TO_TIMESTAMP('2013-01-01 09:30:52','YYYY-MM-DD HH24:MI:SS'),0,'Centrally maintained',100,'Y',1)
;
-- Jan 1, 2013 9:35:57 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Column SET DefaultValue='@SQL=SELECT NVL(MAX(SeqNo),0)+10 AS DefaultValue FROM AD_InfoColumn WHERE AD_InfoWindow_ID=@AD_InfoWindow_ID@',Updated=TO_TIMESTAMP('2013-01-01 09:35:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=15787
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=10, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13599
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=20, XPosition=4,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13593
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=30, XPosition=7,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13601
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=40, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13600
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=50, XPosition=7,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13604
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=60, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13595
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=70, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13594
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=80, XPosition=2,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13592
;
-- Jan 2, 2013 8:30:41 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=90, XPosition=3,Updated=TO_TIMESTAMP('2013-01-02 08:30:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13596
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=100, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=5, SeqNo=110, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13605
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120, XPosition=8,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=130, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201624
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=140, XPosition=4,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13606
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=150, XPosition=8,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=160, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13603
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=170, XPosition=4,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=180, XPosition=7,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623
;
-- Jan 2, 2013 8:30:42 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=190, XPosition=1,Updated=TO_TIMESTAMP('2013-01-02 08:30:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13597
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100, IsDisplayed='Y', XPosition=5,Updated=TO_TIMESTAMP('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120,Updated=TO_TIMESTAMP('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13605
;
-- Jan 2, 2013 8:34:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=150, IsDisplayed='Y', XPosition=7,Updated=TO_TIMESTAMP('2013-01-02 08:34:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 2, 2013 8:35:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=80,Updated=TO_TIMESTAMP('2013-01-02 08:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13592
;
-- Jan 2, 2013 8:35:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=90, XPosition=4,Updated=TO_TIMESTAMP('2013-01-02 08:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13596
;
-- Jan 2, 2013 8:35:46 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100, XPosition=6,Updated=TO_TIMESTAMP('2013-01-02 08:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 4, 2013 10:03:29 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,DefaultValue,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,895,'D','Y','N','N',0,'N',1,'N',20,'N',1103,TO_TIMESTAMP('2013-01-04 10:03:27','YYYY-MM-DD HH24:MI:SS'),'N','Y','34ce8949-69ce-49f3-add5-9a4b073e9abb','N','Y','IsDefault','Default value','The Default Checkbox indicates if this record will be used as a default value.','Default','Y','Y',100,TO_TIMESTAMP('2013-01-04 10:03:27','YYYY-MM-DD HH24:MI:SS'),0,100,0,208351,'N',0)
;
-- Jan 4, 2013 10:03:35 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoWindow ADD COLUMN IsDefault CHAR(1) DEFAULT 'N' CHECK (IsDefault IN ('Y','N')) NOT NULL
;
-- Jan 4, 2013 10:05:30 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Element (AD_Element_UU,EntityType,ColumnName,Name,Description,PrintName,Created,CreatedBy,UpdatedBy,AD_Org_ID,AD_Element_ID,AD_Client_ID,Updated,IsActive) VALUES ('f201cb26-043b-42c3-8e46-847801008534','D','IsDistinct','Distinct','Select Distinct','Distinct',TO_TIMESTAMP('2013-01-04 10:05:28','YYYY-MM-DD HH24:MI:SS'),100,100,0,202186,0,TO_TIMESTAMP('2013-01-04 10:05:28','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Jan 4, 2013 10:06:11 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Column (IsSyncDatabase,IsAlwaysUpdateable,IsEncrypted,Version,AD_Table_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,Created,IsAutocomplete,IsAllowLogging,AD_Column_UU,DefaultValue,IsUpdateable,ColumnName,Description,Name,IsAllowCopy,IsActive,CreatedBy,Updated,AD_Org_ID,UpdatedBy,AD_Client_ID,AD_Column_ID,IsToolbarButton,SeqNoSelection) VALUES ('N','N','N',1,895,'U','Y','N','N',0,'N',1,'N',20,'N',202186,TO_TIMESTAMP('2013-01-04 10:06:10','YYYY-MM-DD HH24:MI:SS'),'N','Y','773fd373-deca-44a4-bbdf-5f9c07d16c9f','N','Y','IsDistinct','Select Distinct','Distinct','Y','Y',100,TO_TIMESTAMP('2013-01-04 10:06:10','YYYY-MM-DD HH24:MI:SS'),0,100,0,208352,'N',0)
;
-- Jan 4, 2013 10:06:15 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
ALTER TABLE AD_InfoWindow ADD COLUMN IsDistinct CHAR(1) DEFAULT 'N' CHECK (IsDistinct IN ('Y','N')) NOT NULL
;
-- Jan 4, 2013 10:07:12 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',842,'N','N',208352,120,'Y',201627,'N',0,TO_TIMESTAMP('2013-01-04 10:07:10','YYYY-MM-DD HH24:MI:SS'),'N',120,'D',0,'Select Distinct','Y','N','b7862f66-669e-49a4-8c5d-73b1f0962ed1',100,TO_TIMESTAMP('2013-01-04 10:07:10','YYYY-MM-DD HH24:MI:SS'),0,'Distinct',100,'Y',1)
;
-- Jan 4, 2013 10:07:28 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
INSERT INTO AD_Field (ColumnSpan,NumLines,IsQuickEntry,SortNo,IsEncrypted,AD_Tab_ID,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,AD_Org_ID,Created,IsDisplayedGrid,SeqNoGrid,EntityType,AD_Client_ID,Description,IsDisplayed,IsFieldOnly,AD_Field_UU,CreatedBy,Updated,DisplayLength,Name,UpdatedBy,IsActive,XPosition) VALUES (1,1,'N',0,'N',842,'N','N',208351,130,'Y',201628,'N','The Default Checkbox indicates if this record will be used as a default value.',0,TO_TIMESTAMP('2013-01-04 10:07:27','YYYY-MM-DD HH24:MI:SS'),'Y',130,'D',0,'Default value','Y','N','b938a746-41d4-4f3e-9e35-2fefa5461cee',100,TO_TIMESTAMP('2013-01-04 10:07:27','YYYY-MM-DD HH24:MI:SS'),0,'Default',100,'Y',1)
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100,Updated=TO_TIMESTAMP('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201621
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13579
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120,Updated=TO_TIMESTAMP('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13580
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=130, IsDisplayed='Y', XPosition=2,Updated=TO_TIMESTAMP('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201627
;
-- Jan 4, 2013 10:07:59 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=140, IsDisplayed='Y', XPosition=4,Updated=TO_TIMESTAMP('2013-01-04 10:07:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201628
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=40, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13606
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=50, IsDisplayed='Y', XPosition=4,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201624
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=60, IsDisplayed='Y', XPosition=7,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13604
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=70, IsDisplayed='Y', XPosition=1,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13605
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13600
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=90,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13595
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=100,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13594
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13592
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=120,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13596
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=130,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13602
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=140,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 4, 2013 10:11:09 AM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNo=150,Updated=TO_TIMESTAMP('2013-01-04 10:11:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201625
;
-- Jan 4, 2013 1:36:51 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Tab SET IsSingleRow='Y',Updated=TO_TIMESTAMP('2013-01-04 13:36:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=842
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=50,Updated=TO_TIMESTAMP('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201624
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=140, IsDisplayed='Y', XPosition=8,Updated=TO_TIMESTAMP('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201626
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=170,Updated=TO_TIMESTAMP('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622
;
-- Jan 4, 2013 3:34:29 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET ColumnSpan=2, SeqNo=180,Updated=TO_TIMESTAMP('2013-01-04 15:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623
;
-- Jan 4, 2013 3:35:26 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
DELETE FROM AD_InfoWindow_Trl WHERE AD_InfoWindow_ID=1000000
;
-- Jan 4, 2013 3:35:26 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
DELETE FROM AD_InfoWindow WHERE AD_InfoWindow_ID=1000000
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13572
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201627
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13575
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13578
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13579
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13581
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201621
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13580
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=13577
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=13574
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=13573
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=13582
;
-- Jan 4, 2013 3:37:20 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201628
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201626
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13593
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13594
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13595
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201625
;
-- Jan 4, 2013 3:42:43 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201623
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13597
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=13601
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201622
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=13599
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=13604
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=13600
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=13606
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201624
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=13605
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=13603
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=13596
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=13602
;
-- Jan 4, 2013 3:42:44 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=13592
;
-- Jan 4, 2013 4:37:01 PM MYT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=13580
;
SELECT register_migration_script('201301040851_IDEMPIERE-325.sql') FROM dual
;

View File

@ -12,7 +12,7 @@
<booleanAttribute key="clearwslog" value="false"/> <booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/model.generator"/> <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/model.generator"/>
<booleanAttribute key="default" value="false"/> <booleanAttribute key="default" value="false"/>
<stringAttribute key="deselected_workspace_plugins" value="com.trekglobal.ui.zk.theme,org.adempiere.base.callout,org.adempiere.base.process,org.adempiere.payment.processor,org.adempiere.pipo,org.adempiere.pipo.handlers,org.adempiere.replication,org.adempiere.replication.server,org.adempiere.report.jasper.swing,org.adempiere.report.jasper.webapp,org.adempiere.server,org.adempiere.tomcat.config,org.adempiere.ui.zk,org.adempiere.ui.zk.example,org.adempiere.webstore,org.adempiere.webstore.resource,org.adempiere.webstore.servlet,org.idempiere.hazelcast.service,org.idempiere.hazelcast.service.config,org.idempiere.webservices,org.zkoss.zk.library"/> <stringAttribute key="deselected_workspace_plugins" value="com.trekglobal.ui.zk.theme,event.test,org.adempiere.base.callout,org.adempiere.base.process,org.adempiere.payment.processor,org.adempiere.pipo,org.adempiere.pipo.handlers,org.adempiere.replication,org.adempiere.replication.server,org.adempiere.report.jasper.swing,org.adempiere.report.jasper.webapp,org.adempiere.server,org.adempiere.tomcat.config,org.adempiere.ui.zk,org.adempiere.ui.zk.example,org.adempiere.webstore,org.adempiere.webstore.resource,org.adempiere.webstore.servlet,org.idempiere.fitnesse.fixture,org.idempiere.fitnesse.server,org.idempiere.hazelcast.service,org.idempiere.hazelcast.service.config,org.idempiere.ui.zk.selenium,org.idempiere.ui.zk.theme.flat,org.idempiere.webservices,org.zkoss.zk.library"/>
<booleanAttribute key="includeOptional" value="true"/> <booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-model.generator"/> <stringAttribute key="location" value="${workspace_loc}/../runtime-model.generator"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
@ -21,7 +21,7 @@
<stringAttribute key="pde.version" value="3.3"/> <stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.adempiere.server.server_product"/> <stringAttribute key="product" value="org.adempiere.server.server_product"/>
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:default,org.restlet@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/> <stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:default,org.restlet@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="event.test@default:default,org.adempiere.base@default:default,org.adempiere.eclipse.equinox.http.servlet@default:default,org.adempiere.eclipse.equinox.http.servletbridge@default:default,org.adempiere.eclipse.equinox.servletbridge@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.idempiere.fitnesse.fixture@default:default,org.idempiere.fitnesse.server@default:default"/> <stringAttribute key="selected_workspace_plugins" value="org.adempiere.base@default:default,org.adempiere.eclipse.equinox.http.servlet@default:default,org.adempiere.eclipse.equinox.http.servletbridge@default:default,org.adempiere.eclipse.equinox.servletbridge@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/> <booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/> <stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/> <booleanAttribute key="tracing" value="false"/>

View File

@ -16,6 +16,12 @@
*****************************************************************************/ *****************************************************************************/
package org.compiere.process; package org.compiere.process;
import java.sql.PreparedStatement;
import org.compiere.model.MInfoColumn;
import org.compiere.model.MInfoWindow;
import org.compiere.util.DB;
/** /**
* Validate Info Window SQL * Validate Info Window SQL
* *
@ -25,7 +31,6 @@ package org.compiere.process;
public class InfoWindowValidate extends SvrProcess public class InfoWindowValidate extends SvrProcess
{ {
/** Info Window */ /** Info Window */
@SuppressWarnings("unused")
private int p_AD_InfoWindow_ID = 0; private int p_AD_InfoWindow_ID = 0;
/** /**
@ -44,7 +49,51 @@ public class InfoWindowValidate extends SvrProcess
protected String doIt () protected String doIt ()
throws Exception throws Exception
{ {
return null; MInfoWindow infoWindow = new MInfoWindow(getCtx(), p_AD_InfoWindow_ID, (String)null);
StringBuilder builder = new StringBuilder("SELECT ");
if (infoWindow.isDistinct())
builder.append("DISTINCT ");
MInfoColumn[] infoColumns = infoWindow.getInfoColumns();
if (infoColumns.length == 0)
throw new Exception("NoColumns");
for (int columnIndex = 0; columnIndex < infoColumns.length; columnIndex++) {
if (columnIndex > 0)
{
builder.append(", ");
}
builder.append(infoColumns[columnIndex].getSelectClause());
}
builder.append( " FROM ").append(infoWindow.getFromClause());
if (infoWindow.getWhereClause() != null && infoWindow.getWhereClause().trim().length() > 0) {
builder.append(" WHERE ").append(infoWindow.getWhereClause());
}
if (infoWindow.getOtherClause() != null && infoWindow.getOtherClause().trim().length() > 0) {
builder.append(" ").append(infoWindow.getOtherClause());
}
while(builder.indexOf("@") >= 0) {
int start = builder.indexOf("@");
int end = builder.indexOf("@", start+1);
if (start >=0 && end > start) {
builder.replace(start, end+1, "0");
} else {
break;
}
}
PreparedStatement pstmt = null;
try {
pstmt = DB.prepareStatement(builder.toString(), get_TrxName());
pstmt.executeQuery();
} finally {
DB.close(pstmt);
}
return "Ok";
} // doIt } // doIt
} // InfoWindowValidate } // InfoWindowValidate

View File

@ -69,5 +69,25 @@
</run> </run>
</application> </application>
</extension> </extension>
<extension
id="org.adempiere.model.CalloutInfoWindow.element"
point="org.adempiere.base.IColumnCallout">
<callout
class="org.adempiere.model.CalloutInfoWindow"
columnName="AD_Element_ID"
priority="0"
tableName="AD_InfoColumn">
</callout>
</extension>
<extension
id="org.adempiere.model.CalloutInfoWindow.table"
point="org.adempiere.base.IColumnCallout">
<callout
class="org.adempiere.model.CalloutInfoWindow"
columnName="AD_Table_ID"
priority="0"
tableName="AD_InfoWindow">
</callout>
</extension>
</plugin> </plugin>

View File

@ -0,0 +1,109 @@
/**
*
*/
package org.adempiere.model;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.adempiere.base.IColumnCallout;
import org.compiere.model.AccessSqlParser;
import org.compiere.model.AccessSqlParser.TableInfo;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.I_AD_InfoColumn;
import org.compiere.model.I_AD_InfoWindow;
import org.compiere.model.MColumn;
import org.compiere.model.MTable;
import org.compiere.model.M_Element;
import org.compiere.util.Env;
/**
* @author hengsin
*
*/
public class CalloutInfoWindow implements IColumnCallout {
/**
*
*/
public CalloutInfoWindow() {
}
/* (non-Javadoc)
* @see org.adempiere.base.IColumnCallout#start(java.util.Properties, int, org.compiere.model.GridTab, org.compiere.model.GridField, java.lang.Object, java.lang.Object)
*/
@Override
public String start(Properties ctx, int WindowNo, GridTab mTab,
GridField mField, Object value, Object oldValue) {
if (mTab.getTableName().equals("AD_InfoColumn"))
return element(mTab, value);
else if (mTab.getTableName().equals("AD_InfoWindow"))
return table(mTab, value);
else
return "";
}
private String table(GridTab mTab, Object value) {
if (value != null) {
int id = ((Number)value).intValue();
if (id > 0) {
I_AD_InfoWindow infoWindow = GridTabWrapper.create(mTab, I_AD_InfoWindow.class);
if (infoWindow.getFromClause() == null || infoWindow.getFromClause().trim().length() == 0) {
MTable table = MTable.get(Env.getCtx(), id);
if (table != null) {
infoWindow.setFromClause(table.getTableName() + " a");
if (infoWindow.getName() == null || infoWindow.getName().trim().length() == 0) {
infoWindow.setName(table.getName());
}
}
}
}
}
return null;
}
protected String element(GridTab mTab, Object value) {
if (value != null) {
int id = ((Number)value).intValue();
if (id > 0) {
I_AD_InfoColumn infoColumn = GridTabWrapper.create(mTab, I_AD_InfoColumn.class);
M_Element element = new M_Element(Env.getCtx(), id, (String)null);
infoColumn.setColumnName(element.getColumnName());
infoColumn.setDescription(element.getDescription());
infoColumn.setHelp(element.getHelp());
infoColumn.setName(element.getName());
if (infoColumn.getSelectClause() == null || infoColumn.getSelectClause().trim().length() == 0) {
String fromClause = infoColumn.getAD_InfoWindow().getFromClause();
AccessSqlParser parser = new AccessSqlParser("SELECT * FROM " + fromClause);
TableInfo[] tableInfos = parser.getTableInfo(0);
Map<String, MTable> map = new HashMap<String, MTable>();
for(TableInfo ti : tableInfos) {
String alias = ti.getSynonym();
String tableName = ti.getTableName();
MTable table = map.get(tableName);
if (table == null) {
table = MTable.get(Env.getCtx(), tableName);
if (table == null) continue;
map.put(tableName, table);
}
MColumn col = table.getColumn(element.getColumnName());
if (col != null) {
infoColumn.setSelectClause(alias+"."+element.getColumnName());
infoColumn.setAD_Reference_ID(col.getAD_Reference_ID());
infoColumn.setAD_Reference_Value_ID(col.getAD_Reference_Value_ID());
infoColumn.setAD_Val_Rule_ID(col.getAD_Val_Rule_ID());
if ((col.isSelectionColumn() || col.isIdentifier()) && !col.isKey())
infoColumn.setIsQueryCriteria(true);
break;
}
}
}
}
}
return "";
}
}

View File

@ -129,6 +129,49 @@ public interface I_AD_InfoColumn
public org.compiere.model.I_AD_Reference getAD_Reference() throws RuntimeException; public org.compiere.model.I_AD_Reference getAD_Reference() throws RuntimeException;
/** Column name AD_Reference_Value_ID */
public static final String COLUMNNAME_AD_Reference_Value_ID = "AD_Reference_Value_ID";
/** Set Reference Key.
* Required to specify, if data type is Table or List
*/
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID);
/** Get Reference Key.
* Required to specify, if data type is Table or List
*/
public int getAD_Reference_Value_ID();
public org.compiere.model.I_AD_Reference getAD_Reference_Value() throws RuntimeException;
/** Column name AD_Val_Rule_ID */
public static final String COLUMNNAME_AD_Val_Rule_ID = "AD_Val_Rule_ID";
/** Set Dynamic Validation.
* Dynamic Validation Rule
*/
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID);
/** Get Dynamic Validation.
* Dynamic Validation Rule
*/
public int getAD_Val_Rule_ID();
public org.compiere.model.I_AD_Val_Rule getAD_Val_Rule() throws RuntimeException;
/** Column name ColumnName */
public static final String COLUMNNAME_ColumnName = "ColumnName";
/** Set DB Column Name.
* Name of the column in the database
*/
public void setColumnName (String ColumnName);
/** Get DB Column Name.
* Name of the column in the database
*/
public String getColumnName();
/** Column name Created */ /** Column name Created */
public static final String COLUMNNAME_Created = "Created"; public static final String COLUMNNAME_Created = "Created";
@ -158,6 +201,19 @@ public interface I_AD_InfoColumn
*/ */
public String getDescription(); public String getDescription();
/** Column name DisplayLogic */
public static final String COLUMNNAME_DisplayLogic = "DisplayLogic";
/** Set Display Logic.
* If the Field is displayed, the result determines if the field is actually displayed
*/
public void setDisplayLogic (String DisplayLogic);
/** Get Display Logic.
* If the Field is displayed, the result determines if the field is actually displayed
*/
public String getDisplayLogic();
/** Column name EntityType */ /** Column name EntityType */
public static final String COLUMNNAME_EntityType = "EntityType"; public static final String COLUMNNAME_EntityType = "EntityType";
@ -199,6 +255,19 @@ public interface I_AD_InfoColumn
*/ */
public boolean isActive(); public boolean isActive();
/** Column name IsCentrallyMaintained */
public static final String COLUMNNAME_IsCentrallyMaintained = "IsCentrallyMaintained";
/** Set Centrally maintained.
* Information maintained in System Element table
*/
public void setIsCentrallyMaintained (boolean IsCentrallyMaintained);
/** Get Centrally maintained.
* Information maintained in System Element table
*/
public boolean isCentrallyMaintained();
/** Column name IsDisplayed */ /** Column name IsDisplayed */
public static final String COLUMNNAME_IsDisplayed = "IsDisplayed"; public static final String COLUMNNAME_IsDisplayed = "IsDisplayed";

View File

@ -182,6 +182,32 @@ public interface I_AD_InfoWindow
*/ */
public boolean isActive(); public boolean isActive();
/** Column name IsDefault */
public static final String COLUMNNAME_IsDefault = "IsDefault";
/** Set Default.
* Default value
*/
public void setIsDefault (boolean IsDefault);
/** Get Default.
* Default value
*/
public boolean isDefault();
/** Column name IsDistinct */
public static final String COLUMNNAME_IsDistinct = "IsDistinct";
/** Set Distinct.
* Select Distinct
*/
public void setIsDistinct (boolean IsDistinct);
/** Get Distinct.
* Select Distinct
*/
public boolean isDistinct();
/** Column name Name */ /** Column name Name */
public static final String COLUMNNAME_Name = "Name"; public static final String COLUMNNAME_Name = "Name";
@ -232,4 +258,17 @@ public interface I_AD_InfoWindow
* User who updated this records * User who updated this records
*/ */
public int getUpdatedBy(); 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

@ -64,6 +64,21 @@ public interface I_AD_Ref_Table
public org.compiere.model.I_AD_Column getAD_Disp() throws RuntimeException; public org.compiere.model.I_AD_Column getAD_Disp() throws RuntimeException;
/** Column name AD_InfoWindow_ID */
public static final String COLUMNNAME_AD_InfoWindow_ID = "AD_InfoWindow_ID";
/** Set Info Window.
* Info and search/select Window
*/
public void setAD_InfoWindow_ID (int AD_InfoWindow_ID);
/** Get Info Window.
* Info and search/select Window
*/
public int getAD_InfoWindow_ID();
public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException;
/** Column name AD_Key */ /** Column name AD_Key */
public static final String COLUMNNAME_AD_Key = "AD_Key"; public static final String COLUMNNAME_AD_Key = "AD_Key";

View File

@ -504,13 +504,4 @@ public abstract class Lookup extends AbstractListModel
return m_loaded; return m_loaded;
} }
/**
* Get custom info factory class
* @return info factory class name
*/
public String getInfoFactoryClass()
{
return "";
}
} // Lookup } // Lookup

View File

@ -18,9 +18,12 @@ package org.compiere.model;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.AccessSqlParser.TableInfo; import org.compiere.model.AccessSqlParser.TableInfo;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Evaluatee;
import org.compiere.util.Evaluator;
/** /**
* Info Window Column Model * Info Window Column Model
@ -91,4 +94,44 @@ public class MInfoColumn extends X_AD_InfoColumn
} }
return true; return true;
} }
/**
* @param ctx
* @param windowNo
* @return boolean
*/
public boolean isDisplayed(final Properties ctx, final int windowNo) {
if (!isDisplayed())
return false;
if (getDisplayLogic() == null || getDisplayLogic().trim().length() == 0)
return true;
Evaluatee evaluatee = new Evaluatee() {
public String get_ValueAsString(String variableName) {
return Env.getContext (ctx, windowNo, variableName, true);
}
};
boolean retValue = Evaluator.evaluateLogic(evaluatee, getDisplayLogic());
if (log.isLoggable(Level.FINEST)) {
log.finest(getName()
+ " (" + getDisplayLogic() + ") => " + retValue);
}
return retValue;
}
@Override
protected boolean beforeSave(boolean newRecord) {
// Sync Terminology
if ((newRecord || is_ValueChanged ("AD_Element_ID"))
&& getAD_Element_ID() != 0 && isCentrallyMaintained())
{
M_Element element = new M_Element (getCtx(), getAD_Element_ID (), get_TrxName());
setName (element.getName());
}
return true;
}
} // MInfoColumn } // MInfoColumn

View File

@ -63,7 +63,7 @@ public class MInfoWindow extends X_AD_InfoWindow
MTable table = MTable.get(Env.getCtx(), tableName); MTable table = MTable.get(Env.getCtx(), tableName);
if (table != null) { if (table != null) {
return query.setParameters(table.getAD_Table_ID()) return query.setParameters(table.getAD_Table_ID())
.setOrderBy("AD_Client_ID Desc, AD_Org_ID Desc, AD_InfoWidnow_ID Desc") .setOrderBy("AD_Client_ID Desc, AD_Org_ID Desc, IsDefault Desc, AD_InfoWindow_ID Desc")
.setOnlyActiveRecords(true) .setOnlyActiveRecords(true)
.setApplyAccessFilter(true) .setApplyAccessFilter(true)
.first(); .first();
@ -84,6 +84,14 @@ public class MInfoWindow extends X_AD_InfoWindow
return list.toArray(new MInfoColumn[0]); return list.toArray(new MInfoColumn[0]);
} }
public MInfoColumn[] getInfoColumns() {
Query query = new Query(getCtx(), MTable.get(getCtx(), I_AD_InfoColumn.Table_ID), I_AD_InfoColumn.COLUMNNAME_AD_InfoWindow_ID+"=?", get_TrxName());
List<MInfoColumn> list = query.setParameters(getAD_InfoWindow_ID())
.setOrderBy(I_AD_InfoColumn.COLUMNNAME_SeqNo)
.list();
return list.toArray(new MInfoColumn[0]);
}
@Override @Override
protected boolean beforeSave(boolean newRecord) { protected boolean beforeSave(boolean newRecord) {
String tableName = getAD_Table().getTableName(); String tableName = getAD_Table().getTableName();
@ -99,7 +107,28 @@ public class MInfoWindow extends X_AD_InfoWindow
return false; return false;
} }
//only one default per table
if (newRecord || is_ValueChanged("IsDefault")) {
if (isDefault()) {
if (newRecord) {
Query query = new Query(getCtx(), MTable.get(getCtx(), Table_ID),
"AD_Table_ID=? AND IsDefault='Y' AND AD_Client_ID=?", get_TrxName());
List<MInfoWindow> list = query.setParameters(getAD_Table_ID(),getAD_Client_ID()).list();
for(MInfoWindow iw : list) {
iw.setIsDefault(false);
iw.saveEx();
}
} else {
Query query = new Query(getCtx(), MTable.get(getCtx(), Table_ID),
"AD_InfoWindow_ID<>? AND AD_Table_ID=? AND IsDefault='Y' AND AD_Client_ID=?", get_TrxName());
List<MInfoWindow> list = query.setParameters(getAD_InfoWindow_ID(), getAD_Table_ID(), getAD_Client_ID()).list();
for(MInfoWindow iw : list) {
iw.setIsDefault(false);
iw.saveEx();
}
}
}
}
return true; return true;
} }
} // MInfoWindow } // MInfoWindow

View File

@ -341,6 +341,14 @@ public final class MLookup extends Lookup implements Serializable
return m_hasInactive; return m_hasInactive;
} // hasInactive } // hasInactive
/**
* @return AD_InfoWindow_ID
*/
public int getAD_InfoWindow_ID()
{
return m_info.InfoWindowId;
}
/** /**
* Return info as ArrayList containing Value/KeyNamePair * Return info as ArrayList containing Value/KeyNamePair
* @param onlyValidated only validated * @param onlyValidated only validated
@ -639,13 +647,6 @@ public final class MLookup extends Lookup implements Serializable
return false; return false;
} }
@Override
public String getInfoFactoryClass() {
return m_info.InfoFactoryClass != null ? m_info.InfoFactoryClass : "";
}
/************************************************************************** /**************************************************************************
* MLookup Loader * MLookup Loader
*/ */

View File

@ -374,7 +374,7 @@ public class MLookupFactory
+ "cd.ColumnName AS DisplayColumn,rt.IsValueDisplayed,cd.IsTranslated," // 3..5 + "cd.ColumnName AS DisplayColumn,rt.IsValueDisplayed,cd.IsTranslated," // 3..5
+ "rt.WhereClause,rt.OrderByClause,t.AD_Window_ID,t.PO_Window_ID, " // 6..9 + "rt.WhereClause,rt.OrderByClause,t.AD_Window_ID,t.PO_Window_ID, " // 6..9
+ "t.AD_Table_ID, cd.ColumnSQL as DisplayColumnSQL, " // 10..11 + "t.AD_Table_ID, cd.ColumnSQL as DisplayColumnSQL, " // 10..11
+ "rt.AD_Window_ID as RT_AD_Window_ID " // 12 + "rt.AD_Window_ID as RT_AD_Window_ID, rt.AD_InfoWindow_ID as AD_InfoWindow_ID " // 12..13
+ "FROM AD_Ref_Table rt" + "FROM AD_Ref_Table rt"
+ " INNER JOIN AD_Table t ON (rt.AD_Table_ID=t.AD_Table_ID)" + " INNER JOIN AD_Table t ON (rt.AD_Table_ID=t.AD_Table_ID)"
+ " INNER JOIN AD_Column ck ON (rt.AD_Key=ck.AD_Column_ID)" + " INNER JOIN AD_Column ck ON (rt.AD_Key=ck.AD_Column_ID)"
@ -389,6 +389,7 @@ public class MLookupFactory
int ZoomWindow = 0; int ZoomWindow = 0;
int ZoomWindowPO = 0; int ZoomWindowPO = 0;
int overrideZoomWindow = 0; int overrideZoomWindow = 0;
int infoWindowId = 0;
//int AD_Table_ID = 0; //int AD_Table_ID = 0;
boolean loaded = false; boolean loaded = false;
@ -413,6 +414,7 @@ public class MLookupFactory
//AD_Table_ID = rs.getInt(10); //AD_Table_ID = rs.getInt(10);
displayColumnSQL = rs.getString(11); displayColumnSQL = rs.getString(11);
overrideZoomWindow = rs.getInt(12); overrideZoomWindow = rs.getInt(12);
infoWindowId = rs.getInt(13);
loaded = true; loaded = true;
} }
} }
@ -560,6 +562,7 @@ public class MLookupFactory
retValue = new MLookupInfo (realSQL.toString(), TableName, retValue = new MLookupInfo (realSQL.toString(), TableName,
msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery); msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery);
retValue.DisplayColumn = lookupDisplayColumn; retValue.DisplayColumn = lookupDisplayColumn;
retValue.InfoWindowId = infoWindowId;
s_cacheRefTable.put(key.toString(), retValue.cloneIt()); s_cacheRefTable.put(key.toString(), retValue.cloneIt());
return retValue; return retValue;
} // getLookup_Table } // getLookup_Table

View File

@ -190,10 +190,10 @@ public class MLookupInfo implements Serializable, Cloneable
public String parsedValidationCode = ""; public String parsedValidationCode = "";
public String InfoFactoryClass = null;
public String DisplayColumn; public String DisplayColumn;
public int InfoWindowId;
/** /**
* String representation * String representation
* @return info * @return info

View File

@ -30,7 +30,7 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20121031L; private static final long serialVersionUID = 20130101L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_InfoColumn (Properties ctx, int AD_InfoColumn_ID, String trxName) public X_AD_InfoColumn (Properties ctx, int AD_InfoColumn_ID, String trxName)
@ -41,9 +41,13 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
setAD_InfoColumn_ID (0); setAD_InfoColumn_ID (0);
setAD_InfoWindow_ID (0); setAD_InfoWindow_ID (0);
setAD_Reference_ID (0); setAD_Reference_ID (0);
setColumnName (null);
setEntityType (null); setEntityType (null);
// U // U
setIsDisplayed (false); setIsCentrallyMaintained (true);
// Y
setIsDisplayed (true);
// Y
setIsQueryCriteria (false); setIsQueryCriteria (false);
setName (null); setName (null);
setSelectClause (null); setSelectClause (null);
@ -200,6 +204,79 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
return ii.intValue(); return ii.intValue();
} }
public org.compiere.model.I_AD_Reference getAD_Reference_Value() throws RuntimeException
{
return (org.compiere.model.I_AD_Reference)MTable.get(getCtx(), org.compiere.model.I_AD_Reference.Table_Name)
.getPO(getAD_Reference_Value_ID(), get_TrxName()); }
/** Set Reference Key.
@param AD_Reference_Value_ID
Required to specify, if data type is Table or List
*/
public void setAD_Reference_Value_ID (int AD_Reference_Value_ID)
{
if (AD_Reference_Value_ID < 1)
set_Value (COLUMNNAME_AD_Reference_Value_ID, null);
else
set_Value (COLUMNNAME_AD_Reference_Value_ID, Integer.valueOf(AD_Reference_Value_ID));
}
/** Get Reference Key.
@return Required to specify, if data type is Table or List
*/
public int getAD_Reference_Value_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_Value_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Val_Rule getAD_Val_Rule() throws RuntimeException
{
return (org.compiere.model.I_AD_Val_Rule)MTable.get(getCtx(), org.compiere.model.I_AD_Val_Rule.Table_Name)
.getPO(getAD_Val_Rule_ID(), get_TrxName()); }
/** Set Dynamic Validation.
@param AD_Val_Rule_ID
Dynamic Validation Rule
*/
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID)
{
if (AD_Val_Rule_ID < 1)
set_Value (COLUMNNAME_AD_Val_Rule_ID, null);
else
set_Value (COLUMNNAME_AD_Val_Rule_ID, Integer.valueOf(AD_Val_Rule_ID));
}
/** Get Dynamic Validation.
@return Dynamic Validation Rule
*/
public int getAD_Val_Rule_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Val_Rule_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set DB Column Name.
@param ColumnName
Name of the column in the database
*/
public void setColumnName (String ColumnName)
{
set_Value (COLUMNNAME_ColumnName, ColumnName);
}
/** Get DB Column Name.
@return Name of the column in the database
*/
public String getColumnName ()
{
return (String)get_Value(COLUMNNAME_ColumnName);
}
/** Set Description. /** Set Description.
@param Description @param Description
Optional short description of the record Optional short description of the record
@ -217,6 +294,23 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
return (String)get_Value(COLUMNNAME_Description); return (String)get_Value(COLUMNNAME_Description);
} }
/** Set Display Logic.
@param DisplayLogic
If the Field is displayed, the result determines if the field is actually displayed
*/
public void setDisplayLogic (String DisplayLogic)
{
set_Value (COLUMNNAME_DisplayLogic, DisplayLogic);
}
/** Get Display Logic.
@return If the Field is displayed, the result determines if the field is actually displayed
*/
public String getDisplayLogic ()
{
return (String)get_Value(COLUMNNAME_DisplayLogic);
}
/** EntityType AD_Reference_ID=389 */ /** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389; public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entity Type. /** Set Entity Type.
@ -254,6 +348,30 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
return (String)get_Value(COLUMNNAME_Help); return (String)get_Value(COLUMNNAME_Help);
} }
/** Set Centrally maintained.
@param IsCentrallyMaintained
Information maintained in System Element table
*/
public void setIsCentrallyMaintained (boolean IsCentrallyMaintained)
{
set_Value (COLUMNNAME_IsCentrallyMaintained, Boolean.valueOf(IsCentrallyMaintained));
}
/** Get Centrally maintained.
@return Information maintained in System Element table
*/
public boolean isCentrallyMaintained ()
{
Object oo = get_Value(COLUMNNAME_IsCentrallyMaintained);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Displayed. /** Set Displayed.
@param IsDisplayed @param IsDisplayed
Determines, if this field is displayed Determines, if this field is displayed

View File

@ -30,7 +30,7 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20121031L; private static final long serialVersionUID = 20130104L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_InfoWindow (Properties ctx, int AD_InfoWindow_ID, String trxName) public X_AD_InfoWindow (Properties ctx, int AD_InfoWindow_ID, String trxName)
@ -43,6 +43,10 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
setEntityType (null); setEntityType (null);
// U // U
setFromClause (null); setFromClause (null);
setIsDefault (false);
// N
setIsDistinct (false);
// N
setName (null); setName (null);
} */ } */
} }
@ -211,6 +215,54 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
return (String)get_Value(COLUMNNAME_Help); return (String)get_Value(COLUMNNAME_Help);
} }
/** Set Default.
@param IsDefault
Default value
*/
public void setIsDefault (boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault));
}
/** Get Default.
@return Default value
*/
public boolean isDefault ()
{
Object oo = get_Value(COLUMNNAME_IsDefault);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Distinct.
@param IsDistinct
Select Distinct
*/
public void setIsDistinct (boolean IsDistinct)
{
set_Value (COLUMNNAME_IsDistinct, Boolean.valueOf(IsDistinct));
}
/** Get Distinct.
@return Select Distinct
*/
public boolean isDistinct ()
{
Object oo = get_Value(COLUMNNAME_IsDistinct);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name. /** Set Name.
@param Name @param Name
Alphanumeric identifier of the entity Alphanumeric identifier of the entity
@ -273,4 +325,21 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
} }
return false; return false;
} }
/** 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_AD_Ref_Table extends PO implements I_AD_Ref_Table, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20121031L; private static final long serialVersionUID = 20121231L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Ref_Table (Properties ctx, int AD_Ref_Table_ID, String trxName) public X_AD_Ref_Table (Properties ctx, int AD_Ref_Table_ID, String trxName)
@ -101,6 +101,34 @@ public class X_AD_Ref_Table extends PO implements I_AD_Ref_Table, I_Persistent
return ii.intValue(); return ii.intValue();
} }
public org.compiere.model.I_AD_InfoWindow getAD_InfoWindow() throws RuntimeException
{
return (org.compiere.model.I_AD_InfoWindow)MTable.get(getCtx(), org.compiere.model.I_AD_InfoWindow.Table_Name)
.getPO(getAD_InfoWindow_ID(), get_TrxName()); }
/** Set Info Window.
@param AD_InfoWindow_ID
Info and search/select Window
*/
public void setAD_InfoWindow_ID (int AD_InfoWindow_ID)
{
if (AD_InfoWindow_ID < 1)
set_Value (COLUMNNAME_AD_InfoWindow_ID, null);
else
set_Value (COLUMNNAME_AD_InfoWindow_ID, Integer.valueOf(AD_InfoWindow_ID));
}
/** Get Info Window.
@return Info and search/select Window
*/
public int getAD_InfoWindow_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_InfoWindow_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_AD_Column getAD_() throws RuntimeException public org.compiere.model.I_AD_Column getAD_() throws RuntimeException
{ {
return (org.compiere.model.I_AD_Column)MTable.get(getCtx(), org.compiere.model.I_AD_Column.Table_Name) return (org.compiere.model.I_AD_Column)MTable.get(getCtx(), org.compiere.model.I_AD_Column.Table_Name)

View File

@ -14,14 +14,12 @@
package org.adempiere.ui.swing.factory; package org.adempiere.ui.swing.factory;
import java.awt.Frame; import java.awt.Frame;
import java.util.logging.Level;
import org.compiere.apps.search.Info; import org.compiere.apps.search.Info;
import org.compiere.apps.search.InfoAsset; import org.compiere.apps.search.InfoAsset;
import org.compiere.apps.search.InfoAssignment; import org.compiere.apps.search.InfoAssignment;
import org.compiere.apps.search.InfoBPartner; import org.compiere.apps.search.InfoBPartner;
import org.compiere.apps.search.InfoCashLine; import org.compiere.apps.search.InfoCashLine;
import org.compiere.apps.search.InfoFactory;
import org.compiere.apps.search.InfoGeneral; import org.compiere.apps.search.InfoGeneral;
import org.compiere.apps.search.InfoInOut; import org.compiere.apps.search.InfoInOut;
import org.compiere.apps.search.InfoInvoice; import org.compiere.apps.search.InfoInvoice;
@ -45,6 +43,7 @@ import org.eevolution.model.I_PP_Product_BOMLine;
*/ */
public class DefaultInfoFactory implements IInfoFactory { public class DefaultInfoFactory implements IInfoFactory {
@SuppressWarnings("unused")
private final static CLogger log = CLogger.getCLogger(DefaultInfoFactory.class); private final static CLogger log = CLogger.getCLogger(DefaultInfoFactory.class);
@Override @Override
@ -56,20 +55,7 @@ public class DefaultInfoFactory implements IInfoFactory {
if (col.indexOf('.') != -1) if (col.indexOf('.') != -1)
col = col.substring(col.indexOf('.')+1); col = col.substring(col.indexOf('.')+1);
boolean multipleSelection = false; boolean multipleSelection = false;
String infoFactoryClass = lookup.getInfoFactoryClass(); if (col.equals("M_Product_ID"))
if (infoFactoryClass != null && infoFactoryClass.trim().length() > 0)
{
try {
@SuppressWarnings("unchecked")
Class<InfoFactory> clazz = (Class<InfoFactory>)this.getClass().getClassLoader().loadClass(infoFactoryClass);
InfoFactory factory = clazz.newInstance();
info = factory.create (frame, true, lookup.getWindowNo(),
tableName, keyColumn, queryValue, false, whereClause);
} catch (Exception e) {
log.log(Level.SEVERE, "Failed to load custom InfoFactory - " + e.getLocalizedMessage(), e);
}
}
else if (col.equals("M_Product_ID"))
{ {
int M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), lookup.getWindowNo(), "M_Warehouse_ID"); int M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), lookup.getWindowNo(), "M_Warehouse_ID");
int M_PriceList_ID = Env.getContextAsInt(Env.getCtx(), lookup.getWindowNo(), "M_PriceList_ID"); int M_PriceList_ID = Env.getContextAsInt(Env.getCtx(), lookup.getWindowNo(), "M_PriceList_ID");

View File

@ -343,6 +343,9 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
boolean multiSelection, boolean multiSelection,
String tableName,boolean addAccessSQL) String tableName,boolean addAccessSQL)
{ {
if (getListhead() != null)
getListHead().detach();
int columnIndex = 0; int columnIndex = 0;
StringBuilder sql = new StringBuilder ("SELECT "); StringBuilder sql = new StringBuilder ("SELECT ");
setLayout(layout); setLayout(layout);

View File

@ -321,71 +321,10 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
actionButton(text); actionButton(text);
return; return;
} }
// text = text.toUpperCase(); if (log.isLoggable(Level.CONFIG))
log.config(getColumnName() + " - " + text); log.config(getColumnName() + " - " + text);
// Exact first int id = -1;
/*
PreparedStatement pstmt = null;
String finalSQL = Msg.parseTranslation(Env.getCtx(), getDirectAccessSQL(text));
int id = -3;
try
{
pstmt = DB.prepareStatement(finalSQL, null);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
id = rs.getInt(1); // first
if (rs.next())
id = -1; // only if unique
}
rs.close();
pstmt.close();
}
catch (Exception e)
{
log.log(Level.SEVERE, finalSQL, e);
id = -2;
}
// Try like
if (id == -3 && !text.endsWith("%"))
{
text += "%";
finalSQL = Msg.parseTranslation(Env.getCtx(), getDirectAccessSQL(text));
try
{
pstmt = DB.prepareStatement(finalSQL, null);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
id = rs.getInt(1); // first
if (rs.next())
id = -1; // only if unique
}
rs.close();
pstmt.close();
}
catch (Exception e)
{
log.log(Level.SEVERE, finalSQL, e);
id = -2;
}
}
try
{
if (pstmt != null)
pstmt.close();
}
catch (Exception e)
{
}
*/
int id = -3;
if (m_tableName == null) // sets table name & key column if (m_tableName == null) // sets table name & key column
getDirectAccessSQL("*"); getDirectAccessSQL("*");
@ -414,6 +353,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
} }
return; return;
} }
if (log.isLoggable(Level.FINE))
log.fine(getColumnName() + " - Unique ID=" + id); log.fine(getColumnName() + " - Unique ID=" + id);
actionCombo(new Integer(id)); // data binding actionCombo(new Integer(id)); // data binding
@ -423,6 +363,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
private void actionCombo (Object value) private void actionCombo (Object value)
{ {
if (log.isLoggable(Level.FINE))
log.fine("Value=" + value); log.fine("Value=" + value);
ValueChangeEvent evt = new ValueChangeEvent(this, this.getColumnName(), getValue(), value); ValueChangeEvent evt = new ValueChangeEvent(this, this.getColumnName(), getValue(), value);
@ -518,6 +459,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
// Zoom / Validation // Zoom / Validation
String whereClause = getWhereClause(); String whereClause = getWhereClause();
if (log.isLoggable(Level.FINE))
log.fine(lookup.getColumnName() + ", Zoom=" + lookup.getZoom() + " (" + whereClause + ")"); log.fine(lookup.getColumnName() + ", Zoom=" + lookup.getZoom() + " (" + whereClause + ")");
// boolean resetValue = false; // Reset value so that is always treated as new entry // boolean resetValue = false; // Reset value so that is always treated as new entry
@ -559,11 +501,13 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
} }
else if (cancelled) else if (cancelled)
{ {
if (log.isLoggable(Level.CONFIG))
log.config(getColumnName() + " - Result = null (cancelled)"); log.config(getColumnName() + " - Result = null (cancelled)");
actionCombo(null); actionCombo(null);
} }
else else
{ {
if (log.isLoggable(Level.CONFIG))
log.config(getColumnName() + " - Result = null (not cancelled)"); log.config(getColumnName() + " - Result = null (not cancelled)");
} }
} }
@ -654,6 +598,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
sql.append(" AND IsActive='Y'"); sql.append(" AND IsActive='Y'");
// *** // ***
if (log.isLoggable(Level.FINEST))
log.finest(m_columnName + " (predefined) " + sql.toString()); log.finest(m_columnName + " (predefined) " + sql.toString());
return MRole.getDefault().addAccessSQL(sql.toString(), return MRole.getDefault().addAccessSQL(sql.toString(),
@ -727,6 +672,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
// *** // ***
if (log.isLoggable(Level.FINEST))
log.finest(m_columnName + " (Table) " + sql.toString()); log.finest(m_columnName + " (Table) " + sql.toString());
return MRole.getDefault().addAccessSQL(sql.toString(), return MRole.getDefault().addAccessSQL(sql.toString(),
@ -799,6 +745,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
if (wc != null && wc.length() > 0) if (wc != null && wc.length() > 0)
retValue.append(" AND ").append(wc); retValue.append(" AND ").append(wc);
// *** // ***
if (log.isLoggable(Level.FINEST))
log.finest(m_columnName + " (TableDir) " + sql.toString()); log.finest(m_columnName + " (TableDir) " + sql.toString());
return MRole.getDefault().addAccessSQL(retValue.toString(), return MRole.getDefault().addAccessSQL(retValue.toString(),
m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
@ -835,6 +782,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
log.severe(getColumnName() + " - Cannot Parse=" + whereClause); log.severe(getColumnName() + " - Cannot Parse=" + whereClause);
else else
{ {
if (log.isLoggable(Level.FINE))
log.fine(getColumnName() + " - Parsed: " + validated); log.fine(getColumnName() + " - Parsed: " + validated);
return validated; return validated;
} }

View File

@ -13,6 +13,14 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.factory; package org.adempiere.webui.factory;
import org.adempiere.webui.info.InfoAssetWindow;
import org.adempiere.webui.info.InfoAssignmentWindow;
import org.adempiere.webui.info.InfoBPartnerWindow;
import org.adempiere.webui.info.InfoInOutWindow;
import org.adempiere.webui.info.InfoInvoiceWindow;
import org.adempiere.webui.info.InfoOrderWindow;
import org.adempiere.webui.info.InfoPaymentWindow;
import org.adempiere.webui.info.InfoProductWindow;
import org.adempiere.webui.info.InfoWindow; import org.adempiere.webui.info.InfoWindow;
import org.adempiere.webui.panel.InfoAssetPanel; import org.adempiere.webui.panel.InfoAssetPanel;
import org.adempiere.webui.panel.InfoAssignmentPanel; import org.adempiere.webui.panel.InfoAssignmentPanel;
@ -38,45 +46,68 @@ public class DefaultInfoFactory implements IInfoFactory {
@Override @Override
public InfoPanel create(int WindowNo, String tableName, String keyColumn, public InfoPanel create(int WindowNo, String tableName, String keyColumn,
String value, boolean multiSelection, String whereClause, boolean lookup) { String value, boolean multiSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup) {
InfoPanel info = null; InfoPanel info = null;
//TODO: info window for c_bpartner, m_product, c_invoice, a_asset, c_order, m_inout, c_payment and resource if (tableName.equals("C_BPartner")) {
if (tableName.equals("C_BPartner")) info = new InfoBPartnerWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoBPartnerPanel (value,WindowNo, !Env.getContext(Env.getCtx(),"IsSOTrx").equals("N"), info = new InfoBPartnerPanel (value,WindowNo, !Env.getContext(Env.getCtx(),"IsSOTrx").equals("N"),
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else if (tableName.equals("M_Product")) }
} else if (tableName.equals("M_Product")) {
info = new InfoProductWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoProductPanel ( WindowNo, info = new InfoProductPanel ( WindowNo,
Env.getContextAsInt(Env.getCtx(), WindowNo, "M_Warehouse_ID"), Env.getContextAsInt(Env.getCtx(), WindowNo, "M_Warehouse_ID"),
Env.getContextAsInt(Env.getCtx(), WindowNo, "M_PriceList_ID"), Env.getContextAsInt(Env.getCtx(), WindowNo, "M_PriceList_ID"),
multiSelection, value,whereClause, lookup); multiSelection, value,whereClause, lookup);
else if (tableName.equals("C_Invoice")) }
} else if (tableName.equals("C_Invoice")) {
info = new InfoInvoiceWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoInvoicePanel ( WindowNo, value, info = new InfoInvoicePanel ( WindowNo, value,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else if (tableName.equals("A_Asset")) }
} else if (tableName.equals("A_Asset")) {
info = new InfoAssetWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoAssetPanel (WindowNo, 0, value, info = new InfoAssetPanel (WindowNo, 0, value,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else if (tableName.equals("C_Order")) }
} else if (tableName.equals("C_Order")) {
info = new InfoOrderWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoOrderPanel ( WindowNo, value, info = new InfoOrderPanel ( WindowNo, value,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else if (tableName.equals("M_InOut")) }
} else if (tableName.equals("M_InOut")) {
info = new InfoInOutWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoInOutPanel (WindowNo, value, info = new InfoInOutPanel (WindowNo, value,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else if (tableName.equals("C_Payment")) }
} else if (tableName.equals("C_Payment")) {
info = new InfoPaymentWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoPaymentPanel (WindowNo, value, multiSelection, whereClause, lookup); info = new InfoPaymentPanel (WindowNo, value, multiSelection, whereClause, lookup);
else if (tableName.equals("C_CashLine")) }
} else if (tableName.equals("C_CashLine")) {
info = new InfoCashLinePanel (WindowNo, value, info = new InfoCashLinePanel (WindowNo, value,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else if (tableName.equals("S_ResourceAssigment")) } else if (tableName.equals("S_ResourceAssigment")) {
info = new InfoAssignmentWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoAssignmentPanel (WindowNo, value, info = new InfoAssignmentPanel (WindowNo, value,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
else { }
// info = new InfoWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, lookup); } else {
// if (!((InfoWindow)info).loadedOK()) { info = new InfoWindow(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, AD_InfoWindow_ID);
if (!info.loadedOK()) {
info = new InfoGeneralPanel (value, WindowNo, info = new InfoGeneralPanel (value, WindowNo,
tableName, keyColumn, tableName, keyColumn,
multiSelection, whereClause, lookup); multiSelection, whereClause, lookup);
// } }
} }
// //
return info; return info;
@ -85,20 +116,20 @@ public class DefaultInfoFactory implements IInfoFactory {
@Override @Override
public InfoPanel create(Lookup lookup, GridField field, String tableName, public InfoPanel create(Lookup lookup, GridField field, String tableName,
String keyColumn, String queryValue, boolean multiSelection, String keyColumn, String queryValue, boolean multiSelection,
String whereClause) { String whereClause, int AD_InfoWindow_ID) {
InfoPanel info = null; InfoPanel info = null;
String col = lookup.getColumnName(); // fully qualified name String col = lookup.getColumnName(); // fully qualified name
if (col.indexOf('.') != -1) if (col.indexOf('.') != -1)
col = col.substring(col.indexOf('.')+1); col = col.substring(col.indexOf('.')+1);
if (col.equals("M_Product_ID")) if (col.equals("M_Product_ID"))
{ {
//TODO: Product info window InfoWindow infoWindow = new InfoProductWindow(lookup.getWindowNo(), tableName, keyColumn, queryValue, multiSelection, whereClause, AD_InfoWindow_ID);
/* if (infoWindow.loadedOK())
InfoWindow infoWindow = new InfoWindow(lookup.getWindowNo(), tableName, keyColumn, value, multiSelection, whereClause);
if (infoWindow.loadedOk())
return infoWindow; return infoWindow;
*/
// Reset // Reset
Env.setContext(Env.getCtx(), lookup.getWindowNo(), Env.TAB_INFO, "M_Product_ID", "0"); Env.setContext(Env.getCtx(), lookup.getWindowNo(), Env.TAB_INFO, "M_Product_ID", "0");
Env.setContext(Env.getCtx(), lookup.getWindowNo(), Env.TAB_INFO, "M_AttributeSetInstance_ID", "0"); Env.setContext(Env.getCtx(), lookup.getWindowNo(), Env.TAB_INFO, "M_AttributeSetInstance_ID", "0");
@ -115,12 +146,10 @@ public class DefaultInfoFactory implements IInfoFactory {
} }
else if (col.equals("C_BPartner_ID")) else if (col.equals("C_BPartner_ID"))
{ {
//TODO: BPartner info window InfoWindow infoWindow = new InfoBPartnerWindow(lookup.getWindowNo(), tableName, keyColumn, queryValue, multiSelection, whereClause, AD_InfoWindow_ID);
/* if (infoWindow.loadedOK())
InfoWindow infoWindow = new InfoWindow(lookup.getWindowNo(), tableName, keyColumn, multiSelection, whereClause);
if (infoWindow.isValid())
return infoWindow; return infoWindow;
*/
boolean isSOTrx = true; // default boolean isSOTrx = true; // default
if (Env.getContext(Env.getCtx(), lookup.getWindowNo(), "IsSOTrx").equals("N")) if (Env.getContext(Env.getCtx(), lookup.getWindowNo(), "IsSOTrx").equals("N"))
@ -131,7 +160,7 @@ public class DefaultInfoFactory implements IInfoFactory {
} }
else // General Info else // General Info
{ {
info = create(lookup.getWindowNo(), tableName, keyColumn, queryValue, false, whereClause, true); info = create(lookup.getWindowNo(), tableName, keyColumn, queryValue, false, whereClause, AD_InfoWindow_ID, true);
} }
return info; return info;
} }

View File

@ -26,9 +26,9 @@ public interface IInfoFactory {
public InfoPanel create (int WindowNo, public InfoPanel create (int WindowNo,
String tableName, String keyColumn, String value, String tableName, String keyColumn, String value,
boolean multiSelection, String whereClause, boolean lookup); boolean multiSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup);
public InfoPanel create (Lookup lookup, GridField field, public InfoPanel create (Lookup lookup, GridField field,
String tableName, String keyColumn, String value, String tableName, String keyColumn, String value,
boolean multiSelection, String whereClause); boolean multiSelection, String whereClause, int AD_InfoWindow_ID);
} }

View File

@ -19,6 +19,7 @@ import org.adempiere.base.Service;
import org.adempiere.webui.panel.InfoPanel; import org.adempiere.webui.panel.InfoPanel;
import org.compiere.model.GridField; import org.compiere.model.GridField;
import org.compiere.model.Lookup; import org.compiere.model.Lookup;
import org.compiere.model.MLookup;
/** /**
* *
@ -36,7 +37,7 @@ public class InfoManager
List<IInfoFactory> factoryList = Service.locator().list(IInfoFactory.class).getServices(); List<IInfoFactory> factoryList = Service.locator().list(IInfoFactory.class).getServices();
for(IInfoFactory factory : factoryList) for(IInfoFactory factory : factoryList)
{ {
info = factory.create(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, lookup); info = factory.create(WindowNo, tableName, keyColumn, value, multiSelection, whereClause, 0, lookup);
if (info != null) if (info != null)
break; break;
} }
@ -49,10 +50,15 @@ public class InfoManager
String whereClause) String whereClause)
{ {
InfoPanel ip = null; InfoPanel ip = null;
int AD_InfoWindow_ID = 0;
if (lookup instanceof MLookup)
{
AD_InfoWindow_ID = ((MLookup)lookup).getAD_InfoWindow_ID();
}
List<IInfoFactory> factoryList = Service.locator().list(IInfoFactory.class).getServices(); List<IInfoFactory> factoryList = Service.locator().list(IInfoFactory.class).getServices();
for(IInfoFactory factory : factoryList) for(IInfoFactory factory : factoryList)
{ {
ip = factory.create(lookup, field, tableName, keyColumn, queryValue, false, whereClause); ip = factory.create(lookup, field, tableName, keyColumn, queryValue, false, whereClause, AD_InfoWindow_ID);
if (ip != null) if (ip != null)
break; break;
} }

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoAssetWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 623767863373135404L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoAssetWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoAssetWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoAssignmentWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = -5726562881863657609L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoAssignmentWindow(int WindowNo, String tableName,
String keyColumn, String queryValue, boolean multipleSelection,
String whereClause, int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoAssignmentWindow(int WindowNo, String tableName,
String keyColumn, String queryValue, boolean multipleSelection,
String whereClause, int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoBPartnerWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = -8994747783253141939L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoBPartnerWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoBPartnerWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoInOutWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 3027121642718090785L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoInOutWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoInOutWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoInvoiceWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 3413423439591833575L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoInvoiceWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoInvoiceWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoOrderWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 1241927188305227636L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoOrderWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoOrderWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoPAttributeInstanceWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 8387016462564425684L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoPAttributeInstanceWindow(int WindowNo, String tableName,
String keyColumn, String queryValue, boolean multipleSelection,
String whereClause, int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoPAttributeInstanceWindow(int WindowNo, String tableName,
String keyColumn, String queryValue, boolean multipleSelection,
String whereClause, int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoPAttributeWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = -4554543873526769338L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoPAttributeWindow(int WindowNo, String tableName,
String keyColumn, String queryValue, boolean multipleSelection,
String whereClause, int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoPAttributeWindow(int WindowNo, String tableName,
String keyColumn, String queryValue, boolean multipleSelection,
String whereClause, int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,52 @@
/**
*
*/
package org.adempiere.webui.info;
/**
* @author hengsin
*
*/
public class InfoPaymentWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 1322780214387328688L;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoPaymentWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID);
// TODO Auto-generated constructor stub
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoPaymentWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
// TODO Auto-generated constructor stub
}
}

View File

@ -0,0 +1,799 @@
/**
*
*/
package org.adempiere.webui.info;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Vector;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListItem;
import org.adempiere.webui.component.ListModelTable;
import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.Tab;
import org.adempiere.webui.component.Tabbox;
import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.session.SessionManager;
import org.compiere.minigrid.ColumnInfo;
import org.compiere.model.MDocType;
import org.compiere.model.MRole;
import org.compiere.util.CLogMgt;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Center;
import org.zkoss.zul.South;
/**
* @author hengsin
*
*/
public class InfoProductWindow extends InfoWindow {
/**
*
*/
private static final long serialVersionUID = 4939032152860189380L;
private Label lblWarehouse;
private Listbox pickWarehouse;
private Label lblPriceList;
private Listbox pickPriceList;
private Tabbox tabbedPane;
private WListbox warehouseTbl;
private String m_sqlWarehouse;
private WListbox substituteTbl;
private String m_sqlSubstitute;
private WListbox relatedTbl;
private String m_sqlRelated;
//Available to Promise Tab
private WListbox m_tableAtp;
//IDEMPIERE-337
private WListbox productpriceTbl;
private String m_sqlProductprice;
private Textbox fieldDescription;
/** ASI */
private int m_M_AttributeSetInstance_ID;
private Borderlayout contentBorderLayout;
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
*/
public InfoProductWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID) {
this(WindowNo, tableName, keyColumn, queryValue, multipleSelection, whereClause, AD_InfoWindow_ID, true);
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param queryValue
* @param multipleSelection
* @param whereClause
* @param AD_InfoWindow_ID
* @param lookup
*/
public InfoProductWindow(int WindowNo, String tableName, String keyColumn,
String queryValue, boolean multipleSelection, String whereClause,
int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, queryValue, multipleSelection,
whereClause, AD_InfoWindow_ID, lookup);
}
@Override
protected String getSQLWhere() {
StringBuilder where = new StringBuilder(super.getSQLWhere());
return where.toString();
}
@Override
protected void createParameterPanel() {
super.createParameterPanel();
initParameters();
addSearchParameter(lblWarehouse, pickWarehouse);
}
@Override
protected void renderContentPane(Center center) {
ColumnInfo[] s_layoutWarehouse = new ColumnInfo[]{
new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "Warehouse", String.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "sum(QtyAvailable)", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "sum(QtyOnHand)", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "sum(QtyReserved)", Double.class)};
/** From Clause */
String s_sqlFrom = " M_PRODUCT_STOCK_V ";
/** Where Clause */
String s_sqlWhere = "Value = ?";
warehouseTbl = ListboxFactory.newDataTable();
m_sqlWarehouse = warehouseTbl.prepareTable(s_layoutWarehouse, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_STOCK_V");
m_sqlWarehouse += " GROUP BY Warehouse";
warehouseTbl.setMultiSelection(false);
warehouseTbl.setShowTotals(true);
warehouseTbl.autoSize();
warehouseTbl.getModel().addTableModelListener(this);
ColumnInfo[] s_layoutSubstitute = new ColumnInfo[]{
new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class),
new ColumnInfo(
Msg.translate(Env.getCtx(), "Value"),
"(Select Value from M_Product p where p.M_Product_ID=M_PRODUCT_SUBSTITUTERELATED_V.Substitute_ID)",
String.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "PriceStd", Double.class)};
s_sqlFrom = "M_PRODUCT_SUBSTITUTERELATED_V";
s_sqlWhere = "M_Product_ID = ? AND M_PriceList_Version_ID = ? and RowType = 'S'";
substituteTbl = ListboxFactory.newDataTable();
m_sqlSubstitute = substituteTbl.prepareTable(s_layoutSubstitute, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
substituteTbl.setMultiSelection(false);
substituteTbl.autoSize();
substituteTbl.getModel().addTableModelListener(this);
ColumnInfo[] s_layoutRelated = new ColumnInfo[]{
new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class),
new ColumnInfo(
Msg.translate(Env.getCtx(), "Value"),
"(Select Value from M_Product p where p.M_Product_ID=M_PRODUCT_SUBSTITUTERELATED_V.Substitute_ID)",
String.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class),
new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "PriceStd", Double.class)};
s_sqlFrom = "M_PRODUCT_SUBSTITUTERELATED_V";
s_sqlWhere = "M_Product_ID = ? AND M_PriceList_Version_ID = ? and RowType = 'R'";
relatedTbl = ListboxFactory.newDataTable();
m_sqlRelated = relatedTbl.prepareTable(s_layoutRelated, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
relatedTbl.setMultiSelection(false);
relatedTbl.autoSize();
relatedTbl.getModel().addTableModelListener(this);
//Available to Promise Tab
m_tableAtp = ListboxFactory.newDataTable();
m_tableAtp.setMultiSelection(false);
//IDEMPIERE-337
ArrayList<ColumnInfo> list = new ArrayList<ColumnInfo>();
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "PriceListVersion"), "plv.Name", String.class));
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "ValidFrom"), "plv.ValidFrom", Timestamp.class));
if (MRole.getDefault().isColumnAccess(251 /*M_ProductPrice*/, 3027/*PriceList*/, false))
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "PriceList"), "bomPriceList(pp.M_Product_ID, pp.M_PriceList_Version_ID) AS PriceList", Double.class));
if (MRole.getDefault().isColumnAccess(251 /*M_ProductPrice*/, 3028/*PriceStd*/, false))
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "bomPriceStd(pp.M_Product_ID, pp.M_PriceList_Version_ID) AS PriceStd", Double.class));
if (MRole.getDefault().isColumnAccess(251 /*M_ProductPrice*/, 3028/*PriceStd*/, false) && MRole.getDefault().isColumnAccess(251 /*M_ProductPrice*/, 3029/*PriceLimit*/, false))
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "Margin"), "bomPriceStd(pp.M_Product_ID, pp.M_PriceList_Version_ID)-bomPriceLimit(pp.M_Product_ID, pp.M_PriceList_Version_ID) AS Margin", Double.class));
if (MRole.getDefault().isColumnAccess(251 /*M_ProductPrice*/, 3029/*PriceLimit*/, false))
list.add(new ColumnInfo(Msg.translate(Env.getCtx(), "PriceLimit"), "bomPriceLimit(pp.M_Product_ID, pp.M_PriceList_Version_ID) AS PriceLimit", Double.class));
ColumnInfo[] s_layoutProductPrice = new ColumnInfo[list.size()];
list.toArray(s_layoutProductPrice);
s_sqlFrom = "M_ProductPrice pp INNER JOIN M_PriceList_Version plv ON (pp.M_PriceList_Version_ID = plv.M_PriceList_Version_ID)";
s_sqlWhere = "pp.M_Product_ID = ? AND plv.IsActive = 'Y' AND pp.IsActive = 'Y'";
productpriceTbl = ListboxFactory.newDataTable();
m_sqlProductprice = productpriceTbl.prepareTable(s_layoutProductPrice, s_sqlFrom, s_sqlWhere, false, "pp") + " ORDER BY plv.ValidFrom DESC";
productpriceTbl.setMultiSelection(false);
productpriceTbl.autoSize();
productpriceTbl.getModel().addTableModelListener(this);
tabbedPane = new Tabbox();
tabbedPane.setHeight("100%");
Tabpanels tabPanels = new Tabpanels();
tabbedPane.appendChild(tabPanels);
Tabs tabs = new Tabs();
tabbedPane.appendChild(tabs);
Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Warehouse")));
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(warehouseTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Description"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
fieldDescription = new Textbox();
fieldDescription.setMultiline(true);
fieldDescription.setReadonly(true);
fieldDescription.setHflex("1");
fieldDescription.setWidth("99%");
fieldDescription.setHeight("99%");
desktopTabPanel.appendChild(fieldDescription);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Substitute_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(substituteTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(relatedTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.getMsg(Env.getCtx(), "ATP"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(m_tableAtp);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Price"));
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(productpriceTbl);
tabPanels.appendChild(desktopTabPanel);
//
int height = SessionManager.getAppDesktop().getClientInfo().desktopHeight * 90 / 100;
// int width = SessionManager.getAppDesktop().getClientInfo().desktopWidth * 80 / 100;
contentBorderLayout = new Borderlayout();
contentBorderLayout.setWidth("100%");
contentBorderLayout.setHeight("100%");
if (isLookup())
contentBorderLayout.setStyle("border: none; position: relative; ");
else
contentBorderLayout.setStyle("border: none; position: absolute; ");
contentBorderLayout.appendCenter(contentPanel);
//true will conflict with listbox scrolling
contentBorderLayout.getCenter().setAutoscroll(false);
South south = new South();
int detailHeight = (height * 25 / 100);
south.setHeight(detailHeight + "px");
south.setCollapsible(true);
south.setSplittable(true);
south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
south.setTooltiptext(Msg.translate(Env.getCtx(), "WarehouseStock"));
contentBorderLayout.appendChild(south);
tabbedPane.setSclass("info-product-tabbedpane");
south.appendChild(tabbedPane);
tabbedPane.setVflex("1");
tabbedPane.setHflex("1");
center.appendChild(contentBorderLayout);
contentPanel.addActionListener(new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
int row = contentPanel.getSelectedRow();
if (row >= 0) {
int M_Warehouse_ID = 0;
ListItem listitem = pickWarehouse.getSelectedItem();
if (listitem != null)
M_Warehouse_ID = (Integer)listitem.getValue();
int M_PriceList_Version_ID = 0;
listitem = pickPriceList.getSelectedItem();
if (listitem != null)
M_PriceList_Version_ID = (Integer)listitem.getValue();
for(int i = 0; i < columnInfos.length; i++) {
if (columnInfos[i].getGridField() != null && columnInfos[i].getGridField().getColumnName().equals("Value")) {
refresh(contentPanel.getValueAt(row,i), M_Warehouse_ID, M_PriceList_Version_ID);
contentBorderLayout.getSouth().setOpen(true);
break;
}
}
}
}
});
}
private void initParameters() {
lblWarehouse = new Label();
lblWarehouse.setValue(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Warehouse")));
pickWarehouse = new Listbox();
pickWarehouse.setMultiple(false);
pickWarehouse.setMold("select");
pickWarehouse.setHflex("1");
pickWarehouse.addEventListener(Events.ON_SELECT, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
ListItem item = InfoProductWindow.this.pickWarehouse.getSelectedItem();
if (item != null && item.getValue() != null) {
Env.setContext(infoContext, p_WindowNo, "Pick_Warehouse_ID", item.getValue().toString());
} else {
Env.setContext(infoContext, p_WindowNo, "Pick_Warehouse_ID", "0");
}
}
});
pickWarehouse.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "warehouse");
// Warehouse
String sql = MRole.getDefault().addAccessSQL (
"SELECT M_Warehouse_ID, Value || ' - ' || Name AS ValueName "
+ "FROM M_Warehouse "
+ "WHERE IsActive='Y'",
"M_Warehouse", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO)
+ " ORDER BY Value";
pickWarehouse.appendItem("", new Integer(0));
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = DB.prepareStatement(sql, null);
rs = pstmt.executeQuery();
while (rs.next())
{
pickWarehouse.appendItem(rs.getString("ValueName"), new Integer(rs.getInt("M_Warehouse_ID")));
}
} catch (SQLException e) {
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} finally {
DB.close(rs, pstmt);
}
lblPriceList = new Label();
lblPriceList.setValue(Msg.getMsg(Env.getCtx(), "PriceListVersion"));
pickPriceList = new Listbox();
pickPriceList.setMultiple(false);
pickPriceList.setMold("select");
pickPriceList.setHflex("1");
pickPriceList.addEventListener(Events.ON_SELECT, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
ListItem item = InfoProductWindow.this.pickPriceList.getSelectedItem();
if (item != null && item.getValue() != null) {
Env.setContext(infoContext, p_WindowNo, "Pick_PriceList_ID", item.getValue().toString());
} else {
Env.setContext(infoContext, p_WindowNo, "Pick_PriceList_ID", "0");
}
}
});
pickPriceList.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "priceList");
addSearchParameter(lblPriceList, pickPriceList);
int M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "M_Warehouse_ID");
int M_PriceList_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "M_PriceList_ID");
fillPickPriceList(M_PriceList_ID);
int M_PriceList_Version_ID = findPLV (M_PriceList_ID);
// Set Warehouse
if (M_Warehouse_ID == 0)
M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID");
if (M_Warehouse_ID != 0)
setWarehouse (M_Warehouse_ID);
// Set PriceList Version
if (M_PriceList_Version_ID != 0)
setPriceListVersion (M_PriceList_Version_ID);
}
/**
* Find Price List Version and update context
*
* @param M_PriceList_ID price list
* @return M_PriceList_Version_ID price list version
*/
private int findPLV (int M_PriceList_ID)
{
Timestamp priceDate = null;
// Sales Order Date
String dateStr = Env.getContext(Env.getCtx(), p_WindowNo, "DateOrdered");
if (dateStr != null && dateStr.length() > 0)
priceDate = Env.getContextAsDate(Env.getCtx(), p_WindowNo, "DateOrdered");
else // Invoice Date
{
dateStr = Env.getContext(Env.getCtx(), p_WindowNo, "DateInvoiced");
if (dateStr != null && dateStr.length() > 0)
priceDate = Env.getContextAsDate(Env.getCtx(), p_WindowNo, "DateInvoiced");
}
// Today
if (priceDate == null)
priceDate = new Timestamp(System.currentTimeMillis());
//
if (log.isLoggable(Level.CONFIG))
log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate);
int retValue = 0;
String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom "
+ "FROM M_PriceList pl, M_PriceList_Version plv "
+ "WHERE pl.M_PriceList_ID=plv.M_PriceList_ID"
+ " AND plv.IsActive='Y'"
+ " AND pl.M_PriceList_ID=? " // 1
+ "ORDER BY plv.ValidFrom DESC";
// find newest one
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, M_PriceList_ID);
rs = pstmt.executeQuery();
while (rs.next() && retValue == 0)
{
Timestamp plDate = rs.getTimestamp(2);
if (!priceDate.before(plDate))
retValue = rs.getInt(1);
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
Env.setContext(Env.getCtx(), p_WindowNo, "M_PriceList_Version_ID", retValue);
return retValue;
} // findPLV
/**
* Set Warehouse
*
* @param M_Warehouse_ID warehouse
*/
private void setWarehouse(int M_Warehouse_ID)
{
for (int i = 0; i < pickWarehouse.getItemCount(); i++)
{
Integer key = (Integer) pickWarehouse.getItemAtIndex(i).getValue();
if (key == M_Warehouse_ID)
{
pickWarehouse.setSelectedIndex(i);
Env.setContext(infoContext, p_WindowNo, "Pick_Warehouse_ID", M_Warehouse_ID);
return;
}
}
} // setWarehouse
/**
* Set PriceList
*
* @param M_PriceList_Version_ID price list
*/
private void setPriceListVersion(int M_PriceList_Version_ID)
{
if (log.isLoggable(Level.CONFIG))
log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID);
for (int i = 0; i < pickPriceList.getItemCount(); i++)
{
Integer key = (Integer) pickPriceList.getItemAtIndex(i).getValue();
if (key == M_PriceList_Version_ID)
{
pickPriceList.setSelectedIndex(i);
Env.setContext(infoContext, "Pick_PriceList_Version_ID", M_PriceList_Version_ID);
return;
}
}
if (log.isLoggable(Level.FINE))
log.fine("NOT found");
} // setPriceListVersion
/**
* Refresh Query
*/
private void refresh(Object obj, int M_Warehouse_ID, int M_PriceList_Version_ID)
{
//int M_Product_ID = 0;
String sql = m_sqlWarehouse;
if (log.isLoggable(Level.FINEST))
log.finest(sql);
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setString(1, (String)obj);
rs = pstmt.executeQuery();
warehouseTbl.loadTable(rs);
}
catch (Exception e)
{
log.log(Level.WARNING, sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
int m_M_Product_ID = getSelectedRowKey();
sql = "SELECT DocumentNote FROM M_Product WHERE M_Product_ID=?";
fieldDescription.setText(DB.getSQLValueString(null, sql, m_M_Product_ID));
sql = m_sqlSubstitute;
if (log.isLoggable(Level.FINEST))
log.finest(sql);
try {
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, M_PriceList_Version_ID);
rs = pstmt.executeQuery();
substituteTbl.loadTable(rs);
} catch (Exception e) {
log.log(Level.WARNING, sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
sql = m_sqlRelated;
if (log.isLoggable(Level.FINEST))
log.finest(sql);
try {
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, m_M_Product_ID);
pstmt.setInt(2, M_PriceList_Version_ID);
rs = pstmt.executeQuery();
relatedTbl.loadTable(rs);
} catch (Exception e) {
log.log(Level.WARNING, sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
initAtpTab(M_Warehouse_ID, m_M_Product_ID);
//IDEMPIERE-337
sql = m_sqlProductprice;
if (log.isLoggable(Level.FINEST))
log.finest(sql);
try {
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, m_M_Product_ID);
rs = pstmt.executeQuery();
productpriceTbl.loadTable(rs);
} catch (Exception e) {
log.log(Level.WARNING, sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
} // refresh
// Elaine 2008/11/26
/**
* Query ATP
* @param m_M_Warehouse_ID
* @param m_M_Product_ID
*/
private void initAtpTab (int m_M_Warehouse_ID, int m_M_Product_ID)
{
// Header
Vector<String> columnNames = new Vector<String>();
columnNames.add(Msg.translate(Env.getCtx(), "Date"));
columnNames.add(Msg.translate(Env.getCtx(), "QtyOnHand"));
columnNames.add(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
columnNames.add(Msg.translate(Env.getCtx(), "QtyOrdered"));
columnNames.add(Msg.translate(Env.getCtx(), "QtyReserved"));
columnNames.add(Msg.translate(Env.getCtx(), "M_Locator_ID"));
columnNames.add(Msg.translate(Env.getCtx(), "M_AttributeSetInstance_ID"));
columnNames.add(Msg.translate(Env.getCtx(), "DocumentNo"));
columnNames.add(Msg.translate(Env.getCtx(), "M_Warehouse_ID"));
// Fill Storage Data
boolean showDetail = CLogMgt.isLevelFine();
String sql = "SELECT s.QtyOnHand, s.QtyReserved, s.QtyOrdered,"
+ " productAttribute(s.M_AttributeSetInstance_ID), s.M_AttributeSetInstance_ID,";
if (!showDetail)
sql = "SELECT SUM(s.QtyOnHand), SUM(s.QtyReserved), SUM(s.QtyOrdered),"
+ " productAttribute(s.M_AttributeSetInstance_ID), 0,";
sql += " w.Name, l.Value "
+ "FROM M_Storage s"
+ " INNER JOIN M_Locator l ON (s.M_Locator_ID=l.M_Locator_ID)"
+ " INNER JOIN M_Warehouse w ON (l.M_Warehouse_ID=w.M_Warehouse_ID) "
+ "WHERE M_Product_ID=?";
if (m_M_Warehouse_ID != 0)
sql += " AND l.M_Warehouse_ID=?";
if (m_M_AttributeSetInstance_ID > 0)
sql += " AND s.M_AttributeSetInstance_ID=?";
sql += " AND (s.QtyOnHand<>0 OR s.QtyReserved<>0 OR s.QtyOrdered<>0)";
if (!showDetail)
sql += " GROUP BY productAttribute(s.M_AttributeSetInstance_ID), w.Name, l.Value";
sql += " ORDER BY l.Value";
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
double qty = 0;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, m_M_Product_ID);
if (m_M_Warehouse_ID != 0)
pstmt.setInt(2, m_M_Warehouse_ID);
if (m_M_AttributeSetInstance_ID > 0)
pstmt.setInt(3, m_M_AttributeSetInstance_ID);
rs = pstmt.executeQuery();
while (rs.next())
{
Vector<Object> line = new Vector<Object>(9);
line.add(null); // Date
double qtyOnHand = rs.getDouble(1);
qty += qtyOnHand;
line.add(new Double(qtyOnHand)); // Qty
line.add(null); // BPartner
line.add(new Double(rs.getDouble(3))); // QtyOrdered
line.add(new Double(rs.getDouble(2))); // QtyReserved
line.add(rs.getString(7)); // Locator
String asi = rs.getString(4);
if (showDetail && (asi == null || asi.length() == 0))
asi = "{" + rs.getInt(5) + "}";
line.add(asi); // ASI
line.add(null); // DocumentNo
line.add(rs.getString(6)); // Warehouse
data.add(line);
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);
}
finally {
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
// Orders
sql = "SELECT o.DatePromised, ol.QtyReserved,"
+ " productAttribute(ol.M_AttributeSetInstance_ID), ol.M_AttributeSetInstance_ID,"
+ " dt.DocBaseType, bp.Name,"
+ " dt.PrintName || ' ' || o.DocumentNo As DocumentNo, w.Name "
+ "FROM C_Order o"
+ " INNER JOIN C_OrderLine ol ON (o.C_Order_ID=ol.C_Order_ID)"
+ " INNER JOIN C_DocType dt ON (o.C_DocType_ID=dt.C_DocType_ID)"
+ " INNER JOIN M_Warehouse w ON (ol.M_Warehouse_ID=w.M_Warehouse_ID)"
+ " INNER JOIN C_BPartner bp ON (o.C_BPartner_ID=bp.C_BPartner_ID) "
+ "WHERE ol.QtyReserved<>0"
+ " AND ol.M_Product_ID=?";
if (m_M_Warehouse_ID != 0)
sql += " AND ol.M_Warehouse_ID=?";
if (m_M_AttributeSetInstance_ID > 0)
sql += " AND ol.M_AttributeSetInstance_ID=?";
sql += " ORDER BY o.DatePromised";
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, m_M_Product_ID);
if (m_M_Warehouse_ID != 0)
pstmt.setInt(2, m_M_Warehouse_ID);
if (m_M_AttributeSetInstance_ID > 0)
pstmt.setInt(3, m_M_AttributeSetInstance_ID);
rs = pstmt.executeQuery();
while (rs.next())
{
Vector<Object> line = new Vector<Object>(9);
line.add(rs.getTimestamp(1)); // Date
double oq = rs.getDouble(2);
String DocBaseType = rs.getString(5);
Double qtyReserved = null;
Double qtyOrdered = null;
if (MDocType.DOCBASETYPE_PurchaseOrder.equals(DocBaseType))
{
qtyOrdered = new Double(oq);
qty += oq;
}
else
{
qtyReserved = new Double(oq);
qty -= oq;
}
line.add(new Double(qty)); // Qty
line.add(rs.getString(6)); // BPartner
line.add(qtyOrdered); // QtyOrdered
line.add(qtyReserved); // QtyReserved
line.add(null); // Locator
String asi = rs.getString(3);
if (showDetail && (asi == null || asi.length() == 0))
asi = "{" + rs.getInt(4) + "}";
line.add(asi); // ASI
line.add(rs.getString(7)); // DocumentNo
line.add(rs.getString(8)); // Warehouse
data.add(line);
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);
}
finally {
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
// Table
ListModelTable model = new ListModelTable(data);
m_tableAtp.setData(model, columnNames);
//
m_tableAtp.setColumnClass(0, Timestamp.class, true); // Date
m_tableAtp.setColumnClass(1, Double.class, true); // Quantity
m_tableAtp.setColumnClass(2, String.class, true); // Partner
m_tableAtp.setColumnClass(3, Double.class, true); // Quantity
m_tableAtp.setColumnClass(4, Double.class, true); // Quantity
m_tableAtp.setColumnClass(5, String.class, true); // Locator
m_tableAtp.setColumnClass(6, String.class, true); // ASI
m_tableAtp.setColumnClass(7, String.class, true); // DocNo
m_tableAtp.setColumnClass(8, String.class, true); // Warehouse
//
m_tableAtp.autoSize();
} // initAtpTab
/**
* Fill Picks with values
*
* @param M_PriceList_ID price list
*/
private void fillPickPriceList (int M_PriceList_ID)
{
// Price List
String SQL = "SELECT M_PriceList_Version.M_PriceList_Version_ID,"
+ " M_PriceList_Version.Name || ' (' || c.Iso_Code || ')' AS ValueName "
+ "FROM M_PriceList_Version, M_PriceList pl, C_Currency c "
+ "WHERE M_PriceList_Version.M_PriceList_ID=pl.M_PriceList_ID"
+ " AND pl.C_Currency_ID=c.C_Currency_ID"
+ " AND M_PriceList_Version.IsActive='Y' AND pl.IsActive='Y'";
// Same PL currency as original one
if (M_PriceList_ID != 0)
SQL += " AND EXISTS (SELECT * FROM M_PriceList xp WHERE xp.M_PriceList_ID=" + M_PriceList_ID
+ " AND pl.C_Currency_ID=xp.C_Currency_ID)";
// Add Access & Order
SQL = MRole.getDefault().addAccessSQL (SQL, "M_PriceList_Version", true, false) // fully qualidfied - RO
+ " ORDER BY M_PriceList_Version.Name";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pickPriceList.appendItem("",new Integer(0));
pstmt = DB.prepareStatement(SQL, null);
rs = pstmt.executeQuery();
while (rs.next())
{
pickPriceList.appendItem(rs.getString(2),new Integer(rs.getInt(1)));
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, SQL, e);
setStatusLine(e.getLocalizedMessage(), true);
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
}
}

View File

@ -9,6 +9,7 @@ import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.Grid;
@ -64,19 +65,20 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
private Borderlayout layout; private Borderlayout layout;
private Vbox southBody; private Vbox southBody;
/** List of WEditors */ /** List of WEditors */
private List<WEditor> editors = null; private List<WEditor> editors;
private Properties infoContext = new Properties(Env.getCtx()); protected Properties infoContext;
/** Max Length of Fields */ /** Max Length of Fields */
public static final int FIELDLENGTH = 20; public static final int FIELDLENGTH = 20;
protected ColumnInfo[] columnInfos = new ColumnInfo[0]; protected ColumnInfo[] columnInfos;
protected MInfoWindow infoWindow; protected MInfoWindow infoWindow;
protected TableInfo[] tableInfos; protected TableInfo[] tableInfos;
protected MInfoColumn[] infoColumns; protected MInfoColumn[] infoColumns;
protected String queryValue; protected String queryValue;
private List<GridField> gridFields = null; private List<GridField> gridFields;
private int AD_InfoWindow_ID;
/** /**
* @param WindowNo * @param WindowNo
@ -86,8 +88,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
* @param whereClause * @param whereClause
*/ */
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue,
boolean multipleSelection, String whereClause) { boolean multipleSelection, String whereClause, int AD_InfoWindow_ID) {
this(WindowNo, tableName, keyColumn, queryValue, multipleSelection, whereClause, true); this(WindowNo, tableName, keyColumn, queryValue, multipleSelection, whereClause, AD_InfoWindow_ID, true);
} }
/** /**
@ -99,16 +101,23 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
* @param lookup * @param lookup
*/ */
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue,
boolean multipleSelection, String whereClause, boolean lookup) { boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup) {
super(WindowNo, tableName, keyColumn, multipleSelection, whereClause, super(WindowNo, tableName, keyColumn, multipleSelection, whereClause,
lookup); lookup);
this.queryValue = queryValue; this.queryValue = queryValue;
this.AD_InfoWindow_ID = AD_InfoWindow_ID;
infoContext = new Properties(Env.getCtx());
p_loadedOK = loadInfoDefinition(); p_loadedOK = loadInfoDefinition();
if (loadedOK()) { if (loadedOK()) {
initUI(); if (isLookup()) {
Env.clearTabContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO);
}
renderWindow();
if (queryValue != null && queryValue.trim().length() > 0) if (queryValue != null && queryValue.trim().length() > 0)
{ {
prepareTable();
processQueryValue(); processQueryValue();
} }
} }
@ -136,10 +145,12 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
} }
private boolean loadInfoDefinition() { private boolean loadInfoDefinition() {
if (p_tableName.startsWith("AD_InfoWindow_ID=")) { if (AD_InfoWindow_ID > 0) {
int AD_InfoWindow_ID = Integer.parseInt(p_tableName.substring("AD_InfoWindow_ID=".length()));
infoWindow = new MInfoWindow(Env.getCtx(), AD_InfoWindow_ID, null); infoWindow = new MInfoWindow(Env.getCtx(), AD_InfoWindow_ID, null);
p_tableName = MTable.getTableName(Env.getCtx(), infoWindow.getAD_Table_ID()); String tableName = MTable.getTableName(Env.getCtx(), infoWindow.getAD_Table_ID());
if (!tableName.equalsIgnoreCase(p_tableName)) {
throw new IllegalArgumentException("AD_InfoWindow.TableName <> TableName argument. ("+tableName + " <> " + p_tableName+")");
}
} else { } else {
infoWindow = MInfoWindow.get(p_tableName, (String)null); infoWindow = MInfoWindow.get(p_tableName, (String)null);
} }
@ -147,10 +158,42 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
if (infoWindow != null) { if (infoWindow != null) {
AccessSqlParser sqlParser = new AccessSqlParser("SELECT * FROM " + infoWindow.getFromClause()); AccessSqlParser sqlParser = new AccessSqlParser("SELECT * FROM " + infoWindow.getFromClause());
tableInfos = sqlParser.getTableInfo(0); tableInfos = sqlParser.getTableInfo(0);
if (tableInfos[0].getSynonym() != null && tableInfos[0].getSynonym().trim().length() > 0) {
p_tableName = tableInfos[0].getSynonym().trim();
if (p_whereClause != null && p_whereClause.trim().length() > 0) {
p_whereClause = p_whereClause.replace(tableInfos[0].getTableName()+".", p_tableName+".");
}
}
infoColumns = infoWindow.getInfoColumns(tableInfos); infoColumns = infoWindow.getInfoColumns(tableInfos);
prepareTable(); gridFields = new ArrayList<GridField>();
for(MInfoColumn infoColumn : infoColumns) {
String columnName = infoColumn.getColumnName();
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
infoColumn.getAD_Reference_Value_ID(), false, false);
if (infoColumn.getAD_Val_Rule_ID() > 0) {
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
}
GridField gridField = new GridField(vo);
gridFields.add(gridField);
}
StringBuilder builder = new StringBuilder(p_whereClause != null ? p_whereClause.trim() : "");
String infoWhereClause = infoWindow.getWhereClause();
if (infoWhereClause != null && infoWhereClause.indexOf("@") >= 0) {
infoWhereClause = Env.parseContext(Env.getCtx(), p_WindowNo, infoWhereClause, false, false);
if (infoWhereClause.length() == 0)
log.log(Level.SEVERE, "Cannot parse context= " + infoWindow.getWhereClause());
}
if (infoWhereClause != null && infoWhereClause.trim().length() > 0) {
if (builder.length() > 0) {
builder.append(" AND ");
}
builder.append(infoWhereClause);
p_whereClause = builder.toString();
}
return true; return true;
} else { } else {
@ -167,17 +210,10 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
String keySelectClause = keyTableAlias+"."+p_keyColumn; String keySelectClause = keyTableAlias+"."+p_keyColumn;
list.add(new ColumnInfo(" ", keySelectClause, IDColumn.class)); list.add(new ColumnInfo(" ", keySelectClause, IDColumn.class));
gridFields = new ArrayList<GridField>(); int i = 0;
for(MInfoColumn infoColumn : infoColumns) for(MInfoColumn infoColumn : infoColumns)
{ {
String columnName = infoColumn.getAD_Element().getColumnName(); if (infoColumn.isDisplayed(infoContext, p_WindowNo))
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
0, false, false);
GridField gridField = new GridField(vo);
gridFields.add(gridField);
//TODO: check display logic using info context
if (infoColumn.isDisplayed())
{ {
ColumnInfo columnInfo = null; ColumnInfo columnInfo = null;
if (infoColumn.getAD_Reference_ID() == DisplayType.ID) if (infoColumn.getAD_Reference_ID() == DisplayType.ID)
@ -195,19 +231,20 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
} }
else else
{ {
columnInfo = createLookupColumnInfo(tableInfos, gridField, infoColumn); columnInfo = createLookupColumnInfo(tableInfos, gridFields.get(i), infoColumn);
} }
} }
else else
{ {
columnInfo = new ColumnInfo(infoColumn.getName(), infoColumn.getSelectClause(), DisplayType.getClass(infoColumn.getAD_Reference_ID(), true)); columnInfo = new ColumnInfo(infoColumn.getName(), infoColumn.getSelectClause(), DisplayType.getClass(infoColumn.getAD_Reference_ID(), true));
} }
columnInfo.setGridField(gridField); columnInfo.setGridField(gridFields.get(i));
list.add(columnInfo); list.add(columnInfo);
} }
i++;
} }
columnInfos = list.toArray(columnInfos); columnInfos = list.toArray(new ColumnInfo[0]);
prepareTable(columnInfos, infoWindow.getFromClause(), p_whereClause, infoWindow.getOtherClause()); prepareTable(columnInfos, infoWindow.getFromClause(), p_whereClause, infoWindow.getOtherClause());
} }
@ -255,12 +292,33 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
@Override @Override
protected String getSQLWhere() { protected String getSQLWhere() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for(WEditor editor : editors) { MTable table = MTable.get(Env.getCtx(), infoWindow.getAD_Table_ID());
if (editor.getValue() != null) { if (table.get_ColumnIndex("IsActive") >=0 ) {
if (builder.length() > 0) { if (p_whereClause != null && p_whereClause.trim().length() > 0) {
builder.append(" AND "); builder.append(" AND ");
} }
builder.append(editor.getColumnName()).append("=?"); builder.append(tableInfos[0].getSynonym()).append(".IsActive='Y'");
}
for(WEditor editor : editors) {
if (editor.getGridField() != null && editor.getValue() != null && editor.getValue().toString().trim().length() > 0) {
if (builder.length() > 0) {
builder.append(" AND ");
} else if (p_whereClause != null && p_whereClause.trim().length() > 0) {
builder.append(" AND ");
}
String columnName = editor.getColumnName();
for(MInfoColumn infoColumn: infoColumns) {
if (columnName.equals(infoColumn.getColumnName())) {
columnName = infoColumn.getSelectClause();
}
}
if (isSearchLike(editor.getGridField())) {
builder.append("UPPER(")
.append(columnName)
.append(") LIKE ?");
} else {
builder.append(columnName).append("=?");
}
} }
} }
return builder.toString(); return builder.toString();
@ -275,7 +333,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
int parameterIndex = 0; int parameterIndex = 0;
for(WEditor editor : editors) { for(WEditor editor : editors) {
Object value = editor.getValue(); Object value = editor.getValue();
if (value != null) { if (value != null && value.toString().trim().length() > 0) {
parameterIndex++; parameterIndex++;
if (value instanceof Boolean) { if (value instanceof Boolean) {
pstmt.setString(parameterIndex, ((Boolean) value).booleanValue() ? "Y" : "N"); pstmt.setString(parameterIndex, ((Boolean) value).booleanValue() ? "Y" : "N");
@ -297,10 +355,28 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
} }
protected void initUI() @Override
{ protected void prepareTable(ColumnInfo[] layout, String from, String where,
initParameterPanel(); String orderBy) {
super.prepareTable(layout, from, where, orderBy);
if (m_sqlMain.indexOf("@") >= 0) {
String sql = Env.parseContext(infoContext, p_WindowNo, m_sqlMain, true);
if (sql == null || sql.length() == 9) {
log.severe("Failed to parsed sql. sql=" + m_sqlMain);
} else {
m_sqlMain = sql;
}
}
if (infoWindow.isDistinct()) {
m_sqlMain = m_sqlMain.substring("SELECT ".length());
m_sqlMain = "SELECT DISTINCT " + m_sqlMain;
}
}
protected void renderWindow()
{
setTitle(infoWindow.get_Translation("Name"));
layout = new Borderlayout(); layout = new Borderlayout();
layout.setWidth("100%"); layout.setWidth("100%");
layout.setHeight("100%"); layout.setHeight("100%");
@ -310,41 +386,51 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
} }
this.appendChild(layout); this.appendChild(layout);
North north = new North();
layout.appendChild(north);
north.appendChild(parameterGrid);
Center center = new Center();
layout.appendChild(center);
Div div = new Div();
div.appendChild(contentPanel);
if (isLookup()) if (isLookup())
contentPanel.setWidth("99%"); contentPanel.setWidth("99%");
else else
contentPanel.setStyle("width: 99%; margin: 0px auto;"); contentPanel.setStyle("width: 99%; margin: 0px auto;");
contentPanel.setVflex(true); contentPanel.setVflex(true);
div.setStyle("width :100%; height: 100%");
center.appendChild(div); North north = new North();
div.setVflex("1"); layout.appendChild(north);
div.setHflex("1"); renderParameterPane(north);
Center center = new Center();
layout.appendChild(center);
renderContentPane(center);
South south = new South(); South south = new South();
layout.appendChild(south); layout.appendChild(south);
renderFooter(south);
}
protected void renderFooter(South south) {
southBody = new Vbox(); southBody = new Vbox();
southBody.setHflex("1"); southBody.setHflex("1");
south.appendChild(southBody); south.appendChild(southBody);
southBody.appendChild(new Separator()); southBody.appendChild(new Separator());
southBody.appendChild(confirmPanel); southBody.appendChild(confirmPanel);
southBody.appendChild(statusBar); southBody.appendChild(statusBar);
if (isLookup()) {
Env.clearTabContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO);
} }
protected void renderContentPane(Center center) {
Div div = new Div();
div.setStyle("width :100%; height: 100%");
div.setVflex("1");
div.setHflex("1");
div.appendChild(contentPanel);
center.appendChild(div);
} }
protected void initParameterPanel() { protected void renderParameterPane(North north) {
createParameterPanel();
north.appendChild(parameterGrid);
}
protected void createParameterPanel() {
parameterGrid = GridFactory.newGridLayout(); parameterGrid = GridFactory.newGridLayout();
parameterGrid.setInnerWidth("auto");
parameterGrid.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "infoParameterPanel"); parameterGrid.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "infoParameterPanel");
Rows rows = new Rows(); Rows rows = new Rows();
@ -433,6 +519,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
for(ColumnInfo columnInfo : columnInfos) for(ColumnInfo columnInfo : columnInfos)
{ {
GridField field = columnInfo.getGridField(); GridField field = columnInfo.getGridField();
if (field == null) continue;
String columnName = field.getColumnName(); String columnName = field.getColumnName();
if (columnInfo.getColClass().equals(KeyNamePair.class)) if (columnInfo.getColClass().equals(KeyNamePair.class))
{ {
@ -453,6 +541,12 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener {
} }
} // saveSelectionDetail } // saveSelectionDetail
@Override
protected void executeQuery() {
prepareTable();
super.executeQuery();
}
private boolean isSearchLike(GridField field) private boolean isSearchLike(GridField field)
{ {
return DisplayType.isText(field.getDisplayType()) return DisplayType.isText(field.getDisplayType())

View File

@ -251,6 +251,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
String whereClause, boolean lookup) String whereClause, boolean lookup)
{ {
if (log.isLoggable(Level.INFO))
log.info("WinNo=" + p_WindowNo + " " + whereClause); log.info("WinNo=" + p_WindowNo + " " + whereClause);
p_WindowNo = WindowNo; p_WindowNo = WindowNo;
p_tableName = tableName; p_tableName = tableName;
@ -349,7 +350,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/** Layout of Grid */ /** Layout of Grid */
protected ColumnInfo[] p_layout; protected ColumnInfo[] p_layout;
/** Main SQL Statement */ /** Main SQL Statement */
private String m_sqlMain; protected String m_sqlMain;
/** Count SQL Statement */ /** Count SQL Statement */
private String m_sqlCount; private String m_sqlCount;
/** Order By Clause */ /** Order By Clause */
@ -626,6 +627,11 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
StringBuilder sql = new StringBuilder (m_sqlMain); StringBuilder sql = new StringBuilder (m_sqlMain);
if (dynWhere.length() > 0) if (dynWhere.length() > 0)
sql.append(dynWhere); // includes first AND sql.append(dynWhere); // includes first AND
if (sql.toString().trim().endsWith("WHERE")) {
int index = sql.lastIndexOf(" WHERE");
sql.delete(index, sql.length());
}
if (m_sqlUserOrder != null && m_sqlUserOrder.trim().length() > 0) if (m_sqlUserOrder != null && m_sqlUserOrder.trim().length() > 0)
sql.append(m_sqlUserOrder); sql.append(m_sqlUserOrder);
else else
@ -637,14 +643,17 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
{ {
dataSql = DB.getDatabase().addPagingSQL(dataSql, cacheStart, cacheEnd); dataSql = DB.getDatabase().addPagingSQL(dataSql, cacheStart, cacheEnd);
} }
if (log.isLoggable(Level.FINER))
log.finer(dataSql); log.finer(dataSql);
try try
{ {
m_pstmt = DB.prepareStatement(dataSql, null); m_pstmt = DB.prepareStatement(dataSql, null);
setParameters (m_pstmt, false); // no count setParameters (m_pstmt, false); // no count
if (log.isLoggable(Level.FINE))
log.fine("Start query - " + (System.currentTimeMillis()-startTime) + "ms"); log.fine("Start query - " + (System.currentTimeMillis()-startTime) + "ms");
m_pstmt.setFetchSize(100); m_pstmt.setFetchSize(100);
m_rs = m_pstmt.executeQuery(); m_rs = m_pstmt.executeQuery();
if (log.isLoggable(Level.FINE))
log.fine("End query - " + (System.currentTimeMillis()-startTime) + "ms"); log.fine("End query - " + (System.currentTimeMillis()-startTime) + "ms");
//skips the row that we dont need if we can't use native db paging //skips the row that we dont need if we can't use native db paging
if (end > start && m_useDatabasePaging && !DB.getDatabase().isPagingSupported()) if (end > start && m_useDatabasePaging && !DB.getDatabase().isPagingSupported())
@ -723,8 +732,13 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
sql.append(dynWhere); // includes first AND sql.append(dynWhere); // includes first AND
String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables
if (countSql.trim().endsWith("WHERE")) {
countSql = countSql.trim();
countSql = countSql.substring(0, countSql.length() - 5);
}
countSql = MRole.getDefault().addAccessSQL (countSql, getTableName(), countSql = MRole.getDefault().addAccessSQL (countSql, getTableName(),
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
if (log.isLoggable(Level.FINER))
log.finer(countSql); log.finer(countSql);
m_count = -1; m_count = -1;
@ -746,6 +760,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
m_count = -2; m_count = -2;
} }
if (log.isLoggable(Level.FINE))
log.fine("#" + m_count + " - " + (System.currentTimeMillis()-start) + "ms"); log.fine("#" + m_count + " - " + (System.currentTimeMillis()-start) + "ms");
return true; return true;
@ -761,6 +776,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
if (contentPanel == null) if (contentPanel == null)
return; return;
if (log.isLoggable(Level.CONFIG))
log.config( "OK=" + m_ok); log.config( "OK=" + m_ok);
if (!m_ok) // did not press OK if (!m_ok) // did not press OK
@ -783,6 +799,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
m_results.add(data); m_results.add(data);
} }
if (log.isLoggable(Level.CONFIG))
log.config(getSelectedSQL()); log.config(getSelectedSQL());
// Save Settings of detail info screens // Save Settings of detail info screens
@ -892,6 +909,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
Object[] keys = getSelectedKeys(); Object[] keys = getSelectedKeys();
if (keys == null || keys.length == 0) if (keys == null || keys.length == 0)
{ {
if (log.isLoggable(Level.CONFIG))
log.config("No Results - OK=" log.config("No Results - OK="
+ m_ok + ", Cancel=" + m_cancel); + m_ok + ", Cancel=" + m_cancel);
return ""; return "";
@ -1253,6 +1271,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
*/ */
public void dispose(boolean ok) public void dispose(boolean ok)
{ {
if (log.isLoggable(Level.CONFIG))
log.config("OK=" + ok); log.config("OK=" + ok);
m_ok = ok; m_ok = ok;