hg merge release-4.1 (merge release4.1 into development)
This commit is contained in:
commit
fbe29bb7d7
|
@ -0,0 +1,231 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- May 9, 2016 8:34:27 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
INSERT INTO AD_Reference (AD_Reference_ID,Name,AD_Reference_UU,IsOrderByValue,AD_Org_ID,Description,ValidationType,Updated,IsActive,CreatedBy,UpdatedBy,AD_Client_ID,Created,EntityType) VALUES (200122,'Dashboard Content','eddd31af-5ab7-4b88-967f-4fe7b7e091ea','N',0,'Dashboard Content','D',TO_DATE('2016-05-09 20:34:20','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,0,TO_DATE('2016-05-09 20:34:20','YYYY-MM-DD HH24:MI:SS'),'D')
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:35:29 PM MYT
|
||||
INSERT INTO AD_Column (AD_Column_ID,SeqNoSelection,IsSyncDatabase,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,Updated,IsUpdateable,ColumnName,Name,IsAllowCopy,IsActive,CreatedBy,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,AD_Org_ID,Created,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (212762,0,'N',0,'N','N','N',0,'N',22,'N','N','N','Y','e5d70049-4a7e-49ab-aba9-ad181833c0d9',TO_DATE('2016-05-09 20:35:23','YYYY-MM-DD HH24:MI:SS'),'Y','PA_DashboardContent_ID','Dashboard Content','Y','Y',100,100,'N','N',0,0,TO_DATE('2016-05-09 20:35:23','YYYY-MM-DD HH24:MI:SS'),'D','N','N','N',51006,19,101)
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:35:38 PM MYT
|
||||
UPDATE AD_Column SET FKConstraintType='N', FKConstraintName='PADashboardContent_ADColumn',Updated=TO_DATE('2016-05-09 20:35:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212762
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:35:38 PM MYT
|
||||
ALTER TABLE AD_Column ADD PA_DashboardContent_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:58:49 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
INSERT INTO AD_Field (SortNo,AD_Field_ID,IsEncrypted,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,IsReadOnly,DisplayLogic,AD_Org_ID,Updated,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,CreatedBy,UpdatedBy,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,Created,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,AD_Tab_ID) VALUES (0,204220,'N',0,'N','N',210,'Y','N','@AD_Reference_ID@=200122',0,TO_DATE('2016-05-09 20:58:43','YYYY-MM-DD HH24:MI:SS'),'Dashboard Content','dc337329-72dd-4532-8abf-e0a24ea0340b','Y','N',100,100,'Y','Y',210,1,'N',0,TO_DATE('2016-05-09 20:58:43','YYYY-MM-DD HH24:MI:SS'),2,1,'N','N',212762,'D',101)
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=204220
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=171
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56279
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=54403
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=2574
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=2573
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=202518
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=202519
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=160
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=161
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=162
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=166
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=5122
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=169
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=2370
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=10128
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=4941
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=50188
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=168
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=159
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=4940
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=200288
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=200648
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=202257
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56317
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=62467
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=167
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=825
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=1000320
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y' WHERE AD_Field_ID=204220
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y' WHERE AD_Field_ID=167
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y' WHERE AD_Field_ID=5121
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=56317
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=62467
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=390,IsDisplayedGrid='Y' WHERE AD_Field_ID=202518
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=400,IsDisplayedGrid='Y' WHERE AD_Field_ID=202519
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=410,IsDisplayedGrid='Y' WHERE AD_Field_ID=5122
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=420,IsDisplayedGrid='Y' WHERE AD_Field_ID=200288
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=430,IsDisplayedGrid='Y' WHERE AD_Field_ID=202257
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=440,IsDisplayedGrid='Y' WHERE AD_Field_ID=59619
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=450,IsDisplayedGrid='Y' WHERE AD_Field_ID=1000320
|
||||
;
|
||||
|
||||
CREATE OR REPLACE VIEW ad_field_v AS
|
||||
SELECT t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, f.name, f.description, f.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno, f.sortno, f.issameline,
|
||||
f.isheading, f.isfieldonly, f.isreadonly, f.isencrypted AS isencryptedfield, f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue,
|
||||
c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated, COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id,
|
||||
c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id, COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, 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
|
||||
FROM ad_field f
|
||||
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
|
||||
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id
|
||||
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'
|
||||
;
|
||||
|
||||
CREATE OR REPLACE VIEW ad_field_vt AS
|
||||
SELECT trl.ad_language, t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, trl.name, trl.description, trl.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno,
|
||||
f.sortno, f.issameline, f.isheading, f.isfieldonly, f.isreadonly, f.isencrypted AS isencryptedfield, f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue,
|
||||
c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated, COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id,
|
||||
c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id, COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, 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
|
||||
FROM ad_field f
|
||||
JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id
|
||||
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||
LEFT JOIN ad_fieldgroup_trl fgt ON f.ad_fieldgroup_id = fgt.ad_fieldgroup_id AND trl.ad_language::text = fgt.ad_language::text
|
||||
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
|
||||
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id
|
||||
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'
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201605101800_System_Ticket_1006008.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- May 23, 2016 6:17:30 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
INSERT INTO AD_Column (AD_Column_ID,SeqNoSelection,IsSyncDatabase,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,Updated,IsUpdateable,ColumnName,Name,IsAllowCopy,IsActive,CreatedBy,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,AD_Org_ID,Created,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (212763,0,'N',0,'N','N','N',0,'N',22,'N','N','N','Y','84c773d0-4cdf-45e0-a0cd-0ce63907e53d',TO_DATE('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'N','PA_DashboardContent_ID','Dashboard Content','Y','Y',100,100,'N','N',0,0,TO_DATE('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'U','N','N','N',51006,19,464)
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:25:24 PM MYT
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2016-05-23 18:25:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:28:36 PM MYT
|
||||
INSERT INTO AD_Field (SortNo,AD_Field_ID,IsEncrypted,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,IsReadOnly,DisplayLogic,AD_Org_ID,Updated,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,CreatedBy,UpdatedBy,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,Created,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,AD_Tab_ID) VALUES (0,204221,'N',0,'N','N',300,'Y','N','@AD_Reference_ID@=200122',0,TO_DATE('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),'Dashboard Content','f6d15a90-273e-4810-866d-6a1842a23c32','Y','N',100,100,'Y','Y',280,1,'N',0,TO_DATE('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),1,1,'N','N',212763,'D',395)
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:09 PM MYT
|
||||
UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2016-05-23 18:29:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204221
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:31 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=204221
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:31 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=5054
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:31 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=200849
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200851
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=200852
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=200854
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=5051
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=5057
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:25:15 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
UPDATE AD_Column SET FKConstraintType='N', FKConstraintName='PADashboardContent_ADUserDefFi',Updated=TO_DATE('2016-05-23 20:25:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:25:15 PM MYT
|
||||
ALTER TABLE AD_UserDef_Field ADD PA_DashboardContent_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:25:16 PM MYT
|
||||
ALTER TABLE AD_UserDef_Field ADD CONSTRAINT PADashboardContent_ADUserDefFi FOREIGN KEY (PA_DashboardContent_ID) REFERENCES pa_dashboardcontent(pa_dashboardcontent_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:49:33 PM MYT
|
||||
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2016-05-23 20:49:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201605231800_Ticket_1006008.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Jul 15, 2016 6:12:46 PM MYT
|
||||
-- 1006181 Speed-up windows - Field to show read-only grid
|
||||
UPDATE AD_Field SET Included_Tab_ID = NULL WHERE Included_Tab_ID IS NOT NULL
|
||||
;
|
||||
|
||||
INSERT INTO AD_Reference (AD_Reference_ID,Name,AD_Reference_UU,IsOrderByValue,AD_Org_ID,ValidationType,Updated,IsActive,CreatedBy,UpdatedBy,AD_Client_ID,Created,EntityType) VALUES (200127,'Single Selection Grid','ce2bb5f1-efab-44ba-b5b7-7308a509c39c','N',0,'D',TO_DATE('2016-07-15 18:12:40','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,0,TO_DATE('2016-07-15 18:12:40','YYYY-MM-DD HH24:MI:SS'),'D')
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:13:13 PM MYT
|
||||
INSERT INTO AD_Reference (AD_Reference_ID,Name,AD_Reference_UU,IsOrderByValue,AD_Org_ID,ValidationType,Updated,IsActive,CreatedBy,UpdatedBy,AD_Client_ID,Created,EntityType) VALUES (200128,'Multiple Selection Grid','ca6d9bef-47eb-4278-a11f-20a8a99257cd','N',0,'D',TO_DATE('2016-07-15 18:13:13','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,0,TO_DATE('2016-07-15 18:13:13','YYYY-MM-DD HH24:MI:SS'),'D')
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:20 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=6432
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:20 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=132
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200276
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200771
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=924
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=133
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=137
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200274
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=138
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=202362
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=142
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=8343
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=140
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=202341
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=141
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200350
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200348
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200349
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=204213
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=204214
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=13425
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200837
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=54402
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=54401
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200838
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200834
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=13424
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=62468
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=53280
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200836
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=200835
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=136
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y', Updated=Sysdate, UpdatedBy=100 WHERE AD_Field_ID=139
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:27:18 PM MYT
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Column_ID.AD_Reference_ID@=200127|@AD_Column_ID.AD_Reference_ID@=200128', IsActive='Y', SeqNoGrid=120,Updated=TO_DATE('2016-07-15 18:27:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6432
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201607191600_Ticket_1006181.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Jul 26, 2016 4:43:35 PM MYT
|
||||
-- 1006181 Speed-up windows - Field to show read-only grid
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Column_ID.AD_Reference_ID@=200127|@AD_Column_ID.AD_Reference_ID@=200128|@AD_Reference_ID@=200127|@AD_Reference_ID@=200128',Updated=TO_DATE('2016-07-26 16:43:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6432
|
||||
;
|
||||
|
||||
-- Jul 26, 2016 4:45:34 PM MYT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,MsgTip,AD_Message_UU,Updated,Value,IsActive,CreatedBy,AD_Org_ID,AD_Client_ID,Created,UpdatedBy,EntityType) VALUES ('I','Clear Selection',200404,'Clear current selections','af2f6c7a-7f24-46e2-8ae7-0b67ca44890f',TO_DATE('2016-07-26 16:45:27','YYYY-MM-DD HH24:MI:SS'),'ClearSelection','Y',100,0,0,TO_DATE('2016-07-26 16:45:27','YYYY-MM-DD HH24:MI:SS'),100,'D')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201607261600_Ticket_1006181.sql') FROM dual
|
||||
;
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2271 iDempiere is hardcoded EMail to support subject
|
||||
-- Dec 12, 2016 4:50:36 PM ICT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','@#System_Name@ Trace Information',0,0,'Y',TO_DATE('2016-12-12 16:50:35','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-12-12 16:50:35','YYYY-MM-DD HH24:MI:SS'),100,200414,'FeedBackHeader','D','1a27d0a9-0832-4e63-b49b-bb26eeceafc4')
|
||||
;
|
||||
SELECT register_migration_script('201612121604-IDEMPIERE-2271.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,31 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3272
|
||||
-- Dec 19, 2016 4:43:42 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_DATE('2016-12-19 16:43:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1397
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:48 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_DATE('2016-12-19 16:43:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1400
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:51 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_DATE('2016-12-19 16:43:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3270
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:55 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_DATE('2016-12-19 16:43:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1398
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:57 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_DATE('2016-12-19 16:43:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1401
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:44:02 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_DATE('2016-12-19 16:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5127
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201612191644_SystemElementQuickEntry.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2558 don't allow use old password when change password
|
||||
-- Dec 21, 2016 11:01:23 PM CET
|
||||
UPDATE AD_Table SET AccessLevel='7',LoadSeq=85,Updated=TO_DATE('2016-12-21 23:01:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200171
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:34:17 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:34:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212106
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:34:21 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:34:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212107
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:34:49 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y', IsUpdateable='N',Updated=TO_DATE('2016-12-21 23:34:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212113
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:35:19 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:35:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212114
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:35:27 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:35:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212115
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:35:46 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212118
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:36:15 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:36:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212116
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:36:31 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2016-12-21 23:36:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212117
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:37:15 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY AD_Client_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:37:15 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY AD_Client_ID NOT NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:37:15 PM CET
|
||||
ALTER TABLE AD_Password_History ADD CONSTRAINT ADClient_ADPasswordHistory FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:06 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY AD_Org_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:06 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY AD_Org_ID NOT NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:06 PM CET
|
||||
ALTER TABLE AD_Password_History ADD CONSTRAINT ADOrg_ADPasswordHistory FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:18 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY Created DATE DEFAULT SYSDATE
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:18 PM CET
|
||||
UPDATE AD_Password_History SET Created=SYSDATE WHERE Created IS NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:18 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY Created NOT NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:24 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY CreatedBy NUMBER(10)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:24 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY CreatedBy NOT NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:31 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY IsActive CHAR(1) DEFAULT 'Y'
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:31 PM CET
|
||||
UPDATE AD_Password_History SET IsActive='Y' WHERE IsActive IS NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:31 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY IsActive NOT NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:38 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY Updated DATE DEFAULT SYSDATE
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:38 PM CET
|
||||
UPDATE AD_Password_History SET Updated=SYSDATE WHERE Updated IS NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:38 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY Updated NOT NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:43 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY UpdatedBy NUMBER(10)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:43 PM CET
|
||||
ALTER TABLE AD_Password_History MODIFY UpdatedBy NOT NULL
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201612212302_IDEMPIERE-2558.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
-- May 9, 2016 8:34:27 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
INSERT INTO AD_Reference (AD_Reference_ID,Name,AD_Reference_UU,IsOrderByValue,AD_Org_ID,Description,ValidationType,Updated,IsActive,CreatedBy,UpdatedBy,AD_Client_ID,Created,EntityType) VALUES (200122,'Dashboard Content','eddd31af-5ab7-4b88-967f-4fe7b7e091ea','N',0,'Dashboard Content','D',TO_TIMESTAMP('2016-05-09 20:34:20','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,0,TO_TIMESTAMP('2016-05-09 20:34:20','YYYY-MM-DD HH24:MI:SS'),'D')
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:35:29 PM MYT
|
||||
INSERT INTO AD_Column (AD_Column_ID,SeqNoSelection,IsSyncDatabase,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,Updated,IsUpdateable,ColumnName,Name,IsAllowCopy,IsActive,CreatedBy,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,AD_Org_ID,Created,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (212762,0,'N',0,'N','N','N',0,'N',22,'N','N','N','Y','e5d70049-4a7e-49ab-aba9-ad181833c0d9',TO_TIMESTAMP('2016-05-09 20:35:23','YYYY-MM-DD HH24:MI:SS'),'Y','PA_DashboardContent_ID','Dashboard Content','Y','Y',100,100,'N','N',0,0,TO_TIMESTAMP('2016-05-09 20:35:23','YYYY-MM-DD HH24:MI:SS'),'D','N','N','N',51006,19,101)
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:35:38 PM MYT
|
||||
UPDATE AD_Column SET FKConstraintType='N', FKConstraintName='PADashboardContent_ADColumn',Updated=TO_TIMESTAMP('2016-05-09 20:35:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212762
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:35:38 PM MYT
|
||||
ALTER TABLE AD_Column ADD COLUMN PA_DashboardContent_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:58:49 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
INSERT INTO AD_Field (SortNo,AD_Field_ID,IsEncrypted,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,IsReadOnly,DisplayLogic,AD_Org_ID,Updated,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,CreatedBy,UpdatedBy,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,Created,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,AD_Tab_ID) VALUES (0,204220,'N',0,'N','N',210,'Y','N','@AD_Reference_ID@=200122',0,TO_TIMESTAMP('2016-05-09 20:58:43','YYYY-MM-DD HH24:MI:SS'),'Dashboard Content','dc337329-72dd-4532-8abf-e0a24ea0340b','Y','N',100,100,'Y','Y',210,1,'N',0,TO_TIMESTAMP('2016-05-09 20:58:43','YYYY-MM-DD HH24:MI:SS'),2,1,'N','N',212762,'D',101)
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=204220
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=171
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56279
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=54403
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=2574
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=2573
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=202518
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:12 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=202519
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=160
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=161
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=162
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=166
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=5122
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=169
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=2370
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=10128
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=4941
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=50188
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=168
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=159
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=4940
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=200288
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=200648
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=202257
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56317
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=62467
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=167
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=825
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:13 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=1000320
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y' WHERE AD_Field_ID=204220
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y' WHERE AD_Field_ID=167
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y' WHERE AD_Field_ID=5121
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=56317
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=62467
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=390,IsDisplayedGrid='Y' WHERE AD_Field_ID=202518
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:56 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=400,IsDisplayedGrid='Y' WHERE AD_Field_ID=202519
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=410,IsDisplayedGrid='Y' WHERE AD_Field_ID=5122
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=420,IsDisplayedGrid='Y' WHERE AD_Field_ID=200288
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=430,IsDisplayedGrid='Y' WHERE AD_Field_ID=202257
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=440,IsDisplayedGrid='Y' WHERE AD_Field_ID=59619
|
||||
;
|
||||
|
||||
-- May 9, 2016 8:59:57 PM MYT
|
||||
UPDATE AD_Field SET SeqNoGrid=450,IsDisplayedGrid='Y' WHERE AD_Field_ID=1000320
|
||||
;
|
||||
|
||||
CREATE OR REPLACE VIEW ad_field_v AS
|
||||
SELECT t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, f.name, f.description, f.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno, f.sortno, f.issameline,
|
||||
f.isheading, f.isfieldonly, f.isreadonly, f.isencrypted AS isencryptedfield, f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue,
|
||||
c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated, COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id,
|
||||
c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id, COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, 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
|
||||
FROM ad_field f
|
||||
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
|
||||
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id
|
||||
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'
|
||||
;
|
||||
|
||||
CREATE OR REPLACE VIEW ad_field_vt AS
|
||||
SELECT trl.ad_language, t.ad_window_id, f.ad_tab_id, f.ad_field_id, tbl.ad_table_id, f.ad_column_id, trl.name, trl.description, trl.help, f.isdisplayed, f.displaylogic, f.displaylength, f.seqno,
|
||||
f.sortno, f.issameline, f.isheading, f.isfieldonly, f.isreadonly, f.isencrypted AS isencryptedfield, f.obscuretype, c.columnname, c.columnsql, c.fieldlength, c.vformat, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue,
|
||||
c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated, COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id,
|
||||
c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id, COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS ad_val_rule_id, c.ad_process_id, 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
|
||||
FROM ad_field f
|
||||
JOIN ad_field_trl trl ON f.ad_field_id = trl.ad_field_id
|
||||
JOIN ad_tab t ON f.ad_tab_id = t.ad_tab_id
|
||||
LEFT JOIN ad_fieldgroup fg ON f.ad_fieldgroup_id = fg.ad_fieldgroup_id
|
||||
LEFT JOIN ad_fieldgroup_trl fgt ON f.ad_fieldgroup_id = fgt.ad_fieldgroup_id AND trl.ad_language::text = fgt.ad_language::text
|
||||
LEFT JOIN ad_column c ON f.ad_column_id = c.ad_column_id
|
||||
JOIN ad_table tbl ON c.ad_table_id = tbl.ad_table_id
|
||||
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'
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201605101800_System_Ticket_1006008.sql') FROM dual
|
||||
;
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
-- May 23, 2016 6:17:30 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
INSERT INTO AD_Column (AD_Column_ID,SeqNoSelection,IsSyncDatabase,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,Updated,IsUpdateable,ColumnName,Name,IsAllowCopy,IsActive,CreatedBy,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,AD_Org_ID,Created,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (212763,0,'N',0,'N','N','N',0,'N',22,'N','N','N','Y','84c773d0-4cdf-45e0-a0cd-0ce63907e53d',TO_TIMESTAMP('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'N','PA_DashboardContent_ID','Dashboard Content','Y','Y',100,100,'N','N',0,0,TO_TIMESTAMP('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'U','N','N','N',51006,19,464)
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:25:24 PM MYT
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2016-05-23 18:25:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:28:36 PM MYT
|
||||
INSERT INTO AD_Field (SortNo,AD_Field_ID,IsEncrypted,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,IsReadOnly,DisplayLogic,AD_Org_ID,Updated,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,CreatedBy,UpdatedBy,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,Created,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,AD_Tab_ID) VALUES (0,204221,'N',0,'N','N',300,'Y','N','@AD_Reference_ID@=200122',0,TO_TIMESTAMP('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),'Dashboard Content','f6d15a90-273e-4810-866d-6a1842a23c32','Y','N',100,100,'Y','Y',280,1,'N',0,TO_TIMESTAMP('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),1,1,'N','N',212763,'D',395)
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:09 PM MYT
|
||||
UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2016-05-23 18:29:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204221
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:31 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=204221
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:31 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=5054
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:31 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=200849
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200851
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=200852
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=200854
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=5051
|
||||
;
|
||||
|
||||
-- May 23, 2016 6:29:32 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=5057
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:25:15 PM MYT
|
||||
-- 1006008 Add field type for dashboard content
|
||||
UPDATE AD_Column SET FKConstraintType='N', FKConstraintName='PADashboardContent_ADUserDefFi',Updated=TO_TIMESTAMP('2016-05-23 20:25:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:25:15 PM MYT
|
||||
ALTER TABLE AD_UserDef_Field ADD COLUMN PA_DashboardContent_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:25:16 PM MYT
|
||||
ALTER TABLE AD_UserDef_Field ADD CONSTRAINT PADashboardContent_ADUserDefFi FOREIGN KEY (PA_DashboardContent_ID) REFERENCES pa_dashboardcontent(pa_dashboardcontent_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- May 23, 2016 8:49:33 PM MYT
|
||||
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2016-05-23 20:49:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201605231800_Ticket_1006008.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
-- Jul 15, 2016 6:12:46 PM MYT
|
||||
-- 1006181 Speed-up windows - Field to show read-only grid
|
||||
UPDATE AD_Field SET Included_Tab_ID = NULL WHERE Included_Tab_ID IS NOT NULL
|
||||
;
|
||||
|
||||
INSERT INTO AD_Reference (AD_Reference_ID,Name,AD_Reference_UU,IsOrderByValue,AD_Org_ID,ValidationType,Updated,IsActive,CreatedBy,UpdatedBy,AD_Client_ID,Created,EntityType) VALUES (200127,'Single Selection Grid','ce2bb5f1-efab-44ba-b5b7-7308a509c39c','N',0,'D',TO_TIMESTAMP('2016-07-15 18:12:40','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,0,TO_TIMESTAMP('2016-07-15 18:12:40','YYYY-MM-DD HH24:MI:SS'),'D')
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:13:13 PM MYT
|
||||
INSERT INTO AD_Reference (AD_Reference_ID,Name,AD_Reference_UU,IsOrderByValue,AD_Org_ID,ValidationType,Updated,IsActive,CreatedBy,UpdatedBy,AD_Client_ID,Created,EntityType) VALUES (200128,'Multiple Selection Grid','ca6d9bef-47eb-4278-a11f-20a8a99257cd','N',0,'D',TO_TIMESTAMP('2016-07-15 18:13:13','YYYY-MM-DD HH24:MI:SS'),'Y',100,100,0,TO_TIMESTAMP('2016-07-15 18:13:13','YYYY-MM-DD HH24:MI:SS'),'D')
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:20 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=6432
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:20 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=132
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200276
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200771
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=924
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=133
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=137
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200274
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=138
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=202362
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=142
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=8343
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=140
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=202341
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=141
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200350
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200348
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200349
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=204213
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=204214
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=13425
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200837
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:21 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=54402
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=54401
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200838
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200834
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=13424
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=62468
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=53280
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200836
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=200835
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=136
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:24:22 PM MYT
|
||||
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y', Updated=Now(), UpdatedBy=100 WHERE AD_Field_ID=139
|
||||
;
|
||||
|
||||
-- Jul 15, 2016 6:27:18 PM MYT
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Column_ID.AD_Reference_ID@=200127|@AD_Column_ID.AD_Reference_ID@=200128', IsActive='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2016-07-15 18:27:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6432
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201607191600_Ticket_1006181.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
-- Jul 26, 2016 4:43:35 PM MYT
|
||||
-- 1006181 Speed-up windows - Field to show read-only grid
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Column_ID.AD_Reference_ID@=200127|@AD_Column_ID.AD_Reference_ID@=200128|@AD_Reference_ID@=200127|@AD_Reference_ID@=200128',Updated=TO_TIMESTAMP('2016-07-26 16:43:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6432
|
||||
;
|
||||
|
||||
-- Jul 26, 2016 4:45:34 PM MYT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,MsgTip,AD_Message_UU,Updated,Value,IsActive,CreatedBy,AD_Org_ID,AD_Client_ID,Created,UpdatedBy,EntityType) VALUES ('I','Clear Selection',200404,'Clear current selections','af2f6c7a-7f24-46e2-8ae7-0b67ca44890f',TO_TIMESTAMP('2016-07-26 16:45:27','YYYY-MM-DD HH24:MI:SS'),'ClearSelection','Y',100,0,0,TO_TIMESTAMP('2016-07-26 16:45:27','YYYY-MM-DD HH24:MI:SS'),100,'D')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201607261600_Ticket_1006181.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
-- IDEMPIERE-2271 iDempiere is hardcoded EMail to support subject
|
||||
-- Dec 12, 2016 4:50:36 PM ICT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','@#System_Name@ Trace Information',0,0,'Y',TO_TIMESTAMP('2016-12-12 16:50:35','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-12-12 16:50:35','YYYY-MM-DD HH24:MI:SS'),100,200414,'FeedBackHeader','D','1a27d0a9-0832-4e63-b49b-bb26eeceafc4')
|
||||
;
|
||||
SELECT register_migration_script('201612121604-IDEMPIERE-2271.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,28 @@
|
|||
-- IDEMPIERE-3272
|
||||
-- Dec 19, 2016 4:43:42 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2016-12-19 16:43:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1397
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:48 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2016-12-19 16:43:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1400
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:51 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2016-12-19 16:43:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3270
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:55 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2016-12-19 16:43:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1398
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:43:57 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2016-12-19 16:43:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1401
|
||||
;
|
||||
|
||||
-- Dec 19, 2016 4:44:02 PM CET
|
||||
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsQuickEntry='Y', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2016-12-19 16:44:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5127
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201612191644_SystemElementQuickEntry.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
-- IDEMPIERE-2558 don't allow use old password when change password
|
||||
-- Dec 21, 2016 11:01:23 PM CET
|
||||
UPDATE AD_Table SET AccessLevel='7',LoadSeq=85,Updated=TO_TIMESTAMP('2016-12-21 23:01:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200171
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:34:17 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:34:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212106
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:34:21 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:34:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212107
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:34:49 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y', IsUpdateable='N',Updated=TO_TIMESTAMP('2016-12-21 23:34:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212113
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:35:19 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:35:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212114
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:35:27 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:35:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212115
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:35:46 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:35:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212118
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:36:15 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:36:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212116
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:36:31 PM CET
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2016-12-21 23:36:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212117
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:37:15 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','AD_Client_ID','NUMERIC(10)',null,null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:37:15 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','AD_Client_ID',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:37:15 PM CET
|
||||
ALTER TABLE AD_Password_History ADD CONSTRAINT ADClient_ADPasswordHistory FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:06 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','AD_Org_ID','NUMERIC(10)',null,null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:06 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','AD_Org_ID',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:06 PM CET
|
||||
ALTER TABLE AD_Password_History ADD CONSTRAINT ADOrg_ADPasswordHistory FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:18 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','Created','TIMESTAMP',null,'statement_timestamp()')
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:18 PM CET
|
||||
UPDATE AD_Password_History SET Created=statement_timestamp() WHERE Created IS NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:18 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','Created',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:24 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','CreatedBy','NUMERIC(10)',null,null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:24 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','CreatedBy',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:31 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','IsActive','CHAR(1)',null,'Y')
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:31 PM CET
|
||||
UPDATE AD_Password_History SET IsActive='Y' WHERE IsActive IS NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:31 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','IsActive',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:38 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','Updated','TIMESTAMP',null,'statement_timestamp()')
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:38 PM CET
|
||||
UPDATE AD_Password_History SET Updated=statement_timestamp() WHERE Updated IS NULL
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:38 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','Updated',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:43 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','UpdatedBy','NUMERIC(10)',null,null)
|
||||
;
|
||||
|
||||
-- Dec 21, 2016 11:38:43 PM CET
|
||||
INSERT INTO t_alter_column values('ad_password_history','UpdatedBy',null,'NOT NULL',null)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201612212302_IDEMPIERE-2558.sql') FROM dual
|
||||
;
|
||||
|
|
@ -940,8 +940,17 @@ public class GridTabCSVImporter implements IGridTabImporter
|
|||
if (!(field.isDisplayed() || field.isDisplayedGrid()))
|
||||
return new StringBuilder(Msg.getMsg(Env.getCtx(), "FieldNotDisplayed",new Object[] {header.get(i)}));
|
||||
|
||||
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
if((field.isMandatory(false) || column.isMandatory()) && value == null && field.getDefault()==null){
|
||||
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
boolean isWrongValueForMandatory = false;
|
||||
if (field.isMandatory(false) || column.isMandatory()){
|
||||
if (isInsertMode() && value == null && field.getDefault()==null){
|
||||
isWrongValueForMandatory = true;
|
||||
}else if (!isInsertMode() && "(null)".equals(value)){
|
||||
isWrongValueForMandatory = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(isWrongValueForMandatory){
|
||||
mandatoryColumns.append(" / ");
|
||||
mandatoryColumns.append(header.get(i));
|
||||
}
|
||||
|
|
|
@ -792,7 +792,7 @@ public class GridField
|
|||
if (defStr.equals("@SysDate@")) // System Time
|
||||
return new Timestamp (System.currentTimeMillis());
|
||||
else if (defStr.indexOf('@') != -1) // it is a variable
|
||||
defStr = Env.getContext(m_vo.ctx, m_vo.WindowNo, defStr.replace('@',' ').trim());
|
||||
defStr = Env.parseContext(m_vo.ctx, m_vo.WindowNo, defStr.trim(), false, false);
|
||||
else if (defStr.indexOf("'") != -1) // it is a 'String'
|
||||
defStr = defStr.replace('\'', ' ').trim();
|
||||
|
||||
|
@ -2457,6 +2457,11 @@ public class GridField
|
|||
return m_vo.displayType == DisplayType.Button && MColumn.ISTOOLBARBUTTON_Toolbar.equals(m_vo.IsToolbarButton);
|
||||
}
|
||||
|
||||
public int getPA_DashboardContent_ID()
|
||||
{
|
||||
return m_vo.PA_DashboardContent_ID;
|
||||
}
|
||||
|
||||
public GridField clone(Properties ctx)
|
||||
{
|
||||
try {
|
||||
|
|
|
@ -234,6 +234,8 @@ public class GridFieldVO implements Serializable
|
|||
vo.AD_LabelStyle_ID = rs.getInt (i);
|
||||
else if (columnName.equalsIgnoreCase("AD_FieldStyle_ID"))
|
||||
vo.AD_FieldStyle_ID = rs.getInt (i);
|
||||
else if (columnName.equalsIgnoreCase("PA_DashboardContent_ID"))
|
||||
vo.PA_DashboardContent_ID = rs.getInt (i);
|
||||
}
|
||||
if (vo.Header == null)
|
||||
vo.Header = vo.ColumnName;
|
||||
|
@ -316,6 +318,9 @@ public class GridFieldVO implements Serializable
|
|||
|
||||
if (userDef.getAD_FieldStyle_ID() > 0)
|
||||
vo.AD_FieldStyle_ID = userDef.getAD_FieldStyle_ID();
|
||||
|
||||
if (userDef.getPA_DashboardContent_ID() > 0)
|
||||
vo.PA_DashboardContent_ID = userDef.getPA_DashboardContent_ID();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -671,6 +676,8 @@ public class GridFieldVO implements Serializable
|
|||
|
||||
public int AD_FieldStyle_ID = 0;
|
||||
|
||||
public int PA_DashboardContent_ID = 0;
|
||||
|
||||
/**
|
||||
* Set Context including contained elements
|
||||
* @param newCtx new context
|
||||
|
@ -802,6 +809,7 @@ public class GridFieldVO implements Serializable
|
|||
clone.IsDefaultFocus = IsDefaultFocus;
|
||||
clone.AD_FieldStyle_ID = AD_FieldStyle_ID;
|
||||
clone.AD_LabelStyle_ID = AD_LabelStyle_ID;
|
||||
clone.PA_DashboardContent_ID = PA_DashboardContent_ID;
|
||||
|
||||
// Lookup
|
||||
clone.ValidationCode = ValidationCode;
|
||||
|
|
|
@ -155,10 +155,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
// The window of this tab
|
||||
private GridWindow m_window;
|
||||
|
||||
public GridWindow getGridWindow() {
|
||||
return m_window;
|
||||
}
|
||||
|
||||
/** The Table Model for Query */
|
||||
private GridTable m_mTable = null;
|
||||
|
||||
|
@ -1287,6 +1283,11 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
{
|
||||
return m_keyColumnName;
|
||||
} // getKeyColumnName
|
||||
|
||||
public int getKeyColumnIndex()
|
||||
{
|
||||
return m_mTable.getKeyColumnIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Name of the Key Column
|
||||
|
@ -3356,4 +3357,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
selection.clear();
|
||||
}
|
||||
|
||||
public GridWindow getGridWindow()
|
||||
{
|
||||
return this.m_window;
|
||||
}
|
||||
|
||||
public GridTabVO getVO()
|
||||
{
|
||||
return m_vo;
|
||||
}
|
||||
} // GridTab
|
||||
|
|
|
@ -3948,4 +3948,8 @@ public class GridTable extends AbstractTableModel
|
|||
m_lastSortColumnIndex = -1;
|
||||
m_lastSortedAscending = true;
|
||||
}
|
||||
|
||||
public int getKeyColumnIndex() {
|
||||
return m_indexKeyColumn;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -570,6 +570,17 @@ public interface I_AD_Column
|
|||
*/
|
||||
public String getName();
|
||||
|
||||
/** Column name PA_DashboardContent_ID */
|
||||
public static final String COLUMNNAME_PA_DashboardContent_ID = "PA_DashboardContent_ID";
|
||||
|
||||
/** Set Dashboard Content */
|
||||
public void setPA_DashboardContent_ID (int PA_DashboardContent_ID);
|
||||
|
||||
/** Get Dashboard Content */
|
||||
public int getPA_DashboardContent_ID();
|
||||
|
||||
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException;
|
||||
|
||||
/** Column name ReadOnlyLogic */
|
||||
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";
|
||||
|
||||
|
|
|
@ -416,6 +416,17 @@ public interface I_AD_UserDef_Field
|
|||
*/
|
||||
public int getNumLines();
|
||||
|
||||
/** Column name PA_DashboardContent_ID */
|
||||
public static final String COLUMNNAME_PA_DashboardContent_ID = "PA_DashboardContent_ID";
|
||||
|
||||
/** Set Dashboard Content */
|
||||
public void setPA_DashboardContent_ID (int PA_DashboardContent_ID);
|
||||
|
||||
/** Get Dashboard Content */
|
||||
public int getPA_DashboardContent_ID();
|
||||
|
||||
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException;
|
||||
|
||||
/** Column name ReadOnlyLogic */
|
||||
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";
|
||||
|
||||
|
|
|
@ -994,7 +994,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
setC_PaymentTerm_ID (ii);
|
||||
else
|
||||
{
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'";
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y' AND IsActive='Y'";
|
||||
ii = DB.getSQLValue(null, sql, getAD_Client_ID());
|
||||
if (ii != 0)
|
||||
setC_PaymentTerm_ID (ii);
|
||||
|
|
|
@ -1039,7 +1039,7 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
setC_PaymentTerm_ID(ii);
|
||||
else
|
||||
{
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'";
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y' AND IsActive='Y'";
|
||||
ii = DB.getSQLValue(null, sql, getAD_Client_ID());
|
||||
if (ii != 0)
|
||||
setC_PaymentTerm_ID (ii);
|
||||
|
|
|
@ -116,6 +116,9 @@ public class SystemIDs
|
|||
public final static int REFERENCE_DATATYPE_URL = 40;
|
||||
public final static int REFERENCE_DATATYPE_YES_NO = 20;
|
||||
public final static int REFERENCE_DATATYPE_CHART = 53370;
|
||||
public final static int REFERENCE_DATATYPE_DASHBOARD_CONTENT = 200122;
|
||||
public final static int REFERENCE_DATATYPE_SINGLE_SELECTION_GRID = 200127;
|
||||
public final static int REFERENCE_DATATYPE_MULTIPLE_SELECTION_GRID = 200128;
|
||||
|
||||
public final static int REFERENCE_AD_USER = 110;
|
||||
public final static int REFERENCE_DOCUMENTACTION = 135;
|
||||
|
|
|
@ -32,7 +32,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20161030L;
|
||||
private static final long serialVersionUID = 20161215L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_Column (Properties ctx, int AD_Column_ID, String trxName)
|
||||
|
@ -924,6 +924,31 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_Name);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_PA_DashboardContent)MTable.get(getCtx(), org.compiere.model.I_PA_DashboardContent.Table_Name)
|
||||
.getPO(getPA_DashboardContent_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Dashboard Content.
|
||||
@param PA_DashboardContent_ID Dashboard Content */
|
||||
public void setPA_DashboardContent_ID (int PA_DashboardContent_ID)
|
||||
{
|
||||
if (PA_DashboardContent_ID < 1)
|
||||
set_Value (COLUMNNAME_PA_DashboardContent_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_PA_DashboardContent_ID, Integer.valueOf(PA_DashboardContent_ID));
|
||||
}
|
||||
|
||||
/** Get Dashboard Content.
|
||||
@return Dashboard Content */
|
||||
public int getPA_DashboardContent_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PA_DashboardContent_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Read Only Logic.
|
||||
@param ReadOnlyLogic
|
||||
Logic to determine if field is read only (applies only when field is read-write)
|
||||
|
@ -1051,4 +1076,4 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
|||
{
|
||||
return (String)get_Value(COLUMNNAME_VFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20161030L;
|
||||
private static final long serialVersionUID = 20161215L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_UserDef_Field (Properties ctx, int AD_UserDef_Field_ID, String trxName)
|
||||
|
@ -638,6 +638,31 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_PA_DashboardContent)MTable.get(getCtx(), org.compiere.model.I_PA_DashboardContent.Table_Name)
|
||||
.getPO(getPA_DashboardContent_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Dashboard Content.
|
||||
@param PA_DashboardContent_ID Dashboard Content */
|
||||
public void setPA_DashboardContent_ID (int PA_DashboardContent_ID)
|
||||
{
|
||||
if (PA_DashboardContent_ID < 1)
|
||||
set_Value (COLUMNNAME_PA_DashboardContent_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_PA_DashboardContent_ID, Integer.valueOf(PA_DashboardContent_ID));
|
||||
}
|
||||
|
||||
/** Get Dashboard Content.
|
||||
@return Dashboard Content */
|
||||
public int getPA_DashboardContent_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PA_DashboardContent_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Read Only Logic.
|
||||
@param ReadOnlyLogic
|
||||
Logic to determine if field is read only (applies only when field is read-write)
|
||||
|
@ -731,4 +756,4 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
|
|||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TIME;
|
|||
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_URL;
|
||||
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_YES_NO;
|
||||
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_CHART;
|
||||
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_DASHBOARD_CONTENT;
|
||||
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_SINGLE_SELECTION_GRID;
|
||||
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_MULTIPLE_SELECTION_GRID;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
|
@ -144,6 +147,12 @@ public final class DisplayType
|
|||
public static final int Payment = REFERENCE_DATATYPE_PAYMENT;
|
||||
|
||||
public static final int Chart = REFERENCE_DATATYPE_CHART;
|
||||
|
||||
public static final int DashboardContent = REFERENCE_DATATYPE_DASHBOARD_CONTENT;
|
||||
|
||||
public static final int SingleSelectionGrid = REFERENCE_DATATYPE_SINGLE_SELECTION_GRID;
|
||||
|
||||
public static final int MultipleSelectionGrid = REFERENCE_DATATYPE_MULTIPLE_SELECTION_GRID;
|
||||
|
||||
/**
|
||||
* - New Display Type
|
||||
|
@ -259,7 +268,9 @@ public final class DisplayType
|
|||
if (displayType == String || displayType == Text
|
||||
|| displayType == TextLong || displayType == Memo
|
||||
|| displayType == FilePath || displayType == FileName
|
||||
|| displayType == URL || displayType == PrinterName)
|
||||
|| displayType == URL || displayType == PrinterName
|
||||
|| displayType == SingleSelectionGrid
|
||||
|| displayType == MultipleSelectionGrid)
|
||||
return true;
|
||||
|
||||
List<IDisplayTypeFactory> factoryList = Service.locator().list(IDisplayTypeFactory.class).getServices();
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
package org.adempiere.pipo2;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
@ -34,6 +36,7 @@ import org.compiere.model.MSysConfig;
|
|||
import org.compiere.util.EMail;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.WebUtil;
|
||||
|
||||
/**
|
||||
* PackIn Notifier
|
||||
|
@ -105,7 +108,13 @@ public class PackInNotifier {
|
|||
} else {
|
||||
status = "Failure";
|
||||
}
|
||||
subject.append(status).append("* Result for PackIn ").append(getFileName());
|
||||
String serverName = null;
|
||||
try {
|
||||
serverName = InetAddress.getLocalHost().getHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
serverName = WebUtil.getHostIP();
|
||||
}
|
||||
subject.append(status).append("* ").append(serverName).append(" - Result for PackIn ").append(getFileName());
|
||||
if (getPluginName() != null) {
|
||||
subject.append(" from ").append(getPluginName());
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
"[Account_Value]","[Account_Name]","[Account_Description]","[Account_Type]","[Account_Sign]","[Account_Document]","[Account_Summary]","[Default_Account]","[Account_Parent]","[Balance Sheet]","[Balance Sheet_Name]","[US 1120 Balance Sheet]","US 1120 Balance Sheet_Name","[Profit & Loss]","[Profit & Loss_Name]","[US 1120 Income Statement]","[US 1120 Income Statement_Name]","[Cash Flow]","[Cash Flow_Name]"
|
||||
[Account_Value],[Account_Name],[Account_Description],[Account_Type],[Account_Sign],[Account_Document],[Account_Summary],[Default_Account],[Account_Parent],[Balance Sheet],[Balance Sheet_Name],[US 1120 Balance Sheet],[US 1120 Balance Sheet_Name],[Profit & Loss],[Profit & Loss_Name],[US 1120 Income Statement],[US 1120 Income Statement_Name],[Cash Flow],[Cash Flow_Name]
|
||||
1,"Assets",,"Asset",,,"Yes",,,1,"Assets",15,"Total Assets",,,,,,
|
||||
11,"Cash",,"Asset",,,"Yes",,1,11,"Cash",1,"Cash",,,,,,
|
||||
11100,"Checking Account","Bank Asset","Asset",,"Yes","No","B_ASSET_ACCT",11,,,,,,,,,,
|
||||
11110,"Checking In-Transfer","Bank transactions in transit","Asset",,"Yes","No","B_INTRANSIT_ACCT",11,,,,,,,,,,
|
||||
11120,"Checking Unidentified Receipts","Receipts from unidentified customer","Asset",,"Yes","No","",11,,,,,,,,,,
|
||||
11120,"Checking Unidentified Receipts","Receipts from unidentified customer","Asset",,"Yes","No",,11,,,,,,,,,,
|
||||
11130,"Checking Unallocated Receipts","Received, unallocated payments","Asset",,"Yes","No","B_UNALLOCATEDCASH_ACCT",11,,,,,,,,,,
|
||||
11200,"Checking Account 2",,"Asset",,,"No",,11,,,,,,,,,,
|
||||
11300,"Savings Account",,"Asset",,,"No",,11,,,,,,,,,,
|
||||
|
@ -16,7 +16,7 @@
|
|||
12115,"Accounts Receivable Services - Trade","Accounts Receivables for Services","Asset",,"Yes","No","C_RECEIVABLE_SERVICES_ACCT",121,,,"2a","Trade nodes and accounts receivables",,,,,,
|
||||
12120,"A/R Non Sufficient Funds Returned Checks",,"Asset",,,"No",,121,,,"2a",,,,,,,
|
||||
12180,"A/R Trade Allowance for Bad Debit",,"Asset",,,"No",,121,,,"2b","Less allowances for bad debts",,,,,,
|
||||
12190,"Not invoiced receivables","We delivered but have not invoiced yet","Asset",,"Yes","No","",121,,,"2a",,,,,,,
|
||||
12190,"Not invoiced receivables","We delivered but have not invoiced yet","Asset",,"Yes","No",,121,,,"2a",,,,,,,
|
||||
122,"Credit Card in Transit",,"Asset",,,"Yes",,12,,,,,,,,,,
|
||||
12210,"In Transit A/R Amex",,"Asset",,,"No",,122,,,"2a",,,,,,,
|
||||
12220,"In Transit A/R Master Card",,"Asset",,,"No",,122,,,"2a",,,,,,,
|
||||
|
@ -30,10 +30,10 @@
|
|||
12440,"Loans Receivable Others",,"Asset",,,"No",,124,,,"2a",,,,,,,
|
||||
125,"Prepayments",,"Asset",,,"Yes",,12,,,,,,,,,,
|
||||
12510,"Vendor prepayment","Prepayments for future expense","Asset",,"Yes","No","V_PREPAYMENT_ACCT",125,,,"2a",,,,,,,
|
||||
12520,"Employee Expense Prepayment","Expense advances","Asset",,"Yes","No","",125,,,"2a",,,,,,,
|
||||
12520,"Employee Expense Prepayment","Expense advances","Asset",,"Yes","No",,125,,,"2a",,,,,,,
|
||||
126,"Tax receivables",,"Asset",,,"Yes",,12,,,,,,,,,,
|
||||
12610,"Tax credit A/R","Tax to be reimbursed - before tax declaration","Asset",,"Yes","No","T_CREDIT_ACCT",126,,,6,,,,,,,
|
||||
12620,"Tax receivables","Tax to receive based on tax declaration","Asset",,"Yes","No","",126,,,6,,,,,,,
|
||||
12620,"Tax receivables","Tax to receive based on tax declaration","Asset",,"Yes","No",,126,,,6,,,,,,,
|
||||
12800,"Intercompany Due From","Default Receivables account for intercompany trx","Asset",,"Yes","No","INTERCOMPANYDUEFROM_ACCT",12,,,6,,,,,,,
|
||||
12900,"A/R Miscellaneous",,"Asset",,,"No",,12,,,"2a",,,,,,,
|
||||
13,"Investments",,"Asset",,,"Yes",,1,13,"Investments",,,,,,,,
|
||||
|
@ -41,10 +41,10 @@
|
|||
13200,"Tax-Exempt Securities",,"Asset",,,"No",,13,,,5,"Tax-Exempt Securities",,,,,,
|
||||
13300,"Other Investments",,"Asset",,,"No",,13,,,9,"Other Investments",,,,,,
|
||||
14,"Inventory",,"Asset",,,"Yes",,1,14,"Inventory",3,"Inventories",,,,,,
|
||||
14100,"General Trade Inventory","Inventory Account","Asset",,"Yes","No","",14,,,,,,,,,,
|
||||
14100,"General Trade Inventory","Inventory Account","Asset",,"Yes","No",,14,,,,,,,,,,
|
||||
14120,"Product asset","Product Inventory Account","Asset",,"Yes","No","P_ASSET_ACCT",14,,,,,,,,,,
|
||||
14130,"Work In Process","Work In Process Account","Asset",,"Yes","No","",14,,,,,,,,,,
|
||||
14140,"Floor Stock","Floor Stock Account","Asset",,"Yes","No","",14,,,,,,,,,,
|
||||
14130,"Work In Process","Work In Process Account","Asset",,"Yes","No",,14,,,,,,,,,,
|
||||
14140,"Floor Stock","Floor Stock Account","Asset",,"Yes","No",,14,,,,,,,,,,
|
||||
15,"Prepaid Expenses, Deposits & Other Current Assets",,"Asset",,,"Yes",,1,15,"Prepaid Expenses, Deposits & Other Current Assets",6,"Other Current Assets",,,,,,
|
||||
151,"Prepaid Expenses",,"Asset",,,"Yes",,15,,,,,,,,,,
|
||||
15110,"Prepaid Insurance",,"Asset",,,"No",,151,,,,,,,,,,
|
||||
|
@ -110,8 +110,8 @@
|
|||
21550,"Mail Order Deposits",,"Liability",,,"No",,215,,,,,,,,,,
|
||||
216,"Tax Payables",,"Liability",,,"Yes",,21,,,18,"Other current liabilities",,,,,,
|
||||
21610,"Tax due","Tax to be paid - before tax declaration","Liability",,"Yes","No","T_DUE_ACCT",216,,,,,,,,,,
|
||||
21620,"Tax liability","Tax to be paid based on tax declaration","Liability",,"Yes","No","",216,,,,,,,,,,
|
||||
21700,"Withholding (Tax)","Withholding for 1099 or Quality Guarantee","Liability",,"Yes","No","",21,,,,,,,,,,
|
||||
21620,"Tax liability","Tax to be paid based on tax declaration","Liability",,"Yes","No",,216,,,,,,,,,,
|
||||
21700,"Withholding (Tax)","Withholding for 1099 or Quality Guarantee","Liability",,"Yes","No",,21,,,,,,,,,,
|
||||
21710,"Withholding (Other)",,"Liability",,,"No",,21,,,,,,,,,,
|
||||
21800,"Intercompany Due To","Default Payables account for intercompany trx","Liability",,"Yes","No","INTERCOMPANYDUETO_ACCT",21,,,,,,,,,,
|
||||
22,"Accrued Expenses",,"Liability",,,"Yes",,2,22,"Accrued Expenses",18,,,,,,,
|
||||
|
@ -152,7 +152,7 @@
|
|||
32,"Earnings",,"Owner's Equity",,,"Yes",,3,32,"Current Profit & Loss",25,"Retained Earnings",,,,,,
|
||||
32100,"Dividends",,"Owner's Equity",,,"No",,32,,,,,,,,,,
|
||||
32200,"Drawings",,"Owner's Equity",,,"No",,32,,,,,,,,,,
|
||||
32900,"Retained Earnings","Year end processing to balance account (Income Summary)","Owner's Equity",,"Yes","No","",32,,,,,,,,,,
|
||||
32900,"Retained Earnings","Year end processing to balance account (Income Summary)","Owner's Equity",,"Yes","No",,32,,,,,,,,,,
|
||||
,,,,,,,,,33,"Total Liabilities and Equity",,,,,,,,
|
||||
4,"Sales",,"Revenue",,,"Yes",,,,,,,4,"Sales",,,,
|
||||
41000,"Trade Revenue","Default Product or Service revenue","Revenue",,"Yes","No","P_REVENUE_ACCT",4,,,,,,,"1a","Gross receipts or sales",,
|
||||
|
@ -160,16 +160,16 @@
|
|||
43000,"Sideline Revenue",,"Revenue",,,"No",,4,,,,,,,"1a",,,
|
||||
46000,"Royalties Revenue",,"Revenue",,,"No",,4,,,,,,,7,"Gross Royalties",,
|
||||
47000,"Unearned revenue","We have invoiced, but not delivered yet","Revenue",,"Yes","No","UNEARNEDREVENUE_ACCT",4,,,,,,,"1a",,,
|
||||
48000,"Not invoiced revenue","We delivered but have not invoiced yet","Revenue",,"Yes","No","",4,,,,,,,"1a",,,
|
||||
48000,"Not invoiced revenue","We delivered but have not invoiced yet","Revenue",,"Yes","No",,4,,,,,,,"1a",,,
|
||||
49,"Sales Discounts",,"Revenue",,,"Yes",,4,,,,,49,"Sales Discounts","1b","Less returns and allowances",,
|
||||
49100,"Trade Discounts","Granted Trade discounts (corrects Product Revenue)","Revenue",,"Yes","No","P_TRADEDISCOUNTGRANT_ACCT",49,,,,,,,,,,
|
||||
49200,"Payment discount expense","Granted early payment discount to customers","Revenue",,"Yes","No","PAYDISCOUNT_EXP_ACCT",49,,,,,,,,,,
|
||||
49300,"Promotion Discounts",,"Revenue",,,"No",,49,,,,,,,,,,
|
||||
5,"Cost of Goods Sold",,"Expense",,,"Yes",,,,,,,5,"Cost of Goods Sold",2,"Cost of goods sold",,
|
||||
51100,"Product CoGs","Cost of Goods Sold","Expense",,"Yes","No","P_COGS_ACCT",5,,,,,,,,,,
|
||||
51110,"Cost Of Production","Cost Of Production Account","Expense",,"Yes","No","",5,,,,,,,,,,
|
||||
51120,"Scrap","Scrap Account","Expense",,"Yes","No","",5,,,,,,,,,,
|
||||
51130,"Outside Processing (Subcontract)","Outside Processing Account","Expense",,"Yes","No","",5,,,,,,,,,,
|
||||
51110,"Cost Of Production","Cost Of Production Account","Expense",,"Yes","No",,5,,,,,,,,,,
|
||||
51120,"Scrap","Scrap Account","Expense",,"Yes","No",,5,,,,,,,,,,
|
||||
51130,"Outside Processing (Subcontract)","Outside Processing Account","Expense",,"Yes","No",,5,,,,,,,,,,
|
||||
51200,"Product Expense","Default Service costs (I.e. not on inventory)","Expense",,"Yes","No","P_EXPENSE_ACCT",5,,,,,,,,,,
|
||||
51210,"Product Cost Adjustment","Product Cost Adjustments","Expense",,"Yes","No","P_COSTADJUSTMENT_ACCT",5,,,,,,,,,,
|
||||
51280,"Landed Cost Clearing","Default Landed Cost Clearing","Expense",,"Yes","No","P_LANDEDCOSTCLEARING_ACCT",5,,,,,,,,,,
|
||||
|
@ -183,17 +183,17 @@
|
|||
56,"Inventory CoGs",,"Expense",,,"Yes",,5,,,,,56,"Inventory CoGs",2,,,
|
||||
56100,"Inventory Shrinkage","Physical Inventory Gain/Loss","Expense",,"Yes","No","W_DIFFERENCES_ACCT",56,,,,,,,,,,
|
||||
56200,"Inventory Write Down Below Cost",,"Expense",,,"No",,56,,,,,,,,,,
|
||||
56300,"Inventory Adjustment","Inventory Actual Accounting Value Adjustment","Expense",,"Yes","No","",56,,,,,,,,,,
|
||||
56400,"Inventory Revaluation","Difference to (lower cost) or market","Expense",,"Yes","No","",56,,,,,,,,,,
|
||||
56300,"Inventory Adjustment","Inventory Actual Accounting Value Adjustment","Expense",,"Yes","No",,56,,,,,,,,,,
|
||||
56400,"Inventory Revaluation","Difference to (lower cost) or market","Expense",,"Yes","No",,56,,,,,,,,,,
|
||||
57000,"Direct Labor",,"Expense",,,"No",,5,,,,,,,,,,
|
||||
58,"CoGS Variances",,"Expense",,,"Yes",,5,,,,,58,"CoGs Variances",2,,,
|
||||
58100,"Invoice price variance","Difference between product cost and invoice price (IPV)","Expense",,"Yes","No","P_INVOICEPRICEVARIANCE_ACCT",58,,,,,,,,,,
|
||||
58200,"Purchase price variance","Difference between purchase price and standard costs (PPV)","Expense",,"Yes","No","P_PURCHASEPRICEVARIANCE_ACCT",58,,,,,,,,,,
|
||||
58300,"Purchase price variance Offset","Offset Account for Purchase price variance (PPV) ","Expense",,"Yes","No","PPVOFFSET_ACCT",58,,,,,,,,,,
|
||||
58400,"Using Variance","Account for Using Variance","Expense",,"Yes","No","",58,,,,,,,,,,
|
||||
58400,"Using Variance","Account for Using Variance","Expense",,"Yes","No",,58,,,,,,,,,,
|
||||
58500,"Method Change Variance","Account for Method Change Variance","Expense",,"Yes","No","P_RATEVARIANCE_ACCT",58,,,,,,,,,,
|
||||
58600,"Rate Variance","Account for Rate Variance","Expense",,"Yes","No","",58,,,,,,,,,,
|
||||
58700,"Mix Variance","Account for Mix Variance","Expense",,"Yes","No","",58,,,,,,,,,,
|
||||
58600,"Rate Variance","Account for Rate Variance","Expense",,"Yes","No",,58,,,,,,,,,,
|
||||
58700,"Mix Variance","Account for Mix Variance","Expense",,"Yes","No",,58,,,,,,,,,,
|
||||
58800,"Average Cost Variance","Account for Average Cost Variance","Expense",,"Yes","No","P_AVERAGECOSTVARIANCE_ACCT",58,,,,,,,,,,
|
||||
59,"CoGs Discounts",,"Expense",,,"Yes",,5,,,,,59,"CoGS Discounts",2,,,
|
||||
59100,"Trade discounts received","Received Trade Discounts (corrects Product expense)","Expense",,"Yes","No","P_TRADEDISCOUNTREC_ACCT",59,,,,,,,,,,
|
||||
|
@ -274,7 +274,7 @@
|
|||
68300,"Business Travel - Hotel",,"Expense",,,"No",,68,,,,,,,,,,
|
||||
68400,"Business Meals & Entertainment (50%)",,"Expense",,,"No",,68,,,,,,,,,,
|
||||
68500,"Staff Meeting Food (100%)",,"Expense",,,"No",,68,,,,,,,,,,
|
||||
68600,"Employee expense","Default employee expenses","Expense",,"Yes","No","",68,,,,,,,,,,
|
||||
68600,"Employee expense","Default employee expenses","Expense",,"Yes","No",,68,,,,,,,,,,
|
||||
68900,"Business Travel Other Expense",,"Expense",,,"No",,68,,,,,,,,,,
|
||||
69,"Insurance",,"Expense",,,"Yes",,6,,,,,69,"Insurance",,,,
|
||||
69100,"Business Insurance",,"Expense",,,"No",,69,,,,,,,,,,
|
||||
|
@ -283,7 +283,7 @@
|
|||
69400,"Other Insurance",,"Expense",,,"No",,69,,,,,,,,,,
|
||||
70,"Payment Processor Costs",,"Expense",,,"Yes",,6,,,,,70,"Payment Processor Costs",,,,
|
||||
70100,"Credit Card Service Charges",,"Expense",,,"No",,70,,,,,,,,,,
|
||||
70200,"Bank Service Charges","Bank expenses","Expense",,"Yes","No","",70,,,,,,,,,,
|
||||
70200,"Bank Service Charges","Bank expenses","Expense",,"Yes","No",,70,,,,,,,,,,
|
||||
70900,"Other Payment Service Charges",,"Expense",,,"No",,70,,,,,,,,,,
|
||||
71,"Dues & Subscription",,"Expense",,,"Yes",,6,,,,,71,"Dues & Subscriptions",,,,
|
||||
71100,"Association Membership Fees",,"Expense",,,"No",,71,,,,,,,,,,
|
||||
|
@ -330,7 +330,7 @@
|
|||
79,"Default/Suspense Accounts","Temporary accounts - balance should be zero","Expense",,,"Yes",,6,,,,,79,"Default/Suspense Accounts",,,,
|
||||
79100,"Default account","Default Account (if no other account is defined) V1.1","Expense",,"Yes","No","DEFAULT_ACCT",79,,,,,,,,,,
|
||||
79200,"Suspense balancing ","Difference to make journal balance in source currency - needs to be solved","Expense",,"Yes","No","SUSPENSEBALANCING_ACCT",79,,,,,,,,,,
|
||||
79300,"Suspense error","Import did not find account - needs to be solved","Expense",,"Yes","No","",79,,,,,,,,,,
|
||||
79300,"Suspense error","Import did not find account - needs to be solved","Expense",,"Yes","No",,79,,,,,,,,,,
|
||||
79400,"Cash book expense","Default other expense for petty cash transactions","Expense",,"Yes","No","CB_EXPENSE_ACCT",79,,,,,,,,,,
|
||||
79500,"Cash book receipts","Default other revenue for petty cash transactions","Revenue",,"Yes","No","CB_RECEIPT_ACCT",79,,,,,,,,,,
|
||||
79600,"Charge expense","Default other expense","Expense",,"Yes","No","CH_EXPENSE_ACCT",79,,,,,,,,,,
|
||||
|
@ -343,8 +343,8 @@
|
|||
80300,"Rental Income",,"Revenue",,,"No",,80,,,,,,,6,"Gross Rents",,
|
||||
80400,"Sales Tax Commission",,"Revenue",,,"No",,80,,,,,,,,,,
|
||||
805,"Currency Gain",,"Revenue",,,"Yes",,80,,,,,805,"Currency Gain",,,,
|
||||
80510,"Bank revaluation gain","Foreign currency bank account gain","Revenue",,"Yes","No","",805,,,,,,,,,,
|
||||
80520,"Bank settlement gain","Difference between payment and bank account currency","Revenue",,"Yes","No","",805,,,,,,,,,,
|
||||
80510,"Bank revaluation gain","Foreign currency bank account gain","Revenue",,"Yes","No",,805,,,,,,,,,,
|
||||
80520,"Bank settlement gain","Difference between payment and bank account currency","Revenue",,"Yes","No",,805,,,,,,,,,,
|
||||
80530,"Unrealized gain","Difference between foreign currency receivables/payables and current rate","Revenue",,"Yes","No","UNREALIZEDGAIN_ACCT",805,,,,,,,,,,
|
||||
80540,"Realized gain","Difference between invoice and payment currency","Revenue",,"Yes","No","REALIZEDGAIN_ACCT",805,,,,,,,,,,
|
||||
80700,"Capital Gains Income",,"Revenue",,,"No",,80,,,,,,,,,,
|
||||
|
@ -356,8 +356,8 @@
|
|||
82300,"Uninsured Casualty Loss",,"Expense",,,"No",,82,,,,,,,,,,
|
||||
82400,"Charitable Contributions",,"Expense",,,"No",,82,,,,,,,19,"Charitable Contributions",,
|
||||
825,"Currency Loss",,"Expense",,,"Yes",,82,,,,,825,"Currency Loss",,,,
|
||||
82510,"Bank revaluation loss","Foreign currency bank account loss","Expense",,"Yes","No","",825,,,,,,,,,,
|
||||
82520,"Bank settlement loss","Difference between payment and bank account currency","Expense",,"Yes","No","",825,,,,,,,,,,
|
||||
82510,"Bank revaluation loss","Foreign currency bank account loss","Expense",,"Yes","No",,825,,,,,,,,,,
|
||||
82520,"Bank settlement loss","Difference between payment and bank account currency","Expense",,"Yes","No",,825,,,,,,,,,,
|
||||
82530,"Unrealized loss","Difference between foreign currency receivables/payables and current rate","Expense",,"Yes","No","UNREALIZEDLOSS_ACCT",825,,,,,,,,,,
|
||||
82540,"Realized loss","Difference between invoice and payment currency","Expense",,"Yes","No","REALIZEDLOSS_ACCT",825,,,,,,,,,,
|
||||
82550,"Currency balancing","Rounding difference to make journal balance in accounting currency","Expense",,"Yes","No","CURRENCYBALANCING_ACCT",825,,,,,,,,,,
|
||||
|
@ -365,15 +365,15 @@
|
|||
82800,"Fixes Asset Sale Loss",,"Expense",,,"No",,82,,,,,,,,,,
|
||||
82900,"Other Expense",,"Expense",,,"No",,82,,,,,,,,,,
|
||||
83,"Expense (Absorbed)",,"Expense",,,"Yes",,,,,,,83,"Expense (Absorbed)",,,,
|
||||
83100,"Labor (Absorbed)","Labor Absorbed account","Expense",,"Yes","No","",83,,,,,,,,,,
|
||||
83200,"Burden (Absorbed)","Burden Absorbed account","Expense",,"Yes","No","",83,,,,,,,,,,
|
||||
83300,"Overhead (Applied)","Overhead Applied account","Expense",,"Yes","No","",83,,,,,,,,,,
|
||||
83100,"Labor (Absorbed)","Labor Absorbed account","Expense",,"Yes","No",,83,,,,,,,,,,
|
||||
83200,"Burden (Absorbed)","Burden Absorbed account","Expense",,"Yes","No",,83,,,,,,,,,,
|
||||
83300,"Overhead (Applied)","Overhead Applied account","Expense",,"Yes","No",,83,,,,,,,,,,
|
||||
,,,,,,,,,,,,,"83_","Net Income before Tax",,,,
|
||||
89,"Income Tax & Summary",,"Expense",,,"Yes",,,,,,,89,"Income Tax & Summary",,,,
|
||||
89100,"Federal Income Tax",,"Expense",,,"No",,89,,,,,,,,,,
|
||||
89200,"State Income Tax",,"Expense",,,"No",,89,,,,,,,,,,
|
||||
89300,"Local Income Tax",,"Expense",,,"No",,89,,,,,,,,,,
|
||||
89900,"Income Summary","Year end processing to balance account (Retained Earnings)","Expense",,"Yes","No","",89,,,,,"89_","Net Income",,,,
|
||||
89900,"Income Summary","Year end processing to balance account (Retained Earnings)","Expense",,"Yes","No",,89,,,,,"89_","Net Income",,,,
|
||||
91,"Costing",,"Memo",,,"Yes",,,,,,,,,,,,
|
||||
911,"Profit Center Costing Distribution",,"Memo",,,"No",,91,,,,,,,,,,
|
||||
912,"Project Costing Distribution",,"Memo",,,"No",,91,,,,,,,,,,
|
||||
|
|
|
|
@ -15,7 +15,7 @@
|
|||
<booleanAttribute key="includeOptional" value="false"/>
|
||||
<stringAttribute key="location" value="${workspace_loc}/../runtime-server.product"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/home/hengsin/Downloads/eclipse-4.4/org.apache.felix.webconsole-4.0.0-sources.jar&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.externalArchive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/home/hengsin/Downloads/jetty-9.2.3.sources/org.apache.aries.spifly.dynamic.bundle-1.0.1-sources.jar&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.externalArchive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/home/hengsin/Downloads/jetty-9.2.3.sources/apache-jsp-8.0.9.M3-sources.jar&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.externalArchive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/home/hengsin/Downloads/jetty-9.2.3.sources/jetty-osgi-boot-9.2.3.v20140905-sources.jar&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.externalArchive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;archive detectRoot=&quot;true&quot; path=&quot;/home/hengsin/Downloads/jetty-9.2.3.sources/jetty-annotations-9.2.3.v20140905-sources.jar&quot;/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.externalArchive"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;default/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;classpathContainer path=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot;/&gt;&#10;" typeId="org.eclipse.jdt.launching.sourceContainer.classpathContainer"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;default/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
|
|
|
@ -188,6 +188,9 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
Env.setContext(ctx, Env.LANGUAGE, langSession);
|
||||
}
|
||||
|
||||
MSystem system = MSystem.get(Env.getCtx());
|
||||
Env.setContext(ctx, "#System_Name", system.getName());
|
||||
|
||||
// Validate language
|
||||
Language language = Language.getLanguage(langLogin);
|
||||
String locale = Env.getContext(ctx, AEnv.LOCALE);
|
||||
|
|
|
@ -1274,7 +1274,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
boolean refresh=true;
|
||||
Treeitem item = treePanel.getTree().getSelectedItem();
|
||||
SimpleTreeModel model = (SimpleTreeModel)(TreeModel<?>) treePanel.getTree().getModel();
|
||||
if (item != null)
|
||||
if (item != null && item.getValue() != null)
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
MTreeNode treeNode = ((DefaultTreeNode<MTreeNode>) item.getValue()).getData();
|
||||
|
|
|
@ -211,197 +211,7 @@ public class DashboardController implements EventListener<Event> {
|
|||
|
||||
boolean panelEmpty = true;
|
||||
|
||||
// HTML content
|
||||
String htmlContent = dc.get_Translation(MDashboardContent.COLUMNNAME_HTML);
|
||||
if(htmlContent != null)
|
||||
{
|
||||
StringBuilder result = new StringBuilder("<html><head>");
|
||||
|
||||
URL url = getClass().getClassLoader().getResource("org/compiere/css/PAPanel.css");
|
||||
InputStreamReader ins;
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
ins = new InputStreamReader(url.openStream());
|
||||
bufferedReader = new BufferedReader( ins );
|
||||
String cssLine;
|
||||
result.append("<style type=\"text/css\">");
|
||||
while ((cssLine = bufferedReader.readLine()) != null)
|
||||
result.append(cssLine + "\n");
|
||||
result.append("</style>");
|
||||
} catch (Exception e1) {
|
||||
logger.log(Level.SEVERE, e1.getLocalizedMessage(), e1);
|
||||
}
|
||||
finally{
|
||||
if (bufferedReader != null) {
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (Exception e) {}
|
||||
bufferedReader = null;
|
||||
}
|
||||
}
|
||||
result.append("</head><body><div class=\"content\">\n");
|
||||
|
||||
// if(description != null)
|
||||
// result.append("<h2>" + description + "</h2>\n");
|
||||
result.append(stripHtml(htmlContent, false) + "<br>\n");
|
||||
result.append("</div>\n</body>\n</html>");
|
||||
|
||||
Html html = new Html();
|
||||
html.setContent(result.toString());
|
||||
content.appendChild(html);
|
||||
panelEmpty = false;
|
||||
}
|
||||
|
||||
// Window
|
||||
int AD_Window_ID = dc.getAD_Window_ID();
|
||||
if(AD_Window_ID > 0)
|
||||
{
|
||||
int AD_Menu_ID = dc.getAD_Menu_ID();
|
||||
Div div = new Div();
|
||||
ToolBarButton btn = new ToolBarButton(String.valueOf(AD_Menu_ID));
|
||||
I_AD_Menu menu = dc.getAD_Menu();
|
||||
btn.setLabel(menu.getName());
|
||||
btn.setAttribute("AD_Menu_ID", AD_Menu_ID);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
div.appendChild(btn);
|
||||
content.appendChild(div);
|
||||
panelEmpty = false;
|
||||
}
|
||||
|
||||
//Report & Process
|
||||
int AD_Process_ID = dc.getAD_Process_ID();
|
||||
if(AD_Process_ID > 0)
|
||||
{
|
||||
String sql = "SELECT AD_MENU_ID FROM AD_MENU WHERE AD_Process_ID=?";
|
||||
int AD_Menu_ID = DB.getSQLValue(null, sql, AD_Process_ID);
|
||||
ToolBarButton btn = new ToolBarButton();
|
||||
MMenu menu = new MMenu(Env.getCtx(), AD_Menu_ID, null);
|
||||
btn.setAttribute("AD_Menu_ID", AD_Menu_ID);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
panelEmpty = false;
|
||||
|
||||
if (dc.isEmbedReportContent())
|
||||
{
|
||||
String processParameters = dc.getProcessParameters();
|
||||
embedReport(content, AD_Process_ID, processParameters);
|
||||
|
||||
Toolbar toolbar = new Toolbar();
|
||||
content.appendChild(toolbar);
|
||||
btn.setLabel("Open run dialog");
|
||||
toolbar.appendChild(btn);
|
||||
|
||||
btn = new ToolBarButton();
|
||||
btn.setAttribute("AD_Process_ID", AD_Process_ID);
|
||||
btn.setAttribute("ProcessParameters", processParameters);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
btn.setLabel("View report in new tab");
|
||||
toolbar.appendChild(new Separator("vertical"));
|
||||
toolbar.appendChild(btn);
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.setLabel(menu.getName());
|
||||
content.appendChild(btn);
|
||||
}
|
||||
}
|
||||
|
||||
// Goal
|
||||
int PA_Goal_ID = dc.getPA_Goal_ID();
|
||||
if(PA_Goal_ID > 0)
|
||||
{
|
||||
//link to open performance detail
|
||||
Div div = new Div();
|
||||
Toolbarbutton link = new Toolbarbutton();
|
||||
link.setImage(ThemeManager.getThemeResource("images/Zoom16.png"));
|
||||
link.setAttribute("PA_Goal_ID", PA_Goal_ID);
|
||||
link.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
|
||||
public void onEvent(Event event) throws Exception {
|
||||
int PA_Goal_ID = (Integer)event.getTarget().getAttribute("PA_Goal_ID");
|
||||
MGoal goal = new MGoal(Env.getCtx(), PA_Goal_ID, null);
|
||||
new WPerformanceDetail(goal);
|
||||
}
|
||||
});
|
||||
div.appendChild(link);
|
||||
content.appendChild(div);
|
||||
|
||||
String goalDisplay = dc.getGoalDisplay();
|
||||
MGoal goal = new MGoal(Env.getCtx(), PA_Goal_ID, null);
|
||||
WGraph graph = new WGraph(goal, 55, false, true,
|
||||
!(MDashboardContent.GOALDISPLAY_Chart.equals(goalDisplay)),
|
||||
MDashboardContent.GOALDISPLAY_Chart.equals(goalDisplay));
|
||||
content.appendChild(graph);
|
||||
panelEmpty = false;
|
||||
}
|
||||
|
||||
// ZUL file url
|
||||
String url = dc.getZulFilePath();
|
||||
if(url != null)
|
||||
{
|
||||
try {
|
||||
|
||||
Component component = null;
|
||||
List<IDashboardGadgetFactory> f = Service.locator().list(IDashboardGadgetFactory.class).getServices();
|
||||
for (IDashboardGadgetFactory factory : f) {
|
||||
component = factory.getGadget(url.toString(),content);
|
||||
if(component != null)
|
||||
break;
|
||||
}
|
||||
|
||||
if(component != null)
|
||||
{
|
||||
if (component instanceof Include)
|
||||
component = component.getFirstChild();
|
||||
|
||||
if (component instanceof DashboardPanel)
|
||||
{
|
||||
DashboardPanel dashboardPanel = (DashboardPanel) component;
|
||||
if (!dashboardPanel.getChildren().isEmpty()) {
|
||||
content.appendChild(dashboardPanel);
|
||||
dashboardRunnable.add(dashboardPanel);
|
||||
panelEmpty = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content.appendChild(component);
|
||||
panelEmpty = false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.WARNING, "Failed to create components. zul="+url, e);
|
||||
throw new AdempiereException(e);
|
||||
}
|
||||
}
|
||||
|
||||
//chart
|
||||
final int AD_Chart_ID = dc.getAD_Chart_ID();
|
||||
if (AD_Chart_ID > 0) {
|
||||
final Div chartPanel = new Div();
|
||||
chartPanel.setSclass("chart-gadget");
|
||||
final MChart chartModel = new MChart(Env.getCtx(), AD_Chart_ID, null);
|
||||
content.appendChild(chartPanel);
|
||||
panelEmpty = false;
|
||||
chartPanel.addEventListener(Events.ON_AFTER_SIZE, new EventListener<AfterSizeEvent>() {
|
||||
@Override
|
||||
public void onEvent(AfterSizeEvent event) throws Exception {
|
||||
int width = event.getWidth()*90/100;
|
||||
int height = event.getHeight();
|
||||
//set normal height
|
||||
if (height == 0) {
|
||||
height = width * 85 / 100;
|
||||
ZKUpdateUtil.setHeight(chartPanel, height+"px");
|
||||
}
|
||||
chartPanel.getChildren().clear();
|
||||
ChartModel model = new ChartModel();
|
||||
model.chart = chartModel;
|
||||
List<IChartRendererService> list = Service.locator().list(IChartRendererService.class).getServices();
|
||||
for (IChartRendererService renderer : list) {
|
||||
if (renderer.renderChart(chartPanel, width, height, model))
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
panelEmpty = !render(content, dc, dashboardRunnable);
|
||||
|
||||
if (panelEmpty)
|
||||
panel.detach();
|
||||
|
@ -467,6 +277,205 @@ public class DashboardController implements EventListener<Event> {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean render(Component content, MDashboardContent dc, DashboardRunnable dashboardRunnable) throws Exception {
|
||||
boolean empty = true;
|
||||
|
||||
// HTML content
|
||||
String htmlContent = dc.get_Translation(MDashboardContent.COLUMNNAME_HTML);
|
||||
if(htmlContent != null)
|
||||
{
|
||||
StringBuilder result = new StringBuilder("<html><head>");
|
||||
|
||||
URL url = getClass().getClassLoader().getResource("org/compiere/css/PAPanel.css");
|
||||
InputStreamReader ins;
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
ins = new InputStreamReader(url.openStream());
|
||||
bufferedReader = new BufferedReader( ins );
|
||||
String cssLine;
|
||||
result.append("<style type=\"text/css\">");
|
||||
while ((cssLine = bufferedReader.readLine()) != null)
|
||||
result.append(cssLine + "\n");
|
||||
result.append("</style>");
|
||||
} catch (Exception e1) {
|
||||
logger.log(Level.SEVERE, e1.getLocalizedMessage(), e1);
|
||||
}
|
||||
finally{
|
||||
if (bufferedReader != null) {
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (Exception e) {}
|
||||
bufferedReader = null;
|
||||
}
|
||||
}
|
||||
result.append("</head><body><div class=\"content\">\n");
|
||||
|
||||
// if(description != null)
|
||||
// result.append("<h2>" + description + "</h2>\n");
|
||||
result.append(stripHtml(htmlContent, false) + "<br>\n");
|
||||
result.append("</div>\n</body>\n</html>");
|
||||
|
||||
Html html = new Html();
|
||||
html.setContent(result.toString());
|
||||
content.appendChild(html);
|
||||
empty = false;
|
||||
}
|
||||
|
||||
// Window
|
||||
int AD_Window_ID = dc.getAD_Window_ID();
|
||||
if(AD_Window_ID > 0)
|
||||
{
|
||||
int AD_Menu_ID = dc.getAD_Menu_ID();
|
||||
Div div = new Div();
|
||||
ToolBarButton btn = new ToolBarButton(String.valueOf(AD_Menu_ID));
|
||||
I_AD_Menu menu = dc.getAD_Menu();
|
||||
btn.setLabel(menu.getName());
|
||||
btn.setAttribute("AD_Menu_ID", AD_Menu_ID);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
div.appendChild(btn);
|
||||
content.appendChild(div);
|
||||
empty = false;
|
||||
}
|
||||
|
||||
//Report & Process
|
||||
int AD_Process_ID = dc.getAD_Process_ID();
|
||||
if(AD_Process_ID > 0)
|
||||
{
|
||||
String sql = "SELECT AD_MENU_ID FROM AD_MENU WHERE AD_Process_ID=?";
|
||||
int AD_Menu_ID = DB.getSQLValue(null, sql, AD_Process_ID);
|
||||
ToolBarButton btn = new ToolBarButton();
|
||||
MMenu menu = new MMenu(Env.getCtx(), AD_Menu_ID, null);
|
||||
btn.setAttribute("AD_Menu_ID", AD_Menu_ID);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
empty = false;
|
||||
|
||||
if (dc.isEmbedReportContent())
|
||||
{
|
||||
String processParameters = dc.getProcessParameters();
|
||||
embedReport(content, AD_Process_ID, processParameters);
|
||||
|
||||
Toolbar toolbar = new Toolbar();
|
||||
content.appendChild(toolbar);
|
||||
btn.setLabel("Open run dialog");
|
||||
toolbar.appendChild(btn);
|
||||
|
||||
btn = new ToolBarButton();
|
||||
btn.setAttribute("AD_Process_ID", AD_Process_ID);
|
||||
btn.setAttribute("ProcessParameters", processParameters);
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
btn.setLabel("View report in new tab");
|
||||
toolbar.appendChild(new Separator("vertical"));
|
||||
toolbar.appendChild(btn);
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.setLabel(menu.getName());
|
||||
content.appendChild(btn);
|
||||
}
|
||||
}
|
||||
|
||||
// Goal
|
||||
int PA_Goal_ID = dc.getPA_Goal_ID();
|
||||
if(PA_Goal_ID > 0)
|
||||
{
|
||||
//link to open performance detail
|
||||
Div div = new Div();
|
||||
Toolbarbutton link = new Toolbarbutton();
|
||||
link.setImage(ThemeManager.getThemeResource("images/Zoom16.png"));
|
||||
link.setAttribute("PA_Goal_ID", PA_Goal_ID);
|
||||
link.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
|
||||
public void onEvent(Event event) throws Exception {
|
||||
int PA_Goal_ID = (Integer)event.getTarget().getAttribute("PA_Goal_ID");
|
||||
MGoal goal = new MGoal(Env.getCtx(), PA_Goal_ID, null);
|
||||
new WPerformanceDetail(goal);
|
||||
}
|
||||
});
|
||||
div.appendChild(link);
|
||||
content.appendChild(div);
|
||||
|
||||
String goalDisplay = dc.getGoalDisplay();
|
||||
MGoal goal = new MGoal(Env.getCtx(), PA_Goal_ID, null);
|
||||
WGraph graph = new WGraph(goal, 55, false, true,
|
||||
!(MDashboardContent.GOALDISPLAY_Chart.equals(goalDisplay)),
|
||||
MDashboardContent.GOALDISPLAY_Chart.equals(goalDisplay));
|
||||
content.appendChild(graph);
|
||||
empty = false;
|
||||
}
|
||||
|
||||
// ZUL file url
|
||||
String url = dc.getZulFilePath();
|
||||
if(url != null)
|
||||
{
|
||||
try {
|
||||
|
||||
Component component = null;
|
||||
List<IDashboardGadgetFactory> f = Service.locator().list(IDashboardGadgetFactory.class).getServices();
|
||||
for (IDashboardGadgetFactory factory : f) {
|
||||
component = factory.getGadget(url.toString(),content);
|
||||
if(component != null)
|
||||
break;
|
||||
}
|
||||
|
||||
if(component != null)
|
||||
{
|
||||
if (component instanceof Include)
|
||||
component = component.getFirstChild();
|
||||
|
||||
if (component instanceof DashboardPanel)
|
||||
{
|
||||
DashboardPanel dashboardPanel = (DashboardPanel) component;
|
||||
if (!dashboardPanel.getChildren().isEmpty()) {
|
||||
content.appendChild(dashboardPanel);
|
||||
if (dashboardRunnable != null)
|
||||
dashboardRunnable.add(dashboardPanel);
|
||||
empty = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content.appendChild(component);
|
||||
empty = false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.WARNING, "Failed to create components. zul="+url, e);
|
||||
throw new AdempiereException(e);
|
||||
}
|
||||
}
|
||||
|
||||
//chart
|
||||
final int AD_Chart_ID = dc.getAD_Chart_ID();
|
||||
if (AD_Chart_ID > 0) {
|
||||
final Div chartPanel = new Div();
|
||||
chartPanel.setSclass("chart-gadget");
|
||||
final MChart chartModel = new MChart(Env.getCtx(), AD_Chart_ID, null);
|
||||
content.appendChild(chartPanel);
|
||||
empty = false;
|
||||
chartPanel.addEventListener(Events.ON_AFTER_SIZE, new EventListener<AfterSizeEvent>() {
|
||||
@Override
|
||||
public void onEvent(AfterSizeEvent event) throws Exception {
|
||||
int width = event.getWidth()*90/100;
|
||||
int height = event.getHeight();
|
||||
//set normal height
|
||||
if (height == 0) {
|
||||
height = width * 85 / 100;
|
||||
chartPanel.setHeight(height+"px");
|
||||
}
|
||||
chartPanel.getChildren().clear();
|
||||
ChartModel model = new ChartModel();
|
||||
model.chart = chartModel;
|
||||
List<IChartRendererService> list = Service.locator().list(IChartRendererService.class).getServices();
|
||||
for (IChartRendererService renderer : list) {
|
||||
if (renderer.renderChart(chartPanel, width, height, model))
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return !empty;
|
||||
}
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
Component comp = event.getTarget();
|
||||
String eventName = event.getName();
|
||||
|
|
|
@ -23,8 +23,10 @@ import org.compiere.model.GridField;
|
|||
import org.compiere.model.MChart;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.zkoss.zk.ui.event.AfterSizeEvent;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Panel;
|
||||
import org.zkoss.zul.Panelchildren;
|
||||
|
||||
|
@ -40,6 +42,12 @@ public class WChartEditor extends WEditor
|
|||
private static final String[] LISTENER_EVENTS = {Events.ON_CLICK};
|
||||
|
||||
private MChart chartModel = null;
|
||||
|
||||
private int chartWidth;
|
||||
|
||||
private int chartHeight;
|
||||
|
||||
private Div chartDiv;
|
||||
|
||||
/** Logger */
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -54,21 +62,16 @@ public class WChartEditor extends WEditor
|
|||
}
|
||||
|
||||
private void createChart() {
|
||||
Panel panel = getComponent();
|
||||
if (panel.getPanelchildren() != null) {
|
||||
panel.getPanelchildren().getChildren().clear();
|
||||
} else {
|
||||
Panelchildren pc = new Panelchildren();
|
||||
panel.appendChild(pc);
|
||||
pc.setSclass("chart-field");
|
||||
}
|
||||
ChartModel model = new ChartModel();
|
||||
model.chart = chartModel;
|
||||
List<IChartRendererService> list = Service.locator().list(IChartRendererService.class).getServices();
|
||||
for (IChartRendererService renderer : list) {
|
||||
if (renderer.renderChart(panel.getPanelchildren(), 400, chartModel.getWinHeight(), model))
|
||||
break;
|
||||
}
|
||||
if (chartHeight > 0 && chartWidth > 0) {
|
||||
chartDiv.getChildren().clear();
|
||||
ChartModel model = new ChartModel();
|
||||
model.chart = chartModel;
|
||||
List<IChartRendererService> list = Service.locator().list(IChartRendererService.class).getServices();
|
||||
for (IChartRendererService renderer : list) {
|
||||
if (renderer.renderChart(chartDiv, chartWidth, chartHeight, model))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -77,10 +80,16 @@ public class WChartEditor extends WEditor
|
|||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
{
|
||||
Panelchildren pc = new Panelchildren();
|
||||
getComponent().appendChild(pc);
|
||||
pc.setSclass("chart-field");
|
||||
chartDiv = new Div();
|
||||
chartDiv.addEventListener(Events.ON_AFTER_SIZE, this);
|
||||
pc.appendChild(chartDiv);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String getDisplay()
|
||||
{
|
||||
return chartModel.get_Translation(MChart.COLUMNNAME_Name);
|
||||
|
@ -129,6 +138,30 @@ public class WChartEditor extends WEditor
|
|||
|
||||
public void onEvent(Event event) throws Exception
|
||||
{
|
||||
if (event instanceof AfterSizeEvent)
|
||||
{
|
||||
AfterSizeEvent ase = (AfterSizeEvent) event;
|
||||
chartWidth = ase.getWidth();
|
||||
if (chartWidth == 0) {
|
||||
chartWidth = 400;
|
||||
}
|
||||
chartHeight = 0;
|
||||
if (chartDiv.getStyle() != null && chartDiv.getStyle().contains("height"))
|
||||
chartHeight = ase.getHeight();
|
||||
//set default height
|
||||
if (chartHeight == 0) {
|
||||
chartHeight = chartModel.getWinHeight();
|
||||
chartDiv.setHeight(chartHeight+"px");
|
||||
}
|
||||
chartDiv.getChildren().clear();
|
||||
ChartModel model = new ChartModel();
|
||||
model.chart = chartModel;
|
||||
List<IChartRendererService> list = Service.locator().list(IChartRendererService.class).getServices();
|
||||
for (IChartRendererService renderer : list) {
|
||||
if (renderer.renderChart(chartDiv, chartWidth, chartHeight, model))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,4 +169,12 @@ public class WChartEditor extends WEditor
|
|||
super.dynamicDisplay();
|
||||
createChart();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#setFieldStyle(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected void setFieldStyle(String style) {
|
||||
chartDiv.setStyle(style);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.adempiere.webui.editor;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.dashboard.DashboardRunnable;
|
||||
import org.adempiere.webui.desktop.DashboardController;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.MDashboardContent;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Caption;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Panel;
|
||||
import org.zkoss.zul.Panelchildren;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public class WDashboardContentEditor extends WEditor {
|
||||
|
||||
private static final String ON_RENDER_CONTENT = "onRenderContent";
|
||||
private DashboardController dashboardController;
|
||||
private MDashboardContent content;
|
||||
private String fieldStyle;
|
||||
|
||||
private final static CLogger logger = CLogger.getCLogger(WDashboardContentEditor.class);
|
||||
|
||||
/**
|
||||
* @param comp
|
||||
* @param gridField
|
||||
*/
|
||||
public WDashboardContentEditor(GridField gridField, int windowNo) {
|
||||
super(new Panel(), gridField);
|
||||
dashboardController = new DashboardController();
|
||||
content = new MDashboardContent(Env.getCtx(), gridField.getPA_DashboardContent_ID(), null);
|
||||
Panelchildren pc = new Panelchildren();
|
||||
getComponent().appendChild(pc);
|
||||
|
||||
Caption caption = new Caption(content.get_Translation(MDashboardContent.COLUMNNAME_Name));
|
||||
getComponent().appendChild(caption);
|
||||
getComponent().addEventListener(ON_RENDER_CONTENT, this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.zkoss.zk.ui.event.EventListener#onEvent(org.zkoss.zk.ui.event.Event)
|
||||
*/
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
if (event.getName().equals(ON_RENDER_CONTENT)) {
|
||||
try {
|
||||
render();
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#setReadWrite(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setReadWrite(boolean readWrite) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#isReadWrite()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadWrite() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#setValue(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setValue(Object value) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#getValue()
|
||||
*/
|
||||
@Override
|
||||
public Object getValue() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#getDisplay()
|
||||
*/
|
||||
@Override
|
||||
public String getDisplay() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dynamicDisplay() {
|
||||
super.dynamicDisplay();
|
||||
Events.postEvent(ON_RENDER_CONTENT, getComponent(), null);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#getComponent()
|
||||
*/
|
||||
@Override
|
||||
public Panel getComponent() {
|
||||
return (Panel) super.getComponent();
|
||||
}
|
||||
|
||||
private void render() throws Exception {
|
||||
Panel panel = getComponent();
|
||||
panel.setSclass("dashboard-field-panel");
|
||||
Panelchildren pc = panel.getPanelchildren();
|
||||
pc.getChildren().clear();
|
||||
Div div = new Div();
|
||||
if (!Util.isEmpty(fieldStyle))
|
||||
div.setStyle(fieldStyle);
|
||||
|
||||
DashboardRunnable dashboardRunnable = new DashboardRunnable(panel.getDesktop());
|
||||
dashboardController.render(div, content, dashboardRunnable);
|
||||
if (!dashboardRunnable.isEmpty())
|
||||
dashboardRunnable.refreshDashboard(false);
|
||||
|
||||
pc.appendChild(div);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.adempiere.webui.editor.WEditor#setFieldStyle(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected void setFieldStyle(String style) {
|
||||
fieldStyle = style;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,377 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.editor.grid.selection;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
||||
import org.adempiere.model.MTabCustomization;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.ListHead;
|
||||
import org.adempiere.webui.component.ListHeader;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.GridTable;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Borderlayout;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.ListModel;
|
||||
import org.zkoss.zul.South;
|
||||
import org.zkoss.zul.ext.Selectable;
|
||||
|
||||
/**
|
||||
* Read only grid view for single or multi selection
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class GridTabSelectionListView extends Borderlayout
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 4145737989132101461L;
|
||||
|
||||
private static final int MIN_COLUMN_WIDTH = 100;
|
||||
|
||||
private static final int MAX_COLUMN_WIDTH = 300;
|
||||
|
||||
private Listbox listbox = null;
|
||||
|
||||
private int pageSize = 100;
|
||||
|
||||
private GridField[] gridField;
|
||||
private AbstractTableModel tableModel;
|
||||
|
||||
private int numColumns = 5;
|
||||
|
||||
private int windowNo;
|
||||
|
||||
private GridTab gridTab;
|
||||
|
||||
private boolean init;
|
||||
|
||||
private SimpleGridTableListModel listModel;
|
||||
|
||||
private GridTabSelectionListViewRenderer renderer;
|
||||
|
||||
private South south;
|
||||
|
||||
private Map<Integer, String> columnWidthMap;
|
||||
|
||||
private Label selectedLabel;
|
||||
|
||||
public GridTabSelectionListView(boolean multiple)
|
||||
{
|
||||
this(multiple, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param windowNo
|
||||
*/
|
||||
public GridTabSelectionListView(boolean multiple, int windowNo)
|
||||
{
|
||||
this.windowNo = windowNo;
|
||||
listbox = new Listbox();
|
||||
listbox.setCheckmark(true);
|
||||
listbox.setMultiple(multiple);
|
||||
south = new South();
|
||||
this.appendChild(south);
|
||||
|
||||
//default paging size
|
||||
pageSize = MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 100);
|
||||
listbox.setMold("paging");
|
||||
listbox.setPageSize(pageSize);
|
||||
|
||||
setStyle("min-height: 200px;");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param gridTab
|
||||
*/
|
||||
public void init(GridTab gridTab)
|
||||
{
|
||||
if (init) return;
|
||||
|
||||
setupFields(gridTab);
|
||||
|
||||
setupColumns();
|
||||
render();
|
||||
|
||||
this.init = true;
|
||||
}
|
||||
|
||||
private void setupFields(GridTab gridTab) {
|
||||
this.gridTab = gridTab;
|
||||
tableModel = gridTab.getTableModel();
|
||||
GridField[] tmpFields = ((GridTable)tableModel).getFields();
|
||||
MTabCustomization tabCustomization = MTabCustomization.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()), gridTab.getAD_Tab_ID(), null);
|
||||
if (tabCustomization != null && tabCustomization.getAD_Tab_Customization_ID() > 0
|
||||
&& tabCustomization.getCustom() != null && tabCustomization.getCustom().trim().length() > 0) {
|
||||
String custom = tabCustomization.getCustom().trim();
|
||||
String[] customComponent = custom.split(";");
|
||||
String[] fieldIds = customComponent[0].split("[,]");
|
||||
List<GridField> fieldList = new ArrayList<GridField>();
|
||||
for(String fieldIdStr : fieldIds) {
|
||||
fieldIdStr = fieldIdStr.trim();
|
||||
if (fieldIdStr.length() == 0) continue;
|
||||
int AD_Field_ID = Integer.parseInt(fieldIdStr);
|
||||
for(GridField gridField : tmpFields) {
|
||||
if (gridField.getAD_Field_ID() == AD_Field_ID) {
|
||||
fieldList.add(gridField);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
gridField = fieldList.toArray(new GridField[0]);
|
||||
if (customComponent.length == 2) {
|
||||
String[] widths = customComponent[1].split("[,]");
|
||||
for(int i = 0; i< gridField.length; i++) {
|
||||
columnWidthMap.put(gridField[i].getAD_Field_ID(), widths[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gridField = tmpFields;
|
||||
}
|
||||
numColumns = gridField.length;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isInit() {
|
||||
return init;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param gridTab
|
||||
*/
|
||||
public void activate(GridTab gridTab) {
|
||||
if (isInit())
|
||||
{
|
||||
if (this.gridTab != gridTab)
|
||||
{
|
||||
init = false;
|
||||
init(gridTab);
|
||||
}
|
||||
}
|
||||
else
|
||||
init(gridTab);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param gridTab
|
||||
*/
|
||||
public void refresh(GridTab gridTab) {
|
||||
gridTab.query(false, 0, 0);
|
||||
gridTab.getTableModel().fireTableDataChanged();
|
||||
|
||||
if (this.gridTab != gridTab)
|
||||
{
|
||||
init = false;
|
||||
init(gridTab);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set paging size
|
||||
* @param pageSize
|
||||
*/
|
||||
public void setPageSize(int pageSize)
|
||||
{
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
this.getChildren().clear();
|
||||
}
|
||||
|
||||
private void setupColumns()
|
||||
{
|
||||
if (init) return;
|
||||
|
||||
ListHead header = new ListHead();
|
||||
header.setSizable(true);
|
||||
|
||||
ListHeader selectionHeader = new ListHeader();
|
||||
selectionHeader.setWidth("40px");
|
||||
selectionHeader.setAlign("center");
|
||||
header.appendChild(selectionHeader);
|
||||
|
||||
Map<Integer, String> colnames = new HashMap<Integer, String>();
|
||||
int index = 0;
|
||||
for (int i = 0; i < numColumns; i++)
|
||||
{
|
||||
if (gridField[i].isDisplayed() && gridField[i].isDisplayedGrid())
|
||||
{
|
||||
colnames.put(index, gridField[i].getHeader());
|
||||
index++;
|
||||
ListHeader colHeader = new ListHeader();
|
||||
colHeader.setSort("auto");
|
||||
colHeader.setLabel(gridField[i].getHeader());
|
||||
colHeader.setAttribute("ColumnIndex", getColumnIndex(gridField[i].getColumnName()));
|
||||
if (columnWidthMap != null && columnWidthMap.get(gridField[i].getAD_Field_ID()) != null) {
|
||||
colHeader.setWidth(columnWidthMap.get(gridField[i].getAD_Field_ID()));
|
||||
} else {
|
||||
int l = DisplayType.isNumeric(gridField[i].getDisplayType())
|
||||
? 100 : gridField[i].getDisplayLength() * 9;
|
||||
if (gridField[i].getHeader().length() * 9 > l)
|
||||
l = gridField[i].getHeader().length() * 9;
|
||||
if (l > MAX_COLUMN_WIDTH)
|
||||
l = MAX_COLUMN_WIDTH;
|
||||
else if ( l < MIN_COLUMN_WIDTH)
|
||||
l = MIN_COLUMN_WIDTH;
|
||||
colHeader.setWidth(Integer.toString(l) + "px");
|
||||
}
|
||||
header.appendChild(colHeader);
|
||||
}
|
||||
}
|
||||
listbox.appendChild(header);
|
||||
}
|
||||
|
||||
private int getColumnIndex(String columnName) {
|
||||
for(int i = 0; i < gridTab.getTableModel().getColumnCount(); i++) {
|
||||
if (gridTab.getTableModel().getColumnName(i).equals(columnName)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private void render()
|
||||
{
|
||||
listbox.setStyle("min-height: 200px");
|
||||
listbox.setVflex(true);
|
||||
listbox.setHflex("1");
|
||||
listbox.setSizedByContent(true);
|
||||
|
||||
updateModel();
|
||||
|
||||
Center center = new Center();
|
||||
center.appendChild(listbox);
|
||||
this.appendChild(center);
|
||||
|
||||
selectedLabel = new Label(Msg.getMsg(Env.getCtx(), "Selected") + " : 0");
|
||||
south.appendChild(selectedLabel);
|
||||
}
|
||||
|
||||
private void updateModel() {
|
||||
listModel = new SimpleGridTableListModel((GridTable)tableModel, windowNo);
|
||||
listModel.setMultiple(listbox.isMultiple());
|
||||
renderer = new GridTabSelectionListViewRenderer(gridTab, windowNo);
|
||||
renderer.setListView(this);
|
||||
|
||||
listbox.setItemRenderer(renderer);
|
||||
listbox.setModel(listModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* deactive panel
|
||||
*/
|
||||
public void deactivate() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Listbox
|
||||
*/
|
||||
public Listbox getListbox() {
|
||||
return listbox;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param windowNo
|
||||
*/
|
||||
public void setWindowNo(int windowNo) {
|
||||
this.windowNo = windowNo;
|
||||
}
|
||||
|
||||
public GridField[] getFields() {
|
||||
return gridField;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.zkoss.zk.ui.AbstractComponent#addEventListener(int, java.lang.String, org.zkoss.zk.ui.event.EventListener)
|
||||
*/
|
||||
@Override
|
||||
public boolean addEventListener(int priority, String evtnm,
|
||||
EventListener<? extends Event> listener) {
|
||||
if (Events.ON_SELECT.equals(evtnm)) {
|
||||
return listbox.addEventListener(priority, evtnm, listener);
|
||||
} else {
|
||||
return super.addEventListener(priority, evtnm, listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSelectedIndices(int[] selectedIndices) {
|
||||
ListModel<Object> model = listbox.getModel();
|
||||
if (model != null && model instanceof Selectable) {
|
||||
Collection<Object> selection = new HashSet<Object>();
|
||||
@SuppressWarnings("unchecked")
|
||||
Selectable<Object> selectable = (Selectable<Object>) model;
|
||||
for (int selected : selectedIndices) {
|
||||
selection.add(model.getElementAt(selected));
|
||||
}
|
||||
|
||||
selectable.setSelection(selection);
|
||||
} else {
|
||||
listbox.setSelectedIndices(selectedIndices);
|
||||
}
|
||||
selectedLabel.setValue(Msg.getMsg(Env.getCtx(), "Selected") + " : " + selectedIndices.length);
|
||||
}
|
||||
|
||||
public void clearSelection() {
|
||||
ListModel<Object> model = listbox.getModel();
|
||||
if (model != null && model instanceof Selectable) {
|
||||
Selectable<?> selectable = (Selectable<?>) model;
|
||||
selectable.clearSelection();
|
||||
} else {
|
||||
listbox.clearSelection();
|
||||
}
|
||||
selectedLabel.setValue(Msg.getMsg(Env.getCtx(), "Selected") + " : 0");
|
||||
}
|
||||
|
||||
public void setSelectedIndex(int selected) {
|
||||
ListModel<Object> model = listbox.getModel();
|
||||
if (model != null && model instanceof Selectable) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Selectable<Object> selectable = (Selectable<Object>) model;
|
||||
Collection<Object> selection = new HashSet<Object>();
|
||||
selection.add(model.getElementAt(selected));
|
||||
selectable.setSelection(selection);
|
||||
selectedLabel.setValue(Msg.getMsg(Env.getCtx(), "Selected") + " : " + selection.size());
|
||||
} else {
|
||||
listbox.setSelectedIndex(selected);
|
||||
selectedLabel.setValue(Msg.getMsg(Env.getCtx(), "Selected") + " : " + listbox.getSelectedCount());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,257 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (C) 2016 Trek Global Inc. *
|
||||
* Copyright (C) 2016 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*******************************************************************************/
|
||||
package org.adempiere.webui.editor.grid.selection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.adempiere.webui.component.ListCell;
|
||||
import org.adempiere.webui.component.ListItem;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WebEditorFactory;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
import org.zkoss.zul.ListitemRendererExt;
|
||||
import org.zkoss.zul.RendererCtrl;
|
||||
|
||||
/**
|
||||
* ListItem renderer for GridTabSelectionListView
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public class GridTabSelectionListViewRenderer implements ListitemRenderer<GridTableRow>, ListitemRendererExt, RendererCtrl {
|
||||
|
||||
private static final int MAX_TEXT_LENGTH = 60;
|
||||
private GridTab gridTab;
|
||||
@SuppressWarnings("unused")
|
||||
private int windowNo;
|
||||
private Map<GridField, WEditor> editors = new HashMap<GridField, WEditor>();
|
||||
private GridTabSelectionListView listView;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param gridTab
|
||||
* @param windowNo
|
||||
*/
|
||||
public GridTabSelectionListViewRenderer(GridTab gridTab, int windowNo) {
|
||||
this.gridTab = gridTab;
|
||||
this.windowNo = windowNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param listitem
|
||||
* @param data
|
||||
* @see ListitemRenderer#render(Listitem, Object)
|
||||
*/
|
||||
@Override
|
||||
public void render(Listitem listitem, GridTableRow data, int index) throws Exception {
|
||||
//don't render if not visible
|
||||
if (listView != null && !listView.isVisible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
GridField[] listViewFields = listView.getFields();
|
||||
int columnCount = listViewFields.length;
|
||||
|
||||
GridField[] gridTabFields = gridTab.getFields();
|
||||
boolean isGridViewCustomized = gridTabFields.length != listViewFields.length;
|
||||
if (!isGridViewCustomized) {
|
||||
for(int i = 0; i < gridTabFields.length; i++) {
|
||||
if (listViewFields[i].getAD_Field_ID() != gridTabFields[i].getAD_Field_ID()) {
|
||||
isGridViewCustomized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(Component c = listitem.getParent(); c != null; c = c.getParent()) {
|
||||
if (!c.isVisible())
|
||||
return;
|
||||
}
|
||||
Object[] values = null;
|
||||
if (!isGridViewCustomized) {
|
||||
values = data.getValues();
|
||||
} else {
|
||||
List<Object> dataList = new ArrayList<Object>();
|
||||
for(GridField gridField : listViewFields) {
|
||||
for(int i = 0; i < gridTabFields.length; i++) {
|
||||
if (gridField.getAD_Field_ID() == gridTabFields[i].getAD_Field_ID()) {
|
||||
dataList.add(data.getValues()[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
values = dataList.toArray(new Object[0]);
|
||||
}
|
||||
|
||||
Listcell selectionCell = new Listcell();
|
||||
listitem.appendChild(selectionCell);
|
||||
|
||||
for (int i = 0; i < columnCount; i++) {
|
||||
if (!listViewFields[i].isDisplayedGrid()) {
|
||||
continue;
|
||||
}
|
||||
if (!editors.containsKey(listViewFields[i])) {
|
||||
WEditor editor = null;
|
||||
int displayType = listViewFields[i].getDisplayType();
|
||||
if (displayType != DisplayType.YesNo && displayType != DisplayType.Image && displayType != DisplayType.Chart &&
|
||||
displayType != DisplayType.Button && displayType != DisplayType.DashboardContent) {
|
||||
editor = WebEditorFactory.getEditor(listViewFields[i], true);
|
||||
editor.setReadWrite(false);
|
||||
}
|
||||
editors.put(listViewFields[i], editor);
|
||||
}
|
||||
|
||||
Listcell cell = renderCell(listViewFields[i], values[i]);
|
||||
cell.setParent(listitem);
|
||||
}
|
||||
}
|
||||
|
||||
private Listcell renderCell(GridField gridField, Object value) {
|
||||
Listcell cell;
|
||||
if (gridField.getDisplayType() == DisplayType.YesNo) {
|
||||
cell = new Listcell("", null);
|
||||
cell.setStyle("text-align:center");
|
||||
WEditor editor = WebEditorFactory.getEditor(gridField, true);
|
||||
editor.setReadWrite(false);
|
||||
editor.setValue(value);
|
||||
cell.appendChild(editor.getComponent());
|
||||
} else if (gridField.getDisplayType() == DisplayType.Image || gridField.getDisplayType() == DisplayType.Chart) {
|
||||
WEditor editor = WebEditorFactory.getEditor(gridField, true);
|
||||
editor.setReadWrite(false);
|
||||
editor.setValue(value);
|
||||
cell = new Listcell("", null);
|
||||
cell.appendChild(editor.getComponent());
|
||||
} else {
|
||||
String text = getDisplayText(gridField, value);
|
||||
String display = text;
|
||||
if (text != null && text.length() > MAX_TEXT_LENGTH)
|
||||
display = text.substring(0, MAX_TEXT_LENGTH - 3) + "...";
|
||||
cell = new Listcell(display, null);
|
||||
if (text != null && text.length() > MAX_TEXT_LENGTH)
|
||||
cell.setTooltiptext(text);
|
||||
if (DisplayType.isNumeric(gridField.getDisplayType())) {
|
||||
cell.setStyle("text-align:right");
|
||||
} else if (gridField.getDisplayType() == DisplayType.Image) {
|
||||
cell.setStyle("text-align:center");
|
||||
}
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ListitemRendererExt#getControls()
|
||||
*/
|
||||
public int getControls() {
|
||||
return DETACH_ON_RENDER;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param item
|
||||
* @see ListitemRendererExt#newListcell(Listitem)
|
||||
*/
|
||||
public Listcell newListcell(Listitem item) {
|
||||
ListCell listCell = new ListCell();
|
||||
listCell.applyProperties();
|
||||
listCell.setParent(item);
|
||||
return listCell;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param listbox
|
||||
* @see ListitemRendererExt#newListitem(Listbox)
|
||||
*/
|
||||
public Listitem newListitem(Listbox listbox) {
|
||||
ListItem item = new ListItem();
|
||||
item.applyProperties();
|
||||
return item;
|
||||
}
|
||||
|
||||
private String getDisplayText(GridField gridField, Object value)
|
||||
{
|
||||
if (value == null)
|
||||
return "";
|
||||
|
||||
if (gridField.isEncryptedField())
|
||||
{
|
||||
return "********";
|
||||
}
|
||||
else if (DisplayType.Button == gridField.getDisplayType())
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
WEditor editor = editors.get(gridField);
|
||||
if (editor != null)
|
||||
return editor.getDisplayTextForGridView(value);
|
||||
else
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is renderer initialize
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isInitialize() {
|
||||
return !editors.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return active editor list
|
||||
*/
|
||||
public List<WEditor> getEditors() {
|
||||
List<WEditor> editorList = new ArrayList<WEditor>();
|
||||
if (!editors.isEmpty())
|
||||
editorList.addAll(editors.values());
|
||||
|
||||
return editorList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see RendererCtrl#doCatch(Throwable)
|
||||
*/
|
||||
public void doCatch(Throwable ex) throws Throwable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see RendererCtrl#doFinally()
|
||||
*/
|
||||
public void doFinally() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see RendererCtrl#doTry()
|
||||
*/
|
||||
public void doTry() {
|
||||
}
|
||||
|
||||
public void setListView (GridTabSelectionListView listView) {
|
||||
this.listView = listView;
|
||||
}
|
||||
|
||||
public GridTabSelectionListView getListView() {
|
||||
return listView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.adempiere.webui.editor.grid.selection;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public class GridTableRow {
|
||||
|
||||
private int id;
|
||||
private Object[] values;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public GridTableRow(int id, Object[] values) {
|
||||
this.id = id;
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Object[] getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof GridTableRow && obj != null) {
|
||||
GridTableRow that = (GridTableRow) obj;
|
||||
if (this.id > 0 && that.id == this.id)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (C) 2016 Trek Global Inc. *
|
||||
* Copyright (C) 2016 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*******************************************************************************/
|
||||
package org.adempiere.webui.editor.grid.selection;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import javax.swing.event.TableModelEvent;
|
||||
import javax.swing.event.TableModelListener;
|
||||
|
||||
import org.adempiere.webui.util.SortComparator;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTable;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zul.AbstractListModel;
|
||||
import org.zkoss.zul.ListModel;
|
||||
import org.zkoss.zul.ListitemComparator;
|
||||
import org.zkoss.zul.event.ListDataEvent;
|
||||
import org.zkoss.zul.ext.Sortable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class SimpleGridTableListModel extends AbstractListModel<GridTableRow> implements TableModelListener, Sortable<Object> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 698185856751242764L;
|
||||
private GridTable tableModel;
|
||||
@SuppressWarnings("unused")
|
||||
private GridField[] gridField;
|
||||
@SuppressWarnings("unused")
|
||||
private int windowNo;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tableModel
|
||||
* @param windowNo
|
||||
*/
|
||||
public SimpleGridTableListModel(GridTable tableModel, int windowNo) {
|
||||
this.tableModel = tableModel;
|
||||
this.windowNo = windowNo;
|
||||
gridField = tableModel.getFields();
|
||||
tableModel.addTableModelListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rowIndex
|
||||
* @see ListModel#getElementAt(int)
|
||||
*/
|
||||
public GridTableRow getElementAt(int rowIndex) {
|
||||
GridTableRow row = null;
|
||||
int columnCount = tableModel.getColumnCount();
|
||||
Object[] values = new Object[columnCount];
|
||||
if (rowIndex < tableModel.getRowCount()) {
|
||||
for (int i = 0; i < columnCount; i++) {
|
||||
values[i] = tableModel.getValueAt(rowIndex, i);
|
||||
}
|
||||
row = new GridTableRow(tableModel.getKeyID(rowIndex), values);
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get total number of rows
|
||||
* @return int
|
||||
* @see ListModel#getSize()
|
||||
*/
|
||||
public int getSize() {
|
||||
return tableModel.getRowCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Request components that attached to this model to re-render a row.
|
||||
* @param row
|
||||
*/
|
||||
public void updateComponent(int row) {
|
||||
updateComponent(row, row);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request components that attached to this model to re-render a range of row.
|
||||
* @param fromRow
|
||||
* @param toRow
|
||||
*/
|
||||
public void updateComponent(int fromRow, int toRow) {
|
||||
//must run from the UI thread
|
||||
if (Executions.getCurrent() != null) {
|
||||
fireEvent(ListDataEvent.CONTENTS_CHANGED, fromRow, toRow);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cmpr
|
||||
* @param ascending
|
||||
* @see ListModelExt#sort(Comparator, boolean)
|
||||
*/
|
||||
public void sort(Comparator<Object> cmpr, boolean ascending) {
|
||||
//use default zk comparator
|
||||
if (cmpr instanceof ListitemComparator) {
|
||||
ListitemComparator lic = (ListitemComparator) cmpr;
|
||||
Integer index = (Integer) lic.getListheader().getAttribute("ColumnIndex");
|
||||
if (index != null && index.intValue() >= 0)
|
||||
tableModel.sort(index.intValue(), ascending);
|
||||
else
|
||||
tableModel.sort(lic.getListheader().getColumnIndex(), ascending);
|
||||
} else if (cmpr instanceof SortComparator) {
|
||||
SortComparator sc = (SortComparator)cmpr;
|
||||
tableModel.sort(sc.getColumnIndex(), ascending);
|
||||
}
|
||||
fireEvent(ListDataEvent.CONTENTS_CHANGED, -1, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param e
|
||||
* @see TableModelListener#tableChanged(TableModelEvent)
|
||||
*/
|
||||
public void tableChanged(TableModelEvent e) {
|
||||
if (Executions.getCurrent() != null) {
|
||||
if (e.getType() == TableModelEvent.DELETE)
|
||||
{
|
||||
fireEvent(ListDataEvent.INTERVAL_REMOVED, e.getFirstRow(), e.getLastRow());
|
||||
}
|
||||
else if (e.getType() == TableModelEvent.INSERT)
|
||||
{
|
||||
fireEvent(ListDataEvent.INTERVAL_ADDED, e.getFirstRow(), e.getLastRow());
|
||||
}
|
||||
else if (e.getLastRow() == Integer.MAX_VALUE)
|
||||
{
|
||||
fireEvent(ListDataEvent.CONTENTS_CHANGED, -1, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fireEvent(ListDataEvent.CONTENTS_CHANGED, e.getFirstRow(), e.getLastRow());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortDirection(Comparator<Object> cmpr) {
|
||||
return "natural";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,280 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (C) 2016 Trek Global Inc. *
|
||||
* Copyright (C) 2016 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*******************************************************************************/
|
||||
|
||||
package org.adempiere.webui.editor.grid.selection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.adempiere.webui.ValuePreference;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WEditorPopupMenu;
|
||||
import org.adempiere.webui.event.ContextMenuEvent;
|
||||
import org.adempiere.webui.event.ContextMenuListener;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.window.WFieldRecordInfo;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.GridTabVO;
|
||||
import org.compiere.model.GridWindow;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.ListModel;
|
||||
import org.zkoss.zul.Menuitem;
|
||||
import org.zkoss.zul.ext.Selectable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public class WGridTabMultiSelectionEditor extends WEditor implements ContextMenuListener
|
||||
{
|
||||
private static final String[] LISTENER_EVENTS = {Events.ON_SELECT};
|
||||
|
||||
private Object oldValue;
|
||||
|
||||
private boolean tableEditor = false;
|
||||
|
||||
private GridTab listViewGridTab = null;
|
||||
|
||||
private String currentLinkValue = null;
|
||||
|
||||
private boolean readWrite;
|
||||
|
||||
public WGridTabMultiSelectionEditor(GridField gridField) {
|
||||
this(gridField, false);
|
||||
}
|
||||
|
||||
public WGridTabMultiSelectionEditor(GridField gridField, boolean tableEditor)
|
||||
{
|
||||
super(tableEditor ? new Textbox() : new GridTabSelectionListView(true, gridField.getWindowNo()), gridField);
|
||||
this.tableEditor = tableEditor;
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlBasedComponent getComponent() {
|
||||
return (HtmlBasedComponent) component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadWrite() {
|
||||
return readWrite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadWrite(boolean readWrite) {
|
||||
if (getComponent() instanceof GridTabSelectionListView) {
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
listView.getListbox().setEnabled(readWrite);
|
||||
}
|
||||
this.readWrite = readWrite;
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
if (tableEditor)
|
||||
{
|
||||
((Textbox)getComponent()).setReadonly(true);
|
||||
}
|
||||
else if (gridField != null && gridField.getGridTab() != null)
|
||||
{
|
||||
int AD_Tab_ID = gridField.getIncluded_Tab_ID();
|
||||
GridWindow gridWindow = gridField.getGridTab().getGridWindow();
|
||||
int count = gridWindow.getTabCount();
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
GridTab t = gridWindow.getTab(i);
|
||||
if (t.getAD_Tab_ID() == AD_Tab_ID)
|
||||
{
|
||||
GridTabVO vo = t.getVO();
|
||||
listViewGridTab = new GridTab(vo, gridWindow);
|
||||
String lcn = t.getLinkColumnName();
|
||||
if (Util.isEmpty(lcn)) {
|
||||
t.setLinkColumnName(null);
|
||||
lcn = t.getLinkColumnName();
|
||||
}
|
||||
listViewGridTab.setLinkColumnName(lcn);
|
||||
listView.init(listViewGridTab);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
|
||||
Menuitem clear = new Menuitem(Msg.getMsg(Env.getCtx(), "ClearSelection"), null);
|
||||
clear.setAttribute("EVENT", "onClearSelection");
|
||||
clear.addEventListener(Events.ON_CLICK, popupMenu);
|
||||
popupMenu.appendChild(clear);
|
||||
|
||||
listView.getListbox().setContext(popupMenu);
|
||||
}
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
{
|
||||
if (Events.ON_SELECT.equals(event.getName()))
|
||||
{
|
||||
Object newValue = null;
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
Listbox listbox = listView.getListbox();
|
||||
ListModel<GridTableRow> model = listbox.getModel();
|
||||
if (model != null && model instanceof Selectable<?>)
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
@SuppressWarnings("unchecked")
|
||||
Selectable<GridTableRow> selectable = (Selectable<GridTableRow>) model;
|
||||
Set<GridTableRow> selection = selectable.getSelection();
|
||||
for(GridTableRow row : selection)
|
||||
{
|
||||
if (buffer.length() > 0)
|
||||
buffer.append(",");
|
||||
buffer.append(row.hashCode());
|
||||
}
|
||||
newValue = buffer.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
int[] selection = listView.getListbox().getSelectedIndices();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for(int rowIndex : selection)
|
||||
{
|
||||
int id = listViewGridTab.getKeyID(rowIndex);
|
||||
if (buffer.length() > 0)
|
||||
buffer.append(",");
|
||||
buffer.append(id);
|
||||
}
|
||||
newValue = buffer.toString();
|
||||
}
|
||||
if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
|
||||
return;
|
||||
}
|
||||
if (oldValue == null && newValue == null) {
|
||||
return;
|
||||
}
|
||||
Object prevValue = oldValue;
|
||||
oldValue = newValue;
|
||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), prevValue, newValue);
|
||||
super.fireValueChange(changeEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplay()
|
||||
{
|
||||
return oldValue != null ? oldValue.toString() : "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue()
|
||||
{
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(Object value)
|
||||
{
|
||||
if (value == null && oldValue == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (value != null && oldValue != null && value.equals(oldValue))
|
||||
{
|
||||
return;
|
||||
}
|
||||
oldValue = value;
|
||||
if (!tableEditor)
|
||||
updateSlectedIndices();
|
||||
else
|
||||
((Textbox)getComponent()).setValue(oldValue != null ? oldValue.toString() : "");
|
||||
}
|
||||
|
||||
private void updateSlectedIndices() {
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
if (!Util.isEmpty((String)oldValue))
|
||||
{
|
||||
List<Integer> list = new ArrayList<Integer>();
|
||||
String[] selected = ((String)oldValue).split("[,]");
|
||||
for(String s : selected) {
|
||||
int id = Integer.parseInt(s);
|
||||
for(int i = 0; i < listViewGridTab.getRowCount(); i++) {
|
||||
if (listViewGridTab.getKeyID(i) == id) {
|
||||
list.add(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int[] selectedIndices = new int[list.size()];
|
||||
for(int i = 0; i < selectedIndices.length; i++)
|
||||
{
|
||||
selectedIndices[i] = list.get(i);
|
||||
}
|
||||
listView.setSelectedIndices(selectedIndices);
|
||||
}
|
||||
else
|
||||
{
|
||||
listView.clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getEvents()
|
||||
{
|
||||
return LISTENER_EVENTS;
|
||||
}
|
||||
|
||||
public void onMenu(ContextMenuEvent evt)
|
||||
{
|
||||
if (WEditorPopupMenu.PREFERENCE_EVENT.equals(evt.getContextEvent()))
|
||||
{
|
||||
if (isShowPreference())
|
||||
ValuePreference.start (getComponent(), this.getGridField(), getValue());
|
||||
return;
|
||||
}
|
||||
else if (WEditorPopupMenu.CHANGE_LOG_EVENT.equals(evt.getContextEvent()))
|
||||
{
|
||||
WFieldRecordInfo.start(gridField);
|
||||
}
|
||||
else if ("onClearSelection".equals(evt.getContextEvent()))
|
||||
{
|
||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, null);
|
||||
super.fireValueChange(changeEvent);
|
||||
oldValue = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dynamicDisplay() {
|
||||
if (!tableEditor && listViewGridTab != null) {
|
||||
String name = listViewGridTab.getLinkColumnName();
|
||||
String linkValue = Env.getContext(Env.getCtx(), gridField.getWindowNo(), name);
|
||||
if ((currentLinkValue == null && linkValue != null)
|
||||
|| (currentLinkValue != null && linkValue == null)
|
||||
|| (currentLinkValue != null && linkValue != null && !currentLinkValue.equals(linkValue)))
|
||||
{
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
listView.refresh(listViewGridTab);
|
||||
updateSlectedIndices();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (C) 2016 Trek Global Inc. *
|
||||
* Copyright (C) 2016 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*******************************************************************************/
|
||||
|
||||
package org.adempiere.webui.editor.grid.selection;
|
||||
|
||||
import org.adempiere.webui.ValuePreference;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WEditorPopupMenu;
|
||||
import org.adempiere.webui.event.ContextMenuEvent;
|
||||
import org.adempiere.webui.event.ContextMenuListener;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.window.WFieldRecordInfo;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.GridTabVO;
|
||||
import org.compiere.model.GridWindow;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Menuitem;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public class WGridTabSingleSelectionEditor extends WEditor implements ContextMenuListener
|
||||
{
|
||||
private static final String[] LISTENER_EVENTS = {Events.ON_SELECT};
|
||||
|
||||
private Object oldValue;
|
||||
|
||||
private boolean tableEditor = false;
|
||||
|
||||
private GridTab listViewGridTab = null;
|
||||
|
||||
private String currentLinkValue = null;
|
||||
|
||||
private boolean readWrite;
|
||||
|
||||
public WGridTabSingleSelectionEditor(GridField gridField) {
|
||||
this(gridField, false);
|
||||
}
|
||||
|
||||
public WGridTabSingleSelectionEditor(GridField gridField, boolean tableEditor)
|
||||
{
|
||||
super(tableEditor ? new Textbox() : new GridTabSelectionListView(false, gridField.getWindowNo()), gridField);
|
||||
this.tableEditor = tableEditor;
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlBasedComponent getComponent() {
|
||||
return (HtmlBasedComponent) component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadWrite() {
|
||||
return readWrite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadWrite(boolean readWrite) {
|
||||
if (getComponent() instanceof GridTabSelectionListView) {
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
listView.getListbox().setEnabled(readWrite);
|
||||
}
|
||||
this.readWrite = readWrite;
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
if (tableEditor)
|
||||
{
|
||||
((Textbox)getComponent()).setReadonly(true);
|
||||
}
|
||||
else if (gridField != null && gridField.getGridTab() != null)
|
||||
{
|
||||
int AD_Tab_ID = gridField.getIncluded_Tab_ID();
|
||||
GridWindow gridWindow = gridField.getGridTab().getGridWindow();
|
||||
int count = gridWindow.getTabCount();
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
GridTab t = gridWindow.getTab(i);
|
||||
if (t.getAD_Tab_ID() == AD_Tab_ID)
|
||||
{
|
||||
GridTabVO vo = t.getVO();
|
||||
listViewGridTab = new GridTab(vo, gridWindow);
|
||||
String lcn = t.getLinkColumnName();
|
||||
if (Util.isEmpty(lcn)) {
|
||||
t.setLinkColumnName(null);
|
||||
lcn = t.getLinkColumnName();
|
||||
}
|
||||
listViewGridTab.setLinkColumnName(lcn);
|
||||
listView.init(listViewGridTab);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
|
||||
Menuitem clear = new Menuitem(Msg.getMsg(Env.getCtx(), "ClearSelection"), null);
|
||||
clear.setAttribute("EVENT", "onClearSelection");
|
||||
clear.addEventListener(Events.ON_CLICK, popupMenu);
|
||||
popupMenu.appendChild(clear);
|
||||
|
||||
listView.getListbox().setContext(popupMenu);
|
||||
}
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
{
|
||||
if (Events.ON_SELECT.equals(event.getName()))
|
||||
{
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
int selected = listView.getListbox().getSelectedIndex();
|
||||
Object newValue = selected >= 0 ? Integer.toString(listViewGridTab.getKeyID(selected)) : null;
|
||||
if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
|
||||
return;
|
||||
}
|
||||
if (oldValue == null && newValue == null) {
|
||||
return;
|
||||
}
|
||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
|
||||
super.fireValueChange(changeEvent);
|
||||
oldValue = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplay()
|
||||
{
|
||||
return oldValue != null ? oldValue.toString() : "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue()
|
||||
{
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(Object value)
|
||||
{
|
||||
if (value == null && oldValue == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (value != null && oldValue != null && value.equals(oldValue))
|
||||
{
|
||||
return;
|
||||
}
|
||||
oldValue = value;
|
||||
if (!tableEditor)
|
||||
updateSlectedIndices();
|
||||
else
|
||||
((Textbox)getComponent()).setValue(oldValue != null ? oldValue.toString() : "");
|
||||
}
|
||||
|
||||
private void updateSlectedIndices() {
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
listView.clearSelection();
|
||||
if (!Util.isEmpty((String)oldValue))
|
||||
{
|
||||
int id = Integer.parseInt((String) oldValue);
|
||||
for(int i = 0; i < listViewGridTab.getRowCount(); i++) {
|
||||
if (listViewGridTab.getKeyID(i) == id) {
|
||||
listView.setSelectedIndex(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getEvents()
|
||||
{
|
||||
return LISTENER_EVENTS;
|
||||
}
|
||||
|
||||
public void onMenu(ContextMenuEvent evt)
|
||||
{
|
||||
if (WEditorPopupMenu.PREFERENCE_EVENT.equals(evt.getContextEvent()))
|
||||
{
|
||||
if (isShowPreference())
|
||||
ValuePreference.start (getComponent(), this.getGridField(), getValue());
|
||||
return;
|
||||
}
|
||||
else if (WEditorPopupMenu.CHANGE_LOG_EVENT.equals(evt.getContextEvent()))
|
||||
{
|
||||
WFieldRecordInfo.start(gridField);
|
||||
}
|
||||
else if ("onClearSelection".equals(evt.getContextEvent()))
|
||||
{
|
||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, null);
|
||||
super.fireValueChange(changeEvent);
|
||||
oldValue = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dynamicDisplay() {
|
||||
if (!tableEditor && listViewGridTab != null) {
|
||||
String name = listViewGridTab.getLinkColumnName();
|
||||
String linkValue = Env.getContext(Env.getCtx(), gridField.getWindowNo(), name);
|
||||
if ((currentLinkValue == null && linkValue != null)
|
||||
|| (currentLinkValue != null && linkValue == null)
|
||||
|| (currentLinkValue != null && linkValue != null && !currentLinkValue.equals(linkValue)))
|
||||
{
|
||||
GridTabSelectionListView listView = (GridTabSelectionListView) getComponent();
|
||||
listView.refresh(listViewGridTab);
|
||||
updateSlectedIndices();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ import org.adempiere.webui.editor.WAssignmentEditor;
|
|||
import org.adempiere.webui.editor.WBinaryEditor;
|
||||
import org.adempiere.webui.editor.WButtonEditor;
|
||||
import org.adempiere.webui.editor.WChartEditor;
|
||||
import org.adempiere.webui.editor.WDashboardContentEditor;
|
||||
import org.adempiere.webui.editor.WDateEditor;
|
||||
import org.adempiere.webui.editor.WDatetimeEditor;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
|
@ -37,6 +38,8 @@ import org.adempiere.webui.editor.WTimeEditor;
|
|||
import org.adempiere.webui.editor.WUnknownEditor;
|
||||
import org.adempiere.webui.editor.WUrlEditor;
|
||||
import org.adempiere.webui.editor.WYesNoEditor;
|
||||
import org.adempiere.webui.editor.grid.selection.WGridTabMultiSelectionEditor;
|
||||
import org.adempiere.webui.editor.grid.selection.WGridTabSingleSelectionEditor;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.util.DisplayType;
|
||||
|
@ -126,6 +129,12 @@ public class DefaultEditorFactory implements IEditorFactory {
|
|||
editor = new WChartEditor(gridField, (gridTab == null ? 0 : gridTab.getWindowNo()));
|
||||
}
|
||||
|
||||
/** Dashboard Content */
|
||||
else if(displayType == DisplayType.DashboardContent)
|
||||
{
|
||||
editor = new WDashboardContentEditor(gridField, (gridTab == null ? 0 : gridTab.getWindowNo()));
|
||||
}
|
||||
|
||||
/** Button */
|
||||
else if (displayType == DisplayType.Button)
|
||||
{
|
||||
|
@ -182,6 +191,14 @@ public class DefaultEditorFactory implements IEditorFactory {
|
|||
{
|
||||
editor = new WAssignmentEditor(gridField);
|
||||
}
|
||||
else if (displayType == DisplayType.SingleSelectionGrid)
|
||||
{
|
||||
editor = new WGridTabSingleSelectionEditor(gridField, tableEditor);
|
||||
}
|
||||
else if (displayType == DisplayType.MultipleSelectionGrid)
|
||||
{
|
||||
editor = new WGridTabMultiSelectionEditor(gridField, tableEditor);
|
||||
}
|
||||
else
|
||||
{
|
||||
editor = new WUnknownEditor(gridField);
|
||||
|
|
|
@ -96,6 +96,11 @@ public class DefaultFeedbackService implements IFeedbackService {
|
|||
showEmailDialog(imageBytes);
|
||||
}
|
||||
|
||||
protected String getFeedbackSubject() {
|
||||
String feedBackHeader = Msg.getMsg(Env.getCtx(), "FeedBackHeader");
|
||||
return Env.parseContext(Env.getCtx(), 0, feedBackHeader, false, false);
|
||||
}
|
||||
|
||||
protected void showEmailDialog(byte[] imageBytes) {
|
||||
DataSource ds = FeedbackManager.getLogAttachment(errorOnly);
|
||||
|
||||
|
@ -103,7 +108,7 @@ public class DefaultFeedbackService implements IFeedbackService {
|
|||
Msg.getMsg(Env.getCtx(), "EMailSupport"),
|
||||
MUser.get(Env.getCtx()),
|
||||
"", // to
|
||||
MSystem.get(Env.getCtx()).getName() + " " + Msg.getMsg(Env.getCtx(), "TraceInfo"),
|
||||
getFeedbackSubject(),
|
||||
"", ds);
|
||||
dialog.setAttribute(Window.MODE_KEY, Mode.OVERLAPPED);
|
||||
|
||||
|
|
|
@ -187,3 +187,7 @@ span.grid-combobox-editor {
|
|||
cursor: default;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dashboard-field-panel.z-panel, .dashboard-field-panel.z-panel > .z-panel-body, .dashboard-field-panel.z-panel > .z-panel-body > .z-panelchildren {
|
||||
overflow: visible;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue