Merge release-7.1 into master
This commit is contained in:
commit
a8ad176e47
|
@ -6,7 +6,8 @@ CREATE OR REPLACE VIEW AD_TAB_V
|
||||||
AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING,
|
AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING,
|
||||||
READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB,
|
READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB,
|
||||||
ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON)
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
AS
|
AS
|
||||||
SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
||||||
t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
@ -16,7 +17,7 @@ SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
||||||
t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
FROM AD_Tab t
|
FROM AD_Tab t
|
||||||
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
WHERE t.IsActive='Y'
|
WHERE t.IsActive='Y'
|
||||||
|
|
|
@ -6,7 +6,8 @@ CREATE OR REPLACE VIEW AD_TAB_VT
|
||||||
ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE,
|
ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE,
|
||||||
COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID,
|
COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID,
|
||||||
ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON)
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
AS
|
AS
|
||||||
SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description,
|
SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description,
|
||||||
trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
@ -16,7 +17,7 @@ SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, tr
|
||||||
t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
FROM AD_Tab t
|
FROM AD_Tab t
|
||||||
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID)
|
INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID)
|
||||||
|
|
|
@ -6,7 +6,8 @@ CREATE OR REPLACE VIEW AD_TAB_V
|
||||||
AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING,
|
AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING,
|
||||||
READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB,
|
READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB,
|
||||||
ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON)
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
AS
|
AS
|
||||||
SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
||||||
t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
@ -16,7 +17,7 @@ SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
||||||
t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
FROM AD_Tab t
|
FROM AD_Tab t
|
||||||
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
WHERE t.IsActive='Y'
|
WHERE t.IsActive='Y'
|
||||||
|
|
|
@ -6,7 +6,8 @@ CREATE OR REPLACE VIEW AD_TAB_VT
|
||||||
ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE,
|
ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE,
|
||||||
COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID,
|
COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID,
|
||||||
ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON)
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
AS
|
AS
|
||||||
SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description,
|
SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description,
|
||||||
trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
@ -16,7 +17,7 @@ SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, tr
|
||||||
t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
FROM AD_Tab t
|
FROM AD_Tab t
|
||||||
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID)
|
INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID)
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-2836 SQL Searches for advanced users
|
||||||
|
-- Nov 21, 2019, 10:28:50 PM CET
|
||||||
|
UPDATE AD_Field SET Help='The Validation Code displays the date, time and message of the error.
|
||||||
|
|
||||||
|
You can add advanced SQL queries to your searches by filling this field with @SQL=[WHERE CLAUSE].
|
||||||
|
Do not include the WHERE statement and use Fully qualified SQL statements. F.e:
|
||||||
|
|
||||||
|
'||chr(64)||'SQL=C_Order.isActive=''Y'' AND SalesRep_ID=@AD_User_ID@
|
||||||
|
|
||||||
|
will filter orders by active and where the sales representative is the current user.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-11-21 22:28:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12249
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 21, 2019, 6:54:31 PM CET
|
||||||
|
UPDATE AD_Field SET Help='The Validation Code displays the date, time and message of the error.
|
||||||
|
|
||||||
|
You can add advanced SQL queries to your searches by filling this field with @SQL=[WHERE CLAUSE].
|
||||||
|
Do not include the WHERE statement and use Fully qualified SQL statements. F.e:
|
||||||
|
|
||||||
|
'||chr(64)||'SQL=C_Order.isActive=''Y'' AND SalesRep_ID=@AD_User_ID@
|
||||||
|
|
||||||
|
will filter orders by active and where the sales representative is the current user.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-11-21 18:54:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206305
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201911211857_IDEMPIERE-2836.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,122 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-4130 MaxQueryRecords by Tab (FHCA-1115)
|
||||||
|
-- Dec 18, 2019, 10:20:27 PM CET
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (214163,0,'Max Query Records','If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records','Enter the number of records a user will be able to query to avoid unnecessary system load. If 0, no restrictions are imposed.',106,'MaxQueryRecords','0',10,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_DATE('2019-12-18 22:20:26','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-12-18 22:20:26','YYYY-MM-DD HH24:MI:SS'),100,2854,'Y','N','D','N','N','N','Y','33a4790c-3b91-474d-9c36-0cc85af4b700','Y',0,'N','N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:20:44 PM CET
|
||||||
|
ALTER TABLE AD_Tab ADD MaxQueryRecords NUMBER(10) DEFAULT 0
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:21:56 PM CET
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206373,'Max Query Records','If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records','Enter the number of records a user will be able to query to avoid unnecessary system load. If 0, no restrictions are imposed.',106,214163,'Y',10,350,'N','N','N','N',0,0,'Y',TO_DATE('2019-12-18 22:21:56','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-12-18 22:21:56','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','27fb6d6a-0562-4de7-a9a8-7772daca44a0','Y',330,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206373
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11265
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=929
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11998
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=271
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11266
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1548
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1550
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1549
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4956
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201811
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5131
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3205
|
||||||
|
;
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW AD_TAB_V
|
||||||
|
(AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, DESCRIPTION,
|
||||||
|
HELP, SEQNO, ISSINGLEROW, HASTREE, ISINFOTAB,
|
||||||
|
REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED, ISDELETEABLE,
|
||||||
|
ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB, ISREADONLY,
|
||||||
|
AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING,
|
||||||
|
READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB,
|
||||||
|
ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
|
AS
|
||||||
|
SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
||||||
|
t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable,
|
||||||
|
tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility
|
||||||
|
t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel,
|
||||||
|
t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
|
FROM AD_Tab t
|
||||||
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
|
WHERE t.IsActive='Y'
|
||||||
|
AND tbl.IsActive='Y';
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW AD_TAB_VT
|
||||||
|
(AD_LANGUAGE, AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME,
|
||||||
|
DESCRIPTION, HELP, SEQNO, ISSINGLEROW, HASTREE,
|
||||||
|
ISINFOTAB, REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED,
|
||||||
|
ISDELETEABLE, ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB,
|
||||||
|
ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE,
|
||||||
|
COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID,
|
||||||
|
ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
|
AS
|
||||||
|
SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description,
|
||||||
|
trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable,
|
||||||
|
tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility
|
||||||
|
t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel,
|
||||||
|
t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
|
FROM AD_Tab t
|
||||||
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
|
INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID)
|
||||||
|
WHERE t.IsActive='Y'
|
||||||
|
AND tbl.IsActive='Y';
|
||||||
|
|
||||||
|
SELECT register_migration_script('201912182232_IDEMPIERE-4130.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
-- IDEMPIERE-2836 SQL Searches for advanced users
|
||||||
|
-- Nov 21, 2019, 10:28:50 PM CET
|
||||||
|
UPDATE AD_Field SET Help='The Validation Code displays the date, time and message of the error.
|
||||||
|
|
||||||
|
You can add advanced SQL queries to your searches by filling this field with @SQL=[WHERE CLAUSE].
|
||||||
|
Do not include the WHERE statement and use Fully qualified SQL statements. F.e:
|
||||||
|
|
||||||
|
@SQL=C_Order.isActive=''Y'' AND SalesRep_ID=@AD_User_ID@
|
||||||
|
|
||||||
|
will filter orders by active and where the sales representative is the current user.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-11-21 22:28:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12249
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 21, 2019, 6:54:31 PM CET
|
||||||
|
UPDATE AD_Field SET Help='The Validation Code displays the date, time and message of the error.
|
||||||
|
|
||||||
|
You can add advanced SQL queries to your searches by filling this field with @SQL=[WHERE CLAUSE].
|
||||||
|
Do not include the WHERE statement and use Fully qualified SQL statements. F.e:
|
||||||
|
|
||||||
|
@SQL=C_Order.isActive=''Y'' AND SalesRep_ID=@AD_User_ID@
|
||||||
|
|
||||||
|
will filter orders by active and where the sales representative is the current user.', IsCentrallyMaintained='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-11-21 18:54:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206305
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201911211857_IDEMPIERE-2836.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,119 @@
|
||||||
|
-- IDEMPIERE-4130 MaxQueryRecords by Tab (FHCA-1115)
|
||||||
|
-- Dec 18, 2019, 10:20:27 PM CET
|
||||||
|
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (214163,0,'Max Query Records','If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records','Enter the number of records a user will be able to query to avoid unnecessary system load. If 0, no restrictions are imposed.',106,'MaxQueryRecords','0',10,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2019-12-18 22:20:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-12-18 22:20:26','YYYY-MM-DD HH24:MI:SS'),100,2854,'Y','N','D','N','N','N','Y','33a4790c-3b91-474d-9c36-0cc85af4b700','Y',0,'N','N','N','N')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:20:44 PM CET
|
||||||
|
ALTER TABLE AD_Tab ADD COLUMN MaxQueryRecords NUMERIC(10) DEFAULT '0'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:21:56 PM CET
|
||||||
|
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206373,'Max Query Records','If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records','Enter the number of records a user will be able to query to avoid unnecessary system load. If 0, no restrictions are imposed.',106,214163,'Y',10,350,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2019-12-18 22:21:56','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-12-18 22:21:56','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','27fb6d6a-0562-4de7-a9a8-7772daca44a0','Y',330,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206373
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11265
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=929
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11998
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=271
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11266
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1548
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1550
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1549
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4956
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201811
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5131
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 18, 2019, 10:23:00 PM CET
|
||||||
|
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-12-18 22:23:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3205
|
||||||
|
;
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW AD_TAB_V
|
||||||
|
(AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, DESCRIPTION,
|
||||||
|
HELP, SEQNO, ISSINGLEROW, HASTREE, ISINFOTAB,
|
||||||
|
REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED, ISDELETEABLE,
|
||||||
|
ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB, ISREADONLY,
|
||||||
|
AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING,
|
||||||
|
READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB,
|
||||||
|
ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
|
AS
|
||||||
|
SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description,
|
||||||
|
t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable,
|
||||||
|
tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility
|
||||||
|
t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel,
|
||||||
|
t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
|
FROM AD_Tab t
|
||||||
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
|
WHERE t.IsActive='Y'
|
||||||
|
AND tbl.IsActive='Y';
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW AD_TAB_VT
|
||||||
|
(AD_LANGUAGE, AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME,
|
||||||
|
DESCRIPTION, HELP, SEQNO, ISSINGLEROW, HASTREE,
|
||||||
|
ISINFOTAB, REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED,
|
||||||
|
ISDELETEABLE, ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB,
|
||||||
|
ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE,
|
||||||
|
COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID,
|
||||||
|
ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID,
|
||||||
|
INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON,
|
||||||
|
MAXQUERYRECORDS)
|
||||||
|
AS
|
||||||
|
SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description,
|
||||||
|
trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType,
|
||||||
|
tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable,
|
||||||
|
tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility
|
||||||
|
t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel,
|
||||||
|
t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic,
|
||||||
|
t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab,
|
||||||
|
t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID,
|
||||||
|
t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords
|
||||||
|
FROM AD_Tab t
|
||||||
|
INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
|
INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID)
|
||||||
|
WHERE t.IsActive='Y'
|
||||||
|
AND tbl.IsActive='Y';
|
||||||
|
|
||||||
|
SELECT register_migration_script('201912182232_IDEMPIERE-4130.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -37,7 +37,6 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.base.IGridTabImporter;
|
import org.adempiere.base.IGridTabImporter;
|
||||||
|
@ -242,6 +241,7 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
manageMasterTrx(gridTab, null);
|
manageMasterTrx(gridTab, null);
|
||||||
createTrx(gridTab);
|
createTrx(gridTab);
|
||||||
}
|
}
|
||||||
|
trx.setDisplayName(GridTabCSVImporter.class.getName()+"_fileImport_" + gridTab.getTableName());
|
||||||
|
|
||||||
String recordResult = processRecord(importMode, gridTab, indxDetail, isDetail, idx, rowResult, childs);
|
String recordResult = processRecord(importMode, gridTab, indxDetail, isDetail, idx, rowResult, childs);
|
||||||
rowResult.append(recordResult);
|
rowResult.append(recordResult);
|
||||||
|
@ -594,8 +594,7 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
* @param gridTab
|
* @param gridTab
|
||||||
*/
|
*/
|
||||||
private void createTrx(GridTab gridTab){
|
private void createTrx(GridTab gridTab){
|
||||||
|
trxName = Trx.createTrxName("CSVImport");
|
||||||
trxName = getTrxName(gridTab.getTableName());
|
|
||||||
gridTab.getTableModel().setImportingMode(true,trxName);
|
gridTab.getTableModel().setImportingMode(true,trxName);
|
||||||
trx = Trx.get(trxName,true);
|
trx = Trx.get(trxName,true);
|
||||||
masterRecord = null;
|
masterRecord = null;
|
||||||
|
@ -777,10 +776,6 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
|
|
||||||
}//processRecord
|
}//processRecord
|
||||||
|
|
||||||
private String getTrxName(String gritTabName){
|
|
||||||
return "Import_" + gritTabName + "_" + UUID.randomUUID();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void throwAdempiereException(String msg){
|
private void throwAdempiereException(String msg){
|
||||||
throw new AdempiereException(msg);
|
throw new AdempiereException(msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -3115353522698098211L;
|
private static final long serialVersionUID = 5057703093968124177L;
|
||||||
|
|
||||||
public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate";
|
public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate";
|
||||||
|
|
||||||
|
@ -3392,4 +3392,44 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
public void setCalloutUI(ICalloutUI calloutUI) {
|
public void setCalloutUI(ICalloutUI calloutUI) {
|
||||||
this.calloutUI = calloutUI;
|
this.calloutUI = calloutUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get Max Query Records.
|
||||||
|
* @return If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
|
||||||
|
*/
|
||||||
|
public int getMaxQueryRecords() {
|
||||||
|
// minimum between AD_Tab.MaxQueryRecords and AD_Role.MaxQueryRecords
|
||||||
|
int roleMaxQueryRecords = MRole.getDefault().getMaxQueryRecords();
|
||||||
|
int tabMaxQueryRecords = m_vo.MaxQueryRecords;
|
||||||
|
if (roleMaxQueryRecords > 0 && roleMaxQueryRecords < tabMaxQueryRecords)
|
||||||
|
tabMaxQueryRecords = roleMaxQueryRecords;
|
||||||
|
return tabMaxQueryRecords;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Require Query
|
||||||
|
* @param noRecords records
|
||||||
|
* @return true if query required
|
||||||
|
*/
|
||||||
|
public boolean isQueryRequire (int noRecords)
|
||||||
|
{
|
||||||
|
if (noRecords < 2)
|
||||||
|
return false;
|
||||||
|
int max = getMaxQueryRecords();
|
||||||
|
if (max > 0 && noRecords > max)
|
||||||
|
return true;
|
||||||
|
int qu = MRole.getDefault().getConfirmQueryRecords();
|
||||||
|
return (noRecords > qu);
|
||||||
|
} // isQueryRequire
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Over max Query
|
||||||
|
* @param noRecords records
|
||||||
|
* @return true if over max query
|
||||||
|
*/
|
||||||
|
public boolean isQueryMax (int noRecords)
|
||||||
|
{
|
||||||
|
int max = getMaxQueryRecords();
|
||||||
|
return max > 0 && noRecords > max;
|
||||||
|
} // isQueryMax
|
||||||
|
|
||||||
} // GridTab
|
} // GridTab
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -1353087123788176368L;
|
private static final long serialVersionUID = 9091214632840854495L;
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Create MTab VO
|
* Create MTab VO
|
||||||
|
@ -206,6 +206,8 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
|
|
||||||
vo.TreeDisplayedOn = rs.getString("TreeDisplayedOn");
|
vo.TreeDisplayedOn = rs.getString("TreeDisplayedOn");
|
||||||
|
|
||||||
|
vo.MaxQueryRecords = rs.getInt("MaxQueryRecords");
|
||||||
|
|
||||||
vo.AD_Table_ID = rs.getInt("AD_Table_ID");
|
vo.AD_Table_ID = rs.getInt("AD_Table_ID");
|
||||||
vo.TableName = rs.getString("TableName");
|
vo.TableName = rs.getString("TableName");
|
||||||
if (rs.getString("IsView").equals("Y"))
|
if (rs.getString("IsView").equals("Y"))
|
||||||
|
@ -436,6 +438,8 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
public boolean HasTree = false;
|
public boolean HasTree = false;
|
||||||
/** Tree displayed on */
|
/** Tree displayed on */
|
||||||
public String TreeDisplayedOn = "";
|
public String TreeDisplayedOn = "";
|
||||||
|
/** Max Query Records */
|
||||||
|
public int MaxQueryRecords = 0;
|
||||||
/** Table */
|
/** Table */
|
||||||
public int AD_Table_ID;
|
public int AD_Table_ID;
|
||||||
/** Table UUID */
|
/** Table UUID */
|
||||||
|
@ -553,6 +557,7 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
clone.IsInsertRecord = IsInsertRecord;
|
clone.IsInsertRecord = IsInsertRecord;
|
||||||
clone.HasTree = HasTree;
|
clone.HasTree = HasTree;
|
||||||
clone.TreeDisplayedOn = TreeDisplayedOn;
|
clone.TreeDisplayedOn = TreeDisplayedOn;
|
||||||
|
clone.MaxQueryRecords = MaxQueryRecords;
|
||||||
clone.AD_Table_ID = AD_Table_ID;
|
clone.AD_Table_ID = AD_Table_ID;
|
||||||
clone.AD_Column_ID = AD_Column_ID;
|
clone.AD_Column_ID = AD_Column_ID;
|
||||||
clone.Parent_Column_ID = Parent_Column_ID;
|
clone.Parent_Column_ID = Parent_Column_ID;
|
||||||
|
|
|
@ -428,6 +428,19 @@ public interface I_AD_Tab
|
||||||
*/
|
*/
|
||||||
public boolean isTranslationTab();
|
public boolean isTranslationTab();
|
||||||
|
|
||||||
|
/** Column name MaxQueryRecords */
|
||||||
|
public static final String COLUMNNAME_MaxQueryRecords = "MaxQueryRecords";
|
||||||
|
|
||||||
|
/** Set Max Query Records.
|
||||||
|
* If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
|
||||||
|
*/
|
||||||
|
public void setMaxQueryRecords (int MaxQueryRecords);
|
||||||
|
|
||||||
|
/** Get Max Query Records.
|
||||||
|
* If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
|
||||||
|
*/
|
||||||
|
public int getMaxQueryRecords();
|
||||||
|
|
||||||
/** Column name Name */
|
/** Column name Name */
|
||||||
public static final String COLUMNNAME_Name = "Name";
|
public static final String COLUMNNAME_Name = "Name";
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class X_AD_Tab extends PO implements I_AD_Tab, I_Persistent
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20191121L;
|
private static final long serialVersionUID = 20191218L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_AD_Tab (Properties ctx, int AD_Tab_ID, String trxName)
|
public X_AD_Tab (Properties ctx, int AD_Tab_ID, String trxName)
|
||||||
|
@ -674,6 +674,26 @@ public class X_AD_Tab extends PO implements I_AD_Tab, I_Persistent
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Max Query Records.
|
||||||
|
@param MaxQueryRecords
|
||||||
|
If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
|
||||||
|
*/
|
||||||
|
public void setMaxQueryRecords (int MaxQueryRecords)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_MaxQueryRecords, Integer.valueOf(MaxQueryRecords));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Max Query Records.
|
||||||
|
@return If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
|
||||||
|
*/
|
||||||
|
public int getMaxQueryRecords ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_MaxQueryRecords);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Name.
|
/** Set Name.
|
||||||
@param Name
|
@param Name
|
||||||
Alphanumeric identifier of the entity
|
Alphanumeric identifier of the entity
|
||||||
|
|
|
@ -657,7 +657,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initFirstTabpanel() {
|
private void initFirstTabpanel() {
|
||||||
adTabbox.getSelectedTabpanel().query(m_onlyCurrentRows, m_onlyCurrentDays, MRole.getDefault().getMaxQueryRecords());
|
adTabbox.getSelectedTabpanel().query(m_onlyCurrentRows, m_onlyCurrentDays, adTabbox.getSelectedGridTab().getMaxQueryRecords());
|
||||||
adTabbox.getSelectedTabpanel().activate(true);
|
adTabbox.getSelectedTabpanel().activate(true);
|
||||||
Events.echoEvent(new Event(ADTabpanel.ON_POST_INIT_EVENT, adTabbox.getSelectedTabpanel()));
|
Events.echoEvent(new Event(ADTabpanel.ON_POST_INIT_EVENT, adTabbox.getSelectedTabpanel()));
|
||||||
}
|
}
|
||||||
|
@ -705,7 +705,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
mTab.getTableName(), MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
mTab.getTableName(), MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
||||||
int no = DB.getSQLValue(null, finalSQL.toString());
|
int no = DB.getSQLValue(null, finalSQL.toString());
|
||||||
//
|
//
|
||||||
require = MRole.getDefault().isQueryRequire(no);
|
require = mTab.isQueryRequire(no);
|
||||||
}
|
}
|
||||||
// Show Query
|
// Show Query
|
||||||
if (require)
|
if (require)
|
||||||
|
@ -2060,7 +2060,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
{
|
{
|
||||||
m_onlyCurrentRows = false; // search history too
|
m_onlyCurrentRows = false; // search history too
|
||||||
adTabbox.getSelectedGridTab().setQuery(query);
|
adTabbox.getSelectedGridTab().setQuery(query);
|
||||||
adTabbox.getSelectedTabpanel().query(m_onlyCurrentRows, m_onlyCurrentDays, MRole.getDefault().getMaxQueryRecords()); // autoSize
|
adTabbox.getSelectedTabpanel().query(m_onlyCurrentRows, m_onlyCurrentDays, adTabbox.getSelectedGridTab().getMaxQueryRecords()); // autoSize
|
||||||
}
|
}
|
||||||
|
|
||||||
if (findWindow.isCreateNew())
|
if (findWindow.isCreateNew())
|
||||||
|
|
|
@ -251,7 +251,7 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
for (int i = 0; i < listVO.size(); i++)
|
for (int i = 0; i < listVO.size(); i++)
|
||||||
{
|
{
|
||||||
createField(listVO.get(i), rows);
|
createField(listVO.get(i), rows);
|
||||||
log.severe(listVO.get(i).ColumnName + listVO.get(i).SeqNo);
|
if (log.isLoggable(Level.INFO)) log.info(listVO.get(i).ColumnName + listVO.get(i).SeqNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.adempiere.webui.component.Panel;
|
||||||
import org.adempiere.webui.component.Row;
|
import org.adempiere.webui.component.Row;
|
||||||
import org.adempiere.webui.component.Rows;
|
import org.adempiere.webui.component.Rows;
|
||||||
import org.adempiere.webui.component.Textbox;
|
import org.adempiere.webui.component.Textbox;
|
||||||
|
import org.adempiere.webui.component.ToolBarButton;
|
||||||
import org.adempiere.webui.component.WListbox;
|
import org.adempiere.webui.component.WListbox;
|
||||||
import org.adempiere.webui.editor.WDateEditor;
|
import org.adempiere.webui.editor.WDateEditor;
|
||||||
import org.adempiere.webui.editor.WSearchEditor;
|
import org.adempiere.webui.editor.WSearchEditor;
|
||||||
|
@ -35,10 +36,12 @@ import org.adempiere.webui.panel.ADForm;
|
||||||
import org.adempiere.webui.panel.CustomForm;
|
import org.adempiere.webui.panel.CustomForm;
|
||||||
import org.adempiere.webui.panel.IFormController;
|
import org.adempiere.webui.panel.IFormController;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
import org.compiere.apps.form.FactReconcile;
|
import org.compiere.apps.form.FactReconcile;
|
||||||
import org.compiere.model.MClient;
|
import org.compiere.model.MClient;
|
||||||
import org.compiere.model.MColumn;
|
import org.compiere.model.MColumn;
|
||||||
|
import org.compiere.model.MFactAcct;
|
||||||
import org.compiere.model.MLookup;
|
import org.compiere.model.MLookup;
|
||||||
import org.compiere.model.MLookupFactory;
|
import org.compiere.model.MLookupFactory;
|
||||||
import org.compiere.model.X_C_ElementValue;
|
import org.compiere.model.X_C_ElementValue;
|
||||||
|
@ -47,8 +50,10 @@ import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
import org.zkoss.zk.ui.WrongValueException;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zul.Borderlayout;
|
import org.zkoss.zul.Borderlayout;
|
||||||
import org.zkoss.zul.Center;
|
import org.zkoss.zul.Center;
|
||||||
import org.zkoss.zul.North;
|
import org.zkoss.zul.North;
|
||||||
|
@ -112,6 +117,7 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
private Button bGenerate = cp.createButton(ConfirmPanel.A_PROCESS);
|
private Button bGenerate = cp.createButton(ConfirmPanel.A_PROCESS);
|
||||||
private Button bReset = cp.createButton(ConfirmPanel.A_RESET);
|
private Button bReset = cp.createButton(ConfirmPanel.A_RESET);
|
||||||
private Button bZoom = cp.createButton(ConfirmPanel.A_ZOOM);
|
private Button bZoom = cp.createButton(ConfirmPanel.A_ZOOM);
|
||||||
|
private Button bZoomDoc = cp.createButton(ConfirmPanel.A_ZOOM);
|
||||||
private Grid commandLayout = GridFactory.newGridLayout();
|
private Grid commandLayout = GridFactory.newGridLayout();
|
||||||
private Button bRefresh = cp.createButton(ConfirmPanel.A_REFRESH);
|
private Button bRefresh = cp.createButton(ConfirmPanel.A_REFRESH);
|
||||||
private Label labelDateAcct = new Label();
|
private Label labelDateAcct = new Label();
|
||||||
|
@ -125,6 +131,9 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
private Label differenceLabel = new Label();
|
private Label differenceLabel = new Label();
|
||||||
private Textbox differenceField = new Textbox();
|
private Textbox differenceField = new Textbox();
|
||||||
|
|
||||||
|
private ToolBarButton bSelect = new ToolBarButton("SelectAll");
|
||||||
|
private boolean checkAllSelected = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static Init
|
* Static Init
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -137,12 +146,19 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
bRefresh.addActionListener(this);
|
bRefresh.addActionListener(this);
|
||||||
bReset.addActionListener(this);
|
bReset.addActionListener(this);
|
||||||
bZoom.addActionListener(this);
|
bZoom.addActionListener(this);
|
||||||
|
bZoomDoc.addActionListener(this);
|
||||||
bGenerate.setEnabled(false);
|
bGenerate.setEnabled(false);
|
||||||
bReset.setEnabled(false);
|
bReset.setEnabled(false);
|
||||||
//bRefresh.setText(Msg.getMsg(Env.getCtx(), "Query"));
|
//bRefresh.setText(Msg.getMsg(Env.getCtx(), "Query"));
|
||||||
bGenerate.setLabel(Msg.getMsg(Env.getCtx(),"Process"));
|
bGenerate.setLabel(Msg.getMsg(Env.getCtx(),"Process"));
|
||||||
bReset.setLabel(Msg.getMsg(Env.getCtx(),"Reset"));
|
bReset.setLabel(Msg.getMsg(Env.getCtx(),"Reset"));
|
||||||
bZoom.setLabel(Msg.translate(Env.getCtx(), "Fact_Acct_ID"));
|
bZoom.setLabel(Msg.translate(Env.getCtx(), "Fact_Acct_ID"));
|
||||||
|
bZoomDoc.setId(bZoomDoc.getId() + "Doc"); // to avoid 'org.zkoss.zk.ui.UiException: Not unique in the ID space of <Grid null>: Zoom'
|
||||||
|
bZoomDoc.setLabel(Msg.translate(Env.getCtx(), "ZoomDocument"));
|
||||||
|
bSelect.setMode("toggle");
|
||||||
|
bSelect.setImage(ThemeManager.getThemeResource("images/SelectAll24.png"));
|
||||||
|
bSelect.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "SelectAll"));
|
||||||
|
bSelect.addEventListener(Events.ON_CLICK, this);
|
||||||
|
|
||||||
//
|
//
|
||||||
labelAcctSchema.setText(Msg.translate(Env.getCtx(), "C_AcctSchema_ID"));
|
labelAcctSchema.setText(Msg.translate(Env.getCtx(), "C_AcctSchema_ID"));
|
||||||
|
@ -234,9 +250,13 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
ZKUpdateUtil.setWidth(commandLayout, "100%");
|
ZKUpdateUtil.setWidth(commandLayout, "100%");
|
||||||
rows = commandLayout.newRows();
|
rows = commandLayout.newRows();
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
|
row.appendCellChild(bSelect, 1);
|
||||||
row.appendCellChild(bZoom, 1);
|
row.appendCellChild(bZoom, 1);
|
||||||
ZKUpdateUtil.setHflex(bZoom, "true");
|
ZKUpdateUtil.setHflex(bZoom, "true");
|
||||||
ZKUpdateUtil.setWidth(bZoom, "100%");
|
ZKUpdateUtil.setWidth(bZoom, "100%");
|
||||||
|
row.appendCellChild(bZoomDoc, 1);
|
||||||
|
ZKUpdateUtil.setHflex(bZoomDoc, "true");
|
||||||
|
ZKUpdateUtil.setWidth(bZoomDoc, "100%");
|
||||||
row.appendCellChild(differenceLabel.rightAlign());
|
row.appendCellChild(differenceLabel.rightAlign());
|
||||||
ZKUpdateUtil.setHflex(differenceLabel, "true");
|
ZKUpdateUtil.setHflex(differenceLabel, "true");
|
||||||
row.appendCellChild(differenceField, 2);
|
row.appendCellChild(differenceField, 2);
|
||||||
|
@ -251,6 +271,8 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
{
|
{
|
||||||
bZoom.setTooltiptext(bZoom.getLabel());
|
bZoom.setTooltiptext(bZoom.getLabel());
|
||||||
bZoom.setLabel(null);
|
bZoom.setLabel(null);
|
||||||
|
bZoomDoc.setTooltiptext(bZoomDoc.getLabel());
|
||||||
|
bZoomDoc.setLabel(null);
|
||||||
bGenerate.setTooltiptext(bGenerate.getLabel());
|
bGenerate.setTooltiptext(bGenerate.getLabel());
|
||||||
bGenerate.setLabel(null);
|
bGenerate.setLabel(null);
|
||||||
bReset.setTooltiptext(bReset.getLabel());
|
bReset.setTooltiptext(bReset.getLabel());
|
||||||
|
@ -310,11 +332,14 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
+ "AND EXISTS (SELECT 1 FROM C_AcctSchema_Element ase "
|
+ "AND EXISTS (SELECT 1 FROM C_AcctSchema_Element ase "
|
||||||
+ "WHERE ase.C_Element_ID=C_ElementValue.C_Element_ID AND ase.ElementType='AC' "
|
+ "WHERE ase.C_Element_ID=C_ElementValue.C_Element_ID AND ase.ElementType='AC' "
|
||||||
+ "AND ase.C_AcctSchema_ID=@C_AcctSchema_ID@ AND ase.AD_Client_ID=@AD_Client_ID@) ");
|
+ "AND ase.C_AcctSchema_ID=@C_AcctSchema_ID@ AND ase.AD_Client_ID=@AD_Client_ID@) ");
|
||||||
fieldAccount = new WTableDirEditor("C_ElementValue_ID", false, false, true, lookupAccount);
|
fieldAccount = new WTableDirEditor("C_ElementValue_ID", true, false, true, lookupAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadData(){
|
public void loadData(){
|
||||||
|
|
||||||
|
if(fieldAccount.isNullOrEmpty())
|
||||||
|
throw new WrongValueException(fieldAccount.getComponent(), Msg.getMsg(Env.getCtx(), "FillMandatory"));
|
||||||
|
|
||||||
if(fieldAcctSchema.getValue()!=null)
|
if(fieldAcctSchema.getValue()!=null)
|
||||||
m_C_AcctSchema_ID = (Integer)fieldAcctSchema.getValue();
|
m_C_AcctSchema_ID = (Integer)fieldAcctSchema.getValue();
|
||||||
else
|
else
|
||||||
|
@ -419,6 +444,27 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
public void tableChanged(WTableModelEvent event) {
|
public void tableChanged(WTableModelEvent event) {
|
||||||
if (! loading )
|
if (! loading )
|
||||||
calculateSelection();
|
calculateSelection();
|
||||||
|
|
||||||
|
if (event.getModel() == miniTable.getModel()) {
|
||||||
|
|
||||||
|
int row = event.getFirstRow();
|
||||||
|
int col = event.getColumn();
|
||||||
|
|
||||||
|
if (row < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (checkAllSelected && col == selectedColIndex) {
|
||||||
|
ListModelTable model = miniTable.getModel();
|
||||||
|
boolean rowUnSelected = false;
|
||||||
|
for (int i = 0; i < model.getRowCount(); i++) {
|
||||||
|
if ( ! (Boolean) model.getValueAt(i, selectedColIndex) ) {
|
||||||
|
rowUnSelected = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bSelect.setPressed(! rowUnSelected);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -431,7 +477,9 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
resetReconciliation();
|
resetReconciliation();
|
||||||
|
|
||||||
else if (event.getTarget().equals(bZoom))
|
else if (event.getTarget().equals(bZoom))
|
||||||
zoom();
|
zoom(MFactAcct.Table_ID);
|
||||||
|
else if (event.getTarget().equals(bZoomDoc))
|
||||||
|
zoom(-1);
|
||||||
|
|
||||||
else if (event.getTarget().equals(bCancel))
|
else if (event.getTarget().equals(bCancel))
|
||||||
SessionManager.getAppDesktop().closeActiveWindow();
|
SessionManager.getAppDesktop().closeActiveWindow();
|
||||||
|
@ -439,6 +487,9 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
else if (event.getTarget().equals(bRefresh))
|
else if (event.getTarget().equals(bRefresh))
|
||||||
loadData();
|
loadData();
|
||||||
|
|
||||||
|
else if (event.getTarget().equals(bSelect))
|
||||||
|
onbSelect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateReconciliation() {
|
private void generateReconciliation() {
|
||||||
|
@ -474,6 +525,8 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
((ListModelTable) miniTable.getModel()).remove(r--);
|
((ListModelTable) miniTable.getModel()).remove(r--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bSelect.setPressed(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -481,7 +534,7 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
* @param AD_Window_ID window id
|
* @param AD_Window_ID window id
|
||||||
* @param zoomQuery zoom query
|
* @param zoomQuery zoom query
|
||||||
*/
|
*/
|
||||||
protected void zoom ()
|
protected void zoom (int tableID)
|
||||||
{
|
{
|
||||||
log.info("");
|
log.info("");
|
||||||
|
|
||||||
|
@ -494,7 +547,12 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
|
|
||||||
int factId = pp.getKey();
|
int factId = pp.getKey();
|
||||||
|
|
||||||
AEnv.zoom(270, factId);
|
if (tableID == MFactAcct.Table_ID)
|
||||||
|
AEnv.zoom(tableID, factId);
|
||||||
|
else {
|
||||||
|
MFactAcct fa = new MFactAcct(Env.getCtx(), factId, null);
|
||||||
|
AEnv.zoom(fa.getAD_Table_ID(), fa.getRecord_ID());
|
||||||
|
}
|
||||||
} // zoom
|
} // zoom
|
||||||
|
|
||||||
private void resetReconciliation() {
|
private void resetReconciliation() {
|
||||||
|
@ -522,6 +580,8 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
((ListModelTable) miniTable.getModel()).remove(r--);
|
((ListModelTable) miniTable.getModel()).remove(r--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bSelect.setPressed(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -529,5 +589,17 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
return form;
|
return form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onbSelect() {
|
||||||
|
ListModelTable model = miniTable.getModel();
|
||||||
|
int rows = model.getSize();
|
||||||
|
Boolean selectAll = bSelect.isPressed() ? Boolean.FALSE : Boolean.TRUE;
|
||||||
|
bSelect.setPressed(! bSelect.isPressed());
|
||||||
|
checkAllSelected = false;
|
||||||
|
for (int i = 0; i < rows; i++)
|
||||||
|
model.setValueAt(selectAll, i, selectedColIndex);
|
||||||
|
checkAllSelected = true;
|
||||||
|
miniTable.setModel(model);
|
||||||
|
calculateSelection();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MImportTemplate;
|
import org.compiere.model.MImportTemplate;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
import org.compiere.model.MRole;
|
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -345,14 +344,14 @@ public class CSVImportAction implements EventListener<Event>
|
||||||
if (query != null) {
|
if (query != null) {
|
||||||
query.addRestriction("1=1");
|
query.addRestriction("1=1");
|
||||||
panel.getActiveGridTab().setQuery(query);
|
panel.getActiveGridTab().setQuery(query);
|
||||||
panel.getADTab().getSelectedTabpanel().query(false, 0, MRole.getDefault().getMaxQueryRecords());
|
panel.getADTab().getSelectedTabpanel().query(false, 0, panel.getActiveGridTab().getMaxQueryRecords());
|
||||||
}
|
}
|
||||||
panel.getActiveGridTab().dataRefresh(false);
|
panel.getActiveGridTab().dataRefresh(false);
|
||||||
|
|
||||||
if (detailQuery != null){
|
if (detailQuery != null){
|
||||||
detailQuery.addRestriction("1=1");
|
detailQuery.addRestriction("1=1");
|
||||||
panel.getADTab().getSelectedDetailADTabpanel().getGridTab().setQuery(detailQuery);
|
panel.getADTab().getSelectedDetailADTabpanel().getGridTab().setQuery(detailQuery);
|
||||||
panel.getADTab().getSelectedDetailADTabpanel().query(false, 0, MRole.getDefault().getMaxQueryRecords());
|
panel.getADTab().getSelectedDetailADTabpanel().query(false, 0, panel.getActiveGridTab().getMaxQueryRecords());
|
||||||
panel.getADTab().getSelectedDetailADTabpanel().getGridTab().dataRefresh(false);
|
panel.getADTab().getSelectedDetailADTabpanel().getGridTab().dataRefresh(false);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -127,16 +127,15 @@ import org.zkoss.zul.Vlayout;
|
||||||
*/
|
*/
|
||||||
public class FindWindow extends Window implements EventListener<Event>, ValueChangeListener, DialogEvents
|
public class FindWindow extends Window implements EventListener<Event>, ValueChangeListener, DialogEvents
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 2958810511464597943L;
|
||||||
|
|
||||||
private static final String FIND_ROW_EDITOR = "find.row.editor";
|
private static final String FIND_ROW_EDITOR = "find.row.editor";
|
||||||
|
|
||||||
private static final String FIND_ROW_EDITOR_TO = "find.row.editor.to";
|
private static final String FIND_ROW_EDITOR_TO = "find.row.editor.to";
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = -7374857601424061640L;
|
|
||||||
|
|
||||||
// values and label for history combo
|
// values and label for history combo
|
||||||
private static final String HISTORY_DAY_ALL = "All";
|
private static final String HISTORY_DAY_ALL = "All";
|
||||||
private static final String HISTORY_DAY_YEAR = "Year";
|
private static final String HISTORY_DAY_YEAR = "Year";
|
||||||
|
@ -174,6 +173,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
private String m_whereExtended;
|
private String m_whereExtended;
|
||||||
/** Search Fields */
|
/** Search Fields */
|
||||||
private GridField[] m_findFields;
|
private GridField[] m_findFields;
|
||||||
|
/** The Tab */
|
||||||
|
private GridTab m_gridTab = null;
|
||||||
/** Resulting query */
|
/** Resulting query */
|
||||||
private MQuery m_query = null;
|
private MQuery m_query = null;
|
||||||
/** Is cancel ? */
|
/** Is cancel ? */
|
||||||
|
@ -243,6 +244,10 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
private StatusBarPanel statusBar = new StatusBarPanel();
|
private StatusBarPanel statusBar = new StatusBarPanel();
|
||||||
/** END DEVCOFFEE **/
|
/** END DEVCOFFEE **/
|
||||||
|
|
||||||
|
/** IDEMPIERE-2836 User Query Where */
|
||||||
|
private String m_whereUserQuery;
|
||||||
|
private ToolBar advancedPanelToolBar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FindPanel Constructor
|
* FindPanel Constructor
|
||||||
* @param targetWindowNo targetWindowNo
|
* @param targetWindowNo targetWindowNo
|
||||||
|
@ -264,6 +269,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
m_tableName = tableName;
|
m_tableName = tableName;
|
||||||
m_whereExtended = whereExtended;
|
m_whereExtended = whereExtended;
|
||||||
m_findFields = findFields;
|
m_findFields = findFields;
|
||||||
|
if (findFields != null && findFields.length > 0)
|
||||||
|
m_gridTab = findFields[0].getGridTab();
|
||||||
m_sNew = "** ".concat(Msg.getMsg(Env.getCtx(), "New Query")).concat(" **");
|
m_sNew = "** ".concat(Msg.getMsg(Env.getCtx(), "New Query")).concat(" **");
|
||||||
m_AD_Tab_ID = adTabId;
|
m_AD_Tab_ID = adTabId;
|
||||||
m_minRecords = minRecords;
|
m_minRecords = minRecords;
|
||||||
|
@ -469,10 +476,10 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
pnlButtonRight.appendChild(btnCancel);
|
pnlButtonRight.appendChild(btnCancel);
|
||||||
pnlButtonRight.setStyle("text-align: right");
|
pnlButtonRight.setStyle("text-align: right");
|
||||||
|
|
||||||
ToolBar toolBar = new ToolBar();
|
advancedPanelToolBar = new ToolBar();
|
||||||
toolBar.appendChild(btnNew);
|
advancedPanelToolBar.appendChild(btnNew);
|
||||||
toolBar.appendChild(btnDelete);
|
advancedPanelToolBar.appendChild(btnDelete);
|
||||||
ZKUpdateUtil.setWidth(toolBar, "100%");
|
ZKUpdateUtil.setWidth(advancedPanelToolBar, "100%");
|
||||||
|
|
||||||
fQueryName.addEventListener(Events.ON_SELECT, this);
|
fQueryName.addEventListener(Events.ON_SELECT, this);
|
||||||
|
|
||||||
|
@ -541,9 +548,9 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
|
|
||||||
North north =new North();
|
North north =new North();
|
||||||
layout.appendChild(north);
|
layout.appendChild(north);
|
||||||
north.appendChild(toolBar);
|
north.appendChild(advancedPanelToolBar);
|
||||||
|
|
||||||
ZKUpdateUtil.setVflex(toolBar, "0");
|
ZKUpdateUtil.setVflex(advancedPanelToolBar, "0");
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
|
@ -1313,6 +1320,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
}
|
}
|
||||||
else if (event.getTarget() == fQueryName)
|
else if (event.getTarget() == fQueryName)
|
||||||
{
|
{
|
||||||
|
m_whereUserQuery = null;
|
||||||
|
showAdvanced();
|
||||||
btnSave.setDisabled(false);
|
btnSave.setDisabled(false);
|
||||||
btnShare.setDisabled(false);
|
btnShare.setDisabled(false);
|
||||||
int index = fQueryName.getSelectedIndex();
|
int index = fQueryName.getSelectedIndex();
|
||||||
|
@ -1483,31 +1492,37 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
private void parseUserQuery(MUserQuery userQuery)
|
private void parseUserQuery(MUserQuery userQuery)
|
||||||
{
|
{
|
||||||
String code = userQuery.getCode();
|
String code = userQuery.getCode();
|
||||||
String[] segments = code.split(Pattern.quote(SEGMENT_SEPARATOR));
|
if (code.startsWith("@SQL=")) {
|
||||||
|
m_whereUserQuery = "(" + code.substring(code.indexOf("=")+1, code.length()) + ")";
|
||||||
|
log.log(Level.INFO, m_whereUserQuery);
|
||||||
|
hideAdvanced();
|
||||||
|
} else {
|
||||||
|
String[] segments = code.split(Pattern.quote(SEGMENT_SEPARATOR));
|
||||||
|
|
||||||
List<?> rowList = advancedPanel.getChildren();
|
List<?> rowList = advancedPanel.getChildren();
|
||||||
for (int rowIndex = rowList.size() - 1; rowIndex >= 1; rowIndex--)
|
for (int rowIndex = rowList.size() - 1; rowIndex >= 1; rowIndex--)
|
||||||
rowList.remove(rowIndex);
|
rowList.remove(rowIndex);
|
||||||
|
|
||||||
for (int i = 0; i < segments.length; i++)
|
for (int i = 0; i < segments.length; i++)
|
||||||
{
|
{
|
||||||
String[] fields = segments[i].split(Pattern.quote(FIELD_SEPARATOR));
|
String[] fields = segments[i].split(Pattern.quote(FIELD_SEPARATOR));
|
||||||
|
|
||||||
createFields(fields, i);
|
createFields(fields, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] historysegments = code.split(Pattern.quote(HISTORY_SEPARATOR));
|
String[] historysegments = code.split(Pattern.quote(HISTORY_SEPARATOR));
|
||||||
|
|
||||||
String history = historysegments.length > INDEX_HISTORY? historysegments[INDEX_HISTORY] : "";
|
String history = historysegments.length > INDEX_HISTORY? historysegments[INDEX_HISTORY] : "";
|
||||||
if(history.length() > 0)
|
if(history.length() > 0)
|
||||||
{
|
{
|
||||||
historyCombo.setAttribute("history", history);
|
historyCombo.setAttribute("history", history);
|
||||||
//historyCombo.setSelectedItem(new Comboitem(history));
|
//historyCombo.setSelectedItem(new Comboitem(history));
|
||||||
//historyCombo.setSelectedItem(new Comboitem(history, history));
|
//historyCombo.setSelectedItem(new Comboitem(history, history));
|
||||||
historyCombo.setSelectedIndex(getHistoryIndex(history)+1);
|
historyCombo.setSelectedIndex(getHistoryIndex(history)+1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
advancedPanel.invalidate();
|
winAdvanced.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getHistoryIndex(String value)
|
private int getHistoryIndex(String value)
|
||||||
|
@ -1613,146 +1628,151 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
//
|
//
|
||||||
m_query = new MQuery(m_tableName);
|
m_query = new MQuery(m_tableName);
|
||||||
m_query.addRestriction(Env.parseContext(Env.getCtx(), m_targetWindowNo, m_whereExtended, false));
|
m_query.addRestriction(Env.parseContext(Env.getCtx(), m_targetWindowNo, m_whereExtended, false));
|
||||||
StringBuilder code = new StringBuilder();
|
|
||||||
|
|
||||||
int openBrackets = 0;
|
if (m_whereUserQuery == null) {
|
||||||
|
StringBuilder code = new StringBuilder();
|
||||||
|
|
||||||
List<?> rowList = advancedPanel.getChildren();
|
int openBrackets = 0;
|
||||||
|
|
||||||
for (int rowIndex = 1; rowIndex < rowList.size() ; rowIndex++)
|
List<?> rowList = advancedPanel.getChildren();
|
||||||
{
|
|
||||||
// Column
|
|
||||||
ListItem row = (ListItem)rowList.get(rowIndex);
|
|
||||||
Listbox column = (Listbox)row.getFellow("listColumn"+row.getId());
|
|
||||||
if (column == null)
|
|
||||||
continue;
|
|
||||||
String ColumnName = column.getSelectedItem().getValue().toString();
|
|
||||||
String infoName = column.toString();
|
|
||||||
//
|
|
||||||
GridField field = getTargetMField(ColumnName);
|
|
||||||
if (field == null || field.isVirtualUIColumn())
|
|
||||||
continue;
|
|
||||||
boolean isProductCategoryField = isProductCategoryField(field.getColumnName());
|
|
||||||
String ColumnSQL = field.getSearchColumnSQL();
|
|
||||||
// Left brackets
|
|
||||||
Listbox listLeftBracket = (Listbox)row.getFellow("listLeftBracket"+row.getId());
|
|
||||||
String lBrackets = listLeftBracket.getSelectedItem().getValue().toString();
|
|
||||||
if ( lBrackets != null )
|
|
||||||
openBrackets += lBrackets.length();
|
|
||||||
else lBrackets = "";
|
|
||||||
// Right brackets
|
|
||||||
Listbox listRightBracket = (Listbox)row.getFellow("listRightBracket"+row.getId());
|
|
||||||
String rBrackets = listRightBracket.getSelectedItem().getValue().toString();
|
|
||||||
if ( rBrackets != null )
|
|
||||||
openBrackets -= rBrackets.length();
|
|
||||||
else rBrackets = "";
|
|
||||||
// And Or
|
|
||||||
Listbox listAndOr = (Listbox)row.getFellow("listAndOr"+row.getId());
|
|
||||||
String andOr = listAndOr.getSelectedItem().getValue().toString();
|
|
||||||
boolean and = true;
|
|
||||||
if ( rowIndex > 1 ) {
|
|
||||||
and = !"OR".equals(andOr);
|
|
||||||
}
|
|
||||||
// Op
|
|
||||||
Listbox op = (Listbox)row.getFellow("listOperator"+row.getId());
|
|
||||||
if (op == null)
|
|
||||||
continue;
|
|
||||||
String Operator = op.getSelectedItem().getValue().toString();
|
|
||||||
|
|
||||||
// Value ******
|
for (int rowIndex = 1; rowIndex < rowList.size() ; rowIndex++)
|
||||||
ListCell cellQueryFrom = (ListCell)row.getFellow("cellQueryFrom"+row.getId());
|
{
|
||||||
Object value = null;
|
// Column
|
||||||
|
ListItem row = (ListItem)rowList.get(rowIndex);
|
||||||
|
Listbox column = (Listbox)row.getFellow("listColumn"+row.getId());
|
||||||
|
if (column == null)
|
||||||
|
continue;
|
||||||
|
String ColumnName = column.getSelectedItem().getValue().toString();
|
||||||
|
String infoName = column.toString();
|
||||||
|
//
|
||||||
|
GridField field = getTargetMField(ColumnName);
|
||||||
|
if (field == null || field.isVirtualUIColumn())
|
||||||
|
continue;
|
||||||
|
boolean isProductCategoryField = isProductCategoryField(field.getColumnName());
|
||||||
|
String ColumnSQL = field.getSearchColumnSQL();
|
||||||
|
// Left brackets
|
||||||
|
Listbox listLeftBracket = (Listbox)row.getFellow("listLeftBracket"+row.getId());
|
||||||
|
String lBrackets = listLeftBracket.getSelectedItem().getValue().toString();
|
||||||
|
if ( lBrackets != null )
|
||||||
|
openBrackets += lBrackets.length();
|
||||||
|
else lBrackets = "";
|
||||||
|
// Right brackets
|
||||||
|
Listbox listRightBracket = (Listbox)row.getFellow("listRightBracket"+row.getId());
|
||||||
|
String rBrackets = listRightBracket.getSelectedItem().getValue().toString();
|
||||||
|
if ( rBrackets != null )
|
||||||
|
openBrackets -= rBrackets.length();
|
||||||
|
else rBrackets = "";
|
||||||
|
// And Or
|
||||||
|
Listbox listAndOr = (Listbox)row.getFellow("listAndOr"+row.getId());
|
||||||
|
String andOr = listAndOr.getSelectedItem().getValue().toString();
|
||||||
|
boolean and = true;
|
||||||
|
if ( rowIndex > 1 ) {
|
||||||
|
and = !"OR".equals(andOr);
|
||||||
|
}
|
||||||
|
// Op
|
||||||
|
Listbox op = (Listbox)row.getFellow("listOperator"+row.getId());
|
||||||
|
if (op == null)
|
||||||
|
continue;
|
||||||
|
String Operator = op.getSelectedItem().getValue().toString();
|
||||||
|
|
||||||
//Allowing Date validation before save
|
// Value ******
|
||||||
Component compo = cellQueryFrom.getFirstChild();
|
ListCell cellQueryFrom = (ListCell)row.getFellow("cellQueryFrom"+row.getId());
|
||||||
if(compo instanceof Datebox) {
|
Object value = null;
|
||||||
Datebox dbox = (Datebox)compo;
|
|
||||||
if(dbox.getValue() != null)
|
|
||||||
value = new Timestamp(((Date)dbox.getValue()).getTime());
|
|
||||||
}
|
|
||||||
else if(compo instanceof DatetimeBox) {
|
|
||||||
DatetimeBox dtbox = (DatetimeBox)compo;
|
|
||||||
if(dtbox.getValue() != null)
|
|
||||||
value = new Timestamp(((Date)dtbox.getValue()).getTime());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
value = cellQueryFrom.getAttribute("value");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value == null)
|
//Allowing Date validation before save
|
||||||
{
|
Component compo = cellQueryFrom.getFirstChild();
|
||||||
if(Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL))
|
if(compo instanceof Datebox) {
|
||||||
{
|
Datebox dbox = (Datebox)compo;
|
||||||
m_query.addRestriction(ColumnSQL, Operator, null,
|
if(dbox.getValue() != null)
|
||||||
infoName, null, and, openBrackets);
|
value = new Timestamp(((Date)dbox.getValue()).getTime());
|
||||||
appendCode(code, ColumnName, Operator, "", "", andOr, lBrackets, rBrackets);
|
}
|
||||||
}
|
else if(compo instanceof DatetimeBox) {
|
||||||
continue;
|
DatetimeBox dtbox = (DatetimeBox)compo;
|
||||||
}
|
if(dtbox.getValue() != null)
|
||||||
Object parsedValue = parseValue(field, value);
|
value = new Timestamp(((Date)dtbox.getValue()).getTime());
|
||||||
if (parsedValue == null)
|
}
|
||||||
continue;
|
else {
|
||||||
String infoDisplay = value.toString();
|
value = cellQueryFrom.getAttribute("value");
|
||||||
if (field.isLookup())
|
}
|
||||||
infoDisplay = field.getLookup().getDisplay(value);
|
|
||||||
else if (field.getDisplayType() == DisplayType.YesNo)
|
|
||||||
infoDisplay = Msg.getMsg(Env.getCtx(), infoDisplay);
|
|
||||||
// Value2 ******
|
|
||||||
Object value2 = null;
|
|
||||||
if (MQuery.OPERATORS[MQuery.BETWEEN_INDEX].getValue().equals(Operator))
|
|
||||||
{
|
|
||||||
ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId());
|
|
||||||
|
|
||||||
//Allowing Date validation before save
|
if (value == null)
|
||||||
compo = cellQueryTo.getFirstChild();
|
{
|
||||||
if(compo instanceof Datebox) {
|
if(Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL))
|
||||||
Datebox dbox = (Datebox)compo;
|
{
|
||||||
if(dbox.getValue() != null)
|
m_query.addRestriction(ColumnSQL, Operator, null,
|
||||||
value2 = new Timestamp(((Date)dbox.getValue()).getTime());
|
infoName, null, and, openBrackets);
|
||||||
}
|
appendCode(code, ColumnName, Operator, "", "", andOr, lBrackets, rBrackets);
|
||||||
else if(compo instanceof DatetimeBox) {
|
}
|
||||||
DatetimeBox dtbox = (DatetimeBox)compo;
|
continue;
|
||||||
if(dtbox.getValue() != null)
|
}
|
||||||
value2 = new Timestamp(((Date)dtbox.getValue()).getTime());
|
Object parsedValue = parseValue(field, value);
|
||||||
}
|
if (parsedValue == null)
|
||||||
else {
|
continue;
|
||||||
value2 = cellQueryFrom.getAttribute("value");
|
String infoDisplay = value.toString();
|
||||||
}
|
if (field.isLookup())
|
||||||
|
infoDisplay = field.getLookup().getDisplay(value);
|
||||||
|
else if (field.getDisplayType() == DisplayType.YesNo)
|
||||||
|
infoDisplay = Msg.getMsg(Env.getCtx(), infoDisplay);
|
||||||
|
// Value2 ******
|
||||||
|
Object value2 = null;
|
||||||
|
if (MQuery.OPERATORS[MQuery.BETWEEN_INDEX].getValue().equals(Operator))
|
||||||
|
{
|
||||||
|
ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId());
|
||||||
|
|
||||||
|
//Allowing Date validation before save
|
||||||
|
compo = cellQueryTo.getFirstChild();
|
||||||
|
if(compo instanceof Datebox) {
|
||||||
|
Datebox dbox = (Datebox)compo;
|
||||||
|
if(dbox.getValue() != null)
|
||||||
|
value2 = new Timestamp(((Date)dbox.getValue()).getTime());
|
||||||
|
}
|
||||||
|
else if(compo instanceof DatetimeBox) {
|
||||||
|
DatetimeBox dtbox = (DatetimeBox)compo;
|
||||||
|
if(dtbox.getValue() != null)
|
||||||
|
value2 = new Timestamp(((Date)dtbox.getValue()).getTime());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
value2 = cellQueryFrom.getAttribute("value");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
value2 = cellQueryTo.getAttribute("value");
|
value2 = cellQueryTo.getAttribute("value");
|
||||||
if (value2 == null)
|
if (value2 == null)
|
||||||
continue;
|
continue;
|
||||||
Object parsedValue2 = parseValue(field, value2);
|
Object parsedValue2 = parseValue(field, value2);
|
||||||
String infoDisplay_to = value2.toString();
|
String infoDisplay_to = value2.toString();
|
||||||
if (parsedValue2 == null)
|
if (parsedValue2 == null)
|
||||||
continue;
|
continue;
|
||||||
m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
|
m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
|
||||||
infoName, infoDisplay, infoDisplay_to, and, openBrackets);
|
infoName, infoDisplay, infoDisplay_to, and, openBrackets);
|
||||||
}
|
}
|
||||||
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator)) {
|
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator)) {
|
||||||
if (!(parsedValue instanceof Integer)) {
|
if (!(parsedValue instanceof Integer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
m_query.addRestriction(getSubCategoryWhereClause(field, ((Integer) parsedValue).intValue()), and, openBrackets);
|
m_query.addRestriction(getSubCategoryWhereClause(field, ((Integer) parsedValue).intValue()), and, openBrackets);
|
||||||
}
|
}
|
||||||
else if ((field.getDisplayType()==DisplayType.ChosenMultipleSelectionList||field.getDisplayType()==DisplayType.ChosenMultipleSelectionSearch||field.getDisplayType()==DisplayType.ChosenMultipleSelectionTable) &&
|
else if ((field.getDisplayType()==DisplayType.ChosenMultipleSelectionList||field.getDisplayType()==DisplayType.ChosenMultipleSelectionSearch||field.getDisplayType()==DisplayType.ChosenMultipleSelectionTable) &&
|
||||||
(MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator) || MQuery.OPERATORS[MQuery.NOT_EQUAL_INDEX].getValue().equals(Operator)))
|
(MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator) || MQuery.OPERATORS[MQuery.NOT_EQUAL_INDEX].getValue().equals(Operator)))
|
||||||
{
|
{
|
||||||
String clause = DB.intersectClauseForCSV(ColumnSQL, parsedValue.toString());
|
String clause = DB.intersectClauseForCSV(ColumnSQL, parsedValue.toString());
|
||||||
if (MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator))
|
if (MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator))
|
||||||
m_query.addRestriction(clause, and, openBrackets);
|
m_query.addRestriction(clause, and, openBrackets);
|
||||||
else
|
else
|
||||||
m_query.addRestriction("NOT (" + clause + ")", and, openBrackets);
|
m_query.addRestriction("NOT (" + clause + ")", and, openBrackets);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_query.addRestriction(ColumnSQL, Operator, parsedValue,
|
m_query.addRestriction(ColumnSQL, Operator, parsedValue,
|
||||||
infoName, infoDisplay, and, openBrackets);
|
infoName, infoDisplay, and, openBrackets);
|
||||||
|
|
||||||
appendCode(code, ColumnName, Operator, value.toString(), value2 != null ? value2.toString() : "", andOr, lBrackets, rBrackets);
|
appendCode(code, ColumnName, Operator, value.toString(), value2 != null ? value2.toString() : "", andOr, lBrackets, rBrackets);
|
||||||
}
|
}
|
||||||
|
|
||||||
saveQuery(saveQuery, code, shareAllUsers);
|
saveQuery(saveQuery, code, shareAllUsers);
|
||||||
|
} else {
|
||||||
|
m_query.addRestriction(Env.parseContext(Env.getCtx(), m_targetWindowNo, m_whereUserQuery, false));
|
||||||
|
}
|
||||||
|
|
||||||
} // cmd_saveAdvanced
|
} // cmd_saveAdvanced
|
||||||
|
|
||||||
|
@ -2340,15 +2360,14 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
rs = null;
|
rs = null;
|
||||||
stmt = null;
|
stmt = null;
|
||||||
}
|
}
|
||||||
MRole role = MRole.getDefault();
|
|
||||||
// No Records
|
// No Records
|
||||||
/* if (m_total == 0 && alertZeroRecords)
|
/* if (m_total == 0 && alertZeroRecords)
|
||||||
FDialog.warn(m_targetWindowNo, this, "FindZeroRecords");*/
|
FDialog.warn(m_targetWindowNo, this, "FindZeroRecords");*/
|
||||||
// More then allowed
|
// More then allowed
|
||||||
if (query != null && role.isQueryMax(m_total))
|
if (m_gridTab != null && query != null && m_gridTab.isQueryMax(m_total))
|
||||||
{
|
{
|
||||||
FDialog.error(m_targetWindowNo, this, "FindOverMax",
|
FDialog.error(m_targetWindowNo, this, "FindOverMax",
|
||||||
m_total + " > " + role.getMaxQueryRecords());
|
m_total + " > " + m_gridTab.getMaxQueryRecords());
|
||||||
m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ]
|
m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ]
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2536,8 +2555,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
*/
|
*/
|
||||||
public MQuery getQuery()
|
public MQuery getQuery()
|
||||||
{
|
{
|
||||||
MRole role = MRole.getDefault();
|
if (m_gridTab != null && m_gridTab.isQueryMax(getTotalRecords()) && !m_isCancel)
|
||||||
if (role.isQueryMax(getTotalRecords()) && !m_isCancel)
|
|
||||||
{
|
{
|
||||||
m_query = MQuery.getNoRecordQuery (m_tableName, false);
|
m_query = MQuery.getNoRecordQuery (m_tableName, false);
|
||||||
m_total = 0;
|
m_total = 0;
|
||||||
|
@ -2709,4 +2727,14 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
} // setDtatusDB
|
} // setDtatusDB
|
||||||
/** END DEVCOFFEE **/
|
/** END DEVCOFFEE **/
|
||||||
|
|
||||||
|
private void hideAdvanced() {
|
||||||
|
advancedPanelToolBar.setVisible(false);
|
||||||
|
advancedPanel.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showAdvanced() {
|
||||||
|
advancedPanelToolBar.setVisible(true);
|
||||||
|
advancedPanel.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
} // FindPanel
|
} // FindPanel
|
||||||
|
|
|
@ -250,8 +250,7 @@ public class FactReconcile {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
rec.setMatchCode(null);
|
return rec.delete(false);
|
||||||
return rec.save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Vector<KeyNamePair> getAccount(){
|
protected Vector<KeyNamePair> getAccount(){
|
||||||
|
|
Loading…
Reference in New Issue