Merge with default

This commit is contained in:
hieplq 2018-02-26 03:11:15 +07:00
commit 6bb1c5ecc3
50 changed files with 4548 additions and 196 deletions

View File

@ -1,5 +1,5 @@
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, COALESCE(f.VFormat, c.VFormat) AS 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, COALESCE(f.isalwaysupdateable, c.isalwaysupdateable) AS isalwaysupdateable, COALESCE(f.readonlylogic, c.readonlylogic) AS readonlylogic, COALESCE(f.mandatorylogic, c.mandatorylogic) AS mandatorylogic, COALESCE(f.isupdateable, c.isupdateable) AS 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, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus, c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id
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, COALESCE(f.VFormat, c.VFormat) AS 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, COALESCE(f.isalwaysupdateable, c.isalwaysupdateable) AS isalwaysupdateable, COALESCE(f.readonlylogic, c.readonlylogic) AS readonlylogic, COALESCE(f.mandatorylogic, c.mandatorylogic) AS mandatorylogic, COALESCE(f.isupdateable, c.isupdateable) AS 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, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus, c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id, COALESCE(f.placeholder, c.placeholder) AS placeholder
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
@ -8,4 +8,3 @@ CREATE OR REPLACE VIEW ad_field_v AS
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' AND c.isactive = 'Y'
;

View File

@ -1,11 +1,12 @@
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, COALESCE(f.VFormat, c.VFormat) AS 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, COALESCE(f.isalwaysupdateable, c.isalwaysupdateable) AS isalwaysupdateable, COALESCE(f.readonlylogic, c.readonlylogic) AS readonlylogic, COALESCE(f.mandatorylogic, c.mandatorylogic) AS mandatorylogic, COALESCE(f.isupdateable, c.isupdateable) AS 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, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus, c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id
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, COALESCE(f.VFormat, c.VFormat) AS 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, COALESCE(f.isalwaysupdateable, c.isalwaysupdateable) AS isalwaysupdateable, COALESCE(f.readonlylogic, c.readonlylogic) AS readonlylogic, COALESCE(f.mandatorylogic, c.mandatorylogic) AS mandatorylogic, COALESCE(f.isupdateable, c.isupdateable) AS 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, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus, c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id, COALESCE(trl.placeholder, ct.placeholder) AS placeholder
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 = fgt.ad_language
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
LEFT JOIN ad_column_trl ct ON f.ad_column_id = ct.ad_column_id
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_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' AND c.isactive = 'Y'

View File

@ -7,7 +7,7 @@ COALESCE(f.readonlylogic, c.readonlylogic) AS readonlylogic, COALESCE(f.mandator
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, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus,
c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id
c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id, COALESCE(f.placeholder, c.placeholder) AS placeholder
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

View File

@ -6,13 +6,14 @@ CREATE OR REPLACE VIEW ad_field_vt AS
c.isalwaysupdateable) AS isalwaysupdateable, COALESCE(f.readonlylogic, c.readonlylogic) AS readonlylogic, COALESCE(f.mandatorylogic, c.mandatorylogic) AS mandatorylogic, COALESCE(f.isupdateable, c.isupdateable) AS 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, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus, c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id
f.seqnogrid, c.seqnoselection, f.xposition, f.columnspan, f.numlines, COALESCE(f.istoolbarbutton, c.istoolbarbutton) AS istoolbarbutton, c.formatpattern, f.isadvancedfield, f.isdefaultfocus, c.ad_chart_id, f.ad_labelstyle_id, f.ad_fieldstyle_id, c.pa_dashboardcontent_id, COALESCE(trl.placeholder, ct.placeholder) AS placeholder
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
LEFT JOIN ad_column_trl ct ON f.ad_column_id = ct.ad_column_id
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_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' AND c.isactive = 'Y'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +1,39 @@
-- Mar 19, 2013 12:39:44 PM COT
-- IDEMPIERE-774 Migration Script for Synchronize Terminology
INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, Name, PrintName, Description, Help, IsTranslated) SELECT m.AD_Element_ID, l.AD_LANGUAGE, m.AD_Client_ID, m.AD_Org_ID, m.IsActive, m.Created, m.CreatedBy, m.Updated, m.UpdatedBy, m.Name, m.PrintName, m.Description, m.Help, 'N' FROM AD_ELEMENT m, AD_LANGUAGE l WHERE l.IsActive = 'Y' AND l.IsSystemLanguage = 'Y' AND AD_Element_ID || AD_LANGUAGE NOT IN (SELECT AD_Element_ID || AD_LANGUAGE FROM AD_ELEMENT_TRL)
INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, Name, PrintName, Description, Help, Placeholder, IsTranslated) SELECT m.AD_Element_ID, l.AD_LANGUAGE, m.AD_Client_ID, m.AD_Org_ID, m.IsActive, m.Created, m.CreatedBy, m.Updated, m.UpdatedBy, m.Name, m.PrintName, m.Description, m.Help, m.Placeholder, 'N' FROM AD_ELEMENT m, AD_LANGUAGE l WHERE l.IsActive = 'Y' AND l.IsSystemLanguage = 'Y' AND AD_Element_ID || AD_LANGUAGE NOT IN (SELECT AD_Element_ID || AD_LANGUAGE FROM AD_ELEMENT_TRL)
;
UPDATE AD_COLUMN c SET AD_Element_id = (SELECT AD_Element_ID FROM AD_ELEMENT e WHERE UPPER(c.ColumnName)=UPPER(e.ColumnName)) WHERE AD_Element_ID IS NULL
;
DELETE AD_ELEMENT_TRL WHERE AD_Element_ID >= 1000000 AND AD_Element_ID IN (SELECT AD_Element_ID FROM AD_ELEMENT e WHERE NOT EXISTS (SELECT 1 FROM AD_COLUMN c WHERE UPPER(e.ColumnName)=UPPER(c.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_INFOCOLUMN i WHERE UPPER(e.ColumnName)=UPPER(i.ColumnName)))
DELETE FROM AD_ELEMENT_TRL WHERE AD_Element_ID >= 1000000 AND AD_Element_ID IN (SELECT AD_Element_ID FROM AD_ELEMENT e WHERE NOT EXISTS (SELECT 1 FROM AD_COLUMN c WHERE UPPER(e.ColumnName)=UPPER(c.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_INFOCOLUMN i WHERE UPPER(e.ColumnName)=UPPER(i.ColumnName)))
;
DELETE AD_ELEMENT e WHERE AD_Element_ID >= 1000000 AND NOT EXISTS (SELECT 1 FROM AD_COLUMN c WHERE UPPER(e.ColumnName)=UPPER(c.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_INFOCOLUMN i WHERE UPPER(e.ColumnName)=UPPER(i.ColumnName))
DELETE FROM AD_ELEMENT e WHERE AD_Element_ID >= 1000000 AND NOT EXISTS (SELECT 1 FROM AD_COLUMN c WHERE UPPER(e.ColumnName)=UPPER(c.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_INFOCOLUMN i WHERE UPPER(e.ColumnName)=UPPER(i.ColumnName))
;
UPDATE AD_COLUMN c SET (ColumnName, Name, Description, Help) = (SELECT ColumnName, Name, Description, Help FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')))
UPDATE AD_COLUMN c SET (ColumnName, Name, Description, Help, Placeholder) = (SELECT ColumnName, Name, Description, Help, Placeholder FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR COALESCE(c.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(c.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(c.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
;
UPDATE AD_INFOCOLUMN c SET (ColumnName, Name, Description, Help) = (SELECT ColumnName, Name, Description, Help FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE c.IsCentrallyMaintained='Y' AND c.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')))
UPDATE AD_INFOCOLUMN c SET (ColumnName, Name, Description, Help, Placeholder) = (SELECT ColumnName, Name, Description, Help, Placeholder FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID), Updated = SYSDATE WHERE c.IsCentrallyMaintained='Y' AND c.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name OR COALESCE(c.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(c.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(c.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
;
UPDATE AD_FIELD f SET (Name, Description, Help) = (SELECT e.Name, e.Description, e.Help FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')))
UPDATE AD_FIELD f SET (Name, Description, Help, Placeholder) = (SELECT e.Name, e.Description, e.Help, e.Placeholder FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.Name OR COALESCE(f.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(f.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
;
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.Name OR NVL(trl.Description,' ') <> NVL(e.Description,' ') OR NVL(trl.Help,' ') <> NVL(e.Help,' ')))
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.Name OR COALESCE(trl.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(e.Help,N' ')))
;
UPDATE AD_FIELD f SET Name = (SELECT e.PO_Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.PO_Name OR NVL(f.Description,' ') <> NVL(e.PO_Description,' ') OR NVL(f.Help,' ') <> NVL(e.PO_Help,' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_TAB t, AD_WINDOW w WHERE f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
UPDATE AD_FIELD f SET Name = (SELECT e.PO_Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (f.Name <> e.PO_Name OR COALESCE(f.Description,N' ') <> COALESCE(e.PO_Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(e.PO_Help,N' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_TAB t, AD_WINDOW w WHERE f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
;
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.PO_Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.PO_Name OR NVL(trl.Description,' ') <> NVL(e.PO_Description,' ') OR NVL(trl.Help,' ') <> NVL(e.PO_Help,' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_FIELD f, AD_TAB t, AD_WINDOW w WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
UPDATE AD_FIELD_TRL trl SET Name = (SELECT e.PO_Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND trl.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> e.PO_Name OR COALESCE(trl.Description,N' ') <> COALESCE(e.PO_Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(e.PO_Help,N' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_FIELD f, AD_TAB t, AD_WINDOW w WHERE trl.AD_Field_ID=f.AD_Field_ID AND f.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
;
UPDATE AD_FIELD f SET Name = (SELECT p.Name FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT p.Description FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT p.Help FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_PROCESS p, AD_COLUMN c WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND (f.Name<>p.Name OR NVL(f.Description,' ')<>NVL(p.Description,' ') OR NVL(f.Help,' ')<>NVL(p.Help,' ')))
UPDATE AD_FIELD f SET Name = (SELECT p.Name FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Description = (SELECT p.Description FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Help = (SELECT p.Help FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_PROCESS p, AD_COLUMN c WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND (f.Name<>p.Name OR COALESCE(f.Description,N' ')<>COALESCE(p.Description,N' ') OR COALESCE(f.Help,N' ')<>COALESCE(p.Help,N' ')))
;
UPDATE AD_FIELD_TRL trl SET Name = (SELECT p.Name FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Description = (SELECT p.Description FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Help = (SELECT p.Help FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), IsTranslated = (SELECT p.IsTranslated FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name<>p.Name OR NVL(trl.Description,' ')<>NVL(p.Description,' ') OR NVL(trl.Help,' ')<>NVL(p.Help,' ')))
UPDATE AD_FIELD_TRL trl SET Name = (SELECT p.Name FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Description = (SELECT p.Description FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Help = (SELECT p.Help FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), IsTranslated = (SELECT p.IsTranslated FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name<>p.Name OR COALESCE(trl.Description,N' ')<>COALESCE(p.Description,N' ') OR COALESCE(trl.Help,N' ')<>COALESCE(p.Help,N' ')))
;
UPDATE AD_PROCESS_PARA f SET ColumnName = (SELECT e.ColumnName FROM AD_ELEMENT e WHERE UPPER(e.ColumnName)=UPPER(f.ColumnName)) WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE UPPER(e.ColumnName)=UPPER(f.ColumnName) AND e.ColumnName<>f.ColumnName)
@ -42,31 +42,31 @@ UPDATE AD_PROCESS_PARA f SET ColumnName = (SELECT e.ColumnName FROM AD_ELEMENT e
UPDATE AD_PROCESS_PARA p SET IsCentrallyMaintained = 'N' WHERE IsCentrallyMaintained <> 'N' AND NOT EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE p.ColumnName=e.ColumnName)
;
UPDATE AD_PROCESS_PARA f SET Name = (SELECT e.Name FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Description = (SELECT e.Description FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Help = (SELECT e.Help FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')))
UPDATE AD_PROCESS_PARA f SET Name = (SELECT e.Name FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Description = (SELECT e.Description FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Help = (SELECT e.Help FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName), Updated = SYSDATE WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE e.ColumnName=f.ColumnName AND (f.Name <> e.Name OR COALESCE(f.Description,N' ') <> COALESCE(e.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(e.Help,N' ') OR COALESCE(f.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
;
UPDATE AD_PROCESS_PARA_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ')))
UPDATE AD_PROCESS_PARA_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR COALESCE(trl.Description,N' ') <> COALESCE(et.Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(et.Help,N' ') OR COALESCE(trl.Placeholder,N' ') <> COALESCE(et.Placeholder,N' ')))
;
UPDATE AD_INFOCOLUMN_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ')))
UPDATE AD_INFOCOLUMN_TRL trl SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID), Updated = SYSDATE WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (trl.Name <> et.Name OR COALESCE(trl.Description,N' ') <> COALESCE(et.Description,N' ') OR COALESCE(trl.Help,N' ') <> COALESCE(et.Help,N' ') OR COALESCE(trl.Placeholder,N' ') <> COALESCE(et.Placeholder,N' ')))
;
UPDATE AD_WF_NODE n SET Name = (SELECT w.Name FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Description = (SELECT w.Description FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Help = (SELECT w.Help FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID AND (w.Name <> n.Name OR NVL(w.Description,' ') <> NVL(n.Description,' ') OR NVL(w.Help,' ') <> NVL(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
UPDATE AD_WF_NODE n SET Name = (SELECT w.Name FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Description = (SELECT w.Description FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID), Help = (SELECT w.Help FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_WINDOW w WHERE w.AD_Window_ID=n.AD_Window_ID AND (w.Name <> n.Name OR COALESCE(w.Description,N' ') <> COALESCE(n.Description,N' ') OR COALESCE(w.Help,N' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
;
UPDATE AD_WF_NODE_TRL trl SET Name = (SELECT t.Name FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Description = (SELECT t.Description FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Help = (SELECT t.Help FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR NVL(trl.Description,' ') <> NVL(t.Description,' ') OR NVL(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> NVL(t.Help,' ')))
UPDATE AD_WF_NODE_TRL trl SET Name = (SELECT t.Name FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Description = (SELECT t.Description FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE), Help = (SELECT t.Help FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_WINDOW_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,N' ') <> COALESCE(t.Description,N' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,N' ')))
;
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID AND (f.Name <> n.Name OR NVL(f.Description,' ') <> NVL(n.Description,' ') OR NVL(f.Help,' ') <> NVL(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_FORM f WHERE f.AD_Form_ID=n.AD_Form_ID AND (f.Name <> n.Name OR COALESCE(f.Description,N' ') <> COALESCE(n.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
;
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR NVL(trl.Description,' ') <> NVL(t.Description,' ') OR NVL(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> NVL(t.Help,' ')))
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_FORM_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,N' ') <> COALESCE(t.Description,N' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,N' ')))
;
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID AND (f.Name <> n.Name OR NVL(f.Description,' ') <> NVL(n.Description,' ') OR NVL(f.Help,' ') <> NVL(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
UPDATE AD_WF_NODE n SET (Name, Description, Help) = (SELECT f.Name, f.Description, f.Help FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID) WHERE n.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_PROCESS f WHERE f.AD_Process_ID=n.AD_Process_ID AND (f.Name <> n.Name OR COALESCE(f.Description,N' ') <> COALESCE(n.Description,N' ') OR COALESCE(f.Help,N' ') <> COALESCE(dbms_lob.substr(n.Help, 4000, 1 ),' ')))
;
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR NVL(trl.Description,' ') <> NVL(t.Description,' ') OR NVL(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> NVL(t.Help,' ')))
UPDATE AD_WF_NODE_TRL trl SET (Name, Description, Help) = (SELECT t.Name, t.Description, t.Help FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL t, AD_WF_NODE n WHERE trl.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Process_ID=t.AD_Process_ID AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y' AND (trl.Name <> t.Name OR COALESCE(trl.Description,N' ') <> COALESCE(t.Description,N' ') OR COALESCE(dbms_lob.substr(trl.Help, 4000, 1 ),' ') <> COALESCE(t.Help,N' ')))
;
UPDATE AD_PRINTFORMATITEM pfi SET Name = (SELECT e.Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID) WHERE pfi.IsCentrallyMaintained='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID AND e.Name<>pfi.Name) AND EXISTS (SELECT 1 FROM AD_CLIENT WHERE AD_Client_ID=pfi.AD_Client_ID AND IsMultiLingualDocument='Y')
@ -123,7 +123,7 @@ UPDATE AD_MENU m SET Name = (SELECT Name FROM AD_InfoWindow f WHERE m.AD_InfoWin
UPDATE AD_MENU_TRL mt SET Name = (SELECT ft.Name FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE), Description = (SELECT ft.Description FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE), IsTranslated = (SELECT ft.IsTranslated FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE mt.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND mt.AD_LANGUAGE=ft.AD_LANGUAGE AND m.AD_InfoWindow_ID IS NOT NULL AND m.Action = 'I' AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y')
;
UPDATE AD_COLUMN_TRL ct SET Name = (SELECT e.Name FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE AND ct.Name<>e.Name)
UPDATE AD_COLUMN_TRL ct SET (Name, Placeholder) = (SELECT e.Name, e.Placeholder FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE AND (ct.Name<>e.Name OR COALESCE(ct.Placeholder,N' ') <> COALESCE(e.Placeholder,N' ')))
;
UPDATE AD_TABLE t SET (Name,Description) = (SELECT e.Name,e.Description FROM AD_ELEMENT e WHERE t.TableName||'_ID'=e.ColumnName) WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE t.TableName||'_ID'=e.ColumnName AND t.Name<>e.Name)

View File

@ -1,6 +1,6 @@
-- Mar 19, 2013 11:59:08 AM COT
-- IDEMPIERE-774 Migration Script for Synchronize Terminology
INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, Name, PrintName, Description, Help, IsTranslated) SELECT m.AD_Element_ID, l.AD_LANGUAGE, m.AD_Client_ID, m.AD_Org_ID, m.IsActive, m.Created, m.CreatedBy, m.Updated, m.UpdatedBy, m.Name, m.PrintName, m.Description, m.Help, 'N' FROM AD_ELEMENT m, AD_LANGUAGE l WHERE l.IsActive = 'Y' AND l.IsSystemLanguage = 'Y' AND AD_Element_ID || AD_LANGUAGE NOT IN (SELECT AD_Element_ID || AD_LANGUAGE FROM AD_ELEMENT_TRL)
INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, Name, PrintName, Description, Help, Placeholder, IsTranslated) SELECT m.AD_Element_ID, l.AD_LANGUAGE, m.AD_Client_ID, m.AD_Org_ID, m.IsActive, m.Created, m.CreatedBy, m.Updated, m.UpdatedBy, m.Name, m.PrintName, m.Description, m.Help, m.Placeholder, 'N' FROM AD_ELEMENT m, AD_LANGUAGE l WHERE l.IsActive = 'Y' AND l.IsSystemLanguage = 'Y' AND AD_Element_ID || AD_LANGUAGE NOT IN (SELECT AD_Element_ID || AD_LANGUAGE FROM AD_ELEMENT_TRL)
;
UPDATE AD_COLUMN SET AD_Element_id = (SELECT AD_Element_ID FROM AD_ELEMENT e WHERE UPPER(AD_COLUMN.ColumnName)=UPPER(e.ColumnName)) WHERE AD_Element_ID IS NULL
@ -12,16 +12,16 @@ DELETE FROM AD_ELEMENT_TRL WHERE AD_Element_ID >= 1000000 AND AD_Element_ID IN (
DELETE FROM AD_ELEMENT WHERE AD_Element_ID >= 1000000 AND NOT EXISTS (SELECT 1 FROM AD_COLUMN c WHERE UPPER(AD_ELEMENT.ColumnName)=UPPER(c.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(AD_ELEMENT.ColumnName)=UPPER(p.ColumnName)) AND NOT EXISTS (SELECT 1 FROM AD_INFOCOLUMN i WHERE UPPER(AD_ELEMENT.ColumnName)=UPPER(i.ColumnName))
;
UPDATE AD_COLUMN SET ColumnName=e.ColumnName,Name=e.Name,Description=e.Description,Help=e.Help, Updated = statement_timestamp() FROM AD_ELEMENT e WHERE AD_COLUMN.AD_Element_ID=e.AD_Element_ID AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE AD_COLUMN.AD_Element_ID=e.AD_Element_ID AND (AD_COLUMN.ColumnName <> e.ColumnName OR AD_COLUMN.Name <> e.Name OR COALESCE(AD_COLUMN.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_COLUMN.Help,' ') <> COALESCE(e.Help,' ')))
UPDATE AD_COLUMN SET ColumnName=e.ColumnName,Name=e.Name,Description=e.Description,Help=e.Help,Placeholder=e.Placeholder, Updated = statement_timestamp() FROM AD_ELEMENT e WHERE AD_COLUMN.AD_Element_ID=e.AD_Element_ID AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE AD_COLUMN.AD_Element_ID=e.AD_Element_ID AND (AD_COLUMN.ColumnName <> e.ColumnName OR AD_COLUMN.Name <> e.Name OR COALESCE(AD_COLUMN.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_COLUMN.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(AD_COLUMN.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
;
UPDATE AD_INFOCOLUMN SET ColumnName=e.ColumnName,Name=e.Name,Description=e.Description,Help=e.Help, Updated = statement_timestamp() FROM AD_ELEMENT e WHERE AD_INFOCOLUMN.AD_Element_ID=e.AD_Element_ID AND AD_INFOCOLUMN.IsCentrallyMaintained='Y' AND AD_INFOCOLUMN.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE AD_INFOCOLUMN.AD_Element_ID=e.AD_Element_ID AND (AD_INFOCOLUMN.ColumnName <> e.ColumnName OR AD_INFOCOLUMN.Name <> e.Name OR COALESCE(AD_INFOCOLUMN.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_INFOCOLUMN.Help,' ') <> COALESCE(e.Help,' ')))
UPDATE AD_INFOCOLUMN SET ColumnName=e.ColumnName,Name=e.Name,Description=e.Description,Help=e.Help,Placeholder=e.Placeholder, Updated = statement_timestamp() FROM AD_ELEMENT e WHERE AD_INFOCOLUMN.AD_Element_ID=e.AD_Element_ID AND AD_INFOCOLUMN.IsCentrallyMaintained='Y' AND AD_INFOCOLUMN.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE AD_INFOCOLUMN.AD_Element_ID=e.AD_Element_ID AND (AD_INFOCOLUMN.ColumnName <> e.ColumnName OR AD_INFOCOLUMN.Name <> e.Name OR COALESCE(AD_INFOCOLUMN.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_INFOCOLUMN.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(AD_INFOCOLUMN.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
;
UPDATE AD_FIELD SET Name=e.Name,Description=e.Description,Help=e.Help, Updated = statement_timestamp() FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=AD_FIELD.AD_Column_ID AND AD_FIELD.IsCentrallyMaintained='Y' AND AD_FIELD.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE AD_FIELD.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (AD_FIELD.Name <> e.Name OR COALESCE(AD_FIELD.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_FIELD.Help,' ') <> COALESCE(e.Help,' ')))
UPDATE AD_FIELD SET Name=e.Name,Description=e.Description,Help=e.Help,Placeholder=e.Placeholder, Updated = statement_timestamp() FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=AD_FIELD.AD_Column_ID AND AD_FIELD.IsCentrallyMaintained='Y' AND AD_FIELD.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE AD_FIELD.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (AD_FIELD.Name <> e.Name OR COALESCE(AD_FIELD.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_FIELD.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(AD_FIELD.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
;
UPDATE AD_FIELD_TRL SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Description = (SELECT e.Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Updated = statement_timestamp() WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE AD_FIELD_TRL.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND AD_FIELD_TRL.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (AD_FIELD_TRL.Name <> e.Name OR COALESCE(AD_FIELD_TRL.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_FIELD_TRL.Help,' ') <> COALESCE(e.Help,' ')))
UPDATE AD_FIELD_TRL SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Description = (SELECT e.Description FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f WHERE e.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID), Updated = statement_timestamp() WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c WHERE AD_FIELD_TRL.AD_Field_ID=f.AD_Field_ID AND f.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND AD_FIELD_TRL.AD_LANGUAGE=e.AD_LANGUAGE AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (AD_FIELD_TRL.Name <> e.Name OR COALESCE(AD_FIELD_TRL.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_FIELD_TRL.Help,' ') <> COALESCE(e.Help,' ')))
;
UPDATE AD_FIELD SET Name = (SELECT e.PO_Name FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=AD_FIELD.AD_Column_ID), Description = (SELECT e.PO_Description FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=AD_FIELD.AD_Column_ID), Help = (SELECT e.PO_Help FROM AD_ELEMENT e, AD_COLUMN c WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=AD_FIELD.AD_Column_ID), Updated = statement_timestamp() WHERE AD_FIELD.IsCentrallyMaintained='Y' AND AD_FIELD.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c WHERE AD_FIELD.AD_Column_ID=c.AD_Column_ID AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL AND (AD_FIELD.Name <> e.PO_Name OR COALESCE(AD_FIELD.Description,' ') <> COALESCE(e.PO_Description,' ') OR COALESCE(AD_FIELD.Help,' ') <> COALESCE(e.PO_Help,' ')) AND e.PO_Name IS NOT NULL) AND EXISTS (SELECT 1 FROM AD_TAB t, AD_WINDOW w WHERE AD_FIELD.AD_Tab_ID=t.AD_Tab_ID AND t.AD_Window_ID=w.AD_Window_ID AND w.IsSOTrx='N')
@ -42,13 +42,13 @@ UPDATE AD_PROCESS_PARA SET ColumnName = (SELECT e.ColumnName FROM AD_ELEMENT e W
UPDATE AD_PROCESS_PARA SET IsCentrallyMaintained = 'N' WHERE IsCentrallyMaintained <> 'N' AND NOT EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE AD_PROCESS_PARA.ColumnName=e.ColumnName)
;
UPDATE AD_PROCESS_PARA SET Name = (SELECT e.Name FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Description = (SELECT e.Description FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Help = (SELECT e.Help FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Updated = statement_timestamp() WHERE AD_PROCESS_PARA.IsCentrallyMaintained='Y' AND AD_PROCESS_PARA.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName AND (AD_PROCESS_PARA.Name <> e.Name OR COALESCE(AD_PROCESS_PARA.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_PROCESS_PARA.Help,' ') <> COALESCE(e.Help,' ')))
UPDATE AD_PROCESS_PARA SET Name = (SELECT e.Name FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Description = (SELECT e.Description FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Help = (SELECT e.Help FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName), Updated = statement_timestamp() WHERE AD_PROCESS_PARA.IsCentrallyMaintained='Y' AND AD_PROCESS_PARA.IsActive='Y' AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE e.ColumnName=AD_PROCESS_PARA.ColumnName AND (AD_PROCESS_PARA.Name <> e.Name OR COALESCE(AD_PROCESS_PARA.Description,' ') <> COALESCE(e.Description,' ') OR COALESCE(AD_PROCESS_PARA.Help,' ') <> COALESCE(e.Help,' ') OR COALESCE(AD_PROCESS_PARA.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
;
UPDATE AD_PROCESS_PARA_TRL SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Updated = statement_timestamp() WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (AD_PROCESS_PARA_TRL.Name <> et.Name OR COALESCE(AD_PROCESS_PARA_TRL.Description,' ') <> COALESCE(et.Description,' ') OR COALESCE(AD_PROCESS_PARA_TRL.Help,' ') <> COALESCE(et.Help,' ')))
UPDATE AD_PROCESS_PARA_TRL SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID), Updated = statement_timestamp() WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (AD_PROCESS_PARA_TRL.Name <> et.Name OR COALESCE(AD_PROCESS_PARA_TRL.Description,' ') <> COALESCE(et.Description,' ') OR COALESCE(AD_PROCESS_PARA_TRL.Help,' ') <> COALESCE(et.Help,' ') OR COALESCE(AD_PROCESS_PARA_TRL.Placeholder,' ') <> COALESCE(et.Placeholder,' ')))
;
UPDATE AD_INFOCOLUMN_TRL SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Updated = statement_timestamp() WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (AD_INFOCOLUMN_TRL.Name <> et.Name OR COALESCE(AD_INFOCOLUMN_TRL.Description,' ') <> COALESCE(et.Description,' ') OR COALESCE(AD_INFOCOLUMN_TRL.Help,' ') <> COALESCE(et.Help,' ')))
UPDATE AD_INFOCOLUMN_TRL SET Name = (SELECT et.Name FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Description = (SELECT et.Description FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID), Updated = statement_timestamp() WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f WHERE et.AD_LANGUAGE=AD_INFOCOLUMN_TRL.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=AD_INFOCOLUMN_TRL.AD_InfoColumn_ID AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y' AND (AD_INFOCOLUMN_TRL.Name <> et.Name OR COALESCE(AD_INFOCOLUMN_TRL.Description,' ') <> COALESCE(et.Description,' ') OR COALESCE(AD_INFOCOLUMN_TRL.Help,' ') <> COALESCE(et.Help,' ') OR COALESCE(AD_INFOCOLUMN_TRL.Placeholder,' ') <> COALESCE(et.Placeholder,' ')))
;
UPDATE AD_WF_NODE SET Name = (SELECT w.Name FROM AD_WINDOW w WHERE w.AD_Window_ID=AD_WF_NODE.AD_Window_ID), Description = (SELECT w.Description FROM AD_WINDOW w WHERE w.AD_Window_ID=AD_WF_NODE.AD_Window_ID), Help = (SELECT w.Help FROM AD_WINDOW w WHERE w.AD_Window_ID=AD_WF_NODE.AD_Window_ID) WHERE AD_WF_NODE.IsCentrallyMaintained = 'Y' AND EXISTS (SELECT 1 FROM AD_WINDOW w WHERE w.AD_Window_ID=AD_WF_NODE.AD_Window_ID AND (w.Name <> AD_WF_NODE.Name OR COALESCE(w.Description,' ') <> COALESCE(AD_WF_NODE.Description,' ') OR COALESCE(w.Help,' ') <> COALESCE(AD_WF_NODE.Help,' ')))
@ -123,7 +123,7 @@ UPDATE AD_MENU SET Name = (SELECT Name FROM AD_InfoWindow f WHERE AD_MENU.AD_Inf
UPDATE AD_MENU_TRL SET Name = (SELECT ft.Name FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE AD_MENU_TRL.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND AD_MENU_TRL.AD_LANGUAGE=ft.AD_LANGUAGE), Description = (SELECT ft.Description FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE AD_MENU_TRL.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND AD_MENU_TRL.AD_LANGUAGE=ft.AD_LANGUAGE), IsTranslated = (SELECT ft.IsTranslated FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE AD_MENU_TRL.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND AD_MENU_TRL.AD_LANGUAGE=ft.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_InfoWindow_TRL ft, AD_MENU m WHERE AD_MENU_TRL.AD_Menu_ID=m.AD_Menu_ID AND m.AD_InfoWindow_ID=ft.AD_InfoWindow_ID AND AD_MENU_TRL.AD_LANGUAGE=ft.AD_LANGUAGE AND m.AD_InfoWindow_ID IS NOT NULL AND m."action" = 'I' AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y')
;
UPDATE AD_COLUMN_TRL SET Name = (SELECT e.Name FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE AD_COLUMN_TRL.AD_Column_ID=c.AD_Column_ID AND AD_COLUMN_TRL.AD_LANGUAGE=e.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE AD_COLUMN_TRL.AD_Column_ID=c.AD_Column_ID AND AD_COLUMN_TRL.AD_LANGUAGE=e.AD_LANGUAGE AND AD_COLUMN_TRL.Name<>e.Name)
UPDATE AD_COLUMN_TRL SET Name = (SELECT e.Name FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE AD_COLUMN_TRL.AD_Column_ID=c.AD_Column_ID AND AD_COLUMN_TRL.AD_LANGUAGE=e.AD_LANGUAGE), PlaceHolder = (SELECT e.PlaceHolder FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE AD_COLUMN_TRL.AD_Column_ID=c.AD_Column_ID AND AD_COLUMN_TRL.AD_LANGUAGE=e.AD_LANGUAGE) WHERE EXISTS (SELECT 1 FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID) WHERE AD_COLUMN_TRL.AD_Column_ID=c.AD_Column_ID AND AD_COLUMN_TRL.AD_LANGUAGE=e.AD_LANGUAGE AND (AD_COLUMN_TRL.Name<>e.Name OR COALESCE(AD_COLUMN_TRL.Placeholder,' ') <> COALESCE(e.Placeholder,' ')))
;
UPDATE AD_TABLE SET Name=e.Name,Description=e.Description FROM AD_ELEMENT e WHERE AD_TABLE.TableName||'_ID'=e.ColumnName AND EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE AD_TABLE.TableName||'_ID'=e.ColumnName AND AD_TABLE.Name<>e.Name)

View File

@ -114,6 +114,7 @@ public class CalloutWindowCustomization extends CalloutEngine
ud_field.setName(field.get_Translation("Name", lang));
ud_field.setDescription(field.get_Translation("Description", lang));
ud_field.setHelp(field.get_Translation("Help", lang));
ud_field.setPlaceholder(field.get_Translation("PlaceHolder", lang));
//IDEMPIERE-163 / do not inherit configuration from field - all configuration was made nullable, if null it inherit the field/column config
return NO_ERROR;

View File

@ -140,6 +140,7 @@ public class Callout_AD_Column extends CalloutEngine
column.setName(element.getName());
column.setDescription(element.getDescription());
column.setHelp(element.getHelp());
column.setPlaceholder(element.getPlaceholder());
}
return "";

View File

@ -92,7 +92,10 @@ public class OrderRePrice extends SvrProcess
for (int i = 0; i < lines.length; i++)
{
lines[i].setPrice(invoice.getM_PriceList_ID(), invoice.getC_BPartner_ID());
lines[i].saveEx();
if (lines[i].is_Changed()) {
lines[i].setTaxAmt();
lines[i].saveEx();
}
}
invoice = new MInvoice (getCtx(), p_C_Invoice_ID, null);
BigDecimal newPrice = invoice.getGrandTotal();

View File

@ -109,10 +109,10 @@ public class SynchronizeTerminology extends SvrProcess
log.info("Adding missing Element Translations");
sql="INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID,"
+" IsActive, Created, CreatedBy, Updated, UpdatedBy,"
+" Name, PrintName, Description, Help, IsTranslated)"
+" Name, PrintName, Description, Help, Placeholder, IsTranslated)"
+" SELECT m.AD_Element_ID, l.AD_LANGUAGE, m.AD_Client_ID, m.AD_Org_ID,"
+" m.IsActive, m.Created, m.CreatedBy, m.Updated, m.UpdatedBy,"
+" m.Name, m.PrintName, m.Description, m.Help, 'N'"
+" m.Name, m.PrintName, m.Description, m.Help, m.Placeholder,'N'"
+" FROM AD_ELEMENT m, AD_LANGUAGE l"
+" WHERE l.IsActive = 'Y' AND l.IsSystemLanguage = 'Y'"
+" AND AD_Element_ID || AD_LANGUAGE NOT IN "
@ -159,14 +159,15 @@ public class SynchronizeTerminology extends SvrProcess
// Columns
log.info("Synchronize Column");
sql=" UPDATE AD_COLUMN c"
+" SET (ColumnName, Name, Description, Help) ="
+" (SELECT ColumnName, Name, Description, Help"
+" SET (ColumnName, Name, Description, Help, Placeholder) ="
+" (SELECT ColumnName, Name, Description, Help, Placeholder"
+" FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID),"
+" Updated = SYSDATE"
+" WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e "
+" WHERE c.AD_Element_ID=e.AD_Element_ID"
+" AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name "
+" OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')))";
+" OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')"
+" OR NVL(c.Placeholder,' ') <> NVL(e.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);
@ -174,15 +175,16 @@ public class SynchronizeTerminology extends SvrProcess
// Info Columns
log.info("Synchronize Info Column");
sql=" UPDATE AD_INFOCOLUMN c"
+" SET (ColumnName, Name, Description, Help) ="
+" (SELECT ColumnName, Name, Description, Help"
+" SET (ColumnName, Name, Description, Help, Placeholder) ="
+" (SELECT ColumnName, Name, Description, Help, Placeholder"
+" FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID),"
+" Updated = SYSDATE"
+" WHERE c.IsCentrallyMaintained='Y' AND c.IsActive='Y'"
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e "
+" WHERE c.AD_Element_ID=e.AD_Element_ID"
+" AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name "
+" OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')))";
+" OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')"
+" OR NVL(c.Placeholder,' ') <> NVL(e.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);
@ -190,8 +192,8 @@ public class SynchronizeTerminology extends SvrProcess
// Fields should now be synchronized
log.info("Synchronize Field");
sql=" UPDATE AD_FIELD f"
+" SET (Name, Description, Help) = "
+" (SELECT e.Name, e.Description, e.Help"
+" SET (Name, Description, Help, Placeholder) = "
+" (SELECT e.Name, e.Description, e.Help, e.Placeholder"
+" FROM AD_ELEMENT e, AD_COLUMN c"
+" WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID),"
+" Updated = SYSDATE"
@ -199,7 +201,8 @@ public class SynchronizeTerminology extends SvrProcess
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c"
+" WHERE f.AD_Column_ID=c.AD_Column_ID"
+" AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL"
+" AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')))";
+" AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')"
+" OR NVL(f.Placeholder,' ') <> NVL(e.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);
@ -216,6 +219,9 @@ public class SynchronizeTerminology extends SvrProcess
+" Help = (SELECT e.Help FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f"
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID "
+" AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID),"
+" Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f"
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID "
+" AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID),"
+" IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f"
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID "
+" AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID),"
@ -226,7 +232,8 @@ public class SynchronizeTerminology extends SvrProcess
+" AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL"
+" AND trl.AD_LANGUAGE=e.AD_LANGUAGE"
+" AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
+" AND (trl.Name <> e.Name OR NVL(trl.Description,' ') <> NVL(e.Description,' ') OR NVL(trl.Help,' ') <> NVL(e.Help,' ')))";
+" AND (trl.Name <> e.Name OR NVL(trl.Description,' ') <> NVL(e.Description,' ') OR NVL(trl.Help,' ') <> NVL(e.Help,' ')"
+" OR NVL(trl.Placeholder,' ') <> NVL(e.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);
@ -362,11 +369,13 @@ public class SynchronizeTerminology extends SvrProcess
+" WHERE e.ColumnName=f.ColumnName),"
+" Help = (SELECT e.Help FROM AD_ELEMENT e"
+" WHERE e.ColumnName=f.ColumnName),"
+" Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT e"
+" WHERE e.ColumnName=f.ColumnName),"
+" Updated = SYSDATE"
+" WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e"
+" WHERE e.ColumnName=f.ColumnName"
+" AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')))";
+" AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ') OR NVL(f.Placeholder,' ') <> NVL(e.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);
@ -383,6 +392,9 @@ public class SynchronizeTerminology extends SvrProcess
+" Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f"
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID),"
+" Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f"
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID),"
+" IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f"
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID),"
@ -391,7 +403,7 @@ public class SynchronizeTerminology extends SvrProcess
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID"
+" AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
+" AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ')))";
+" AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ') OR NVL(trl.Placeholder,' ') <> NVL(et.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);
@ -408,6 +420,9 @@ public class SynchronizeTerminology extends SvrProcess
+" Help = (SELECT et.Help FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f"
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID),"
+" Placeholder = (SELECT et.Placeholder FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f"
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID),"
+" IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f"
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID),"
@ -416,7 +431,7 @@ public class SynchronizeTerminology extends SvrProcess
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
+" AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID"
+" AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
+" AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ')))";
+" AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ') OR NVL(trl.Placeholder,' ') <> NVL(et.Placeholder,' ')))";
no = DB.executeUpdate(sql, false, get_TrxName());
if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no);
trx.commit(true);

View File

@ -181,6 +181,8 @@ public class DBException extends AdempiereException
* @param e exception
*/
public static boolean isInvalidIdentifierError(Exception e) {
if (DB.isPostgreSQL())
return isSQLState(e, "42P01");
return isErrorCode(e, 904);
}

View File

@ -85,7 +85,7 @@ public class GridField
/**
*
*/
private static final long serialVersionUID = 2703129833179761682L;
private static final long serialVersionUID = -5866251928705632328L;
/**
* Field Constructor.
@ -2529,7 +2529,19 @@ public class GridField
{
return m_vo.PA_DashboardContent_ID;
}
public String getPlaceholder() {
return m_vo.Placeholder;
}
public String getPlaceholder2() {
return m_vo.Placeholder2;
}
public void setPlaceholder(String placeholder) {
m_vo.Placeholder = placeholder;
}
public GridField clone(Properties ctx)
{
try {

View File

@ -47,7 +47,7 @@ public class GridFieldVO implements Serializable
/**
*
*/
private static final long serialVersionUID = 5633655630654835665L;
private static final long serialVersionUID = -3894697577296104861L;
/**
* Return the SQL statement used for the MFieldVO.create
@ -236,6 +236,8 @@ public class GridFieldVO implements Serializable
vo.AD_FieldStyle_ID = rs.getInt (i);
else if (columnName.equalsIgnoreCase("PA_DashboardContent_ID"))
vo.PA_DashboardContent_ID = rs.getInt (i);
else if (columnName.equalsIgnoreCase("placeholder"))
vo.Placeholder = rs.getString(i);
}
if (vo.Header == null)
vo.Header = vo.ColumnName;
@ -321,6 +323,9 @@ public class GridFieldVO implements Serializable
if (userDef.getPA_DashboardContent_ID() > 0)
vo.PA_DashboardContent_ID = userDef.getPA_DashboardContent_ID();
if (userDef.getPlaceholder() != null)
vo.Placeholder = userDef.getPlaceholder();
}
}
//
@ -372,6 +377,8 @@ public class GridFieldVO implements Serializable
vo.DisplayLogic= rs.getString("DisplayLogic");
vo.IsEncryptedField=rs.getString("IsEncrypted").equals("Y");
vo.MandatoryLogic = rs.getString("MandatoryLogic");
vo.Placeholder = rs.getString("Placeholder");
vo.Placeholder2 = rs.getString("Placeholder2");
}
catch (SQLException e)
{
@ -381,6 +388,9 @@ public class GridFieldVO implements Serializable
vo.initFinish();
if (vo.DefaultValue2 == null)
vo.DefaultValue2 = "";
if (vo.Placeholder2 == null)
vo.Placeholder2 = "";
return vo;
} // createParameter
@ -409,6 +419,7 @@ public class GridFieldVO implements Serializable
voT.FieldLength = voF.FieldLength;
voT.DisplayLength = voF.FieldLength;
voT.DefaultValue = voF.DefaultValue2;
voT.Placeholder2 = voF.Placeholder2;
voT.VFormat = voF.VFormat;
voT.FormatPattern = voF.FormatPattern;
voT.ValueMin = voF.ValueMin;
@ -444,7 +455,7 @@ public class GridFieldVO implements Serializable
*/
public static GridFieldVO createParameter (Properties ctx, int WindowNo, int WindowIDOfPanel, int infoWindowID,
int AD_Column_ID, String ColumnName, String Name, int AD_Reference_ID, int AD_Reference_Value_ID,
boolean IsMandatory, boolean IsEncrypted)
boolean IsMandatory, boolean IsEncrypted, String Placeholder)
{
GridFieldVO vo = new GridFieldVO (ctx, WindowNo, 0, 0, 0, false);
vo.isProcess = true;
@ -461,6 +472,7 @@ public class GridFieldVO implements Serializable
vo.IsEncryptedField= IsEncrypted;
vo.AD_Infowindow_ID = infoWindowID;
vo.AD_Window_ID_Of_Panel = WindowIDOfPanel;
vo.Placeholder = Placeholder;
//
vo.initFinish();
return vo;
@ -677,6 +689,9 @@ public class GridFieldVO implements Serializable
public int AD_FieldStyle_ID = 0;
public int PA_DashboardContent_ID = 0;
public String Placeholder = "";
public String Placeholder2 = "";
/**
* Set Context including contained elements
@ -713,6 +728,8 @@ public class GridFieldVO implements Serializable
ReadOnlyLogic = "";
if (MandatoryLogic == null)
MandatoryLogic = "";
if (Placeholder == null)
Placeholder = "";
// Create Lookup, if not ID
@ -810,6 +827,7 @@ public class GridFieldVO implements Serializable
clone.AD_FieldStyle_ID = AD_FieldStyle_ID;
clone.AD_LabelStyle_ID = AD_LabelStyle_ID;
clone.PA_DashboardContent_ID = PA_DashboardContent_ID;
clone.Placeholder = Placeholder;
// Lookup
clone.ValidationCode = ValidationCode;
@ -819,6 +837,7 @@ public class GridFieldVO implements Serializable
// Process Parameter
clone.isRange = isRange;
clone.DefaultValue2 = DefaultValue2;
clone.Placeholder2 = Placeholder2;
clone.AD_Process_ID_Of_Panel = AD_Process_ID_Of_Panel;
clone.AD_Window_ID_Of_Panel = AD_Window_ID_Of_Panel;
clone.AD_Infowindow_ID = AD_Infowindow_ID;

View File

@ -1312,9 +1312,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
public void setLinkColumnName (String linkColumnName)
{
// set parent column name
String sql = "SELECT ColumnName FROM AD_Column WHERE AD_Column_ID=?";
if (m_vo.Parent_Column_ID > 0)
m_parentColumnName = DB.getSQLValueString(null, sql, m_vo.Parent_Column_ID );
m_parentColumnName = MColumn.getColumnName(m_vo.ctx, m_vo.Parent_Column_ID);
if ( m_parentColumnName == null )
m_parentColumnName = "";
@ -1329,27 +1328,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// we have a link column identified (primary parent column)
else
{
String SQL = "SELECT ColumnName FROM AD_Column WHERE AD_Column_ID=?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(SQL, null);
pstmt.setInt(1, m_vo.AD_Column_ID); // Parent Link Column
rs = pstmt.executeQuery();
if (rs.next())
m_linkColumnName = rs.getString(1);
}
catch (SQLException e)
{
log.log(Level.SEVERE, "", e);
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
m_linkColumnName = MColumn.getColumnName(m_vo.ctx, m_vo.AD_Column_ID); // Parent Link Column
if (log.isLoggable(Level.FINE)) log.fine("AD_Column_ID=" + m_vo.AD_Column_ID + " - " + m_linkColumnName);
}
}

View File

@ -49,6 +49,7 @@ import java.util.logging.Level;
import javax.swing.event.TableModelListener;
import javax.swing.table.AbstractTableModel;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.adempiere.util.ServerContext;
import org.compiere.Adempiere;
@ -3542,7 +3543,7 @@ public class GridTable extends AbstractTableModel
if (DBException.isInvalidIdentifierError(e0))
log.warning("Count - " + e0.getLocalizedMessage() + "\nSQL=" + m_SQL_Count);
else
log.log(Level.SEVERE, "Count SQL=" + m_SQL_Count, e0);
throw new AdempiereException(e0);
return 0;
}
finally

View File

@ -581,6 +581,15 @@ public interface I_AD_Column
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException;
/** Column name Placeholder */
public static final String COLUMNNAME_Placeholder = "Placeholder";
/** Set Placeholder */
public void setPlaceholder (String Placeholder);
/** Get Placeholder */
public String getPlaceholder();
/** Column name ReadOnlyLogic */
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";

View File

@ -180,6 +180,15 @@ public interface I_AD_Element
*/
public String getName();
/** Column name Placeholder */
public static final String COLUMNNAME_Placeholder = "Placeholder";
/** Set Placeholder */
public void setPlaceholder (String Placeholder);
/** Get Placeholder */
public String getPlaceholder();
/** Column name PO_Description */
public static final String COLUMNNAME_PO_Description = "PO_Description";

View File

@ -583,6 +583,15 @@ public interface I_AD_Field
*/
public String getObscureType();
/** Column name Placeholder */
public static final String COLUMNNAME_Placeholder = "Placeholder";
/** Set Placeholder */
public void setPlaceholder (String Placeholder);
/** Get Placeholder */
public String getPlaceholder();
/** Column name ReadOnlyLogic */
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";

View File

@ -361,6 +361,15 @@ public interface I_AD_InfoColumn
*/
public String getName();
/** Column name Placeholder */
public static final String COLUMNNAME_Placeholder = "Placeholder";
/** Set Placeholder */
public void setPlaceholder (String Placeholder);
/** Get Placeholder */
public String getPlaceholder();
/** Column name QueryFunction */
public static final String COLUMNNAME_QueryFunction = "QueryFunction";

View File

@ -368,6 +368,24 @@ public interface I_AD_Process_Para
*/
public String getName();
/** Column name Placeholder */
public static final String COLUMNNAME_Placeholder = "Placeholder";
/** Set Placeholder */
public void setPlaceholder (String Placeholder);
/** Get Placeholder */
public String getPlaceholder();
/** Column name Placeholder2 */
public static final String COLUMNNAME_Placeholder2 = "Placeholder2";
/** Set Placeholder2 */
public void setPlaceholder2 (String Placeholder2);
/** Get Placeholder2 */
public String getPlaceholder2();
/** Column name ReadOnlyLogic */
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";

View File

@ -427,6 +427,15 @@ public interface I_AD_UserDef_Field
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException;
/** Column name Placeholder */
public static final String COLUMNNAME_Placeholder = "Placeholder";
/** Set Placeholder */
public void setPlaceholder (String Placeholder);
/** Get Placeholder */
public String getPlaceholder();
/** Column name ReadOnlyLogic */
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";

View File

@ -429,6 +429,87 @@ public interface I_C_Country
*/
public String getName();
/** Column name PlaceholderAddress1 */
public static final String COLUMNNAME_PlaceholderAddress1 = "PlaceholderAddress1";
/** Set Placeholder for Address 1 */
public void setPlaceholderAddress1 (String PlaceholderAddress1);
/** Get Placeholder for Address 1 */
public String getPlaceholderAddress1();
/** Column name PlaceholderAddress2 */
public static final String COLUMNNAME_PlaceholderAddress2 = "PlaceholderAddress2";
/** Set Placeholder for Address 2 */
public void setPlaceholderAddress2 (String PlaceholderAddress2);
/** Get Placeholder for Address 2 */
public String getPlaceholderAddress2();
/** Column name PlaceholderAddress3 */
public static final String COLUMNNAME_PlaceholderAddress3 = "PlaceholderAddress3";
/** Set Placeholder for Address 3 */
public void setPlaceholderAddress3 (String PlaceholderAddress3);
/** Get Placeholder for Address 3 */
public String getPlaceholderAddress3();
/** Column name PlaceholderAddress4 */
public static final String COLUMNNAME_PlaceholderAddress4 = "PlaceholderAddress4";
/** Set Placeholder for Address 4 */
public void setPlaceholderAddress4 (String PlaceholderAddress4);
/** Get Placeholder for Address 4 */
public String getPlaceholderAddress4();
/** Column name PlaceholderAddress5 */
public static final String COLUMNNAME_PlaceholderAddress5 = "PlaceholderAddress5";
/** Set Placeholder for Address 5 */
public void setPlaceholderAddress5 (String PlaceholderAddress5);
/** Get Placeholder for Address 5 */
public String getPlaceholderAddress5();
/** Column name PlaceholderCity */
public static final String COLUMNNAME_PlaceholderCity = "PlaceholderCity";
/** Set Placeholder for city */
public void setPlaceholderCity (String PlaceholderCity);
/** Get Placeholder for city */
public String getPlaceholderCity();
/** Column name PlaceholderComments */
public static final String COLUMNNAME_PlaceholderComments = "PlaceholderComments";
/** Set Placeholder for comments */
public void setPlaceholderComments (String PlaceholderComments);
/** Get Placeholder for comments */
public String getPlaceholderComments();
/** Column name PlaceholderPostal */
public static final String COLUMNNAME_PlaceholderPostal = "PlaceholderPostal";
/** Set Placeholder for postal */
public void setPlaceholderPostal (String PlaceholderPostal);
/** Get Placeholder for postal */
public String getPlaceholderPostal();
/** Column name PlaceholderPostal_Add */
public static final String COLUMNNAME_PlaceholderPostal_Add = "PlaceholderPostal_Add";
/** Set Placeholder for additional zip */
public void setPlaceholderPostal_Add (String PlaceholderPostal_Add);
/** Get Placeholder for additional zip */
public String getPlaceholderPostal_Add();
/** Column name RegionName */
public static final String COLUMNNAME_RegionName = "RegionName";

View File

@ -457,7 +457,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
BigDecimal TaxAmt = Env.ZERO;
if (getC_Tax_ID() == 0)
return;
// setLineNetAmt();
setLineNetAmt();
MTax tax = MTax.get (getCtx(), getC_Tax_ID());
if (tax.isDocumentLevel() && m_IsSOTrx) // AR Inv Tax
return;

View File

@ -91,42 +91,18 @@ public class MLookupFactory
public static MLookupInfo getLookupInfo(Properties ctx, int WindowNo, int TabNo, int Column_ID, int AD_Reference_ID)
{
String ColumnName = "";
int AD_Reference_Value_ID = 0;
boolean IsParent = false;
MColumn column = MColumn.get(ctx, Column_ID);
if (column.get_ID() == 0)
s_log.log(Level.SEVERE, "Column Not Found - AD_Column_ID=" + Column_ID);
String ColumnName = column.getColumnName();
int AD_Reference_Value_ID = column.getAD_Reference_Value_ID();
boolean IsParent = column.isParent();
String ValidationCode = "";
//
String sql = "SELECT c.ColumnName, c.AD_Reference_Value_ID, c.IsParent, vr.Code "
+ "FROM AD_Column c"
+ " LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) "
+ "WHERE c.AD_Column_ID=?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, Column_ID);
//
rs = pstmt.executeQuery();
if (rs.next())
{
ColumnName = rs.getString(1);
AD_Reference_Value_ID = rs.getInt(2);
IsParent = "Y".equals(rs.getString(3));
ValidationCode = rs.getString(4);
}
else
s_log.log(Level.SEVERE, "Column Not Found - AD_Column_ID=" + Column_ID);
}
catch (SQLException ex)
{
s_log.log(Level.SEVERE, "create", ex);
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
if (column.getAD_Val_Rule_ID() > 0) {
MValRule valRule = MValRule.get(ctx, column.getAD_Val_Rule_ID());
ValidationCode = valRule.getCode();
}
//
MLookupInfo info = getLookupInfo (ctx, WindowNo, TabNo, Column_ID, AD_Reference_ID,
@ -993,41 +969,12 @@ public class MLookupFactory
} // getLookup_TableDirEmbed
private static ArrayList<LookupDisplayColumn> getListIdentifiers(String TableName) {
// get display column name (first identifier column)
String sql = "SELECT c.ColumnName,c.IsTranslated,c.AD_Reference_ID,c.AD_Reference_Value_ID "
+ ", c.ColumnSQL " // 5
+ "FROM AD_Table t INNER JOIN AD_Column c ON (t.AD_Table_ID=c.AD_Table_ID) "
+ "WHERE TableName=?"
+ " AND c.IsIdentifier='Y' "
+ "ORDER BY c.SeqNo";
//
ArrayList<LookupDisplayColumn> list = new ArrayList<LookupDisplayColumn>();
//
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setString(1, TableName);
rs = pstmt.executeQuery();
while (rs.next())
{
LookupDisplayColumn ldc = new LookupDisplayColumn (rs.getString(1),
rs.getString(5),
"Y".equals(rs.getString(2)), rs.getInt(3), rs.getInt(4));
list.add (ldc);
}
}
catch (SQLException e)
{
s_log.log(Level.SEVERE, sql, e);
return null;
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
MTable table = MTable.get(Env.getCtx(), TableName);
for (String idColumnName : table.getIdentifierColumns()) {
MColumn column = table.getColumn(idColumnName);
LookupDisplayColumn ldc = new LookupDisplayColumn(column.getColumnName(), column.getColumnSQL(), column.isTranslated(), column.getAD_Reference_ID(), column.getAD_Reference_Value_ID());
list.add (ldc);
}
return list;
}

View File

@ -15,16 +15,18 @@ import org.compiere.util.Env;
*
*/
public class MStyle extends X_AD_Style {
/**
*
*/
private static final long serialVersionUID = -5183438249097292583L;
private static final long serialVersionUID = 4988653330824933725L;
/** Cache */
private static CCache<Integer,MStyle> s_cache = new CCache<Integer,MStyle>(Table_Name, 30, 60);
private X_AD_StyleLine[] m_lines = null;
public static final String SCLASS_PREFIX = "@sclass=";
public static final String ZCLASS_PREFIX = "@zclass=";
public MStyle(Properties ctx, int AD_Style_ID, String trxName) {
super(ctx, AD_Style_ID, trxName);
}

View File

@ -20,6 +20,8 @@ package org.compiere.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -33,6 +35,7 @@ import org.adempiere.model.GenericPO;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.KeyNamePair;
/**
* Persistent Table Model
@ -356,19 +359,26 @@ public class MTable extends X_AD_Table
* Get Identifier Columns of Table
* @return Identifier columns
*/
public String[] getIdentifierColumns()
{
getColumns(false);
ArrayList<String> list = new ArrayList<String>();
//
for (int i = 0; i < m_columns.length; i++)
{
MColumn column = m_columns[i];
public String[] getIdentifierColumns() {
ArrayList<KeyNamePair> listkn = new ArrayList<KeyNamePair>();
for (MColumn column : getColumns(false)) {
if (column.isIdentifier())
list.add(column.getColumnName());
listkn.add(new KeyNamePair(column.getSeqNo(), column.getColumnName()));
}
// Order by SeqNo
Collections.sort(listkn, new Comparator<KeyNamePair>(){
public int compare(KeyNamePair s1,KeyNamePair s2){
if (s1.getKey() < s2.getKey())
return -1;
else if (s1.getKey() > s2.getKey())
return 1;
else
return 0;
}});
String[] retValue = new String[listkn.size()];
for (int i = 0; i < listkn.size(); i++) {
retValue[i] = listkn.get(i).getName();
}
String[] retValue = new String[list.size()];
retValue = list.toArray(retValue);
return retValue;
} // getIdentifierColumns

View File

@ -220,6 +220,7 @@ public class M_Element extends X_AD_Element
if ( is_ValueChanged(M_Element.COLUMNNAME_Name)
|| is_ValueChanged(M_Element.COLUMNNAME_Description)
|| is_ValueChanged(M_Element.COLUMNNAME_Help)
|| is_ValueChanged(M_Element.COLUMNNAME_Placeholder)
|| is_ValueChanged(M_Element.COLUMNNAME_ColumnName)
) {
// Column
@ -228,6 +229,7 @@ public class M_Element extends X_AD_Element
.append(", Name=").append(DB.TO_STRING(getName()))
.append(", Description=").append(DB.TO_STRING(getDescription()))
.append(", Help=").append(DB.TO_STRING(getHelp()))
.append(", Placeholder=").append(DB.TO_STRING(getPlaceholder()))
.append(" WHERE AD_Element_ID=").append(get_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("afterSave - Columns updated #" + no);
@ -249,6 +251,7 @@ public class M_Element extends X_AD_Element
.append(", Name=").append(DB.TO_STRING(getName()))
.append(", Description=").append(DB.TO_STRING(getDescription()))
.append(", Help=").append(DB.TO_STRING(getHelp()))
.append(", Placeholder=").append(DB.TO_STRING(getPlaceholder()))
.append(" WHERE AD_Element_ID=").append(get_ID())
.append(" AND IsCentrallyMaintained='Y'");
no += DB.executeUpdate(sql.toString(), get_TrxName());
@ -260,6 +263,7 @@ public class M_Element extends X_AD_Element
.append(", Name=").append(DB.TO_STRING(getName()))
.append(", Description=").append(DB.TO_STRING(getDescription()))
.append(", Help=").append(DB.TO_STRING(getHelp()))
.append(", Placeholder=").append(DB.TO_STRING(getPlaceholder()))
.append(" WHERE AD_Element_ID=").append(get_ID())
.append(" AND IsCentrallyMaintained='Y'");
no += DB.executeUpdate(sql.toString(), get_TrxName());
@ -269,12 +273,14 @@ public class M_Element extends X_AD_Element
if ( is_ValueChanged(M_Element.COLUMNNAME_Name)
|| is_ValueChanged(M_Element.COLUMNNAME_Description)
|| is_ValueChanged(M_Element.COLUMNNAME_Help)
|| is_ValueChanged(M_Element.COLUMNNAME_Placeholder)
) {
// Field
sql = new StringBuilder("UPDATE AD_Field SET Name=")
.append(DB.TO_STRING(getName()))
.append(", Description=").append(DB.TO_STRING(getDescription()))
.append(", Help=").append(DB.TO_STRING(getHelp()))
.append(", Placeholder=").append(DB.TO_STRING(getPlaceholder()))
.append(" WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=")
.append(get_ID())
.append(") AND IsCentrallyMaintained='Y'");

View File

@ -32,7 +32,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_AD_Column (Properties ctx, int AD_Column_ID, String trxName)
@ -949,6 +949,20 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
return ii.intValue();
}
/** Set Placeholder.
@param Placeholder Placeholder */
public void setPlaceholder (String Placeholder)
{
set_Value (COLUMNNAME_Placeholder, Placeholder);
}
/** Get Placeholder.
@return Placeholder */
public String getPlaceholder ()
{
return (String)get_Value(COLUMNNAME_Placeholder);
}
/** Set Read Only Logic.
@param ReadOnlyLogic
Logic to determine if field is read only (applies only when field is read-write)

View File

@ -30,7 +30,7 @@ public class X_AD_Element extends PO implements I_AD_Element, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_AD_Element (Properties ctx, int AD_Element_ID, String trxName)
@ -208,6 +208,20 @@ public class X_AD_Element extends PO implements I_AD_Element, I_Persistent
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Placeholder.
@param Placeholder Placeholder */
public void setPlaceholder (String Placeholder)
{
set_Value (COLUMNNAME_Placeholder, Placeholder);
}
/** Get Placeholder.
@return Placeholder */
public String getPlaceholder ()
{
return (String)get_Value(COLUMNNAME_Placeholder);
}
/** Set PO Description.
@param PO_Description
Description in PO Screens

View File

@ -32,7 +32,7 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_AD_Field (Properties ctx, int AD_Field_ID, String trxName)
@ -968,6 +968,20 @@ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent
return (String)get_Value(COLUMNNAME_ObscureType);
}
/** Set Placeholder.
@param Placeholder Placeholder */
public void setPlaceholder (String Placeholder)
{
set_Value (COLUMNNAME_Placeholder, Placeholder);
}
/** Get Placeholder.
@return Placeholder */
public String getPlaceholder ()
{
return (String)get_Value(COLUMNNAME_Placeholder);
}
/** Set Read Only Logic.
@param ReadOnlyLogic
Logic to determine if field is read only (applies only when field is read-write)

View File

@ -30,7 +30,7 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_AD_InfoColumn (Properties ctx, int AD_InfoColumn_ID, String trxName)
@ -539,6 +539,20 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent
return new KeyNamePair(get_ID(), getName());
}
/** Set Placeholder.
@param Placeholder Placeholder */
public void setPlaceholder (String Placeholder)
{
set_Value (COLUMNNAME_Placeholder, Placeholder);
}
/** Get Placeholder.
@return Placeholder */
public String getPlaceholder ()
{
return (String)get_Value(COLUMNNAME_Placeholder);
}
/** Set Query Function.
@param QueryFunction
Database function for query

View File

@ -30,7 +30,7 @@ public class X_AD_Process_Para extends PO implements I_AD_Process_Para, I_Persis
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_AD_Process_Para (Properties ctx, int AD_Process_Para_ID, String trxName)
@ -536,6 +536,34 @@ public class X_AD_Process_Para extends PO implements I_AD_Process_Para, I_Persis
return new KeyNamePair(get_ID(), getName());
}
/** Set Placeholder.
@param Placeholder Placeholder */
public void setPlaceholder (String Placeholder)
{
set_Value (COLUMNNAME_Placeholder, Placeholder);
}
/** Get Placeholder.
@return Placeholder */
public String getPlaceholder ()
{
return (String)get_Value(COLUMNNAME_Placeholder);
}
/** Set Placeholder2.
@param Placeholder2 Placeholder2 */
public void setPlaceholder2 (String Placeholder2)
{
set_Value (COLUMNNAME_Placeholder2, Placeholder2);
}
/** Get Placeholder2.
@return Placeholder2 */
public String getPlaceholder2 ()
{
return (String)get_Value(COLUMNNAME_Placeholder2);
}
/** Set Read Only Logic.
@param ReadOnlyLogic
Logic to determine if field is read only (applies only when field is read-write)

View File

@ -30,7 +30,7 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_AD_UserDef_Field (Properties ctx, int AD_UserDef_Field_ID, String trxName)
@ -663,6 +663,20 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
return ii.intValue();
}
/** Set Placeholder.
@param Placeholder Placeholder */
public void setPlaceholder (String Placeholder)
{
set_Value (COLUMNNAME_Placeholder, Placeholder);
}
/** Get Placeholder.
@return Placeholder */
public String getPlaceholder ()
{
return (String)get_Value(COLUMNNAME_Placeholder);
}
/** Set Read Only Logic.
@param ReadOnlyLogic
Logic to determine if field is read only (applies only when field is read-write)

View File

@ -30,7 +30,7 @@ public class X_C_Country extends PO implements I_C_Country, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20171031L;
private static final long serialVersionUID = 20180217L;
/** Standard Constructor */
public X_C_Country (Properties ctx, int C_Country_ID, String trxName)
@ -584,6 +584,132 @@ public class X_C_Country extends PO implements I_C_Country, I_Persistent
return new KeyNamePair(get_ID(), getName());
}
/** Set Placeholder for Address 1.
@param PlaceholderAddress1 Placeholder for Address 1 */
public void setPlaceholderAddress1 (String PlaceholderAddress1)
{
set_Value (COLUMNNAME_PlaceholderAddress1, PlaceholderAddress1);
}
/** Get Placeholder for Address 1.
@return Placeholder for Address 1 */
public String getPlaceholderAddress1 ()
{
return (String)get_Value(COLUMNNAME_PlaceholderAddress1);
}
/** Set Placeholder for Address 2.
@param PlaceholderAddress2 Placeholder for Address 2 */
public void setPlaceholderAddress2 (String PlaceholderAddress2)
{
set_Value (COLUMNNAME_PlaceholderAddress2, PlaceholderAddress2);
}
/** Get Placeholder for Address 2.
@return Placeholder for Address 2 */
public String getPlaceholderAddress2 ()
{
return (String)get_Value(COLUMNNAME_PlaceholderAddress2);
}
/** Set Placeholder for Address 3.
@param PlaceholderAddress3 Placeholder for Address 3 */
public void setPlaceholderAddress3 (String PlaceholderAddress3)
{
set_Value (COLUMNNAME_PlaceholderAddress3, PlaceholderAddress3);
}
/** Get Placeholder for Address 3.
@return Placeholder for Address 3 */
public String getPlaceholderAddress3 ()
{
return (String)get_Value(COLUMNNAME_PlaceholderAddress3);
}
/** Set Placeholder for Address 4.
@param PlaceholderAddress4 Placeholder for Address 4 */
public void setPlaceholderAddress4 (String PlaceholderAddress4)
{
set_Value (COLUMNNAME_PlaceholderAddress4, PlaceholderAddress4);
}
/** Get Placeholder for Address 4.
@return Placeholder for Address 4 */
public String getPlaceholderAddress4 ()
{
return (String)get_Value(COLUMNNAME_PlaceholderAddress4);
}
/** Set Placeholder for Address 5.
@param PlaceholderAddress5 Placeholder for Address 5 */
public void setPlaceholderAddress5 (String PlaceholderAddress5)
{
set_Value (COLUMNNAME_PlaceholderAddress5, PlaceholderAddress5);
}
/** Get Placeholder for Address 5.
@return Placeholder for Address 5 */
public String getPlaceholderAddress5 ()
{
return (String)get_Value(COLUMNNAME_PlaceholderAddress5);
}
/** Set Placeholder for city.
@param PlaceholderCity Placeholder for city */
public void setPlaceholderCity (String PlaceholderCity)
{
set_Value (COLUMNNAME_PlaceholderCity, PlaceholderCity);
}
/** Get Placeholder for city.
@return Placeholder for city */
public String getPlaceholderCity ()
{
return (String)get_Value(COLUMNNAME_PlaceholderCity);
}
/** Set Placeholder for comments.
@param PlaceholderComments Placeholder for comments */
public void setPlaceholderComments (String PlaceholderComments)
{
set_Value (COLUMNNAME_PlaceholderComments, PlaceholderComments);
}
/** Get Placeholder for comments.
@return Placeholder for comments */
public String getPlaceholderComments ()
{
return (String)get_Value(COLUMNNAME_PlaceholderComments);
}
/** Set Placeholder for postal.
@param PlaceholderPostal Placeholder for postal */
public void setPlaceholderPostal (String PlaceholderPostal)
{
set_Value (COLUMNNAME_PlaceholderPostal, PlaceholderPostal);
}
/** Get Placeholder for postal.
@return Placeholder for postal */
public String getPlaceholderPostal ()
{
return (String)get_Value(COLUMNNAME_PlaceholderPostal);
}
/** Set Placeholder for additional zip.
@param PlaceholderPostal_Add Placeholder for additional zip */
public void setPlaceholderPostal_Add (String PlaceholderPostal_Add)
{
set_Value (COLUMNNAME_PlaceholderPostal_Add, PlaceholderPostal_Add);
}
/** Get Placeholder for additional zip.
@return Placeholder for additional zip */
public String getPlaceholderPostal_Add ()
{
return (String)get_Value(COLUMNNAME_PlaceholderPostal_Add);
}
/** Set Region.
@param RegionName
Name of the Region

View File

@ -1047,6 +1047,8 @@ public class AdempiereMonitor extends HttpServlet
for (int i = 0; i < clients.length; i++)
{
MClient client = clients[i];
if (!client.isActive())
continue;
if (i > 0)
p.addElement(" - ");
p.addElement(new a("idempiereMonitor?EMail=" + client.getAD_Client_ID(), client.getName()));

View File

@ -299,7 +299,28 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
styleBuilder.append("; ");
styleBuilder.append(inlineStyle);
}
component.setStyle(styleBuilder.toString());
setComponentStyle(component, styleBuilder.toString());
}
protected void setComponentStyle(HtmlBasedComponent component, String style) {
if (style != null && style.startsWith(MStyle.SCLASS_PREFIX)) {
String sclass = style.substring(MStyle.SCLASS_PREFIX.length());
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setSclass(sclass);
else
component.setSclass(sclass);
} else if (style != null && style.startsWith(MStyle.ZCLASS_PREFIX)) {
String zclass = style.substring(MStyle.ZCLASS_PREFIX.length());
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setZclass(zclass);
else
component.setZclass(zclass);
} else {
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setStyle(style);
else
component.setStyle(style);
}
}
/**

View File

@ -84,7 +84,7 @@ public class ProcessParameterPanel extends Panel implements
/**
*
*/
private static final long serialVersionUID = -6190176000439901932L;
private static final long serialVersionUID = 2388338147222636369L;
/**
* Dynamic generated Parameter panel.
@ -208,7 +208,7 @@ public class ProcessParameterPanel extends Panel implements
+ "p.FieldLength, p.IsMandatory, p.IsRange, p.ColumnName, "
+ "p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, "
+ "p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode, "
+ "p.ReadOnlyLogic, p.DisplayLogic, p.IsEncrypted, NULL AS FormatPattern, p.MandatoryLogic "
+ "p.ReadOnlyLogic, p.DisplayLogic, p.IsEncrypted, NULL AS FormatPattern, p.MandatoryLogic, p.Placeholder, p.Placeholder2 "
+ "FROM AD_Process_Para p"
+ " LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) "
+ "WHERE p.AD_Process_ID=?" // 1
@ -219,7 +219,7 @@ public class ProcessParameterPanel extends Panel implements
+ "p.FieldLength, p.IsMandatory, p.IsRange, p.ColumnName, "
+ "p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, "
+ "p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode, "
+ "p.ReadOnlyLogic, p.DisplayLogic, p.IsEncrypted, NULL AS FormatPattern,p.MandatoryLogic "
+ "p.ReadOnlyLogic, p.DisplayLogic, p.IsEncrypted, NULL AS FormatPattern,p.MandatoryLogic, t.Placeholder, t.Placeholder2 "
+ "FROM AD_Process_Para p"
+ " INNER JOIN AD_Process_Para_Trl t ON (p.AD_Process_Para_ID=t.AD_Process_Para_ID)"
+ " LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) "
@ -338,7 +338,6 @@ public class ProcessParameterPanel extends Panel implements
ZKUpdateUtil.setWidth(box, "100%");
box.appendChild(editor.getComponent());
ZKUpdateUtil.setWidth((HtmlBasedComponent) editor.getComponent(), "49%");
setEditorPlaceHolder(editor, Msg.getMsg(Env.getCtx(), "ProcessParameterRangeFrom"));
//
GridFieldVO voF2 = GridFieldVO.createParameter(voF);
GridField mField2 = new GridField(voF2);
@ -353,7 +352,7 @@ public class ProcessParameterPanel extends Panel implements
mField2.addPropertyChangeListener(editor2);
editor2.dynamicDisplay();
ZKUpdateUtil.setWidth((HtmlBasedComponent) editor2.getComponent(), "49%");
setEditorPlaceHolder(editor2, Msg.getMsg(Env.getCtx(), "ProcessParameterRangeTo"));
setEditorPlaceHolder(editor2, mField2.getPlaceholder2());
// setup editor context menu
popupMenu = editor2.getPopupMenu();
if (popupMenu != null) {

View File

@ -106,6 +106,8 @@ public class WDateEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu);
if (gridField != null)
getComponent().setPlaceholder(gridField.getPlaceholder());
}

View File

@ -593,9 +593,18 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
}
}
protected void setLabelStyle(String style) {
if (label != null)
label.setStyle(style);
protected void setLabelStyle(String style) {
if (label != null) {
if (style != null && style.toLowerCase().startsWith(MStyle.SCLASS_PREFIX)) {
String sclass = style.substring(MStyle.SCLASS_PREFIX.length());
label.setSclass(sclass);
} else if (style != null && style.toLowerCase().startsWith(MStyle.ZCLASS_PREFIX)) {
String zclass = style.substring(MStyle.ZCLASS_PREFIX.length());
label.setZclass(zclass);
} else {
label.setStyle(style);
}
}
}
protected void applyFieldStyles(boolean applyDictionaryStyle) {
@ -607,12 +616,26 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
setFieldStyle(style);
}
protected void setFieldStyle(String style) {
protected void setFieldStyle(String style) {
HtmlBasedComponent component = (HtmlBasedComponent) getComponent();
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setStyle(style);
else
component.setStyle(style);
if (style != null && style.startsWith(MStyle.SCLASS_PREFIX)) {
String sclass = style.substring(MStyle.SCLASS_PREFIX.length());
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setSclass(sclass);
else
component.setSclass(sclass);
} else if (style != null && style.startsWith(MStyle.ZCLASS_PREFIX)) {
String zclass = style.substring(MStyle.ZCLASS_PREFIX.length());
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setZclass(zclass);
else
component.setZclass(zclass);
} else {
if (component instanceof EditorBox)
((EditorBox)component).getTextbox().setStyle(style);
else
component.setStyle(style);
}
}
protected String buildStyle(int AD_Style_ID) {

View File

@ -27,6 +27,8 @@ import org.adempiere.webui.window.WFieldSuggestion;
import org.compiere.model.GridField;
import org.compiere.model.Lookup;
import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.MZoomCondition;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -134,16 +136,14 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
this.updateEnabled = false;
// check possible zoom conditions to enable back zoom
for (int zoomCondWinID :
DB.getIDsEx(null,
"SELECT AD_Window_ID FROM AD_ZoomCondition WHERE IsActive='Y' AND AD_Table_ID IN (SELECT AD_Table_ID FROM AD_Table WHERE TableName=?)",
tableName)) {
Boolean canAccessZoom = MRole.getDefault().getWindowAccess(zoomCondWinID);
MTable table = MTable.get(Env.getCtx(), tableName);
for (MZoomCondition zoomCondition : MZoomCondition.getConditions(table.getAD_Table_ID())) {
Boolean canAccessZoom = MRole.getDefault().getWindowAccess(zoomCondition.getAD_Window_ID());
if (canAccessZoom != null && canAccessZoom) {
this.zoomEnabled = true;
break;
}
}
}
} else {
int cnt = DB.getSQLValueEx(null,
"SELECT COUNT(*) "

View File

@ -95,7 +95,9 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu);
addChangeLogMenu(popupMenu);
if (gridField != null)
getComponent().getTextbox().setPlaceholder(gridField.getPlaceholder());
}
@Override

View File

@ -156,6 +156,9 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
originalStyle = getComponent().getDecimalbox().getStyle();
if (ClientInfo.isMobile())
getComponent().getButton().setVisible(false);
if (gridField != null)
getComponent().getDecimalbox().setPlaceholder(gridField.getPlaceholder());
}
/**

View File

@ -201,7 +201,8 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
getComponent().getButton().setImage(imageUrl);
addChangeLogMenu(popupMenu);
if (gridField != null)
getComponent().getTextbox().setPlaceholder(gridField.getPlaceholder());
return;
}

View File

@ -172,6 +172,8 @@ public class WStringEditor extends WEditor implements ContextMenuListener
}
if ("email".equalsIgnoreCase(gridField.getColumnName()))
getComponent().setClientAttribute("type", "email");
if (gridField != null)
getComponent().setPlaceholder(gridField.getPlaceholder());
}
}

View File

@ -216,6 +216,8 @@ ContextMenuListener, IZoomableEditor
}
// IDEMPIERE 90
}
if (gridField != null)
getComponent().setPlaceholder(gridField.getPlaceholder());
}
private void createCacheListener() {

View File

@ -110,7 +110,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
/**
*
*/
private static final long serialVersionUID = 1672005382454423850L;
private static final long serialVersionUID = -8676586407450465012L;
protected Grid parameterGrid;
private Borderlayout layout;
@ -538,7 +538,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
boolean isMandatory = !m_lookup && infoColumn.isMandatory() && infoColumn.isQueryCriteria();
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), infoWindow.getAD_InfoWindow_ID(), 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
infoColumn.getAD_Reference_Value_ID(), isMandatory, false);
infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.getPlaceholder());
if (infoColumn.getAD_Val_Rule_ID() > 0) {
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
if (vo.lookupInfo != null) {
@ -1987,7 +1987,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
String columnName = infoColumn.getColumnName();
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
infoColumn.getAD_Reference_Value_ID(), false, false);
infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.getPlaceholder());
if (infoColumn.getAD_Val_Rule_ID() > 0) {
vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode();
if (vo.lookupInfo != null) {

View File

@ -667,7 +667,12 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
GridField mField = m_findFields[i];
boolean isDisplayed = mField.isDisplayed();
if (mField.getVO().displayType == DisplayType.YesNo) {
if (DisplayType.isText(mField.getVO().displayType)) {
// for string fields allow searching long strings - useful for like and similar to searches
mField.getVO().FieldLength = 32767; // a conservative max literal string - like oracle extended
mField.getVO().DisplayLength = mField.getVO().FieldLength;
}
if (mField.getVO().displayType == DisplayType.YesNo) {
// Make Yes-No searchable as list
GridFieldVO vo = mField.getVO();
GridFieldVO ynvo = vo.clone(m_simpleCtx, vo.WindowNo, vo.TabNo, vo.AD_Window_ID, vo.AD_Tab_ID, vo.tabReadOnly);

View File

@ -92,7 +92,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
/**
*
*/
private static final long serialVersionUID = -490669500974096990L;
private static final long serialVersionUID = -9116270523919373406L;
private static final String LABEL_STYLE = "white-space: nowrap;";
/** Logger */
private static CLogger log = CLogger.getCLogger(WLocationDialog.class);
@ -633,6 +633,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
}
}
setPlaceholders();
// Fill it
if (m_location.getC_Location_ID() != 0)
{
@ -1095,4 +1096,17 @@ public class WLocationDialog extends Window implements EventListener<Event>
address = address + (c.getName() != null ? c.getName() : "");
return address.replace(" ", "+");
}
void setPlaceholders() {
txtAddress1.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderAddress1"));
txtAddress2.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderAddress2"));
txtAddress3.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderAddress3"));
txtAddress4.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderAddress4"));
txtAddress5.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderAddress5"));
txtComments.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderComments"));
txtCity.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderCity"));
txtPostal.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderPostal"));
txtPostalAdd.setPlaceholder(MCountry.get(Env.getCtx(), s_oldCountry_ID).get_Translation("PlaceholderPostal_Add"));
// TODO set the placeholder for Region (ATM, lstRegion doesn't handle placeholder)
}
}