Merge with c09b1324cdd850c319a77bbe63d1c09ee4ef856d
This commit is contained in:
commit
8c732a1c06
|
@ -18,7 +18,8 @@ CREATE OR REPLACE VIEW AD_FIELD_V AS
|
||||||
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
|
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
|
||||||
c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
f.isdisplayedgrid,
|
f.isdisplayedgrid,
|
||||||
f.seqnogrid
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
FROM AD_FIELD f
|
FROM AD_FIELD f
|
||||||
INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID)
|
INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID)
|
||||||
LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
|
LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
|
||||||
|
|
|
@ -17,7 +17,8 @@ CREATE OR REPLACE VIEW AD_FIELD_VT AS
|
||||||
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
|
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
|
||||||
c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
f.isdisplayedgrid,
|
f.isdisplayedgrid,
|
||||||
f.seqnogrid
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
FROM AD_FIELD f
|
FROM AD_FIELD f
|
||||||
INNER JOIN AD_FIELD_TRL trl ON (f.AD_Field_ID = trl.AD_Field_ID)
|
INNER JOIN AD_FIELD_TRL trl ON (f.AD_Field_ID = trl.AD_Field_ID)
|
||||||
INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID)
|
INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID)
|
||||||
|
|
|
@ -14,7 +14,8 @@ CREATE OR REPLACE VIEW ad_field_v AS
|
||||||
COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete,
|
COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete,
|
||||||
COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
f.isdisplayedgrid,
|
f.isdisplayedgrid,
|
||||||
f.seqnogrid
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
FROM ad_field f
|
FROM ad_field f
|
||||||
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||||
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||||
|
|
|
@ -9,7 +9,8 @@ CREATE OR REPLACE VIEW ad_field_vt AS
|
||||||
f.included_tab_id, fg.fieldgrouptype, fg.iscollapsedbydefault, COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete,
|
f.included_tab_id, fg.fieldgrouptype, fg.iscollapsedbydefault, COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete,
|
||||||
COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
f.isdisplayedgrid,
|
f.isdisplayedgrid,
|
||||||
f.seqnogrid
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
FROM ad_field f
|
FROM ad_field f
|
||||||
JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id
|
JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id
|
||||||
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||||
|
|
|
@ -0,0 +1,210 @@
|
||||||
|
-- Aug 20, 2012 11:14:07 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Help,EntityType,Description,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('Selection_Column_SeqNo',200096,'For ordering sequence of selection column','U','Selection Column Sequence','Selection Column Sequence','Selection Column Sequence','6274682b-ac0f-47e8-9fbb-af34b4d69d89',0,TO_DATE('2012-08-20 23:14:06','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-20 23:14:06','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:14:07 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200096 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:08 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,101,200323,'U','N','N','N',0,'N',14,'N',11,'N','N',200096,'N','Y','97599ffb-8d35-48d1-b3c3-d0751a12563e','N','Y','N','Selection_Column_SeqNo','Selection Column Sequence','For ordering sequence of selection column','Selection Column Sequence','Y',100,TO_DATE('2012-08-20 23:17:07','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-20 23:17:07','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:08 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200323 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Element SET ColumnName='SeqNoSelection',Updated=TO_DATE('2012-08-20 23:17:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200096
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Column SET ColumnName='SeqNoSelection', Name='Selection Column Sequence', Description='Selection Column Sequence', Help='For ordering sequence of selection column' WHERE AD_Element_ID=200096
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Process_Para SET ColumnName='SeqNoSelection', Name='Selection Column Sequence', Description='Selection Column Sequence', Help='For ordering sequence of selection column', AD_Element_ID=200096 WHERE UPPER(ColumnName)='SEQNOSELECTION' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Process_Para SET ColumnName='SeqNoSelection', Name='Selection Column Sequence', Description='Selection Column Sequence', Help='For ordering sequence of selection column' WHERE AD_Element_ID=200096 AND IsCentrallyMaintained='Y'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:18:20 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Column SET Description='Selection Column Sequence ',Updated=TO_DATE('2012-08-20 23:18:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200323
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:18:20 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET Name='Selection Column Sequence', Description='Selection Column Sequence ', Help='For ordering sequence of selection column' WHERE AD_Column_ID=200323 AND IsCentrallyMaintained='Y'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:18:28 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
ALTER TABLE AD_Column ADD SeqNoSelection NUMBER(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:19:29 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',101,14,'N','N',200323,'Y',200288,'N','For ordering sequence of selection column','U','Selection Column Sequence','Selection Column Sequence','N','Y','6efc25d8-6850-4e4e-ba45-12c19a7561ec',100,0,TO_DATE('2012-08-20 23:19:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-20 23:19:28','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:19:29 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200288 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=56374
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=2526
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=171
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=54403
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=2574
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=2573
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=160
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=161
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=162
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=166
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=2370
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=169
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=10128
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=4941
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=50188
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=168
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=159
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=825
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=4940
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=200288
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=167
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=5121
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=56317
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=62467
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=5122
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=200286
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:27:34 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-20 23:27:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200288
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:33:11 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET DisplayLogic='@IsSelectionColumn@=''Y''',Updated=TO_DATE('2012-08-20 23:33:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200288
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE AD_System
|
||||||
|
SET LastMigrationScriptApplied='880_IDEMPIERE-377_SeqNoSelection.sql'
|
||||||
|
WHERE LastMigrationScriptApplied<'880_IDEMPIERE-377_SeqNoSelection.sql'
|
||||||
|
OR LastMigrationScriptApplied IS NULL
|
||||||
|
;
|
|
@ -0,0 +1,77 @@
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW AD_FIELD_V AS
|
||||||
|
SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID,
|
||||||
|
f.NAME, f.Description, f.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength,
|
||||||
|
f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly,
|
||||||
|
f.IsEncrypted AS IsEncryptedField, f.ObscureType,
|
||||||
|
c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat,
|
||||||
|
COALESCE(f.DefaultValue, c.DefaultValue) AS DefaultValue,
|
||||||
|
c.IsKey, c.IsParent,
|
||||||
|
COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
|
||||||
|
c.IsIdentifier, c.IsTranslated, COALESCE(f.AD_Reference_Value_ID, c.AD_Reference_Value_ID) AS AD_Reference_Value_ID,
|
||||||
|
c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID,
|
||||||
|
COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID) AS AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable,
|
||||||
|
c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn,
|
||||||
|
c.IsSelectionColumn,
|
||||||
|
tbl.TableName, c.ValueMin, c.ValueMax,
|
||||||
|
fg.NAME AS FieldGroup, vr.Code AS ValidationCode,
|
||||||
|
f.Included_Tab_ID, fg.FieldGroupType, fg.IsCollapsedByDefault,
|
||||||
|
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
|
||||||
|
c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
|
f.isdisplayedgrid,
|
||||||
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
|
FROM AD_FIELD f
|
||||||
|
INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID)
|
||||||
|
LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
|
||||||
|
LEFT OUTER JOIN AD_COLUMN c ON (f.AD_Column_ID = c.AD_Column_ID)
|
||||||
|
INNER JOIN AD_TABLE tbl ON (c.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
|
INNER JOIN AD_REFERENCE r ON (c.AD_Reference_ID = r.AD_Reference_ID)
|
||||||
|
LEFT OUTER JOIN AD_VAL_RULE vr ON (vr.AD_Val_Rule_ID = COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID))
|
||||||
|
WHERE f.IsActive = 'Y'
|
||||||
|
AND c.IsActive = 'Y';
|
||||||
|
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST -----
|
||||||
|
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW AD_FIELD_VT AS
|
||||||
|
SELECT trl.AD_LANGUAGE, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID,
|
||||||
|
trl.NAME, trl.Description, trl.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength,
|
||||||
|
f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly,
|
||||||
|
f.IsEncrypted AS IsEncryptedField, f.ObscureType,
|
||||||
|
c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat,
|
||||||
|
COALESCE(f.DefaultValue, c.DefaultValue) AS DefaultValue,
|
||||||
|
c.IsKey, c.IsParent,
|
||||||
|
COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
|
||||||
|
c.IsIdentifier, c.IsTranslated, COALESCE(f.AD_Reference_Value_ID, c.AD_Reference_Value_ID) AS AD_Reference_Value_ID,
|
||||||
|
c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID,
|
||||||
|
COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID) as AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable,
|
||||||
|
c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, c.IsSelectionColumn,
|
||||||
|
tbl.TableName, c.ValueMin, c.ValueMax,
|
||||||
|
fgt.NAME AS FieldGroup, vr.Code AS ValidationCode,
|
||||||
|
f.Included_Tab_ID, fg.FieldGroupType, fg.IsCollapsedByDefault,
|
||||||
|
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
|
||||||
|
c.IsAutocomplete, COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
|
f.isdisplayedgrid,
|
||||||
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
|
FROM AD_FIELD f
|
||||||
|
INNER JOIN AD_FIELD_TRL trl ON (f.AD_Field_ID = trl.AD_Field_ID)
|
||||||
|
INNER JOIN AD_TAB t ON (f.AD_Tab_ID = t.AD_Tab_ID)
|
||||||
|
LEFT OUTER JOIN AD_FIELDGROUP fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
|
||||||
|
LEFT OUTER JOIN AD_FIELDGROUP_TRL fgt ON
|
||||||
|
(f.AD_FieldGroup_ID = fgt.AD_FieldGroup_ID AND trl.AD_LANGUAGE=fgt.AD_LANGUAGE)
|
||||||
|
LEFT OUTER JOIN AD_COLUMN c ON (f.AD_Column_ID = c.AD_Column_ID)
|
||||||
|
INNER JOIN AD_TABLE tbl ON (c.AD_Table_ID = tbl.AD_Table_ID)
|
||||||
|
INNER JOIN AD_REFERENCE r ON (c.AD_Reference_ID = r.AD_Reference_ID)
|
||||||
|
LEFT OUTER JOIN AD_VAL_RULE vr ON (vr.AD_Val_Rule_ID=COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID))
|
||||||
|
WHERE f.IsActive = 'Y'
|
||||||
|
AND c.IsActive = 'Y';
|
||||||
|
|
||||||
|
UPDATE AD_System
|
||||||
|
SET LastMigrationScriptApplied='885_IDEMPIERE-377_AD_Field_V.sql'
|
||||||
|
WHERE LastMigrationScriptApplied<'885_IDEMPIERE-377_AD_Field_V.sql'
|
||||||
|
OR LastMigrationScriptApplied IS NULL
|
||||||
|
;
|
|
@ -0,0 +1,36 @@
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:41:46 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,578,200320,'U','N','N','N',0,'N',14,'N',19,'N','N',126,'N','Y','f0b8be7d-2a2a-4c1e-a4b6-d6fe23e4c771','N','Y','N','AD_Table_ID','Database Table information','The Database Table provides the information of the table definition','Table','Y',100,TO_DATE('2012-08-19 15:41:44','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-19 15:41:44','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:41:46 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200320 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:42:25 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
ALTER TABLE AD_PInstance_Log ADD AD_Table_ID NUMBER(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:44:14 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,578,200321,'U','N','N','N',0,'N',14,'N',11,'N','N',538,'N','Y','dcf3a178-7018-4e7d-b449-cf852fb97390','N','Y','N','Record_ID','Direct internal record ID','The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.','Record ID','Y',100,TO_DATE('2012-08-19 15:44:13','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-19 15:44:13','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:44:14 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200321 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:45:16 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
ALTER TABLE AD_PInstance_Log ADD Record_ID NUMBER(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE AD_System
|
||||||
|
SET LastMigrationScriptApplied='887_LinkEndOfProcess.sql'
|
||||||
|
WHERE LastMigrationScriptApplied<'887_LinkEndOfProcess.sql'
|
||||||
|
OR LastMigrationScriptApplied IS NULL
|
||||||
|
;
|
|
@ -0,0 +1,210 @@
|
||||||
|
-- Aug 20, 2012 11:14:07 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Help,EntityType,Description,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('Selection_Column_SeqNo',200096,'For ordering sequence of selection column','U','Selection Column Sequence','Selection Column Sequence','Selection Column Sequence','6274682b-ac0f-47e8-9fbb-af34b4d69d89',0,TO_TIMESTAMP('2012-08-20 23:14:06','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-20 23:14:06','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:14:07 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200096 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:08 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,101,200323,'U','N','N','N',0,'N',14,'N',11,'N','N',200096,'N','Y','97599ffb-8d35-48d1-b3c3-d0751a12563e','N','Y','N','Selection_Column_SeqNo','Selection Column Sequence','For ordering sequence of selection column','Selection Column Sequence','Y',100,TO_TIMESTAMP('2012-08-20 23:17:07','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-20 23:17:07','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:08 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200323 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Element SET ColumnName='SeqNoSelection',Updated=TO_TIMESTAMP('2012-08-20 23:17:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200096
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Column SET ColumnName='SeqNoSelection', Name='Selection Column Sequence', Description='Selection Column Sequence', Help='For ordering sequence of selection column' WHERE AD_Element_ID=200096
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Process_Para SET ColumnName='SeqNoSelection', Name='Selection Column Sequence', Description='Selection Column Sequence', Help='For ordering sequence of selection column', AD_Element_ID=200096 WHERE UPPER(ColumnName)='SEQNOSELECTION' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:17:48 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Process_Para SET ColumnName='SeqNoSelection', Name='Selection Column Sequence', Description='Selection Column Sequence', Help='For ordering sequence of selection column' WHERE AD_Element_ID=200096 AND IsCentrallyMaintained='Y'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:18:20 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Column SET Description='Selection Column Sequence ',Updated=TO_TIMESTAMP('2012-08-20 23:18:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200323
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:18:20 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET Name='Selection Column Sequence', Description='Selection Column Sequence ', Help='For ordering sequence of selection column' WHERE AD_Column_ID=200323 AND IsCentrallyMaintained='Y'
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:18:28 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
ALTER TABLE AD_Column ADD COLUMN SeqNoSelection NUMERIC(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:19:29 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',101,14,'N','N',200323,'Y',200288,'N','For ordering sequence of selection column','U','Selection Column Sequence','Selection Column Sequence','N','Y','6efc25d8-6850-4e4e-ba45-12c19a7561ec',100,0,TO_TIMESTAMP('2012-08-20 23:19:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-20 23:19:28','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:19:29 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200288 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=56374
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=2526
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=171
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=54403
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=2574
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=2573
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=160
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=161
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=162
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=166
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=2370
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=169
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=10128
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=4941
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=50188
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=168
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=159
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=825
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=4940
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=200288
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=167
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=5121
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=56317
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=62467
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=5122
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:43 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=200286
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:27:34 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-20 23:27:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200288
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:33:11 PM IST
|
||||||
|
-- Add search sequence support for search dialog
|
||||||
|
UPDATE AD_Field SET DisplayLogic='@IsSelectionColumn@=''Y''',Updated=TO_TIMESTAMP('2012-08-20 23:33:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200288
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE AD_System
|
||||||
|
SET LastMigrationScriptApplied='880_IDEMPIERE-377_SeqNoSelection.sql'
|
||||||
|
WHERE LastMigrationScriptApplied<'880_IDEMPIERE-377_SeqNoSelection.sql'
|
||||||
|
OR LastMigrationScriptApplied IS NULL
|
||||||
|
;
|
|
@ -0,0 +1,58 @@
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST ----
|
||||||
|
CREATE OR REPLACE VIEW ad_field_v AS
|
||||||
|
SELECT t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id,
|
||||||
|
f.name, f.description, f.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno,
|
||||||
|
f.sortno, f.issameline, f.isheading, f.isfieldonly, f.isreadonly, f.isencrypted AS isencryptedfield,
|
||||||
|
f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat,
|
||||||
|
COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue, c.iskey, c.isparent,
|
||||||
|
COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated,
|
||||||
|
COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id, c.callout,
|
||||||
|
COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id,
|
||||||
|
COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id,
|
||||||
|
c.isalwaysupdateable, c.readonlylogic, c.mandatorylogic, c.isupdateable,
|
||||||
|
c.isencrypted AS isencryptedcolumn, c.isselectioncolumn, tbl.tablename, c.valuemin, c.valuemax,
|
||||||
|
fg.name AS fieldgroup, vr.code AS validationcode, f.included_tab_id, fg.fieldgrouptype, fg.iscollapsedbydefault,
|
||||||
|
COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete,
|
||||||
|
COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
|
f.isdisplayedgrid,
|
||||||
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
|
FROM ad_field f
|
||||||
|
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||||
|
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||||
|
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
|
||||||
|
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id
|
||||||
|
JOIN ad_reference r ON c.ad_reference_id = r.ad_reference_id
|
||||||
|
LEFT JOIN ad_val_rule vr ON vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id)
|
||||||
|
WHERE f.isactive = 'Y'::bpchar AND c.isactive = 'Y'::bpchar;
|
||||||
|
|
||||||
|
-- Aug 20, 2012 11:20:42 PM IST ----
|
||||||
|
CREATE OR REPLACE VIEW ad_field_vt AS
|
||||||
|
SELECT trl.ad_language, t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, trl.name, trl.description,
|
||||||
|
trl.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno, f.sortno, f.issameline, f.isheading, f.isfieldonly, f.isreadonly,
|
||||||
|
f.isencrypted AS isencryptedfield, f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue,
|
||||||
|
c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated,
|
||||||
|
COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id, c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id,
|
||||||
|
COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, c.isalwaysupdateable, c.readonlylogic, c.mandatorylogic, c.isupdateable,
|
||||||
|
c.isencrypted AS isencryptedcolumn, c.isselectioncolumn, tbl.tablename, c.valuemin, c.valuemax, fgt.name AS fieldgroup, vr.code AS validationcode,
|
||||||
|
f.included_tab_id, fg.fieldgrouptype, fg.iscollapsedbydefault, COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete,
|
||||||
|
COALESCE(f.IsAllowCopy, c.IsAllowCopy) AS IsAllowCopy,
|
||||||
|
f.isdisplayedgrid,
|
||||||
|
f.seqnogrid,
|
||||||
|
c.seqnoselection
|
||||||
|
FROM ad_field f
|
||||||
|
JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id
|
||||||
|
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||||
|
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||||
|
LEFT JOIN ad_fieldgroup_trl fgt ON f.ad_fieldgroup_id = fgt.ad_fieldgroup_id AND trl.ad_language::text = fgt.ad_language::text
|
||||||
|
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
|
||||||
|
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id
|
||||||
|
JOIN ad_reference r ON c.ad_reference_id = r.ad_reference_id
|
||||||
|
LEFT JOIN ad_val_rule vr ON vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id)
|
||||||
|
WHERE f.isactive = 'Y'::bpchar AND c.isactive = 'Y'::bpchar;
|
||||||
|
|
||||||
|
UPDATE AD_System
|
||||||
|
SET LastMigrationScriptApplied='885_IDEMPIERE-377_AD_Field_V.sql'
|
||||||
|
WHERE LastMigrationScriptApplied<'885_IDEMPIERE-377_AD_Field_V.sql'
|
||||||
|
OR LastMigrationScriptApplied IS NULL
|
||||||
|
;
|
|
@ -0,0 +1,37 @@
|
||||||
|
-- Aug 19, 2012 3:40:16 PM IST
|
||||||
|
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,578,200320,'U','N','N','N',0,'N',14,'N',19,'N','N',126,'N','Y','f0b8be7d-2a2a-4c1e-a4b6-d6fe23e4c771','N','Y','N','AD_Table_ID','Database Table information','The Database Table provides the information of the table definition','Table','Y',100,TO_TIMESTAMP('2012-08-19 15:41:44','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-19 15:41:44','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:41:46 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200320 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:42:25 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
ALTER TABLE AD_PInstance_Log ADD COLUMN AD_Table_ID NUMERIC(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:44:14 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (0,578,200321,'U','N','N','N',0,'N',14,'N',11,'N','N',538,'N','Y','dcf3a178-7018-4e7d-b449-cf852fb97390','N','Y','N','Record_ID','Direct internal record ID','The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.','Record ID','Y',100,TO_TIMESTAMP('2012-08-19 15:44:13','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-19 15:44:13','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:44:14 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200321 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Aug 19, 2012 3:45:16 PM IST
|
||||||
|
-- Link end-of-process to next window
|
||||||
|
ALTER TABLE AD_PInstance_Log ADD COLUMN Record_ID NUMERIC(10) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE AD_System
|
||||||
|
SET LastMigrationScriptApplied='887_LinkEndOfProcess.sql'
|
||||||
|
WHERE LastMigrationScriptApplied<'887_LinkEndOfProcess.sql'
|
||||||
|
OR LastMigrationScriptApplied IS NULL
|
||||||
|
;
|
|
@ -255,7 +255,8 @@ public class InOutGenerateRMA extends SvrProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add processing information to process log
|
// Add processing information to process log
|
||||||
addLog(shipment.getM_InOut_ID(), shipment.getMovementDate(), null, processMsg.toString());
|
addLog(shipment.getM_InOut_ID(), shipment.getMovementDate(), null, processMsg.toString(),shipment.get_Table_ID(),shipment.getM_InOut_ID()
|
||||||
|
);
|
||||||
m_created++;
|
m_created++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ public class InvoiceGenerateRMA extends SvrProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add processing information to process log
|
// Add processing information to process log
|
||||||
addLog(invoice.getC_Invoice_ID(), invoice.getDateInvoiced(), null, processMsg.toString());
|
addLog(invoice.getC_Invoice_ID(), invoice.getDateInvoiced(), null, processMsg.toString(),invoice.get_Table_ID(),invoice.getC_Invoice_ID());
|
||||||
m_created++;
|
m_created++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -396,7 +396,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
{
|
{
|
||||||
if (payment.allocateIt())
|
if (payment.allocateIt())
|
||||||
{
|
{
|
||||||
addLog(0, payment.getDateAcct(), openAmt, payment.getDocumentNo() + " [1]");
|
addLog(0, payment.getDateAcct(), openAmt, payment.getDocumentNo() + " [1]",payment.get_Table_ID(),payment.getC_Payment_ID());
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -584,8 +584,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
|
|
||||||
}
|
}
|
||||||
m_shipment.saveEx();
|
m_shipment.saveEx();
|
||||||
//
|
addLog(m_shipment.getM_InOut_ID(), m_shipment.getMovementDate(), null, m_shipment.getDocumentNo(),m_shipment.get_Table_ID(),m_shipment.getM_InOut_ID());
|
||||||
addLog(m_shipment.getM_InOut_ID(), m_shipment.getMovementDate(), null, m_shipment.getDocumentNo());
|
|
||||||
m_created++;
|
m_created++;
|
||||||
|
|
||||||
//reset storage cache as MInOut.completeIt will update m_storage
|
//reset storage cache as MInOut.completeIt will update m_storage
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class InvoiceBatchProcess extends SvrProcess
|
||||||
}
|
}
|
||||||
m_invoice.saveEx();
|
m_invoice.saveEx();
|
||||||
|
|
||||||
addLog(0, m_invoice.getDateInvoiced(), m_invoice.getGrandTotal(), m_invoice.getDocumentNo());
|
addLog(0, m_invoice.getDateInvoiced(), m_invoice.getGrandTotal(), m_invoice.getDocumentNo(),m_invoice.get_Table_ID(),m_invoice.getC_Invoice_ID());
|
||||||
m_count++;
|
m_count++;
|
||||||
|
|
||||||
m_invoice = null;
|
m_invoice = null;
|
||||||
|
|
|
@ -267,7 +267,7 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
if (completeOrder && !fullyDelivered)
|
if (completeOrder && !fullyDelivered)
|
||||||
{
|
{
|
||||||
log.fine("Failed CompleteOrder - " + oLine);
|
log.fine("Failed CompleteOrder - " + oLine);
|
||||||
addLog("Failed CompleteOrder - " + oLine); // Elaine 2008/11/25
|
addLog(0, null, null,"Failed CompleteOrder - " + oLine,oLine.get_Table_ID(),oLine.getC_OrderLine_ID()); // Elaine 2008/11/25
|
||||||
completeOrder = false;
|
completeOrder = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -287,8 +287,8 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
{
|
{
|
||||||
log.fine("Failed: " + order.getInvoiceRule()
|
log.fine("Failed: " + order.getInvoiceRule()
|
||||||
+ " - ToInvoice=" + toInvoice + " - " + oLine);
|
+ " - ToInvoice=" + toInvoice + " - " + oLine);
|
||||||
addLog("Failed: " + order.getInvoiceRule()
|
addLog(0, null, null,"Failed: " + order.getInvoiceRule()
|
||||||
+ " - ToInvoice=" + toInvoice + " - " + oLine);
|
+ " - ToInvoice=" + toInvoice + " - " + oLine,oLine.get_Table_ID(),oLine.getC_OrderLine_ID());
|
||||||
}
|
}
|
||||||
} // for all order lines
|
} // for all order lines
|
||||||
if (MOrder.INVOICERULE_Immediate.equals(order.getInvoiceRule()))
|
if (MOrder.INVOICERULE_Immediate.equals(order.getInvoiceRule()))
|
||||||
|
@ -491,13 +491,13 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
if (!m_invoice.processIt(p_docAction))
|
if (!m_invoice.processIt(p_docAction))
|
||||||
{
|
{
|
||||||
log.warning("completeInvoice - failed: " + m_invoice);
|
log.warning("completeInvoice - failed: " + m_invoice);
|
||||||
addLog("completeInvoice - failed: " + m_invoice); // Elaine 2008/11/25
|
addLog(0, null, null,"completeInvoice - failed: " + m_invoice,m_invoice.get_Table_ID(),m_invoice.getC_Invoice_ID()); // Elaine 2008/11/25
|
||||||
throw new IllegalStateException("Invoice Process Failed: " + m_invoice + " - " + m_invoice.getProcessMsg());
|
throw new IllegalStateException("Invoice Process Failed: " + m_invoice + " - " + m_invoice.getProcessMsg());
|
||||||
|
|
||||||
}
|
}
|
||||||
m_invoice.saveEx();
|
m_invoice.saveEx();
|
||||||
|
|
||||||
addLog(m_invoice.getC_Invoice_ID(), m_invoice.getDateInvoiced(), null, m_invoice.getDocumentNo());
|
addLog(m_invoice.getC_Invoice_ID(), m_invoice.getDateInvoiced(), null, m_invoice.getDocumentNo(),m_invoice.get_Table_ID(),m_invoice.getC_Invoice_ID());
|
||||||
m_created++;
|
m_created++;
|
||||||
}
|
}
|
||||||
m_invoice = null;
|
m_invoice = null;
|
||||||
|
|
|
@ -208,7 +208,7 @@ public class OrderPOCreate extends SvrProcess
|
||||||
if (po == null || po.getBill_BPartner_ID() != C_BPartner_ID)
|
if (po == null || po.getBill_BPartner_ID() != C_BPartner_ID)
|
||||||
{
|
{
|
||||||
po = createPOForVendor(rs.getInt(1), so);
|
po = createPOForVendor(rs.getInt(1), so);
|
||||||
addLog(0, null, null, po.getDocumentNo());
|
addLog(0, null, null, po.getDocumentNo(),po.get_Table_ID(),po.getC_Order_ID());
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ public class RequestInvoice extends SvrProcess
|
||||||
|
|
||||||
}
|
}
|
||||||
m_invoice.saveEx();
|
m_invoice.saveEx();
|
||||||
addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo());
|
addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo(),m_invoice.get_Table_ID(),m_invoice.getC_Invoice_ID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_invoice = null;
|
m_invoice = null;
|
||||||
|
|
|
@ -380,7 +380,7 @@ public class RequisitionPOCreate extends SvrProcess
|
||||||
if (m_order != null)
|
if (m_order != null)
|
||||||
{
|
{
|
||||||
m_order.load(get_TrxName());
|
m_order.load(get_TrxName());
|
||||||
addLog(0, null, m_order.getGrandTotal(), m_order.getDocumentNo());
|
addLog(0, null, m_order.getGrandTotal(), m_order.getDocumentNo(),m_order.get_Table_ID(),m_order.getC_Order_ID());
|
||||||
}
|
}
|
||||||
m_order = null;
|
m_order = null;
|
||||||
m_orderLine = null;
|
m_orderLine = null;
|
||||||
|
|
|
@ -1126,6 +1126,14 @@ public class GridField
|
||||||
{
|
{
|
||||||
return m_vo.IsSelectionColumn;
|
return m_vo.IsSelectionColumn;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Selection column sequence
|
||||||
|
* @return SeqNoSelection
|
||||||
|
*/
|
||||||
|
public int getSeqNoSelection()
|
||||||
|
{
|
||||||
|
return m_vo.SeqNoSelection;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get Obscure Type
|
* Get Obscure Type
|
||||||
* @return obscure
|
* @return obscure
|
||||||
|
|
|
@ -136,6 +136,8 @@ public class GridFieldVO implements Serializable
|
||||||
vo.IsEncryptedColumn = "Y".equals(rs.getString (i));
|
vo.IsEncryptedColumn = "Y".equals(rs.getString (i));
|
||||||
else if (columnName.equalsIgnoreCase("IsSelectionColumn"))
|
else if (columnName.equalsIgnoreCase("IsSelectionColumn"))
|
||||||
vo.IsSelectionColumn = "Y".equals(rs.getString (i));
|
vo.IsSelectionColumn = "Y".equals(rs.getString (i));
|
||||||
|
else if (columnName.equalsIgnoreCase("SeqNoSelection"))
|
||||||
|
vo.SeqNoSelection = rs.getInt (i);
|
||||||
else if (columnName.equalsIgnoreCase("SortNo"))
|
else if (columnName.equalsIgnoreCase("SortNo"))
|
||||||
vo.SortNo = rs.getInt (i);
|
vo.SortNo = rs.getInt (i);
|
||||||
else if (columnName.equalsIgnoreCase("FieldLength"))
|
else if (columnName.equalsIgnoreCase("FieldLength"))
|
||||||
|
@ -449,6 +451,8 @@ public class GridFieldVO implements Serializable
|
||||||
public boolean IsEncryptedColumn = false;
|
public boolean IsEncryptedColumn = false;
|
||||||
/** Find Selection */
|
/** Find Selection */
|
||||||
public boolean IsSelectionColumn = false;
|
public boolean IsSelectionColumn = false;
|
||||||
|
/** Selection column sequence */
|
||||||
|
public int SeqNoSelection = 0;
|
||||||
/** Order By */
|
/** Order By */
|
||||||
public int SortNo = 0;
|
public int SortNo = 0;
|
||||||
/** Field Length */
|
/** Field Length */
|
||||||
|
@ -609,6 +613,7 @@ public class GridFieldVO implements Serializable
|
||||||
clone.IsEncryptedField = IsEncryptedField;
|
clone.IsEncryptedField = IsEncryptedField;
|
||||||
clone.IsEncryptedColumn = IsEncryptedColumn;
|
clone.IsEncryptedColumn = IsEncryptedColumn;
|
||||||
clone.IsSelectionColumn = IsSelectionColumn;
|
clone.IsSelectionColumn = IsSelectionColumn;
|
||||||
|
clone.SeqNoSelection = SeqNoSelection;
|
||||||
clone.IsAutocomplete = IsAutocomplete;
|
clone.IsAutocomplete = IsAutocomplete;
|
||||||
clone.IsAllowCopy = IsAllowCopy;
|
clone.IsAllowCopy = IsAllowCopy;
|
||||||
clone.SortNo = SortNo;
|
clone.SortNo = SortNo;
|
||||||
|
|
|
@ -420,6 +420,10 @@ public class MQuery implements Serializable
|
||||||
public static final String BETWEEN = " BETWEEN ";
|
public static final String BETWEEN = " BETWEEN ";
|
||||||
/** Between - 8 */
|
/** Between - 8 */
|
||||||
public static final int BETWEEN_INDEX = 8;
|
public static final int BETWEEN_INDEX = 8;
|
||||||
|
/** For IDEMPIERE-377 */
|
||||||
|
public static final String NOT_NULL = "IS NOT NULL";
|
||||||
|
/** For IDEMPIERE-377 */
|
||||||
|
public static final String NULL = "IS NULL";
|
||||||
|
|
||||||
/** Operators for Strings */
|
/** Operators for Strings */
|
||||||
public static final ValueNamePair[] OPERATORS = new ValueNamePair[] {
|
public static final ValueNamePair[] OPERATORS = new ValueNamePair[] {
|
||||||
|
@ -443,6 +447,45 @@ public class MQuery implements Serializable
|
||||||
new ValueNamePair (EQUAL, " = ")
|
new ValueNamePair (EQUAL, " = ")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Operators for Number, Amount, Date, Costs+Prices, Quantity, Integer, ID */
|
||||||
|
public static final ValueNamePair[] OPERATORS_NUMBERS = new ValueNamePair[] {
|
||||||
|
new ValueNamePair (EQUAL, " = "), // 0
|
||||||
|
new ValueNamePair (NOT_EQUAL, " != "),
|
||||||
|
new ValueNamePair (GREATER, " > "),
|
||||||
|
new ValueNamePair (GREATER_EQUAL, " >= "), // 5
|
||||||
|
new ValueNamePair (LESS, " < "),
|
||||||
|
new ValueNamePair (LESS_EQUAL, " <= "),
|
||||||
|
new ValueNamePair (BETWEEN, " >-< "), // 8
|
||||||
|
new ValueNamePair (NULL, " NULL "),
|
||||||
|
new ValueNamePair (NOT_NULL, " !NULL ")
|
||||||
|
|
||||||
|
};
|
||||||
|
/** Operators for URL */
|
||||||
|
public static final ValueNamePair[] OPERATORS_EQUAL_LIKE = new ValueNamePair[] {
|
||||||
|
new ValueNamePair (EQUAL, " = "), // 0
|
||||||
|
new ValueNamePair (NOT_EQUAL, " != "),
|
||||||
|
new ValueNamePair (NOT_EQUAL, " ~ "),
|
||||||
|
new ValueNamePair (LIKE, " !~ "),
|
||||||
|
new ValueNamePair (NULL, " NULL "),
|
||||||
|
new ValueNamePair (NOT_NULL, " !NULL ")
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Operators for all */
|
||||||
|
public static final ValueNamePair[] OPERATORS_ALL = new ValueNamePair[] {
|
||||||
|
new ValueNamePair (EQUAL, " = "), // 0
|
||||||
|
new ValueNamePair (NOT_EQUAL, " != "),
|
||||||
|
new ValueNamePair (LIKE, " ~ "),
|
||||||
|
new ValueNamePair (NOT_LIKE, " !~ "),
|
||||||
|
new ValueNamePair (GREATER, " > "),
|
||||||
|
new ValueNamePair (GREATER_EQUAL, " >= "), // 5
|
||||||
|
new ValueNamePair (LESS, " < "),
|
||||||
|
new ValueNamePair (LESS_EQUAL, " <= "),
|
||||||
|
new ValueNamePair (BETWEEN, " >-< "), // 8
|
||||||
|
new ValueNamePair (NULL, " NULL "),
|
||||||
|
new ValueNamePair (NOT_NULL, " !NULL ")
|
||||||
|
};
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* Add Restriction
|
* Add Restriction
|
||||||
* @param ColumnName ColumnName
|
* @param ColumnName ColumnName
|
||||||
|
@ -1116,7 +1159,18 @@ class Restriction implements Serializable
|
||||||
sb.append(" IS NULL ");
|
sb.append(" IS NULL ");
|
||||||
else
|
else
|
||||||
sb.append(" IS NOT NULL ");
|
sb.append(" IS NOT NULL ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if ((Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL))
|
||||||
|
&& (Code == null
|
||||||
|
|| "NULL".equals (Code.toString().toUpperCase())))
|
||||||
|
{
|
||||||
|
if (Operator.equals(MQuery.NULL))
|
||||||
|
sb.append(" IS NULL ");
|
||||||
|
else
|
||||||
|
sb.append(" IS NOT NULL ");
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sb.append(Operator);
|
sb.append(Operator);
|
||||||
|
|
|
@ -519,6 +519,16 @@ public class ProcessInfo implements Serializable
|
||||||
} // setParameter
|
} // setParameter
|
||||||
|
|
||||||
|
|
||||||
|
public void addLog (int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg,int tableId,int recordId)
|
||||||
|
{
|
||||||
|
addLog (new ProcessInfoLog (Log_ID, P_ID, P_Date, P_Number, P_Msg,tableId,recordId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addLog (int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg ,int tableId,int recordId)
|
||||||
|
{
|
||||||
|
addLog (new ProcessInfoLog (P_ID, P_Date, P_Number, P_Msg,tableId, recordId));
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Add to Log
|
* Add to Log
|
||||||
* @param Log_ID Log ID
|
* @param Log_ID Log ID
|
||||||
|
|
|
@ -33,7 +33,29 @@ public class ProcessInfoLog implements Serializable
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -4064380205358897097L;
|
private static final long serialVersionUID = -4064380205358897097L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Process Info Log.
|
||||||
|
* @param P_ID Process ID
|
||||||
|
* @param P_Date Process Date
|
||||||
|
* @param P_Number Process Number
|
||||||
|
* @param P_Msg Process Messagre
|
||||||
|
*/
|
||||||
|
public ProcessInfoLog (int Log_ID,int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg, int AD_Table_ID ,int Record_ID)
|
||||||
|
{
|
||||||
|
setLog_ID (Log_ID);
|
||||||
|
setP_ID (P_ID);
|
||||||
|
setP_Date (P_Date);
|
||||||
|
setP_Number (P_Number);
|
||||||
|
setP_Msg (P_Msg);
|
||||||
|
setAd_Table_Id(AD_Table_ID);
|
||||||
|
setRecord_Id(Record_ID);
|
||||||
|
|
||||||
|
} // ProcessInfoLog
|
||||||
|
|
||||||
|
public ProcessInfoLog (int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg , int AD_Table_ID ,int Record_ID)
|
||||||
|
{
|
||||||
|
this (s_Log_ID++, P_ID, P_Date, P_Number, P_Msg, AD_Table_ID,Record_ID);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Process Info Log.
|
* Create Process Info Log.
|
||||||
|
@ -44,7 +66,7 @@ public class ProcessInfoLog implements Serializable
|
||||||
*/
|
*/
|
||||||
public ProcessInfoLog (int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
|
public ProcessInfoLog (int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
|
||||||
{
|
{
|
||||||
this (s_Log_ID++, P_ID, P_Date, P_Number, P_Msg);
|
this (s_Log_ID++, P_ID, P_Date, P_Number, P_Msg, 0,0);
|
||||||
} // ProcessInfoLog
|
} // ProcessInfoLog
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,11 +79,7 @@ public class ProcessInfoLog implements Serializable
|
||||||
*/
|
*/
|
||||||
public ProcessInfoLog (int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
|
public ProcessInfoLog (int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
|
||||||
{
|
{
|
||||||
setLog_ID (Log_ID);
|
this (Log_ID, P_ID, P_Date, P_Number, P_Msg, 0,0);
|
||||||
setP_ID (P_ID);
|
|
||||||
setP_Date (P_Date);
|
|
||||||
setP_Number (P_Number);
|
|
||||||
setP_Msg (P_Msg);
|
|
||||||
} // ProcessInfoLog
|
} // ProcessInfoLog
|
||||||
|
|
||||||
private static int s_Log_ID = 0;
|
private static int s_Log_ID = 0;
|
||||||
|
@ -71,9 +89,24 @@ public class ProcessInfoLog implements Serializable
|
||||||
private Timestamp m_P_Date;
|
private Timestamp m_P_Date;
|
||||||
private BigDecimal m_P_Number;
|
private BigDecimal m_P_Number;
|
||||||
private String m_P_Msg;
|
private String m_P_Msg;
|
||||||
|
private int m_AD_Table_ID;
|
||||||
|
private int m_Record_ID;
|
||||||
|
|
||||||
|
public int getAd_Table_Id() {
|
||||||
|
return m_AD_Table_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAd_Table_Id(int tableId) {
|
||||||
|
this.m_AD_Table_ID = tableId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRecord_Id() {
|
||||||
|
return m_Record_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecord_Id(int recordId) {
|
||||||
|
this.m_Record_ID = recordId;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get Log_ID
|
* Get Log_ID
|
||||||
* @return id
|
* @return id
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class ProcessInfoUtil
|
||||||
public static void setLogFromDB (ProcessInfo pi)
|
public static void setLogFromDB (ProcessInfo pi)
|
||||||
{
|
{
|
||||||
// s_log.fine("setLogFromDB - AD_PInstance_ID=" + pi.getAD_PInstance_ID());
|
// s_log.fine("setLogFromDB - AD_PInstance_ID=" + pi.getAD_PInstance_ID());
|
||||||
String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg "
|
String sql = "SELECT Log_ID, P_ID, P_Date, P_Number, P_Msg, AD_Table_Id,Record_Id "
|
||||||
+ "FROM AD_PInstance_Log "
|
+ "FROM AD_PInstance_Log "
|
||||||
+ "WHERE AD_PInstance_ID=? "
|
+ "WHERE AD_PInstance_ID=? "
|
||||||
+ "ORDER BY Log_ID";
|
+ "ORDER BY Log_ID";
|
||||||
|
@ -125,9 +125,10 @@ public class ProcessInfoUtil
|
||||||
PreparedStatement pstmt = DB.prepareStatement(sql, null);
|
PreparedStatement pstmt = DB.prepareStatement(sql, null);
|
||||||
pstmt.setInt(1, pi.getAD_PInstance_ID());
|
pstmt.setInt(1, pi.getAD_PInstance_ID());
|
||||||
ResultSet rs = pstmt.executeQuery();
|
ResultSet rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next()){
|
||||||
// int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg
|
// int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg, AD_Table_ID, Record_ID
|
||||||
pi.addLog (rs.getInt(1), rs.getInt(2), rs.getTimestamp(3), rs.getBigDecimal(4), rs.getString(5));
|
pi.addLog (rs.getInt(1), rs.getInt(2), rs.getTimestamp(3), rs.getBigDecimal(4), rs.getString(5), rs.getInt(6), rs.getInt(7));
|
||||||
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
}
|
}
|
||||||
|
@ -157,7 +158,7 @@ public class ProcessInfoUtil
|
||||||
for (int i = 0; i < logs.length; i++)
|
for (int i = 0; i < logs.length; i++)
|
||||||
{
|
{
|
||||||
StringBuffer sql = new StringBuffer ("INSERT INTO AD_PInstance_Log "
|
StringBuffer sql = new StringBuffer ("INSERT INTO AD_PInstance_Log "
|
||||||
+ "(AD_PInstance_ID, Log_ID, P_Date, P_ID, P_Number, P_Msg)"
|
+ "(AD_PInstance_ID, Log_ID, P_Date, P_ID, P_Number, P_Msg, AD_Table_Id,Record_ID)"
|
||||||
+ " VALUES (");
|
+ " VALUES (");
|
||||||
sql.append(pi.getAD_PInstance_ID()).append(",")
|
sql.append(pi.getAD_PInstance_ID()).append(",")
|
||||||
.append(logs[i].getLog_ID()).append(",");
|
.append(logs[i].getLog_ID()).append(",");
|
||||||
|
@ -174,10 +175,18 @@ public class ProcessInfoUtil
|
||||||
else
|
else
|
||||||
sql.append(logs[i].getP_Number()).append(",");
|
sql.append(logs[i].getP_Number()).append(",");
|
||||||
if (logs[i].getP_Msg() == null)
|
if (logs[i].getP_Msg() == null)
|
||||||
|
sql.append("NULL,");
|
||||||
|
else
|
||||||
|
sql.append(DB.TO_STRING(logs[i].getP_Msg(),2000)).append(",");
|
||||||
|
if (logs[i].getAd_Table_Id() == 0)
|
||||||
|
sql.append("NULL,");
|
||||||
|
else
|
||||||
|
sql.append(logs[i].getAd_Table_Id()).append(",");
|
||||||
|
if (logs[i].getRecord_Id() == 0)
|
||||||
sql.append("NULL)");
|
sql.append("NULL)");
|
||||||
else
|
else
|
||||||
sql.append(DB.TO_STRING(logs[i].getP_Msg(),2000)).append(")");
|
sql.append(logs[i].getRecord_Id()).append(")");
|
||||||
//
|
//
|
||||||
DB.executeUpdate(sql.toString(), null);
|
DB.executeUpdate(sql.toString(), null);
|
||||||
}
|
}
|
||||||
pi.setLogList(null); // otherwise log entries are twice
|
pi.setLogList(null); // otherwise log entries are twice
|
||||||
|
|
|
@ -427,6 +427,18 @@ public abstract class SvrProcess implements ProcessCall
|
||||||
} // getParameter
|
} // getParameter
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Add Log Entry with table name
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void addLog (int id, Timestamp date, BigDecimal number, String msg, int tableId ,int recordId)
|
||||||
|
{
|
||||||
|
if (m_pi != null)
|
||||||
|
m_pi.addLog(id, date, number, msg,tableId,recordId);
|
||||||
|
|
||||||
|
log.info(id + " - " + date + " - " + number + " - " + msg +" - "+tableId);
|
||||||
|
} // addLog
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Add Log Entry
|
* Add Log Entry
|
||||||
* @param date date or null
|
* @param date date or null
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
package org.adempiere.webui.apps;
|
package org.adempiere.webui.apps;
|
||||||
|
|
||||||
|
import static org.compiere.model.SystemIDs.PROCESS_C_INVOICE_GENERATE;
|
||||||
|
import static org.compiere.model.SystemIDs.PROCESS_M_INOUT_GENERATE;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
@ -27,14 +31,18 @@ import org.adempiere.webui.window.FDialog;
|
||||||
import org.adempiere.webui.window.MultiFileDownloadDialog;
|
import org.adempiere.webui.window.MultiFileDownloadDialog;
|
||||||
import org.adempiere.webui.window.SimplePDFViewer;
|
import org.adempiere.webui.window.SimplePDFViewer;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
import static org.compiere.model.SystemIDs.*;
|
|
||||||
import org.compiere.print.ReportEngine;
|
import org.compiere.print.ReportEngine;
|
||||||
import org.compiere.process.ProcessInfo;
|
import org.compiere.process.ProcessInfo;
|
||||||
|
import org.compiere.process.ProcessInfoLog;
|
||||||
import org.compiere.process.ProcessInfoUtil;
|
import org.compiere.process.ProcessInfoUtil;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
import org.zkoss.zhtml.Table;
|
||||||
|
import org.zkoss.zhtml.Td;
|
||||||
|
import org.zkoss.zhtml.Tr;
|
||||||
import org.zkoss.zk.au.out.AuEcho;
|
import org.zkoss.zk.au.out.AuEcho;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.Desktop;
|
import org.zkoss.zk.ui.Desktop;
|
||||||
|
@ -43,13 +51,15 @@ 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.zk.ui.event.Events;
|
||||||
import org.zkoss.zk.ui.util.Clients;
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
|
import org.zkoss.zul.A;
|
||||||
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.South;
|
|
||||||
import org.zkoss.zul.Div;
|
import org.zkoss.zul.Div;
|
||||||
import org.zkoss.zul.Hbox;
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.Html;
|
import org.zkoss.zul.Html;
|
||||||
|
import org.zkoss.zul.Label;
|
||||||
|
import org.zkoss.zul.North;
|
||||||
|
import org.zkoss.zul.South;
|
||||||
|
|
||||||
import com.lowagie.text.Document;
|
import com.lowagie.text.Document;
|
||||||
import com.lowagie.text.pdf.PdfContentByte;
|
import com.lowagie.text.pdf.PdfContentByte;
|
||||||
|
@ -93,6 +103,7 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
private static final String MESSAGE_DIV_STYLE = "max-height: 150pt; overflow: auto";
|
private static final String MESSAGE_DIV_STYLE = "max-height: 150pt; overflow: auto";
|
||||||
private Div messageDiv;
|
private Div messageDiv;
|
||||||
private Center center;
|
private Center center;
|
||||||
|
private Table logMessageTable;
|
||||||
private North north;
|
private North north;
|
||||||
|
|
||||||
private List<File> downloadFiles;
|
private List<File> downloadFiles;
|
||||||
|
@ -357,7 +368,9 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
|
|
||||||
public void onEvent(Event event) {
|
public void onEvent(Event event) {
|
||||||
Component component = event.getTarget();
|
Component component = event.getTarget();
|
||||||
if (component instanceof Button) {
|
if(component instanceof A && event.getName().equals((Events.ON_CLICK))){
|
||||||
|
doOnClick((A)component);
|
||||||
|
} else if (component instanceof Button) {
|
||||||
Button element = (Button)component;
|
Button element = (Button)component;
|
||||||
if ("Ok".equalsIgnoreCase(element.getId())) {
|
if ("Ok".equalsIgnoreCase(element.getId())) {
|
||||||
if (isParameterPage) {
|
if (isParameterPage) {
|
||||||
|
@ -378,6 +391,24 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void doOnClick(A btn) {
|
||||||
|
int Record_ID = 0;
|
||||||
|
int AD_Table_ID =0;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Record_ID = Integer.valueOf((String)btn.getAttribute("Record_ID"));
|
||||||
|
AD_Table_ID= Integer.valueOf((String)btn.getAttribute("AD_Table_ID"));
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Record_ID > 0 && AD_Table_ID > 0) {
|
||||||
|
|
||||||
|
AEnv.zoom(AD_Table_ID, Record_ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void lockUI(ProcessInfo pi) {
|
public void lockUI(ProcessInfo pi) {
|
||||||
if (m_isLocked || Executions.getCurrent() == null) return;
|
if (m_isLocked || Executions.getCurrent() == null) return;
|
||||||
|
|
||||||
|
@ -412,8 +443,9 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
m_messageText.append("<p><font color=\"").append(pi.isError() ? "#FF0000" : "#0000FF").append("\">** ")
|
m_messageText.append("<p><font color=\"").append(pi.isError() ? "#FF0000" : "#0000FF").append("\">** ")
|
||||||
.append(pi.getSummary())
|
.append(pi.getSummary())
|
||||||
.append("</font></p>");
|
.append("</font></p>");
|
||||||
m_messageText.append(pi.getLogInfo(true));
|
|
||||||
message.setContent(m_messageText.toString());
|
message.setContent(m_messageText.toString());
|
||||||
|
// Add Log info with zoom on record id
|
||||||
|
appendRecordLogInfo(pi.getLogs());
|
||||||
|
|
||||||
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
||||||
bOK.setImage("/images/Reset16.png");
|
bOK.setImage("/images/Reset16.png");
|
||||||
|
@ -432,12 +464,74 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
Clients.response(new AuEcho(this, "onAfterProcess", null));
|
Clients.response(new AuEcho(this, "onAfterProcess", null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void appendRecordLogInfo(ProcessInfoLog[] m_logs) {
|
||||||
|
if (m_logs == null)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.DateTime);
|
||||||
|
|
||||||
|
logMessageTable = new Table();
|
||||||
|
logMessageTable.setId("logrecords");
|
||||||
|
logMessageTable.setDynamicProperty("border", "1");
|
||||||
|
logMessageTable.setDynamicProperty("cellpadding", "0");
|
||||||
|
logMessageTable.setDynamicProperty("cellspacing", "0");
|
||||||
|
logMessageTable.setDynamicProperty("width", "100%");
|
||||||
|
|
||||||
|
this.appendChild(logMessageTable);
|
||||||
|
|
||||||
|
for (int i = 0; i < m_logs.length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
Tr tr = new Tr();
|
||||||
|
logMessageTable.appendChild(tr);
|
||||||
|
|
||||||
|
ProcessInfoLog log = m_logs[i];
|
||||||
|
|
||||||
|
if (log.getP_Date() != null){
|
||||||
|
Label label = new Label(dateFormat.format(log.getP_Date()));
|
||||||
|
//label.setStyle("padding-right:100px");
|
||||||
|
Td td = new Td();
|
||||||
|
td = new Td();
|
||||||
|
td.appendChild(label);
|
||||||
|
tr.appendChild(td);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (log.getP_Number() != null){
|
||||||
|
Label labelPno= new Label(""+log.getP_Number());
|
||||||
|
Td td = new Td();
|
||||||
|
td.appendChild(labelPno);
|
||||||
|
tr.appendChild(td);
|
||||||
|
}
|
||||||
|
|
||||||
|
A recordLink = null;
|
||||||
|
if (log.getP_Msg() != null){
|
||||||
|
recordLink = new A();
|
||||||
|
recordLink.setLabel(log.getP_Msg());
|
||||||
|
|
||||||
|
if (log.getAd_Table_Id() > 0 && log.getRecord_Id()> 0) {
|
||||||
|
recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_Id()));
|
||||||
|
recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAd_Table_Id()));
|
||||||
|
recordLink.addEventListener(Events.ON_CLICK, this);
|
||||||
|
|
||||||
|
}
|
||||||
|
Td td = new Td();
|
||||||
|
td.appendChild(recordLink);
|
||||||
|
tr.appendChild(td);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
messageDiv.appendChild(logMessageTable);
|
||||||
|
}
|
||||||
|
|
||||||
private void restart() {
|
private void restart() {
|
||||||
m_messageText = new StringBuffer(initialMessage);
|
m_messageText = new StringBuffer(initialMessage);
|
||||||
message.setContent(initialMessage);
|
message.setContent(initialMessage);
|
||||||
|
|
||||||
north.setVisible(true);
|
north.setVisible(true);
|
||||||
messageDiv.detach();
|
messageDiv.detach();
|
||||||
|
if(logMessageTable!=null){
|
||||||
|
messageDiv.removeChild(logMessageTable);
|
||||||
|
}
|
||||||
messageDiv.setStyle(MESSAGE_DIV_STYLE);
|
messageDiv.setStyle(MESSAGE_DIV_STYLE);
|
||||||
north.appendChild(messageDiv);
|
north.appendChild(messageDiv);
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ import java.sql.Statement;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -501,7 +503,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
private void initFind()
|
private void initFind()
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
|
|
||||||
|
ArrayList<GridField> gridFieldList = new ArrayList<GridField>();
|
||||||
// Get Info from target Tab
|
// Get Info from target Tab
|
||||||
for (int i = 0; i < m_findFields.length; i++)
|
for (int i = 0; i < m_findFields.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -552,12 +555,27 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mField.isSelectionColumn())
|
if (mField.isSelectionColumn())
|
||||||
addSelectionColumn (mField);
|
gridFieldList.add(mField);
|
||||||
|
|
||||||
// TargetFields
|
// TargetFields
|
||||||
m_targetFields.put (new Integer(mField.getAD_Column_ID()), mField);
|
m_targetFields.put (new Integer(mField.getAD_Column_ID()), mField);
|
||||||
} // for all target tab fields
|
} // for all target tab fields
|
||||||
|
|
||||||
|
|
||||||
|
// added comparator on sequence of selection column for IDEMPIERE-377
|
||||||
|
Collections.sort(gridFieldList, new Comparator<GridField>() {
|
||||||
|
@Override
|
||||||
|
public int compare(GridField o1, GridField o2) {
|
||||||
|
return o1.getSeqNoSelection()-o2.getSeqNoSelection();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// adding sorted columns
|
||||||
|
for(GridField field:gridFieldList){
|
||||||
|
addSelectionColumn (field);
|
||||||
|
}
|
||||||
|
|
||||||
|
gridFieldList = null;
|
||||||
m_total = getNoOfRecords(null, false);
|
m_total = getNoOfRecords(null, false);
|
||||||
|
|
||||||
} // initFind
|
} // initFind
|
||||||
|
@ -660,8 +678,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
ValueNamePair[] cols = new ValueNamePair[items.size()];
|
ValueNamePair[] cols = new ValueNamePair[items.size()];
|
||||||
items.toArray(cols);
|
items.toArray(cols);
|
||||||
Arrays.sort(cols); // sort alpha
|
Arrays.sort(cols); // sort alpha
|
||||||
|
ValueNamePair[] op = MQuery.OPERATORS_ALL;
|
||||||
|
|
||||||
ValueNamePair[] op = MQuery.OPERATORS;
|
|
||||||
|
|
||||||
if(fields == null)
|
if(fields == null)
|
||||||
{
|
{
|
||||||
|
@ -772,9 +790,20 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
Component componentTo = getEditorCompQueryTo(row);
|
Component componentTo = getEditorCompQueryTo(row);
|
||||||
componentTo.setId("searchFieldTo"+row.getId());
|
componentTo.setId("searchFieldTo"+row.getId());
|
||||||
componentTo.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, componentTo.getId());
|
componentTo.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, componentTo.getId());
|
||||||
|
Listbox listOp = (Listbox) row.getFellow("listOperator"+row.getId());
|
||||||
addRowEditor(componentFrom, (ListCell)row.getFellow("cellQueryFrom"+row.getId()));
|
String betweenValue = listOp.getSelectedItem().getValue().toString();
|
||||||
addRowEditor(componentTo,(ListCell)row.getFellow("cellQueryTo"+row.getId()));
|
|
||||||
|
if(betweenValue.equals(MQuery.NULL) || betweenValue.equals(MQuery.NOT_NULL))
|
||||||
|
{
|
||||||
|
// to not display any editor
|
||||||
|
row.getFellow("cellQueryFrom"+row.getId()).getChildren().clear();
|
||||||
|
row.getFellow("cellQueryTo"+row.getId()).getChildren().clear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addRowEditor(componentFrom, (ListCell)row.getFellow("cellQueryFrom"+row.getId()));
|
||||||
|
addRowEditor(componentTo,(ListCell)row.getFellow("cellQueryTo"+row.getId()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (event.getTarget() == fQueryName)
|
else if (event.getTarget() == fQueryName)
|
||||||
{
|
{
|
||||||
|
@ -1078,7 +1107,23 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
ListCell cellQueryFrom = (ListCell)row.getFellow("cellQueryFrom"+row.getId());
|
ListCell cellQueryFrom = (ListCell)row.getFellow("cellQueryFrom"+row.getId());
|
||||||
Object value = cellQueryFrom.getAttribute("value");
|
Object value = cellQueryFrom.getAttribute("value");
|
||||||
if (value == null)
|
if (value == null)
|
||||||
continue;
|
{
|
||||||
|
if(Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL))
|
||||||
|
{
|
||||||
|
m_query.addRestriction(ColumnSQL, Operator, null,
|
||||||
|
infoName, null);
|
||||||
|
if (code.length() > 0)
|
||||||
|
code.append(SEGMENT_SEPARATOR);
|
||||||
|
code.append(ColumnName)
|
||||||
|
.append(FIELD_SEPARATOR)
|
||||||
|
.append(Operator)
|
||||||
|
.append(FIELD_SEPARATOR)
|
||||||
|
.append("")
|
||||||
|
.append(FIELD_SEPARATOR)
|
||||||
|
.append("");
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Object parsedValue = parseValue(field, value);
|
Object parsedValue = parseValue(field, value);
|
||||||
if (parsedValue == null)
|
if (parsedValue == null)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1235,19 +1280,74 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
private void addOperators(ListItem column, Listbox listOperator)
|
private void addOperators(ListItem column, Listbox listOperator)
|
||||||
{
|
{
|
||||||
String columnName = column.getValue().toString();
|
String columnName = column.getValue().toString();
|
||||||
|
int columnID = MColumn.getColumn_ID(this.m_tableName, columnName);
|
||||||
|
String SQL = "SELECT ad_reference_id FROM ad_column WHERE ad_column_id = ?";
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
int referenceType = -1;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement(SQL, null);
|
||||||
|
pstmt.setInt(1, columnID);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
if( rs.next() )
|
||||||
|
{
|
||||||
|
referenceType = rs.getInt(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (SQLException e2)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, SQL, e2);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null; pstmt = null;
|
||||||
|
}
|
||||||
|
|
||||||
log.config("Column: " + columnName);
|
log.config("Column: " + columnName);
|
||||||
|
log.log(Level.INFO, "referenceType : " + referenceType);
|
||||||
if (columnName.endsWith("_ID") || columnName.endsWith("_Acct"))
|
|
||||||
|
List<Integer> numbersList = new ArrayList<Integer>();
|
||||||
|
numbersList.add(DisplayType.Number);
|
||||||
|
numbersList.add(DisplayType.Date);
|
||||||
|
numbersList.add(DisplayType.Amount);
|
||||||
|
numbersList.add(DisplayType.CostPrice);
|
||||||
|
numbersList.add(DisplayType.Quantity);
|
||||||
|
numbersList.add(DisplayType.ID);
|
||||||
|
numbersList.add(DisplayType.Integer);
|
||||||
|
|
||||||
|
List<Integer> equalNotEqualList = new ArrayList<Integer>();
|
||||||
|
equalNotEqualList.add(DisplayType.TableDir);
|
||||||
|
equalNotEqualList.add(DisplayType.Table);
|
||||||
|
equalNotEqualList.add(DisplayType.Search);
|
||||||
|
equalNotEqualList.add(DisplayType.List);
|
||||||
|
|
||||||
|
List<Integer> equalAndLikeList = new ArrayList<Integer>();
|
||||||
|
equalAndLikeList.add(DisplayType.URL);
|
||||||
|
equalAndLikeList.add(DisplayType.Memo);
|
||||||
|
equalAndLikeList.add(DisplayType.TextLong);
|
||||||
|
equalAndLikeList.add(DisplayType.Text);
|
||||||
|
|
||||||
|
if(numbersList.contains(referenceType))
|
||||||
{
|
{
|
||||||
addOperators(MQuery.OPERATORS_ID, listOperator);
|
addOperators(MQuery.OPERATORS_NUMBERS, listOperator);
|
||||||
}
|
}
|
||||||
else if (columnName.startsWith("Is"))
|
else if (equalNotEqualList.contains(referenceType))
|
||||||
{
|
{
|
||||||
addOperators(MQuery.OPERATORS_YN, listOperator);
|
addOperators(MQuery.OPERATORS_ID, listOperator);
|
||||||
|
}
|
||||||
|
else if (DisplayType.YesNo == referenceType)
|
||||||
|
{
|
||||||
|
addOperators(MQuery.OPERATORS_YN, listOperator);
|
||||||
|
}
|
||||||
|
else if (equalAndLikeList.contains(referenceType))
|
||||||
|
{
|
||||||
|
addOperators(MQuery.OPERATORS_EQUAL_LIKE, listOperator);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addOperators(MQuery.OPERATORS, listOperator);
|
addOperators(MQuery.OPERATORS_ALL, listOperator);
|
||||||
}
|
}
|
||||||
} // addOperators
|
} // addOperators
|
||||||
|
|
||||||
|
@ -1452,8 +1552,16 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
// Value ******
|
// Value ******
|
||||||
ListCell cellQueryFrom = (ListCell)row.getFellow("cellQueryFrom"+row.getId());
|
ListCell cellQueryFrom = (ListCell)row.getFellow("cellQueryFrom"+row.getId());
|
||||||
Object value = cellQueryFrom.getAttribute("value");
|
Object value = cellQueryFrom.getAttribute("value");
|
||||||
if (value == null)
|
|
||||||
continue;
|
if (value == null)
|
||||||
|
{
|
||||||
|
if(Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL))
|
||||||
|
{
|
||||||
|
m_query.addRestriction(ColumnSQL, Operator, null,
|
||||||
|
infoName, null);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Object parsedValue = parseValue(field, value);
|
Object parsedValue = parseValue(field, value);
|
||||||
if (parsedValue == null)
|
if (parsedValue == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue