diff --git a/.hgignore b/.hgignore index af10198715..43f03aaa7b 100644 --- a/.hgignore +++ b/.hgignore @@ -59,6 +59,7 @@ syntax: regexp ^lib/plugins$ ^plugins/.*\.class$ ^adempiere-local\.properties$ +^org.adempiere.extend/test.properties$ ^org\.adempiere\.ui/.*\.class$ ^org\.adempiere\.ui/bin/.*\.css$ ^org\.adempiere\.pipo.handlers/.*\.class$ diff --git a/migration/360lts-release/oracle/927_IDEMPIERE-388.sql b/migration/360lts-release/oracle/927_IDEMPIERE-388.sql new file mode 100644 index 0000000000..28c14e9664 --- /dev/null +++ b/migration/360lts-release/oracle/927_IDEMPIERE-388.sql @@ -0,0 +1,66 @@ +-- IDEMPIERE-388 Enable port and TLS configuration for email +-- Oct 3, 2012 10:55:41 AM COT +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('SMTPPort',200170,'D','SMTP Port','SMTP Port Number','SMTP Port','20c841ef-0f1c-4482-87a7-0e882ae1e0de',0,TO_DATE('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y') +; + +-- Oct 3, 2012 10:55:41 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200170 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 3, 2012 10:58:59 AM COT +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200580,'D','N','N','N',0,'N',10,'N',11,'N','N',200170,'N','Y','e463ed28-f6d5-4150-b7bd-49cdc6e7e03b','N','Y','N','SMTPPort','SMTP Port Number','SMTP Port','Y',0,TO_DATE('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,0,0) +; + +-- Oct 3, 2012 10:58:59 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200580 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 3, 2012 11:00:50 AM COT +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSecureSMTP',200171,'D','SMTP SSL/TLS','Use SSL/TLS for SMTP','SMTP SSL/TLS','08c7ca81-950d-4f5f-b0fd-99da440cd1e2',0,TO_DATE('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y') +; + +-- Oct 3, 2012 11:00:50 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200171 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 3, 2012 11:02:40 AM COT +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200581,'D','N','N','N',0,'N',1,'N',20,'N','N',200171,'N','Y','1bf7924e-8543-481d-972d-32ac400ce786','N','Y','N','IsSecureSMTP','Use SSL/TLS for SMTP','N','SMTP SSL/TLS','Y',0,TO_DATE('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,0,0) +; + +-- Oct 3, 2012 11:02:40 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200581 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 3, 2012 11:24:52 AM COT +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'N','N',200580,113,'Y',200594,'N',119,'D','SMTP Port Number','SMTP Port','Y','N','e54979c8-39fc-4ac5-8fd0-5232834a070c',0,0,TO_DATE('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),0,0,TO_DATE('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),'Y','Y',113,1,1,1) +; + +-- Oct 3, 2012 11:24:52 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200594 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 3, 2012 11:27:59 AM COT +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'Y','N',200581,115,'Y',200595,'N',119,'D','Use SSL/TLS for SMTP','SMTP SSL/TLS','Y','N','dbef5a74-3dfa-4246-8b76-04b924ec869c',0,0,TO_DATE('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),0,0,TO_DATE('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),'Y','Y',115,5,2,1) +; + +-- Oct 3, 2012 11:27:59 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200595 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 8, 2012 10:15:49 PM COT +-- IDEMPIERE-388 Enable port and TLS configuration for email +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-10-08 22:15:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200581 +; + +-- Oct 8, 2012 10:15:51 PM COT +-- IDEMPIERE-388 Enable port and TLS configuration for email +ALTER TABLE AD_Client ADD IsSecureSMTP CHAR(1) DEFAULT 'N' CHECK (IsSecureSMTP IN ('Y','N')) NOT NULL +; + +-- Oct 8, 2012 10:16:24 PM COT +-- IDEMPIERE-388 Enable port and TLS configuration for email +ALTER TABLE AD_Client ADD SMTPPort NUMBER(10) DEFAULT NULL +; + +SELECT register_migration_script('927_IDEMPIERE-388.sql') FROM dual +; diff --git a/migration/360lts-release/oracle/929_IDEMPIERE-458.sql b/migration/360lts-release/oracle/929_IDEMPIERE-458.sql new file mode 100644 index 0000000000..aedf4700cf --- /dev/null +++ b/migration/360lts-release/oracle/929_IDEMPIERE-458.sql @@ -0,0 +1,13 @@ +-- IDEMPIERE-458 Invalid indirect foreign keys on GardenWorld +delete from ad_treenode where ad_tree_id=102 and node_id not in (select m_product_id from m_product) +; + +delete from ad_treenode where ad_tree_id=103 and node_id not in (select c_bpartner_id from c_bpartner) +; + +delete from ad_treenode where ad_tree_id=101 and node_id not in (select c_elementvalue_id from c_elementvalue) +; + +SELECT register_migration_script('929_IDEMPIERE-458.sql') FROM dual +; + diff --git a/migration/360lts-release/postgresql/927_IDEMPIERE-388.sql b/migration/360lts-release/postgresql/927_IDEMPIERE-388.sql new file mode 100644 index 0000000000..1d2f0167ad --- /dev/null +++ b/migration/360lts-release/postgresql/927_IDEMPIERE-388.sql @@ -0,0 +1,66 @@ +-- IDEMPIERE-388 Enable port and TLS configuration for email +-- Oct 3, 2012 10:55:41 AM COT +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('SMTPPort',200170,'D','SMTP Port','SMTP Port Number','SMTP Port','20c841ef-0f1c-4482-87a7-0e882ae1e0de',0,TO_TIMESTAMP('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y') +; + +-- Oct 3, 2012 10:55:41 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200170 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 3, 2012 10:58:59 AM COT +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200580,'D','N','N','N',0,'N',10,'N',11,'N','N',200170,'N','Y','e463ed28-f6d5-4150-b7bd-49cdc6e7e03b','N','Y','N','SMTPPort','SMTP Port Number','SMTP Port','Y',0,TO_TIMESTAMP('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,0,0) +; + +-- Oct 3, 2012 10:58:59 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200580 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 3, 2012 11:00:50 AM COT +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSecureSMTP',200171,'D','SMTP SSL/TLS','Use SSL/TLS for SMTP','SMTP SSL/TLS','08c7ca81-950d-4f5f-b0fd-99da440cd1e2',0,TO_TIMESTAMP('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y') +; + +-- Oct 3, 2012 11:00:50 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200171 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Oct 3, 2012 11:02:40 AM COT +INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200581,'D','N','N','N',0,'N',1,'N',20,'N','N',200171,'N','Y','1bf7924e-8543-481d-972d-32ac400ce786','N','Y','N','IsSecureSMTP','Use SSL/TLS for SMTP','N','SMTP SSL/TLS','Y',0,TO_TIMESTAMP('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,0,0) +; + +-- Oct 3, 2012 11:02:40 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200581 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Oct 3, 2012 11:24:52 AM COT +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'N','N',200580,113,'Y',200594,'N',119,'D','SMTP Port Number','SMTP Port','Y','N','e54979c8-39fc-4ac5-8fd0-5232834a070c',0,0,TO_TIMESTAMP('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),0,0,TO_TIMESTAMP('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),'Y','Y',113,1,1,1) +; + +-- Oct 3, 2012 11:24:52 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200594 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 3, 2012 11:27:59 AM COT +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'Y','N',200581,115,'Y',200595,'N',119,'D','Use SSL/TLS for SMTP','SMTP SSL/TLS','Y','N','dbef5a74-3dfa-4246-8b76-04b924ec869c',0,0,TO_TIMESTAMP('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),0,0,TO_TIMESTAMP('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),'Y','Y',115,5,2,1) +; + +-- Oct 3, 2012 11:27:59 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200595 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Oct 8, 2012 10:15:49 PM COT +-- IDEMPIERE-388 Enable port and TLS configuration for email +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-10-08 22:15:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200581 +; + +-- Oct 8, 2012 10:15:51 PM COT +-- IDEMPIERE-388 Enable port and TLS configuration for email +ALTER TABLE AD_Client ADD COLUMN IsSecureSMTP CHAR(1) DEFAULT 'N' CHECK (IsSecureSMTP IN ('Y','N')) NOT NULL +; + +-- Oct 8, 2012 10:16:24 PM COT +-- IDEMPIERE-388 Enable port and TLS configuration for email +ALTER TABLE AD_Client ADD COLUMN SMTPPort NUMERIC(10) DEFAULT NULL +; + +SELECT register_migration_script('927_IDEMPIERE-388.sql') FROM dual +; diff --git a/migration/360lts-release/postgresql/929_IDEMPIERE-458.sql b/migration/360lts-release/postgresql/929_IDEMPIERE-458.sql new file mode 100644 index 0000000000..aedf4700cf --- /dev/null +++ b/migration/360lts-release/postgresql/929_IDEMPIERE-458.sql @@ -0,0 +1,13 @@ +-- IDEMPIERE-458 Invalid indirect foreign keys on GardenWorld +delete from ad_treenode where ad_tree_id=102 and node_id not in (select m_product_id from m_product) +; + +delete from ad_treenode where ad_tree_id=103 and node_id not in (select c_bpartner_id from c_bpartner) +; + +delete from ad_treenode where ad_tree_id=101 and node_id not in (select c_elementvalue_id from c_elementvalue) +; + +SELECT register_migration_script('929_IDEMPIERE-458.sql') FROM dual +; + diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java index 071743bc89..943f3ee846 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java @@ -57,7 +57,7 @@ public class CalloutAssignment extends CalloutEngine return ""; int M_Product_ID = 0; - StringBuilder Name = null; + String Name = null; String Description = null; BigDecimal Qty = null; String sql = "SELECT p.M_Product_ID, ra.Name, ra.Description, ra.Qty " @@ -74,7 +74,7 @@ public class CalloutAssignment extends CalloutEngine if (rs.next()) { M_Product_ID = rs.getInt (1); - Name = new StringBuilder(rs.getString(2)); + Name = rs.getString(2); Description = rs.getString(3); Qty = rs.getBigDecimal(4); } @@ -94,9 +94,9 @@ public class CalloutAssignment extends CalloutEngine { mTab.setValue ("M_Product_ID", new Integer (M_Product_ID)); if (Description != null) - Name.append(" (").append(Description).append(")"); - if (!".".equals(Name.toString())) - mTab.setValue("Description", Name.toString()); + Name += " (" + Description + ")"; + if (!".".equals(Name)) + mTab.setValue("Description", Name); // String variable = "Qty"; // TimeExpenseLine if (mTab.getTableName().startsWith("C_Order")) diff --git a/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java b/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java index 7fac5486a6..e81874265a 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java @@ -264,12 +264,12 @@ public class ClientAcctProcessor extends SvrProcess if (countError[i] > 0) m_summary.append("(Errors=").append(countError[i]).append(")"); m_summary.append(" - "); - StringBuilder msglog = new StringBuilder(getName()).append(": ").append(m_summary.toString()); + StringBuilder msglog = new StringBuilder().append(getName()).append(": ").append(m_summary.toString()); log.finer(msglog.toString()); } else { - StringBuilder msglog = new StringBuilder(getName()).append(": ").append(TableName).append(" - no work"); + StringBuilder msglog = new StringBuilder().append(getName()).append(": ").append(TableName).append(" - no work"); log.finer(msglog.toString()); } } diff --git a/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java b/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java index 3f2ca7bfd1..bd4c028de0 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java +++ b/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java @@ -141,7 +141,7 @@ public class HouseKeeping extends SvrProcess{ houseKeeping.setLastDeleted(nodel); houseKeeping.saveEx(); addLog("@Deleted@ " + nodel); - StringBuilder msg = new StringBuilder(Msg.getElement(getCtx(), tableName + "_ID")).append(" #").append(nodel); + StringBuilder msg = new StringBuilder().append(Msg.getElement(getCtx(), tableName + "_ID")).append(" #").append(nodel); return msg.toString(); }//doIt } diff --git a/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java b/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java index 7ed7e7dc8c..a72f5811c3 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java +++ b/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java @@ -126,7 +126,8 @@ public class InOutGenerateRMA extends SvrProcess } } - return "@Created@ = " + m_created; + StringBuilder msgreturn = new StringBuilder("@Created@ = ").append(m_created); + return msgreturn.toString(); } private int getShipmentDocTypeId(int M_RMA_ID) @@ -241,7 +242,7 @@ public class InOutGenerateRMA extends SvrProcess log.log(Level.WARNING, msglog.toString()); } - StringBuffer processMsg = new StringBuffer(shipment.getDocumentNo()); + StringBuffer processMsg = new StringBuffer().append(shipment.getDocumentNo()); if (!shipment.processIt(p_docAction)) { diff --git a/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java b/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java index 693fc6b8ca..6d5b7d53fc 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java +++ b/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java @@ -120,7 +120,8 @@ public class InvoiceGenerateRMA extends SvrProcess log.log(Level.SEVERE, "Could not close prepared statement"); } } - return "@Created@ = " + m_created; + StringBuilder msgreturn = new StringBuilder("@Created@ = ").append(m_created); + return msgreturn.toString(); } private int getInvoiceDocTypeId(int M_RMA_ID) @@ -203,7 +204,7 @@ public class InvoiceGenerateRMA extends SvrProcess log.log(Level.WARNING, msglog.toString()); } - StringBuilder processMsg = new StringBuilder(invoice.getDocumentNo()); + StringBuilder processMsg = new StringBuilder().append(invoice.getDocumentNo()); if (!invoice.processIt(p_docAction)) { diff --git a/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java b/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java index 5cda31c6c8..bf0d65afc8 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java +++ b/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java @@ -160,7 +160,7 @@ public class PrepareMigrationScripts extends SvrProcess { } } if (blBody) { - body.append(line + '\n'); + body.append(line).append('\n'); } if (line.equals("--BEGINHEADER--")) { blHeader = true; @@ -173,7 +173,7 @@ public class PrepareMigrationScripts extends SvrProcess { } else { if (!isFirstLine) line = scanner.nextLine(); - body.append(line + '\n'); + body.append(line).append('\n'); } isFirstLine = false; } diff --git a/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java b/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java index ae5cae8077..ef4a07bd8b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java +++ b/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java @@ -87,7 +87,8 @@ public class AD_PrintPaper_Default extends SvrProcess log.log(Level.SEVERE, "set print format", e); } - return "@Copied@=" + cnt; + StringBuilder msgreturn = new StringBuilder("@Copied@=").append(cnt); + return msgreturn.toString(); } // doIt } // AD_PrintPaper_Default diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java index 4b6432d7a9..90a8ad565c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java @@ -76,7 +76,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess if (acct == null || acct.get_ID() == 0) throw new AdempiereSystemError("Default Not Found - C_AcctSchema_ID=" + p_C_AcctSchema_ID); - StringBuilder sql; + StringBuilder sql = null; int updated = 0; int created = 0; int updatedTotal = 0; diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java index 02381cea71..41233d26c1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java @@ -111,7 +111,8 @@ public class AllocationReset extends SvrProcess if (delete(hdr)) count++; m_trx.close(); - return "@Deleted@ #" + count; + StringBuilder msgreturn = new StringBuilder("@Deleted@ #").append(count); + return msgreturn.toString(); } // Selection @@ -171,7 +172,8 @@ public class AllocationReset extends SvrProcess rs = null; pstmt = null; } m_trx.close(); - return "@Deleted@ #" + count; + StringBuilder msgreturn = new StringBuilder("@Deleted@ #").append(count); + return msgreturn.toString(); } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java index 3c6393d7ed..ec77dafab0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java +++ b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java @@ -181,7 +181,8 @@ public class AssetDelivery extends SvrProcess log.info("Count=" + count + ", Errors=" + errors + ", Reminder=" + reminders + " - " + (System.currentTimeMillis()-start) + "ms"); - return "@Sent@=" + count + " - @Errors@=" + errors; + StringBuilder msgreturn = new StringBuilder("@Sent@=").append(count).append(" - @Errors@=").append(errors); + return msgreturn.toString(); } // doIt @@ -218,8 +219,10 @@ public class AssetDelivery extends SvrProcess } String msg = email.send(); new MUserMail(m_MailText, asset.getAD_User_ID(), email).saveEx(); - if (!EMail.SENT_OK.equals(msg)) - return "** Not delivered: " + user.getEMail() + " - " + msg; + if (!EMail.SENT_OK.equals(msg)){ + StringBuilder msgreturn = new StringBuilder("** Not delivered: ").append(user.getEMail()).append(" - ").append(msg); + return msgreturn.toString(); + } // return user.getEMail(); } // sendNoGuaranteeMail @@ -285,8 +288,10 @@ public class AssetDelivery extends SvrProcess } String msg = email.send(); new MUserMail(m_MailText, asset.getAD_User_ID(), email).saveEx(); - if (!EMail.SENT_OK.equals(msg)) - return "** Not delivered: " + user.getEMail() + " - " + msg; + if (!EMail.SENT_OK.equals(msg)){ + StringBuilder msgreturn = new StringBuilder("** Not delivered: ").append(user.getEMail()).append(" - ").append(msg); + return msgreturn.toString(); + } MAssetDelivery ad = asset.confirmDelivery(email, user.getAD_User_ID()); ad.saveEx(); @@ -294,7 +299,8 @@ public class AssetDelivery extends SvrProcess // log.fine((System.currentTimeMillis()-start) + " ms"); // success - return user.getEMail() + " - " + asset.getProductVersionNo(); + StringBuilder msgreturn = new StringBuilder().append(user.getEMail()).append(" - ").append(asset.getProductVersionNo()); + return msgreturn.toString(); } // deliverIt } // AssetDelivery diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java b/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java index 9d2ab983e3..79ead59e46 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java @@ -63,7 +63,7 @@ public class BOMFlagValidate extends SvrProcess { while (rs.next()) { - StringBuilder msglog=new StringBuilder(rs.getString(1)).append(" BOM without BOM lines"); + StringBuilder msglog=new StringBuilder().append(rs.getString(1)).append(" BOM without BOM lines"); addLog(0, null, null, msglog.toString(), MProduct.Table_ID, rs.getInt(2)); } } catch (SQLException e) { @@ -119,7 +119,7 @@ public class BOMFlagValidate extends SvrProcess { while (rs.next()) { - StringBuilder msglog = new StringBuilder(rs.getString(1)).append(" not BOM with BOM lines"); + StringBuilder msglog = new StringBuilder().append(rs.getString(1)).append(" not BOM with BOM lines"); addLog(0, null, null, msglog.toString(), MProduct.Table_ID, rs.getInt(2)); } } catch (SQLException e) { diff --git a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java index f96fb2aeb5..4afa418c94 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java @@ -391,7 +391,7 @@ public class ChangeLogProcess extends SvrProcess .append (" FROM ").append(tableName) .append (" WHERE EntityType IN ('D','C'))"); int no = DB.executeUpdate(update.toString(), get_TrxName()); - StringBuilder msglog = new StringBuilder(table.getTableName()).append(" = ").append(no); + StringBuilder msglog = new StringBuilder().append(table.getTableName()).append(" = ").append(no); log.config(msglog.toString()); updateNo += no; @@ -406,8 +406,8 @@ public class ChangeLogProcess extends SvrProcess DB.close(rs, pstmt); rs = null; pstmt = null; } - - return "@Reset@: " + resetNo + " - @Updated@: " + updateNo; + StringBuilder msgreturn = new StringBuilder("@Reset@: ").append(resetNo).append(" - @Updated@: ").append(updateNo); + return msgreturn.toString(); } // setCustomization } // ChangeLogProcess diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java index ab927ecfec..0823509493 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java @@ -125,7 +125,8 @@ public class ColumnEncryption extends SvrProcess { column.setIsEncrypted(false); column.saveEx(); } - return columnName + ": cannot be encrypted"; + StringBuilder msgreturn = new StringBuilder().append(columnName).append(": cannot be encrypted"); + return msgreturn.toString(); } // Start @@ -257,7 +258,8 @@ public class ColumnEncryption extends SvrProcess { } } - return "Encryption=" + column.isEncrypted(); + StringBuilder msgreturn = new StringBuilder("Encryption=").append(column.isEncrypted()); + return msgreturn.toString(); } // doIt /** @@ -346,7 +348,7 @@ public class ColumnEncryption extends SvrProcess { for (int i = 0; i < colLength; i++) { str.append("1"); } - str = new StringBuilder(SecureEngine.encrypt(str.toString())); + str = new StringBuilder().append(SecureEngine.encrypt(str.toString())); return str.length(); } // encryptedColumnLength @@ -372,14 +374,14 @@ public class ColumnEncryption extends SvrProcess { selectSql.append(" WHERE AD_Column_ID=?"); // Alter SQL - StringBuffer alterSql = new StringBuffer(); + StringBuilder alterSql = new StringBuilder(); alterSql.append("ALTER TABLE ").append(tableName); alterSql.append(" MODIFY ").append(columnName); alterSql.append(" NVARCHAR2("); alterSql.append(length).append(") "); // Update SQL - StringBuffer updateSql = new StringBuffer(); + StringBuilder updateSql = new StringBuilder(); updateSql.append("UPDATE AD_Column"); updateSql.append(" SET FieldLength=").append(length); updateSql.append(" WHERE AD_Column_ID=").append(columnID); diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java index 424c3b8977..f9f1dd639e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java @@ -89,7 +89,7 @@ public class CommissionCalc extends SvrProcess comRun.setStartDate(p_StartDate); // 01-Jan-2000 - 31-Jan-2001 - USD SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.Date); - StringBuilder description = new StringBuilder(format.format(p_StartDate)) + StringBuilder description = new StringBuilder().append(format.format(p_StartDate)) .append(" - ").append(format.format(m_EndDate)) .append(" - ").append(MCurrency.getISO_Code(getCtx(), m_com.getC_Currency_ID())); comRun.setDescription(description.toString()); diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java index ee4b3485d7..6618d606ed 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java @@ -112,7 +112,7 @@ public class CopyOrder extends SvrProcess // // Env.setSOTrx(getCtx(), newOrder.isSOTrx()); // return "@C_Order_ID@ " + newOrder.getDocumentNo(); - StringBuilder msgreturn = new StringBuilder(dt.getName()).append(": ").append(newOrder.getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(": ").append(newOrder.getDocumentNo()); return msgreturn.toString(); } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java index 176056b6b8..b591e99288 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java @@ -208,7 +208,8 @@ public class DistributionRun extends SvrProcess createOrders(); } - return "@Created@ #" + m_counter; + StringBuilder msgreturn = new StringBuilder("@Created@ #").append(m_counter); + return msgreturn.toString(); } // doIt @@ -547,7 +548,7 @@ public class DistributionRun extends SvrProcess product = MProduct.get (getCtx(), detail.getM_Product_ID()); if (p_IsTest) { - StringBuilder msglog = new StringBuilder(bp.getName()).append(" - ").append(product.getName()); + StringBuilder msglog = new StringBuilder().append(bp.getName()).append(" - ").append(product.getName()); addLog(0,null, detail.getActualAllocation(), msglog.toString()); continue; } @@ -571,7 +572,7 @@ public class DistributionRun extends SvrProcess log.log(Level.SEVERE, "OrderLine not saved"); return false; } - StringBuilder msglog = new StringBuilder(order.getDocumentNo()).append(": ").append(bp.getName()).append(" - ").append(product.getName()); + StringBuilder msglog = new StringBuilder().append(order.getDocumentNo()).append(": ").append(bp.getName()).append(" - ").append(product.getName()); addLog(0,null, detail.getActualAllocation(), msglog.toString()); } // finish order @@ -997,7 +998,7 @@ public class DistributionRun extends SvrProcess product = MProduct.get (getCtx(), detail.getM_Product_ID()); if (p_IsTest) { - StringBuilder msglog = new StringBuilder(bp.getName()).append(" - ").append(product.getName()); + StringBuilder msglog = new StringBuilder().append(bp.getName()).append(" - ").append(product.getName()); addLog(0,null, detail.getActualAllocation(), msglog.toString()); continue; } @@ -1082,7 +1083,7 @@ public class DistributionRun extends SvrProcess line.saveEx(); } - StringBuilder msglog = new StringBuilder(order.getDocumentNo()) + StringBuilder msglog = new StringBuilder().append(order.getDocumentNo()) .append(": ").append(bp.getName()).append(" - ").append(product.getName()); addLog(0,null, detail.getActualAllocation(), msglog.toString()); } diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java index d801c80cc9..2ce7c03734 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java @@ -167,7 +167,7 @@ public class DunningPrint extends SvrProcess MDunningRunEntry.Table_ID, entry.getC_DunningRunEntry_ID(), entry.getC_BPartner_ID()); - StringBuilder msginfo = new StringBuilder(bp.getName()).append(", Amt=").append(entry.getAmt()); + StringBuilder msginfo = new StringBuilder().append(bp.getName()).append(", Amt=").append(entry.getAmt()); info.setDescription(msginfo.toString()); ReportEngine re = null; if (format != null) @@ -198,7 +198,7 @@ public class DunningPrint extends SvrProcess // if (re != null) { File attachment = re.getPDF(File.createTempFile("Dunning", ".pdf")); - StringBuilder msglog = new StringBuilder(to.toString()).append(" - ").append(attachment); + StringBuilder msglog = new StringBuilder().append(to.toString()).append(" - ").append(attachment); log.fine(msglog.toString()); email.addAttachment(attachment); } @@ -208,15 +208,15 @@ public class DunningPrint extends SvrProcess um.saveEx(); if (msg.equals(EMail.SENT_OK)) { - StringBuilder msglog = new StringBuilder( - bp.getName()).append(" @RequestActionEMailOK@"); + StringBuilder msglog = new StringBuilder() + .append(bp.getName()).append(" @RequestActionEMailOK@"); addLog (entry.get_ID(), null, null,msglog.toString()); count++; printed = true; } else { - StringBuilder msglog = new StringBuilder(bp.getName()).append(" @RequestActionEMailError@ ").append(msg); + StringBuilder msglog = new StringBuilder().append(bp.getName()).append(" @RequestActionEMailError@ ").append(msg); addLog (entry.get_ID(), null, null,msglog.toString() ); errors++; } @@ -244,7 +244,8 @@ public class DunningPrint extends SvrProcess StringBuilder msgreturn = new StringBuilder("@Sent@=").append(count).append(" - @Errors@=").append(errors); return msgreturn.toString(); } - return "@Printed@=" + count; + StringBuilder msgreturn = new StringBuilder("@Printed@=").append(count); + return msgreturn.toString(); } // doIt } // DunningPrint diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java index 8635da3c13..2276400c76 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java @@ -123,7 +123,8 @@ public class DunningRunCreate extends SvrProcess int entries = DB.getSQLValue(get_TrxName(), "SELECT COUNT(*) FROM C_DunningRunEntry WHERE C_DunningRun_ID=?", m_run.get_ID()); - return "@C_DunningRunEntry_ID@ #" + entries; + StringBuilder msgreturn = new StringBuilder("@C_DunningRunEntry_ID@ #").append(entries); + return msgreturn.toString(); } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java index ea2c6b6612..f62b97ad58 100644 --- a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java +++ b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java @@ -55,7 +55,7 @@ public class EMailTest extends SvrProcess // Test Client Mail String clientTest = client.testEMail(); - StringBuilder msglog = new StringBuilder(client.getName()).append(": ").append(clientTest); + StringBuilder msglog = new StringBuilder().append(client.getName()).append(": ").append(clientTest); addLog(0, null, null, msglog.toString()); // Test Client DocumentDir @@ -76,7 +76,7 @@ public class EMailTest extends SvrProcess { MStore store = wstores[i]; String test = store.testEMail(); - msglog = new StringBuilder(store.getName()).append(": ").append(test); + msglog = new StringBuilder().append(store.getName()).append(": ").append(test); addLog(0, null, null, msglog.toString()); } diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java index 491dbabf9b..00eb9b7034 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java @@ -137,7 +137,7 @@ public class ExpenseAPInvoice extends SvrProcess } invoice.setM_PriceList_ID(te.getM_PriceList_ID()); invoice.setSalesRep_ID(te.getDoc_User_ID()); - StringBuilder descr = new StringBuilder(Msg.translate(getCtx(), "S_TimeExpense_ID")) + StringBuilder descr = new StringBuilder().append(Msg.translate(getCtx(), "S_TimeExpense_ID")) .append(": ").append(te.getDocumentNo()).append(" " ) .append(DisplayType.getDateFormat(DisplayType.Date).format(te.getDateReport())); invoice.setDescription(descr.toString()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java b/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java index 24e794990a..04ff010163 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java @@ -75,7 +75,7 @@ public class ImportDelete extends SvrProcess // Delete StringBuilder sql = new StringBuilder("DELETE FROM ").append(tableName).append(" WHERE AD_Client_ID=").append(getAD_Client_ID()); int no = DB.executeUpdate(sql.toString(), get_TrxName()); - StringBuilder msg = new StringBuilder(Msg.translate(getCtx(), tableName + "_ID")).append(" #").append(no); + StringBuilder msg = new StringBuilder().append(Msg.translate(getCtx(), tableName + "_ID")).append(" #").append(no); return msg.toString(); } // ImportDelete diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java index 2c4a8e25cd..78c7535f43 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java @@ -580,8 +580,8 @@ public class ImportGLJournal extends SvrProcess commitEx(); // Count Errors - int errors = DB.getSQLValue(get_TrxName(), - "SELECT COUNT(*) FROM I_GLJournal WHERE I_IsImported NOT IN ('Y','N')" + clientCheck); + StringBuilder msgdb = new StringBuilder("SELECT COUNT(*) FROM I_GLJournal WHERE I_IsImported NOT IN ('Y','N')").append(clientCheck); + int errors = DB.getSQLValue(get_TrxName(), msgdb.toString()); if (errors != 0) { @@ -652,11 +652,11 @@ public class ImportGLJournal extends SvrProcess batch.setDocumentNo (imp.getBatchDocumentNo()); batch.setC_DocType_ID(imp.getC_DocType_ID()); batch.setPostingType(imp.getPostingType()); - StringBuilder description = new StringBuilder(imp.getBatchDescription()); - if (description == null || description.length() == 0) + StringBuilder description; + if (imp.getBatchDescription() == null || imp.getBatchDescription().toString().length() == 0) description = new StringBuilder("*Import-"); else - description.append(" *Import-"); + description = new StringBuilder(imp.getBatchDescription()).append(" *Import-"); description.append(new Timestamp(System.currentTimeMillis())); batch.setDescription(description.toString()); if (!batch.save()) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java index d14a362c84..2064eac3d9 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java @@ -92,7 +92,7 @@ public class ImportPayment extends SvrProcess StringBuilder sql = null; int no = 0; - String clientCheck = " AND AD_Client_ID=" + ba.getAD_Client_ID(); + StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(ba.getAD_Client_ID()); // **** Prepare **** diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java index ba12b6e370..4dc4dc6838 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java @@ -402,7 +402,7 @@ public class InvoiceGenerate extends SvrProcess AD_Language = Language.getBaseAD_Language(); java.text.SimpleDateFormat format = DisplayType.getDateFormat (DisplayType.Date, Language.getLanguage(AD_Language)); - StringBuilder reference = new StringBuilder(dt.getPrintName(m_bp.getAD_Language())) + StringBuilder reference = new StringBuilder().append(dt.getPrintName(m_bp.getAD_Language())) .append(": ").append(ship.getDocumentNo()) .append(" - ").append(format.format(ship.getMovementDate())); m_ship = ship; diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java index 4ecab034c5..acb414438f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java @@ -82,7 +82,7 @@ public class OrderRePrice extends SvrProcess } order = new MOrder (getCtx(), p_C_Order_ID, get_TrxName()); BigDecimal newPrice = order.getGrandTotal(); - retValue = new StringBuilder(order.getDocumentNo()).append(": ").append(oldPrice).append(" -> ").append(newPrice); + retValue = new StringBuilder().append(order.getDocumentNo()).append(": ").append(oldPrice).append(" -> ").append(newPrice); } if (p_C_Invoice_ID != 0) { diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java index 4b452e9495..965c36e2be 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java @@ -80,7 +80,7 @@ public class ProjectLinePricing extends SvrProcess projectLine.setPlannedMarginAmt(pp.getPriceStd().subtract(pp.getPriceLimit())); projectLine.saveEx(); // - StringBuilder retValue = new StringBuilder(Msg.getElement(getCtx(), "PriceList")).append(pp.getPriceList()).append(" - ") + StringBuilder retValue = new StringBuilder().append(Msg.getElement(getCtx(), "PriceList")).append(pp.getPriceList()).append(" - ") .append(Msg.getElement(getCtx(), "PriceStd")).append(pp.getPriceStd()).append(" - ") .append(Msg.getElement(getCtx(), "PriceLimit")).append(pp.getPriceLimit()); return retValue.toString(); diff --git a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java index 0ee1f58acd..cdbc94f307 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java +++ b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java @@ -131,7 +131,7 @@ public class RegisterSystem extends SvrProcess // Send it URL url = new URL (urlString.toString()); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); try { URLConnection uc = url.openConnection(); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java b/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java index f1bc07b3b3..903db22504 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java @@ -243,7 +243,7 @@ public class RequisitionPOCreate extends SvrProcess whereClause.append(")"); // End Requisition Header // // ORDER BY clause - StringBuffer orderClause = new StringBuffer(); + StringBuilder orderClause = new StringBuilder(); if (!p_ConsolidateDocument) { orderClause.append("M_Requisition_ID, "); @@ -355,7 +355,7 @@ public class RequisitionPOCreate extends SvrProcess // default po document type if (!p_ConsolidateDocument) { - StringBuilder msgsd= new StringBuilder(Msg.getElement(getCtx(), "M_Requisition_ID")) + StringBuilder msgsd= new StringBuilder().append(Msg.getElement(getCtx(), "M_Requisition_ID")) .append(": ").append(rLine.getParent().getDocumentNo()); m_order.setDescription(msgsd.toString()); } diff --git a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java index a1a161ac56..267610dc35 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java +++ b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java @@ -369,7 +369,7 @@ public class TableCreateColumns extends SvrProcess // Done if (column.save ()) { - StringBuilder msglog = new StringBuilder(table.getTableName()).append(".").append(column.getColumnName()); + StringBuilder msglog = new StringBuilder().append(table.getTableName()).append(".").append(column.getColumnName()); addLog (0, null, null, msglog.toString()); m_count++; } diff --git a/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java b/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java index 30559f6661..2fe0112ba9 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java +++ b/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java @@ -112,7 +112,7 @@ public class TreeMaintenance extends SvrProcess int deletes = DB.executeUpdate(sql.toString(), get_TrxName()); addLog(0,null, new BigDecimal(deletes), tree.getName()+ " Deleted"); if (!tree.isAllNodes()){ - StringBuilder msgreturn = new StringBuilder(tree.getName()).append(" OK"); + StringBuilder msgreturn = new StringBuilder().append(tree.getName()).append(" OK"); return msgreturn.toString(); } // Insert new @@ -176,9 +176,9 @@ public class TreeMaintenance extends SvrProcess { pstmt = null; } - StringBuilder msglog = new StringBuilder(tree.getName()).append(" Inserted"); + StringBuilder msglog = new StringBuilder().append(tree.getName()).append(" Inserted"); addLog(0,null, new BigDecimal(inserts), msglog.toString()); - StringBuilder msgreturn = new StringBuilder(tree.getName()).append((ok ? " OK" : " Error")); + StringBuilder msgreturn = new StringBuilder().append(tree.getName()).append((ok ? " OK" : " Error")); return msgreturn.toString(); } // verifyTree diff --git a/org.adempiere.base/.classpath b/org.adempiere.base/.classpath index dcf6057cbc..7422ec0fd6 100644 --- a/org.adempiere.base/.classpath +++ b/org.adempiere.base/.classpath @@ -11,6 +11,7 @@ + diff --git a/org.adempiere.base/META-INF/MANIFEST.MF b/org.adempiere.base/META-INF/MANIFEST.MF index 0878765dfd..fabf71bca5 100644 --- a/org.adempiere.base/META-INF/MANIFEST.MF +++ b/org.adempiere.base/META-INF/MANIFEST.MF @@ -17,7 +17,8 @@ Bundle-ClassPath: base.jar, jnlp.jar, groovy-all-1.7.5.jar, vt-dictionary-3.0.jar, - vt-password-3.1.1.jar + vt-password-3.1.1.jar, + super-csv-2.0.0-beta-1.jar Export-Package: bsh, bsh.classpath, bsh.collection, @@ -237,7 +238,14 @@ Export-Package: bsh, org.jfree.ui.about.resources, org.jfree.ui.action, org.jfree.ui.tabbedui, - org.jfree.util + org.jfree.util, + org.supercsv.cellprocessor, + org.supercsv.cellprocessor.constraint, + org.supercsv.cellprocessor.ift, + org.supercsv.exception, + org.supercsv.io, + org.supercsv.prefs, + org.supercsv.util Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.sun.mail.smtp;version="1.4.0", javax.jms;version="1.1.0", diff --git a/org.adempiere.base/build.properties b/org.adempiere.base/build.properties index e463d35f12..b6a4bb78c8 100644 --- a/org.adempiere.base/build.properties +++ b/org.adempiere.base/build.properties @@ -15,7 +15,8 @@ bin.includes = META-INF/,\ OSGI-INF/,\ groovy-all-1.7.5.jar,\ vt-dictionary-3.0.jar,\ - vt-password-3.1.1.jar + vt-password-3.1.1.jar,\ + super-csv-2.0.0-beta-1.jar output.base.jar = build/ source.base.jar = src/ src.includes = schema/ diff --git a/org.adempiere.base/plugin.xml b/org.adempiere.base/plugin.xml index 41d31e82ee..79aa4c8727 100644 --- a/org.adempiere.base/plugin.xml +++ b/org.adempiere.base/plugin.xml @@ -42,6 +42,15 @@ priority="0"> + + + + childs, boolean currentRowOnly, File file) { + + ICsvMapWriter mapWriter = null; + try { + mapWriter = new CsvMapWriter(new FileWriter(file), CsvPreference.STANDARD_PREFERENCE); + GridTable gt = gridTab.getTableModel(); + GridField[] gridFields = getFields(gridTab); + List headArray = new ArrayList(); + List colsArray = new ArrayList(); + List procArray = new ArrayList(); + MTable table = MTable.get(Env.getCtx(), gridTab.getTableName()); + for (int idxfld = 0; idxfld < gridFields.length; idxfld++) { + GridField field = gridFields[idxfld]; + colsArray.add(field.getColumnName()); + MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID()); + String headName = resolveColumnName(table, column); + headArray.add(headName); + if (DisplayType.Date == column.getAD_Reference_ID()) { + procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_DATE_FORMAT))); + } else if (DisplayType.DateTime == column.getAD_Reference_ID()) { + procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_TIMESTAMP_FORMAT))); + } else if (DisplayType.Time == column.getAD_Reference_ID()) { + procArray.add(new Optional(new FmtDate("DisplayType.DEFAULT_TIME_FORMAT"))); + } else if (DisplayType.Integer == column.getAD_Reference_ID() || DisplayType.isNumeric(column.getAD_Reference_ID())) { + procArray.add(new Optional(new FmtNumber(DisplayType.getNumberFormat(column.getAD_Reference_ID())))); + } else if (DisplayType.YesNo == column.getAD_Reference_ID()) { + procArray.add(new Optional(new FmtBool("Y", "N"))); + } else { // lookups and text + procArray.add(null); + } + } + // the header elements are used to map the bean values to each column (names must match) + String[] header = headArray.toArray(new String[headArray.size()]); + CellProcessor[] processors = procArray.toArray(new CellProcessor[procArray.size()]); + // write the header + mapWriter.writeHeader(header); + // write the beans + int start = 0; + int end = 0; + if (currentRowOnly) { + start = gridTab.getCurrentRow(); + end = start + 1; + } else { + end = gt.getRowCount(); + } + for (int idxrow = start; idxrow < end; idxrow++) { + Map row = new HashMap(); + for (int idxfld = 0; idxfld < header.length; idxfld++) { + GridField field = gridFields[idxfld]; + MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID()); + String headName = header[idxfld]; + Object value = resolveValue(gridTab, table, column, idxrow, headName); + row.put(headName, value); + } + mapWriter.write(row, header, processors); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (mapWriter != null) { + try { + mapWriter.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + } + + private Object resolveValue(GridTab gridTab, MTable table, MColumn column, int i, String headName) { + Object value = null; + if (headName.contains("[") && headName.endsWith("]")) { + String foreignTable = column.getReferenceTableName(); + Object idO = gridTab.getValue(i, column.getColumnName()); + if (idO != null) { + if (foreignTable.equals("AD_Ref_List")) { + String ref = (String) idO; + value = MRefList.getListName(Env.getCtx(), column.getAD_Reference_Value_ID(), ref); + } else { + int id = (Integer) idO; + int start = headName.indexOf("[")+1; + int end = headName.length()-1; + String foreignColumn = headName.substring(start, end); + StringBuilder select = new StringBuilder("SELECT ") + .append(foreignColumn).append(" FROM ") + .append(foreignTable).append(" WHERE ") + .append(foreignTable).append("_ID=?"); + value = DB.getSQLValueStringEx(null, select.toString(), id); + } + } + } else { + value = gridTab.getValue(i, headName); + } + return value; + } + + private String resolveColumnName(MTable table, MColumn column) { + StringBuilder name = new StringBuilder(column.getColumnName()); + if (DisplayType.isLookup(column.getAD_Reference_ID())) { + // resolve to identifier - search for value first, if not search for name - if not use the ID + String foreignTable = column.getReferenceTableName(); + if ( ! ("AD_Language".equals(foreignTable) || "AD_EntityType".equals(foreignTable))) { + MTable fTable = MTable.get(Env.getCtx(), foreignTable); + // Hardcoded / do not check for Value on AD_Org and AD_User, must use name for these two tables + if (! ("AD_Org".equals(foreignTable) || "AD_User".equals(foreignTable)) + && fTable.getColumn("Value") != null) { + name.append("[Value]"); // fully qualified + } else if (fTable.getColumn("Name") != null) { + name.append("[Name]"); + } + } + } + return name.toString(); + } + + @Override + public String getFileExtension() { + return "csv"; + } + + @Override + public String getFileExtensionLabel() { + return Msg.getMsg(Env.getCtx(), "FileCSV"); + } + + @Override + public String getContentType() { + return "application/csv"; + } + + private GridField[] getFields (GridTab gridTab) { + GridTable tableModel = gridTab.getTableModel(); + GridField[] tmpFields = tableModel.getFields(); + MTabCustomization tabCustomization = MTabCustomization.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()), gridTab.getAD_Tab_ID(), null); + GridField[] gridFields = null; + if (tabCustomization != null + && tabCustomization.getAD_Tab_Customization_ID() > 0 + && !Util.isEmpty(tabCustomization.getCustom(), true)) + { + String custom = tabCustomization.getCustom().trim(); + String[] customComponent = custom.split(";"); + String[] fieldIds = customComponent[0].split("[,]"); + List fieldList = new ArrayList(); + 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) + { + if(gridField.isDisplayedGrid()) + fieldList.add(gridField); + + break; + } + } + } + gridFields = fieldList.toArray(new GridField[0]); + } + else + { + ArrayList gridFieldList = new ArrayList(); + + for(GridField field:tmpFields) + { + if(field.isDisplayedGrid()) + gridFieldList.add(field); + } + + Collections.sort(gridFieldList, new Comparator() { + @Override + public int compare(GridField o1, GridField o2) { + return o1.getSeqNoGrid()-o2.getSeqNoGrid(); + } + }); + + gridFields = new GridField[gridFieldList.size()]; + gridFieldList.toArray(gridFields); + } + return gridFields; + } + + public boolean isColumnPrinted(GridTab tab, int col) + { + GridField field = tab.getField(col); + // field not displayed + if (!field.isDisplayed()) + return false; + // field encrypted + if (field.isEncrypted()) + return false; + // button without a reference value + if (field.getDisplayType() == DisplayType.Button && field.getAD_Reference_Value_ID() == 0) + return false; + return true; + } + +} diff --git a/org.adempiere.base/src/org/adempiere/model/MRelationType.java b/org.adempiere.base/src/org/adempiere/model/MRelationType.java index 3bd4cf3001..1428f42ae8 100644 --- a/org.adempiere.base/src/org/adempiere/model/MRelationType.java +++ b/org.adempiere.base/src/org/adempiere/model/MRelationType.java @@ -414,8 +414,8 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider { private static void evaluateQuery(final MQuery query) { - final String sqlCommon = " FROM " + query.getZoomTableName() - + " WHERE " + query.getWhereClause(false); + StringBuilder sqlCommon = new StringBuilder(" FROM ").append(query.getZoomTableName()) + .append(" WHERE ").append(query.getWhereClause(false)); final String sqlCount = "SELECT COUNT(*) " + sqlCommon; @@ -424,10 +424,10 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider { if (count > 0) { - final String sqlFirstKey = "SELECT " + query.getZoomColumnName() - + sqlCommon; + StringBuilder sqlFirstKey = new StringBuilder("SELECT ").append(query.getZoomColumnName()) + .append(sqlCommon); - final int firstKey = DB.getSQLValueEx(null, sqlFirstKey); + final int firstKey = DB.getSQLValueEx(null, sqlFirstKey.toString()); query.setZoomValue(firstKey); } } @@ -462,7 +462,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider { @Override public String toString() { - final StringBuffer sb = new StringBuffer("MRelationType["); + StringBuilder sb = new StringBuilder("MRelationType["); // sb.append(get_ID()); sb.append(", Name=").append(getName()); diff --git a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java index 13321d8dff..5da31e4698 100644 --- a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java +++ b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java @@ -55,7 +55,8 @@ public class ResetLockedAccount extends SvrProcess { if (no < 0) throw new AdempiereException("Could not unlock user account" + user.toString()); - return "@OK@ - The user '" + user.getName() + "' has been unlocked"; + StringBuilder msgreturn = new StringBuilder("@OK@ - The user '").append(user.getName()).append("' has been unlocked"); + return msgreturn.toString(); } else { @@ -84,7 +85,8 @@ public class ResetLockedAccount extends SvrProcess { int no = DB.executeUpdate(sql.toString(), p_AD_Client_ID, get_TrxName()); if (no < 0) throw new AdempiereException("Could not unlock user account"); - return no + " locked account has been reset"; + StringBuilder msgreturn = new StringBuilder().append(no).append(" locked account has been reset"); + return msgreturn.toString(); } } } \ No newline at end of file diff --git a/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java b/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java index 30a95be6ce..1931a52e08 100644 --- a/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java +++ b/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java @@ -127,7 +127,8 @@ public class UUIDGenerator extends SvrProcess { } finally { DB.close(rs,stmt); } - return count + " table altered"; + StringBuilder msgreturn = new StringBuilder().append(count).append(" table altered"); + return msgreturn.toString(); } public static void updateUUID(MColumn column, String trxName) { @@ -241,13 +242,13 @@ public class UUIDGenerator extends SvrProcess { while (rs.next()) { noColumns++; - StringBuilder columnName = new StringBuilder(rs.getString ("COLUMN_NAME")); + StringBuilder columnName = new StringBuilder().append(rs.getString ("COLUMN_NAME")); if (!columnName.toString().equalsIgnoreCase(column.getColumnName())) continue; // update existing column boolean notNull = DatabaseMetaData.columnNoNulls == rs.getInt("NULLABLE"); - sql = new StringBuilder(column.getSQLModify(table, column.isMandatory() != notNull)); + sql = new StringBuilder().append(column.getSQLModify(table, column.isMandatory() != notNull)); break; } } @@ -282,10 +283,10 @@ public class UUIDGenerator extends SvrProcess { if (no != -1) { - StringBuilder indexName = new StringBuilder(column.getColumnName()).append("_idx"); + StringBuilder indexName = new StringBuilder().append(column.getColumnName()).append("_idx"); if (indexName.length() > 30) { int i = indexName.length() - 31; - indexName = new StringBuilder(column.getColumnName().substring(0, column.getColumnName().length() - i)); + indexName = new StringBuilder().append(column.getColumnName().substring(0, column.getColumnName().length() - i)); indexName.append("_uu_idx"); } StringBuilder indexSql = new StringBuilder("CREATE UNIQUE INDEX ").append(indexName).append(" ON ").append(tableName) diff --git a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java index 3e203157a1..2c21c936bb 100644 --- a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java +++ b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java @@ -176,7 +176,7 @@ public abstract class AbstractDocumentSearch { } // SearchDefinition with a special query } else if (msd.getSearchType().equals(MSearchDefinition.SEARCHTYPE_QUERY)) { - sqlSO = new StringBuilder(msd.getQuery()); + sqlSO = new StringBuilder().append(msd.getQuery()); pstmtSO = DB.prepareStatement(sqlSO.toString(), null); // count '?' in statement int count = 1; diff --git a/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java b/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java index 728f1c3585..895fd5a055 100644 --- a/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java +++ b/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java @@ -135,22 +135,22 @@ public class ModelClassGenerator if (tableName == null) throw new RuntimeException ("TableName not found for ID=" + AD_Table_ID); // - String accessLevelInfo = accessLevel + " "; + StringBuilder accessLevelInfo = new StringBuilder().append(accessLevel).append(" "); if (accessLevel >= 4 ) - accessLevelInfo += "- System "; + accessLevelInfo.append("- System "); if (accessLevel == 2 || accessLevel == 3 || accessLevel == 6 || accessLevel == 7) - accessLevelInfo += "- Client "; + accessLevelInfo.append("- Client "); if (accessLevel == 1 || accessLevel == 3 || accessLevel == 5 || accessLevel == 7) - accessLevelInfo += "- Org "; + accessLevelInfo.append("- Org "); // - String keyColumn = tableName + "_ID"; - String className = "X_" + tableName; + StringBuilder keyColumn = new StringBuilder().append(tableName).append("_ID"); + StringBuilder className = new StringBuilder("X_").append(tableName); // StringBuilder start = new StringBuilder() .append (ModelInterfaceGenerator.COPY) .append ("/** Generated Model - DO NOT CHANGE */").append(NL) - .append("package " + packageName + ";").append(NL) + .append("package ").append(packageName).append(";").append(NL) .append(NL) ; @@ -248,12 +248,12 @@ public class ModelClassGenerator .append(" }").append(NL) ; - StringBuilder end = new StringBuilder ("}"); + String end = "}"; // sb.insert(0, start); sb.append(end); - return className; + return className.toString(); } /** @@ -398,10 +398,10 @@ public class ModelClassGenerator if (fieldName != null && referenceClassName != null) { sb.append(NL) - .append("\tpublic "+referenceClassName+" get").append(fieldName).append("() throws RuntimeException").append(NL) + .append("\tpublic ").append(referenceClassName).append(" get").append(fieldName).append("() throws RuntimeException").append(NL) .append(" {").append(NL) - .append("\t\treturn ("+referenceClassName+")MTable.get(getCtx(), "+referenceClassName+".Table_Name)").append(NL) - .append("\t\t\t.getPO(get"+columnName+"(), get_TrxName());") + .append("\t\treturn (").append(referenceClassName).append(")MTable.get(getCtx(), ").append(referenceClassName).append(".Table_Name)").append(NL) + .append("\t\t\t.getPO(get").append(columnName).append("(), get_TrxName());") /**/ .append("\t}").append(NL) ; @@ -701,9 +701,9 @@ public class ModelClassGenerator */ private StringBuilder createKeyNamePair (String columnName, int displayType) { - String method = "get" + columnName + "()"; + StringBuilder method = new StringBuilder("get").append(columnName).append("()"); if (displayType != DisplayType.String) - method = "String.valueOf(" + method + ")"; + method = new StringBuilder("String.valueOf(").append(method).append(")"); StringBuilder sb = new StringBuilder(NL) .append(" /** Get Record ID/ColumnName").append(NL) @@ -757,7 +757,8 @@ public class ModelClassGenerator fw.close (); float size = out.length(); size /= 1024; - System.out.println(out.getAbsolutePath() + " - " + size + " kB"); + StringBuilder msgout = new StringBuilder().append(out.getAbsolutePath()).append(" - ").append(size).append(" kB"); + System.out.println(msgout.toString()); } catch (Exception ex) { @@ -837,9 +838,9 @@ public class ModelClassGenerator if (tableName == null || tableName.trim().length() == 0) throw new IllegalArgumentException("Must specify table name"); - String tableLike = tableName.trim(); - if (!tableLike.startsWith("'") || !tableLike.endsWith("'")) - tableLike = "'" + tableLike + "'"; + StringBuilder tableLike = new StringBuilder().append(tableName.trim()); + if (!tableLike.toString().startsWith("'") || !tableLike.toString().endsWith("'")) + tableLike = new StringBuilder("'").append(tableLike).append("'"); StringBuilder entityTypeFilter = new StringBuilder(); if (entityType != null && entityType.trim().length() > 0) @@ -848,9 +849,9 @@ public class ModelClassGenerator StringTokenizer tokenizer = new StringTokenizer(entityType, ","); int i = 0; while(tokenizer.hasMoreTokens()) { - String token = tokenizer.nextToken().trim(); - if (!token.startsWith("'") || !token.endsWith("'")) - token = "'" + token + "'"; + StringBuilder token = new StringBuilder().append(tokenizer.nextToken().trim()); + if (!token.toString().startsWith("'") || !token.toString().endsWith("'")) + token = new StringBuilder("'").append(token).append("'"); if (i > 0) entityTypeFilter.append(","); entityTypeFilter.append(token); @@ -863,18 +864,18 @@ public class ModelClassGenerator entityTypeFilter.append("EntityType IN ('U','A')"); } - String directory = sourceFolder.trim(); + StringBuilder directory = new StringBuilder().append(sourceFolder.trim()); String packagePath = packageName.replace(".", File.separator); - if (!(directory.endsWith("/") || directory.endsWith("\\"))) + if (!(directory.toString().endsWith("/") || directory.toString().endsWith("\\"))) { - directory = directory + File.separator; + directory.append(File.separator); } if (File.separator.equals("/")) - directory = directory.replaceAll("[\\\\]", File.separator); + directory = new StringBuilder(directory.toString().replaceAll("[\\\\]", File.separator)); else - directory = directory.replaceAll("[/]", File.separator); - directory = directory + packagePath; - file = new File(directory); + directory = new StringBuilder(directory.toString().replaceAll("[/]", File.separator)); + directory.append(packagePath); + file = new File(directory.toString()); if (!file.exists()) file.mkdirs(); @@ -899,7 +900,7 @@ public class ModelClassGenerator rs = pstmt.executeQuery(); while (rs.next()) { - new ModelClassGenerator(rs.getInt(1), directory, packageName); + new ModelClassGenerator(rs.getInt(1), directory.toString(), packageName); count++; } } diff --git a/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java b/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java index 00732354c8..ad079ddcb1 100644 --- a/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java +++ b/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java @@ -171,7 +171,7 @@ public class ModelInterfaceGenerator accessLevelInfo.append("- Org "); // - String className = "I_" + tableName; + StringBuilder className = new StringBuilder("I_").append(tableName); // StringBuilder start = new StringBuilder() .append (COPY) @@ -216,12 +216,12 @@ public class ModelInterfaceGenerator //.append(" POInfo initPO (Properties ctx);") // INFO - Should this be here??? ; - StringBuilder end = new StringBuilder("}"); + String end = "}"; // sb.insert(0, start); sb.append(end); - return className; + return className.toString(); } /** @@ -418,7 +418,8 @@ public class ModelInterfaceGenerator fw.close(); float size = out.length(); size /= 1024; - System.out.println(out.getAbsolutePath() + " - " + size + " kB"); + StringBuilder msgout = new StringBuilder().append(out.getAbsolutePath()).append(" - ").append(size).append(" kB"); + System.out.println(msgout.toString()); } catch (Exception ex) { log.log(Level.SEVERE, fileName, ex); throw new RuntimeException(ex); @@ -634,13 +635,13 @@ public class ModelInterfaceGenerator public static String getReferenceClassName(int AD_Table_ID, String columnName, int displayType, int AD_Reference_ID) { - StringBuilder referenceClassName = null; + String referenceClassName = null; // if (displayType == DisplayType.TableDir || (displayType == DisplayType.Search && AD_Reference_ID == 0)) { String refTableName = MQuery.getZoomTableName(columnName); // teo_sarca: BF [ 1817768 ] Isolate hardcoded table direct columns - referenceClassName = new StringBuilder("I_").append(refTableName); + referenceClassName = "I_"+refTableName; MTable table = MTable.get(Env.getCtx(), refTableName); if (table != null) @@ -649,7 +650,7 @@ public class ModelInterfaceGenerator String modelpackage = getModelPackage(entityType) ; if (modelpackage != null) { - referenceClassName = new StringBuilder(modelpackage).append(".").append(referenceClassName); + referenceClassName = modelpackage+"."+referenceClassName; } if (!isGenerateModelGetterForEntity(AD_Table_ID, entityType)) { @@ -691,11 +692,11 @@ public class ModelInterfaceGenerator final int refDisplayType = rs.getInt(3); if (refDisplayType == DisplayType.ID) { - referenceClassName = new StringBuilder("I_").append(refTableName); + referenceClassName = "I_"+refTableName; String modelpackage = getModelPackage(entityType); if (modelpackage != null) { - referenceClassName = new StringBuilder(modelpackage).append(".").append(referenceClassName); + referenceClassName = modelpackage+"."+referenceClassName; } if (!isGenerateModelGetterForEntity(AD_Table_ID, entityType)) { @@ -716,19 +717,19 @@ public class ModelInterfaceGenerator } else if (displayType == DisplayType.Location) { - referenceClassName = new StringBuilder("I_C_Location"); + referenceClassName = "I_C_Location"; } else if (displayType == DisplayType.Locator) { - referenceClassName = new StringBuilder("I_M_Locator"); + referenceClassName = "I_M_Locator"; } else if (displayType == DisplayType.Account) { - referenceClassName = new StringBuilder("I_C_ValidCombination"); + referenceClassName = "I_C_ValidCombination"; } else if (displayType == DisplayType.PAttribute) { - referenceClassName = new StringBuilder("I_M_AttributeSetInstance"); + referenceClassName = "I_M_AttributeSetInstance"; } else { @@ -736,7 +737,7 @@ public class ModelInterfaceGenerator //sb.append("\tpublic I_"+columnName+" getI_").append(columnName).append("(){return null; };"); } // - return referenceClassName.toString(); + return referenceClassName; } @@ -797,7 +798,7 @@ public class ModelInterfaceGenerator entityTypeFilter.append("EntityType IN ('U','A')"); } - StringBuilder directory = new StringBuilder(sourceFolder.trim()); + StringBuilder directory = new StringBuilder().append(sourceFolder.trim()); String packagePath = packageName.replace(".", File.separator); if (!(directory.toString().endsWith("/") || directory.toString().endsWith("\\"))) { diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java index 6516c0ac10..3c741700f2 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc.java @@ -426,22 +426,24 @@ public abstract class Doc || m_DocStatus.equals(DocumentEngine.STATUS_Voided) || m_DocStatus.equals(DocumentEngine.STATUS_Reversed)) ; - else - return "Invalid DocStatus='" + m_DocStatus + "' for DocumentNo=" + getDocumentNo(); + else{ + StringBuilder msgreturn = new StringBuilder("Invalid DocStatus='").append(m_DocStatus).append("' for DocumentNo=").append(getDocumentNo()); + return msgreturn.toString(); + } // if (p_po.getAD_Client_ID() != m_as.getAD_Client_ID()) { - String error = "AD_Client_ID Conflict - Document=" + p_po.getAD_Client_ID() - + ", AcctSchema=" + m_as.getAD_Client_ID(); - log.severe(error); - return error; + StringBuilder error = new StringBuilder("AD_Client_ID Conflict - Document=").append(p_po.getAD_Client_ID()) + .append(", AcctSchema=").append(m_as.getAD_Client_ID()); + log.severe(error.toString()); + return error.toString(); } // Lock Record ---- String trxName = null; // outside trx if on server if (! m_manageLocalTrx) trxName = getTrxName(); // on trx if it's in client - StringBuffer sql = new StringBuffer ("UPDATE "); + StringBuilder sql = new StringBuilder ("UPDATE "); sql.append(get_TableName()).append( " SET Processing='Y' WHERE ") .append(get_TableName()).append("_ID=").append(get_ID()) .append(" AND Processed='Y' AND IsActive='Y'"); @@ -565,7 +567,7 @@ public abstract class Doc // Reference note.setReference(toString()); // Document // Text - StringBuffer Text = new StringBuffer (Msg.getMsg(Env.getCtx(), AD_MessageValue)); + StringBuilder Text = new StringBuilder (Msg.getMsg(Env.getCtx(), AD_MessageValue)); if (p_Error != null) Text.append(" (").append(p_Error).append(")"); String cn = getClass().getName(); @@ -603,7 +605,7 @@ public abstract class Doc */ protected int deleteAcct() { - StringBuffer sql = new StringBuffer ("DELETE Fact_Acct WHERE AD_Table_ID=") + StringBuilder sql = new StringBuilder ("DELETE Fact_Acct WHERE AD_Table_ID=") .append(get_Table_ID()) .append(" AND Record_ID=").append(p_po.get_ID()) .append(" AND C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID()); @@ -776,7 +778,7 @@ public abstract class Doc String trxName = null; // outside trx if on server if (! m_manageLocalTrx) trxName = getTrxName(); // on trx if it's in client - StringBuffer sql = new StringBuffer ("UPDATE "); + StringBuilder sql = new StringBuilder ("UPDATE "); sql.append(get_TableName()).append( " SET Processing='N' WHERE ") .append(get_TableName()).append("_ID=").append(p_po.get_ID()); DB.executeUpdate(sql.toString(), trxName); diff --git a/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java b/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java index a70746a68e..e511d6fc0e 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java +++ b/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java @@ -84,7 +84,7 @@ public class DocLine_Allocation extends DocLine */ public String toString () { - StringBuffer sb = new StringBuffer ("DocLine_Allocation["); + StringBuilder sb = new StringBuilder ("DocLine_Allocation["); sb.append(get_ID()) .append(",Amt=").append(getAmtSource()) .append(",Discount=").append(getDiscountAmt()) diff --git a/org.adempiere.base/src/org/compiere/acct/DocManager.java b/org.adempiere.base/src/org/compiere/acct/DocManager.java index 97b83de957..b89fae8fc3 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocManager.java +++ b/org.adempiere.base/src/org/compiere/acct/DocManager.java @@ -227,10 +227,11 @@ public class DocManager { if (tableName == null) { s_log.severe("Table not a financial document. AD_Table_ID=" + AD_Table_ID); - return "Table not a financial document. AD_Table_ID="+AD_Table_ID; + StringBuilder msgreturn = new StringBuilder("Table not a financial document. AD_Table_ID=").append(AD_Table_ID); + return msgreturn.toString(); } - StringBuffer sql = new StringBuffer("SELECT * FROM ") + StringBuilder sql = new StringBuilder("SELECT * FROM ") .append(tableName) .append(" WHERE ").append(tableName).append("_ID=? AND Processed='Y'"); PreparedStatement pstmt = null; @@ -366,7 +367,7 @@ public class DocManager { private final static boolean save (String trxName, int AD_Table_ID, int Record_ID, String status) { MTable table = MTable.get(Env.getCtx(), AD_Table_ID); - StringBuffer sql = new StringBuffer("UPDATE "); + StringBuilder sql = new StringBuilder("UPDATE "); sql.append(table.getTableName()).append(" SET Posted='").append(status) .append("',Processing='N' ") .append("WHERE ") diff --git a/org.adempiere.base/src/org/compiere/acct/DocTax.java b/org.adempiere.base/src/org/compiere/acct/DocTax.java index 9dbe5f21d5..13a4f9309c 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocTax.java +++ b/org.adempiere.base/src/org/compiere/acct/DocTax.java @@ -170,7 +170,8 @@ public final class DocTax */ public String getDescription() { - return m_name + " " + m_taxBaseAmt.toString(); + StringBuilder msgreturn = new StringBuilder().append(m_name).append(" ").append(m_taxBaseAmt.toString()); + return msgreturn.toString(); } // getDescription /** @@ -236,7 +237,7 @@ public final class DocTax */ public String toString() { - StringBuffer sb = new StringBuffer("Tax=("); + StringBuilder sb = new StringBuilder("Tax=("); sb.append(m_name); sb.append(" Amt=").append(m_amount); sb.append(")"); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java index d0e8a10dd5..ff23a40b62 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java @@ -747,9 +747,9 @@ public class Doc_AllocationHdr extends Doc if (invoiceSource == null || invoiceAccounted == null) return "Gain/Loss - Invoice not posted yet"; // - String description = "Invoice=(" + invoice.getC_Currency_ID() + ")" + invoiceSource + "/" + invoiceAccounted - + " - Allocation=(" + getC_Currency_ID() + ")" + allocationSource + "/" + allocationAccounted; - log.fine(description); + StringBuilder description = new StringBuilder("Invoice=(").append(invoice.getC_Currency_ID()).append(")").append(invoiceSource).append("/").append(invoiceAccounted) + .append(" - Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource).append("/").append(allocationAccounted); + log.fine(description.toString()); // Allocation not Invoice Currency if (getC_Currency_ID() != invoice.getC_Currency_ID()) { @@ -759,10 +759,10 @@ public class Doc_AllocationHdr extends Doc invoice.getC_ConversionType_ID(), invoice.getAD_Client_ID(), invoice.getAD_Org_ID()); if (allocationSourceNew == null) return "Gain/Loss - No Conversion from Allocation->Invoice"; - String d2 = "Allocation=(" + getC_Currency_ID() + ")" + allocationSource - + "->(" + invoice.getC_Currency_ID() + ")" + allocationSourceNew; - log.fine(d2); - description += " - " + d2; + StringBuilder d2 = new StringBuilder("Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource) + .append("->(").append(invoice.getC_Currency_ID()).append(")").append(allocationSourceNew); + log.fine(d2.toString()); + description.append(" - ").append(d2); allocationSource = allocationSourceNew; } @@ -771,9 +771,9 @@ public class Doc_AllocationHdr extends Doc if (allocationSource.compareTo(invoiceSource) == 0) { acctDifference = invoiceAccounted.subtract(allocationAccounted); // gain is negative - String d2 = "(full) = " + acctDifference; - log.fine(d2); - description += " - " + d2; + StringBuilder d2 = new StringBuilder("(full) = ").append(acctDifference); + log.fine(d2.toString()); + description.append(" - ").append(d2); } else // partial or MC { @@ -790,9 +790,9 @@ public class Doc_AllocationHdr extends Doc int precision = as.getStdPrecision(); if (acctDifference.scale() > precision) acctDifference = acctDifference.setScale(precision, BigDecimal.ROUND_HALF_UP); - String d2 = "(partial) = " + acctDifference + " - Multiplier=" + multiplier; - log.fine(d2); - description += " - " + d2; + StringBuilder d2 = new StringBuilder("(partial) = ").append(acctDifference).append(" - Multiplier=").append(multiplier); + log.fine(d2.toString()); + description.append(" - ").append(d2); } if (acctDifference.signum() == 0) @@ -808,10 +808,10 @@ public class Doc_AllocationHdr extends Doc { FactLine fl = fact.createLine (line, loss, gain, as.getC_Currency_ID(), acctDifference); - fl.setDescription(description); + fl.setDescription(description.toString()); fact.createLine (line, acct, as.getC_Currency_ID(), acctDifference.negate()); - fl.setDescription(description); + fl.setDescription(description.toString()); } else { diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java index 270bd8eeac..c79c86ecf0 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java @@ -245,7 +245,7 @@ public class Doc_Invoice extends Doc public BigDecimal getBalance() { BigDecimal retValue = Env.ZERO; - StringBuffer sb = new StringBuffer (" ["); + StringBuilder sb = new StringBuilder (" ["); // Total retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross)); sb.append(getAmount(Doc.AMTTYPE_Gross)); @@ -900,19 +900,19 @@ public class Doc_Invoice extends Doc } else { - sql.append(" AND il.C_InvoiceLine_ID = (SELECT MIN(il1.C_InvoiceLine_ID) " - + "FROM C_Invoice i1, C_InvoiceLine il1 " - + "WHERE i1.C_Invoice_ID=il1.C_Invoice_ID" - + " AND po.M_Product_ID=il1.M_Product_ID AND po.C_BPartner_ID=i1.C_BPartner_ID") + sql.append(" AND il.C_InvoiceLine_ID = (SELECT MIN(il1.C_InvoiceLine_ID) ") + .append("FROM C_Invoice i1, C_InvoiceLine il1 ") + .append("WHERE i1.C_Invoice_ID=il1.C_Invoice_ID") + .append(" AND po.M_Product_ID=il1.M_Product_ID AND po.C_BPartner_ID=i1.C_BPartner_ID") .append(" AND i1.C_Invoice_ID=").append(get_ID()).append(") "); } sql.append(" AND i.C_Invoice_ID=").append(get_ID()).append(") ") // update - .append("WHERE EXISTS (SELECT * " - + "FROM C_Invoice i, C_InvoiceLine il " - + "WHERE i.C_Invoice_ID=il.C_Invoice_ID" - + " AND po.M_Product_ID=il.M_Product_ID AND po.C_BPartner_ID=i.C_BPartner_ID" - + " AND i.C_Invoice_ID=").append(get_ID()).append(")"); + .append("WHERE EXISTS (SELECT * ") + .append("FROM C_Invoice i, C_InvoiceLine il ") + .append("WHERE i.C_Invoice_ID=il.C_Invoice_ID") + .append(" AND po.M_Product_ID=il.M_Product_ID AND po.C_BPartner_ID=i.C_BPartner_ID") + .append(" AND i.C_Invoice_ID=").append(get_ID()).append(")"); int no = DB.executeUpdate(sql.toString(), getTrxName()); log.fine("Updated=" + no); } // updateProductPO diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java index 919324a1bf..d6e9269101 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java @@ -282,7 +282,7 @@ public class Doc_Order extends Doc public BigDecimal getBalance() { BigDecimal retValue = Env.ZERO; - StringBuffer sb = new StringBuffer (" ["); + StringBuilder sb = new StringBuilder (" ["); // Total retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross)); sb.append(getAmount(Doc.AMTTYPE_Gross)); @@ -461,7 +461,7 @@ public class Doc_Order extends Doc if (ci.getC_AcctSchema1_ID() != as.getC_AcctSchema_ID()) return; - StringBuffer sql = new StringBuffer ( + StringBuilder sql = new StringBuilder ( "UPDATE M_Product_PO po ") .append("SET PriceLastPO = (SELECT currencyConvert(ol.PriceActual,ol.C_Currency_ID,po.C_Currency_ID,o.DateOrdered,o.C_ConversionType_ID,o.AD_Client_ID,o.AD_Org_ID) ") .append("FROM C_Order o, C_OrderLine ol ") @@ -479,11 +479,11 @@ public class Doc_Order extends Doc .append(" AND po.M_Product_ID=ol1.M_Product_ID AND po.C_BPartner_ID=o1.C_BPartner_ID") .append(" AND o1.C_Order_ID=").append(get_ID()).append(") "); sql.append(" AND o.C_Order_ID=").append(get_ID()).append(") ") - .append("WHERE EXISTS (SELECT * " - + "FROM C_Order o, C_OrderLine ol " - + "WHERE o.C_Order_ID=ol.C_Order_ID" - + " AND po.M_Product_ID=ol.M_Product_ID AND po.C_BPartner_ID=o.C_BPartner_ID" - + " AND o.C_Order_ID=").append(get_ID()).append(")"); + .append("WHERE EXISTS (SELECT * ") + .append("FROM C_Order o, C_OrderLine ol ") + .append("WHERE o.C_Order_ID=ol.C_Order_ID") + .append(" AND po.M_Product_ID=ol.M_Product_ID AND po.C_BPartner_ID=o.C_BPartner_ID") + .append(" AND o.C_Order_ID=").append(get_ID()).append(")"); int no = DB.executeUpdate(sql.toString(), getTrxName()); log.fine("Updated=" + no); } // updateProductPO diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java b/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java index 21abf38069..11ce108a20 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java @@ -86,9 +86,12 @@ public class Doc_ProjectIssue extends Doc public String getDocumentNo () { MProject p = m_issue.getParent(); - if (p != null) - return p.getValue() + " #" + m_issue.getLine(); - return "(" + m_issue.get_ID() + ")"; + if (p != null){ + StringBuilder msgreturn = new StringBuilder().append(p.getValue()).append(" #").append(m_issue.getLine()); + return msgreturn.toString(); + } + StringBuilder msgreturn = new StringBuilder("(").append(m_issue.get_ID()).append(")"); + return msgreturn.toString(); } // getDocumentNo /** diff --git a/org.adempiere.base/src/org/compiere/acct/FactLine.java b/org.adempiere.base/src/org/compiere/acct/FactLine.java index bdaac5aebc..276ed52563 100644 --- a/org.adempiere.base/src/org/compiere/acct/FactLine.java +++ b/org.adempiere.base/src/org/compiere/acct/FactLine.java @@ -351,7 +351,7 @@ public final class FactLine extends X_Fact_Acct if (m_docLine != null) setC_Tax_ID (m_docLine.getC_Tax_ID()); // Description - StringBuffer description = new StringBuffer(m_doc.getDocumentNo()); + StringBuilder description = new StringBuilder().append(m_doc.getDocumentNo()); if (m_docLine != null) { description.append(" #").append(m_docLine.getLine()); @@ -458,8 +458,10 @@ public final class FactLine extends X_Fact_Acct String original = getDescription(); if (original == null || original.trim().length() == 0) super.setDescription(description); - else - super.setDescription(original + " - " + description); + else{ + StringBuilder msgd = new StringBuilder(original).append(" - ").append(description); + super.setDescription(msgd.toString()); + } } // addDescription /** @@ -729,7 +731,7 @@ public final class FactLine extends X_Fact_Acct */ public String toString() { - StringBuffer sb = new StringBuffer("FactLine=["); + StringBuilder sb = new StringBuilder("FactLine=["); sb.append(getAD_Table_ID()).append(":").append(getRecord_ID()) .append(",").append(m_acct) .append(",Cur=").append(getC_Currency_ID()) @@ -1104,7 +1106,7 @@ public final class FactLine extends X_Fact_Acct // end Bayu Sistematika // success = true; - log.fine(new StringBuffer("(Table=").append(AD_Table_ID) + log.fine(new StringBuilder("(Table=").append(AD_Table_ID) .append(",Record_ID=").append(Record_ID) .append(",Line=").append(Record_ID) .append(", Account=").append(m_acct) @@ -1132,7 +1134,7 @@ public final class FactLine extends X_Fact_Acct setAD_Org_ID (fact.getAD_Org_ID()); } else - log.warning(new StringBuffer("Not Found (try later) ") + log.warning(new StringBuilder("Not Found (try later) ") .append(",C_AcctSchema_ID=").append(getC_AcctSchema_ID()) .append(", AD_Table_ID=").append(AD_Table_ID) .append(",Record_ID=").append(Record_ID) diff --git a/org.adempiere.base/src/org/compiere/acct/Matcher.java b/org.adempiere.base/src/org/compiere/acct/Matcher.java index 3f520e1b00..dd1245e57d 100644 --- a/org.adempiere.base/src/org/compiere/acct/Matcher.java +++ b/org.adempiere.base/src/org/compiere/acct/Matcher.java @@ -157,12 +157,12 @@ public class Matcher // MMatchInv inv = new MMatchInv (); int M_MatchInv_ID = DB.getNextID (AD_Client_ID, "M_MatchInv", m_trxName); // - StringBuffer sql = new StringBuffer("INSERT INTO M_MatchInv (" - + "M_MatchInv_ID, " - + "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy, " - + "M_InOutLine_ID,C_InvoiceLine_ID, " - + "M_Product_ID,DateTrx,Qty, " - + "Processing,Processed,Posted) VALUES (") + StringBuilder sql = new StringBuilder("INSERT INTO M_MatchInv (") + .append("M_MatchInv_ID, ") + .append("AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy, ") + .append("M_InOutLine_ID,C_InvoiceLine_ID, ") + .append("M_Product_ID,DateTrx,Qty, ") + .append("Processing,Processed,Posted) VALUES (") .append(M_MatchInv_ID).append(", ") .append(AD_Client_ID).append(",").append(AD_Org_ID).append(",'Y',SysDate,0,SysDate,0, ") .append(M_InOutLine_ID).append(",").append(C_InvoiceLine_ID).append(", ") diff --git a/org.adempiere.base/src/org/compiere/acct/ProductInfo.java b/org.adempiere.base/src/org/compiere/acct/ProductInfo.java index 10711c6b66..c29b883d2f 100644 --- a/org.adempiere.base/src/org/compiere/acct/ProductInfo.java +++ b/org.adempiere.base/src/org/compiere/acct/ProductInfo.java @@ -236,12 +236,12 @@ public class ProductInfo */ private BigDecimal getPriceList (MAcctSchema as, boolean onlyPOPriceList) { - StringBuffer sql = new StringBuffer ( - "SELECT pl.C_Currency_ID, pp.PriceList, pp.PriceStd, pp.PriceLimit " - + "FROM M_PriceList pl, M_PriceList_Version plv, M_ProductPrice pp " - + "WHERE pl.M_PriceList_ID = plv.M_PriceList_ID" - + " AND plv.M_PriceList_Version_ID = pp.M_PriceList_Version_ID" - + " AND pp.M_Product_ID=?"); + StringBuilder sql = new StringBuilder ( + "SELECT pl.C_Currency_ID, pp.PriceList, pp.PriceStd, pp.PriceLimit ") + .append("FROM M_PriceList pl, M_PriceList_Version plv, M_ProductPrice pp ") + .append("WHERE pl.M_PriceList_ID = plv.M_PriceList_ID") + .append(" AND plv.M_PriceList_Version_ID = pp.M_PriceList_Version_ID") + .append(" AND pp.M_Product_ID=?"); if (onlyPOPriceList) sql.append(" AND pl.IsSOPriceList='N'"); sql.append(" ORDER BY pl.IsSOPriceList ASC, plv.ValidFrom DESC"); diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java index 65e2d79620..c0f785dadc 100644 --- a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java +++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java @@ -350,7 +350,7 @@ public final class ImpFormat for (int i = 0; i < m_rows.size(); i++) { ImpFormatRow row = (ImpFormatRow)m_rows.get(i); - StringBuffer entry = new StringBuffer (); + StringBuilder entry = new StringBuilder (); // Label-Start if (withLabel) { @@ -439,7 +439,7 @@ public final class ImpFormat int length = line.length(); for (int field = 1; field <= fieldNo && pos < length; field++) { - StringBuffer content = new StringBuffer(); + StringBuilder content = new StringBuilder(); // two delimiter directly after each other if (line.charAt(pos) == delimiter) { @@ -518,7 +518,7 @@ public final class ImpFormat // Check if the record is already there ------------------------------ - StringBuffer sql = new StringBuffer ("SELECT COUNT(*), MAX(") + StringBuilder sql = new StringBuilder ("SELECT COUNT(*), MAX(") .append(m_tablePK).append(") FROM ").append(m_tableName) .append(" WHERE AD_Client_ID=").append(AD_Client_ID).append(" AND ("); // @@ -541,7 +541,7 @@ public final class ImpFormat whereParentChild += " AND " + nodes[i]; } } - StringBuffer find = new StringBuffer(); + StringBuilder find = new StringBuilder(); if (where1 != null) find.append(where1); if (where2 != null) @@ -587,7 +587,7 @@ public final class ImpFormat if (ID == 0) { ID = DB.getNextID(ctx, m_tableName, null); // get ID - sql = new StringBuffer("INSERT INTO ") + sql = new StringBuilder("INSERT INTO ") .append(m_tableName).append("(").append(m_tablePK).append(",") .append("AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive") // StdFields .append(") VALUES (").append(ID).append(",") @@ -607,7 +607,7 @@ public final class ImpFormat log.finer("Old ID=" + ID + " " + find); // Update Info ------------------------------------------------------- - sql = new StringBuffer ("UPDATE ") + sql = new StringBuilder ("UPDATE ") .append(m_tableName).append(" SET "); for (int i = 0; i < nodes.length; i++) sql.append(nodes[i]).append(","); // column=value diff --git a/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java b/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java index a5e6e858c2..a9d70e2e82 100644 --- a/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java +++ b/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java @@ -731,7 +731,7 @@ public abstract class OFXBankStatementHandler extends DefaultHandler { if (!m_controller.saveLine()) { - m_errorMessage = new StringBuffer(m_controller.getErrorMessage()); + m_errorMessage = new StringBuffer().append(m_controller.getErrorMessage()); m_errorDescription = new StringBuffer(m_controller.getErrorDescription()); throw new SAXException(m_errorMessage.toString()); } diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index eee5e23723..eff9ee2293 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -676,7 +676,7 @@ public class GridFieldVO implements Serializable */ public String toString () { - StringBuffer sb = new StringBuffer ("MFieldVO["); + StringBuilder sb = new StringBuilder ("MFieldVO["); sb.append(AD_Column_ID).append("-").append(ColumnName) .append ("]"); return sb.toString (); diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index cf5258adf3..0bfa30cfe1 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -537,7 +537,7 @@ public class GridTable extends AbstractTableModel } // getColumn /** - * Return Columns with Indentifier (ColumnName) + * Return Columns with Identifier (ColumnName) * @param identifier column name * @return MField */ diff --git a/org.adempiere.base/src/org/compiere/model/GridWindow.java b/org.adempiere.base/src/org/compiere/model/GridWindow.java index bc961938d5..4aa05fef47 100644 --- a/org.adempiere.base/src/org/compiere/model/GridWindow.java +++ b/org.adempiere.base/src/org/compiere/model/GridWindow.java @@ -413,7 +413,8 @@ public class GridWindow implements Serializable */ public String toString() { - return "MWindow[" + m_vo.WindowNo + "," + m_vo.Name + " (" + m_vo.AD_Window_ID + ")]"; + StringBuilder msgreturn = new StringBuilder("MWindow[").append(m_vo.WindowNo).append(",").append(m_vo.Name).append(" (").append(m_vo.AD_Window_ID).append(")]"); + return msgreturn.toString(); } // toString /** @@ -423,15 +424,15 @@ public class GridWindow implements Serializable */ public WebDoc getHelpDoc (boolean javaClient) { - String title = Msg.getMsg(Env.getCtx(), "Window") + ": " + getName(); + StringBuilder title = new StringBuilder(Msg.getMsg(Env.getCtx(), "Window")).append(": ").append(getName()); WebDoc doc = null; if (javaClient) { - doc = WebDoc.create (false, title, javaClient); + doc = WebDoc.create (false, title.toString(), javaClient); } else // HTML { - doc = WebDoc.createPopup (title); + doc = WebDoc.createPopup (title.toString()); doc.addPopupClose(Env.getCtx()); } diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_Client.java b/org.adempiere.base/src/org/compiere/model/I_AD_Client.java index 01892ebf3d..37e4467921 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_Client.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_Client.java @@ -87,10 +87,10 @@ public interface I_AD_Client /** Column name AD_PasswordRule_ID */ public static final String COLUMNNAME_AD_PasswordRule_ID = "AD_PasswordRule_ID"; - /** Set AD_PasswordRule */ + /** Set Password Policies */ public void setAD_PasswordRule_ID (int AD_PasswordRule_ID); - /** Get AD_PasswordRule */ + /** Get Password Policies */ public int getAD_PasswordRule_ID(); public org.compiere.model.I_AD_PasswordRule getAD_PasswordRule() throws RuntimeException; @@ -217,6 +217,19 @@ public interface I_AD_Client */ public boolean isPostImmediate(); + /** Column name IsSecureSMTP */ + public static final String COLUMNNAME_IsSecureSMTP = "IsSecureSMTP"; + + /** Set SMTP SSL/TLS. + * Use SSL/TLS for SMTP + */ + public void setIsSecureSMTP (boolean IsSecureSMTP); + + /** Get SMTP SSL/TLS. + * Use SSL/TLS for SMTP + */ + public boolean isSecureSMTP(); + /** Column name IsServerEMail */ public static final String COLUMNNAME_IsServerEMail = "IsServerEMail"; @@ -373,6 +386,19 @@ public interface I_AD_Client */ public String getSMTPHost(); + /** Column name SMTPPort */ + public static final String COLUMNNAME_SMTPPort = "SMTPPort"; + + /** Set SMTP Port. + * SMTP Port Number + */ + public void setSMTPPort (int SMTPPort); + + /** Get SMTP Port. + * SMTP Port Number + */ + public int getSMTPPort(); + /** Column name StoreArchiveOnFileSystem */ public static final String COLUMNNAME_StoreArchiveOnFileSystem = "StoreArchiveOnFileSystem"; diff --git a/org.adempiere.base/src/org/compiere/model/MAccount.java b/org.adempiere.base/src/org/compiere/model/MAccount.java index 7739a61a1b..75895fc10c 100644 --- a/org.adempiere.base/src/org/compiere/model/MAccount.java +++ b/org.adempiere.base/src/org/compiere/model/MAccount.java @@ -83,10 +83,10 @@ public class MAccount extends X_C_ValidCombination ArrayList params = new ArrayList(); // Mandatory fields - StringBuilder whereClause = new StringBuilder("AD_Client_ID=?" // #1 - + " AND AD_Org_ID=?" - + " AND C_AcctSchema_ID=?" - + " AND Account_ID=?"); // #4 + StringBuilder whereClause = new StringBuilder("AD_Client_ID=?") // #1 + .append(" AND AD_Org_ID=?") + .append(" AND C_AcctSchema_ID=?") + .append(" AND Account_ID=?"); // #4 params.add(AD_Client_ID); params.add(AD_Org_ID); params.add(C_AcctSchema_ID); diff --git a/org.adempiere.base/src/org/compiere/model/MAccountLookup.java b/org.adempiere.base/src/org/compiere/model/MAccountLookup.java index cee7604a5f..1f08b62883 100644 --- a/org.adempiere.base/src/org/compiere/model/MAccountLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MAccountLookup.java @@ -191,7 +191,7 @@ public final class MAccountLookup extends Lookup implements Serializable for(MAccount account :accounts) { - StringBuilder msglist = new StringBuilder(account.getCombination()).append(" - ") + StringBuilder msglist = new StringBuilder().append(account.getCombination()).append(" - ") .append(account.getDescription()); list.add (new KeyNamePair(account.getC_ValidCombination_ID(), msglist.toString())); } diff --git a/org.adempiere.base/src/org/compiere/model/MAcctProcessor.java b/org.adempiere.base/src/org/compiere/model/MAcctProcessor.java index 6ad2e59ef6..e75e9e13a4 100644 --- a/org.adempiere.base/src/org/compiere/model/MAcctProcessor.java +++ b/org.adempiere.base/src/org/compiere/model/MAcctProcessor.java @@ -94,7 +94,7 @@ public class MAcctProcessor extends X_C_AcctProcessor { this (client.getCtx(), 0, client.get_TrxName()); setClientOrg(client); - StringBuilder msgset = new StringBuilder(client.getName()).append(" - ") + StringBuilder msgset = new StringBuilder().append(client.getName()).append(" - ") .append(Msg.translate(getCtx(), "C_AcctProcessor_ID")); setName (msgset.toString()); setSupervisor_ID (Supervisor_ID); diff --git a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java index 2d06d2f56b..0540f42415 100644 --- a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java +++ b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java @@ -195,7 +195,7 @@ public class MAcctSchema extends X_C_AcctSchema this (client.getCtx(), 0, client.get_TrxName()); setClientOrg(client); setC_Currency_ID (currency.getKey()); - StringBuilder msgset = new StringBuilder(client.getName()).append(" ").append(getGAAP()).append("/").append(get_ColumnCount()).append(" ").append(currency.getName()); + StringBuilder msgset = new StringBuilder().append(client.getName()).append(" ").append(getGAAP()).append("/").append(get_ColumnCount()).append(" ").append(currency.getName()); setName (msgset.toString()); } // MAcctSchema diff --git a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java index 0917529f45..545de0beff 100644 --- a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java @@ -649,7 +649,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public String getDocumentInfo() { - StringBuilder msgreturn = new StringBuilder(Msg.getElement(getCtx(), "C_AllocationHdr_ID")).append(" ").append(getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(Msg.getElement(getCtx(), "C_AllocationHdr_ID")).append(" ").append(getDocumentNo()); return msgreturn.toString(); } // getDocumentInfo @@ -661,7 +661,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction { try { - StringBuilder msgctf = new StringBuilder(get_TableName()).append(get_ID()).append("_"); + StringBuilder msgctf = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); File temp = File.createTempFile(msgctf.toString(), ".pdf"); return createPDF (temp); } diff --git a/org.adempiere.base/src/org/compiere/model/MArchive.java b/org.adempiere.base/src/org/compiere/model/MArchive.java index 8a193021da..4d3b747fa6 100644 --- a/org.adempiere.base/src/org/compiere/model/MArchive.java +++ b/org.adempiere.base/src/org/compiere/model/MArchive.java @@ -411,15 +411,16 @@ public class MArchive extends X_AD_Archive { BufferedOutputStream out = null; try { // create destination folder - final File destFolder = new File(m_archivePathRoot + File.separator - + getArchivePathSnippet()); + StringBuilder msgfile = new StringBuilder().append(m_archivePathRoot).append(File.separator) + .append(getArchivePathSnippet()); + final File destFolder = new File(msgfile.toString()); if (!destFolder.exists()) { if (!destFolder.mkdirs()) { log.warning("unable to create folder: " + destFolder.getPath()); } } // write to pdf - StringBuilder msgfile = new StringBuilder(m_archivePathRoot).append(File.separator) + msgfile = new StringBuilder().append(m_archivePathRoot).append(File.separator) .append(getArchivePathSnippet()).append(this.get_ID()).append(".pdf"); final File destFile = new File(msgfile.toString()); diff --git a/org.adempiere.base/src/org/compiere/model/MAsset.java b/org.adempiere.base/src/org/compiere/model/MAsset.java index faf94f2241..439c158f47 100644 --- a/org.adempiere.base/src/org/compiere/model/MAsset.java +++ b/org.adempiere.base/src/org/compiere/model/MAsset.java @@ -187,14 +187,14 @@ public class MAsset extends X_A_Asset if (deliveryCount > 1) documentNo.append("_").append(deliveryCount); // Value - StringBuilder value = new StringBuilder(partner.getValue()).append("_").append(product.getValue()); + StringBuilder value = new StringBuilder().append(partner.getValue()).append("_").append(product.getValue()); if (value.length() > 40-documentNo.length()) value.delete(40-documentNo.length(), value.length()).append(documentNo); setValue(value.toString()); // Name MProduct.afterSave - StringBuilder name = new StringBuilder(partner.getName()).append(" - ").append(product.getName()); + StringBuilder name = new StringBuilder().append(partner.getName()).append(" - ").append(product.getName()); if (name.length() > 60) name.delete(60,name.length()); setName(name.toString()); diff --git a/org.adempiere.base/src/org/compiere/model/MAttachment.java b/org.adempiere.base/src/org/compiere/model/MAttachment.java index 0a57f7c1d3..57e167c06f 100644 --- a/org.adempiere.base/src/org/compiere/model/MAttachment.java +++ b/org.adempiere.base/src/org/compiere/model/MAttachment.java @@ -579,14 +579,14 @@ public class MAttachment extends X_AD_Attachment FileChannel out = null; try { //create destination folder - StringBuilder msgfile = new StringBuilder(m_attachmentPathRoot).append(File.separator).append(getAttachmentPathSnippet()); + StringBuilder msgfile = new StringBuilder().append(m_attachmentPathRoot).append(File.separator).append(getAttachmentPathSnippet()); final File destFolder = new File(msgfile.toString()); if(!destFolder.exists()){ if(!destFolder.mkdirs()){ log.warning("unable to create folder: " + destFolder.getPath()); } } - msgfile = new StringBuilder(m_attachmentPathRoot).append(File.separator) + msgfile = new StringBuilder().append(m_attachmentPathRoot).append(File.separator) .append(getAttachmentPathSnippet()).append(File.separator).append(entryFile.getName()); final File destFile = new File(msgfile.toString()); in = new FileInputStream(entryFile).getChannel(); diff --git a/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java b/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java index 6e733f2f06..49ad562d07 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MBPartnerLocation.java @@ -125,7 +125,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location { /** Cached Location */ private MLocation m_location = null; /** Unique Name */ - private StringBuffer m_uniqueName = null; + private String m_uniqueName = null; private int m_unique = 0; /** @@ -181,21 +181,21 @@ public class MBPartnerLocation extends X_C_BPartner_Location { * address */ private void makeUnique(MLocation address) { - m_uniqueName = new StringBuffer(); + m_uniqueName = ""; // 0 - City if (m_unique >= 0 || m_uniqueName.length() == 0) { String xx = address.getCity(); if (xx != null && xx.length() > 0) - m_uniqueName = new StringBuffer(xx); + m_uniqueName = xx; } // 1 + Address1 if (m_unique >= 1 || m_uniqueName.length() == 0) { String xx = address.getAddress1(); if (xx != null && xx.length() > 0) { if (m_uniqueName.length() > 0) - m_uniqueName.append(" "); - m_uniqueName.append(xx); + m_uniqueName += " "; + m_uniqueName += xx; } } // 2 + Address2 @@ -203,8 +203,8 @@ public class MBPartnerLocation extends X_C_BPartner_Location { String xx = address.getAddress2(); if (xx != null && xx.length() > 0) { if (m_uniqueName.length() > 0) - m_uniqueName.append(" "); - m_uniqueName.append(xx); + m_uniqueName += " "; + m_uniqueName += xx; } } // 3 - Region @@ -212,8 +212,8 @@ public class MBPartnerLocation extends X_C_BPartner_Location { String xx = address.getRegionName(true); if (xx != null && xx.length() > 0) { if (m_uniqueName.length() > 0) - m_uniqueName.append(" "); - m_uniqueName.append(xx); + m_uniqueName += " "; + m_uniqueName += xx; } } // 4 - ID @@ -221,12 +221,12 @@ public class MBPartnerLocation extends X_C_BPartner_Location { int id = get_ID(); if (id == 0) id = address.get_ID(); - m_uniqueName.append("#").append(id); + m_uniqueName += "#" + id; } } // makeUnique public String getBPLocName(MLocation address) { - m_uniqueName = new StringBuffer(getName()); + m_uniqueName = getName(); m_unique = MSysConfig.getIntValue("START_VALUE_BPLOCATION_NAME", 0, getAD_Client_ID(), getAD_Org_ID()); if (m_unique < 0 || m_unique > 4) diff --git a/org.adempiere.base/src/org/compiere/model/MBankAccount.java b/org.adempiere.base/src/org/compiere/model/MBankAccount.java index ce681e4f54..752b5c9c97 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankAccount.java +++ b/org.adempiere.base/src/org/compiere/model/MBankAccount.java @@ -117,7 +117,7 @@ public class MBankAccount extends X_C_BankAccount */ public String getName() { - StringBuilder msgreturn = new StringBuilder(getBank().getName()).append(" ").append(getAccountNo()); + StringBuilder msgreturn = new StringBuilder().append(getBank().getName()).append(" ").append(getAccountNo()); return msgreturn.toString(); } // getName diff --git a/org.adempiere.base/src/org/compiere/model/MBankStatement.java b/org.adempiere.base/src/org/compiere/model/MBankStatement.java index 56806857ef..fff3eb2bfb 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankStatement.java +++ b/org.adempiere.base/src/org/compiere/model/MBankStatement.java @@ -148,8 +148,10 @@ public class MBankStatement extends X_C_BankStatement implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgd = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgd.toString()); + } } // addDescription /** @@ -162,10 +164,10 @@ public class MBankStatement extends X_C_BankStatement implements DocAction super.setProcessed (processed); if (get_ID() == 0) return; - String sql = "UPDATE C_BankStatementLine SET Processed='" - + (processed ? "Y" : "N") - + "' WHERE C_BankStatement_ID=" + getC_BankStatement_ID(); - int noLine = DB.executeUpdate(sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE C_BankStatementLine SET Processed='") + .append((processed ? "Y" : "N")) + .append("' WHERE C_BankStatement_ID=").append(getC_BankStatement_ID()); + int noLine = DB.executeUpdate(sql.toString(), get_TrxName()); m_lines = null; log.fine("setProcessed - " + processed + " - Lines=" + noLine); } // setProcessed @@ -194,7 +196,8 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public String getDocumentInfo() { - return getBankAccount().getName() + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(getBankAccount().getName()).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -205,7 +208,8 @@ public class MBankStatement extends X_C_BankStatement implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) @@ -460,16 +464,16 @@ public class MBankStatement extends X_C_BankStatement implements DocAction MBankStatementLine line = lines[i]; if (line.getStmtAmt().compareTo(Env.ZERO) != 0) { - String description = Msg.getMsg(getCtx(), "Voided") + " (" - + Msg.translate(getCtx(), "StmtAmt") + "=" + line.getStmtAmt(); + StringBuilder description = new StringBuilder(Msg.getMsg(getCtx(), "Voided")).append(" (") + .append(Msg.translate(getCtx(), "StmtAmt")).append("=").append(line.getStmtAmt()); if (line.getTrxAmt().compareTo(Env.ZERO) != 0) - description += ", " + Msg.translate(getCtx(), "TrxAmt") + "=" + line.getTrxAmt(); + description.append(", ").append(Msg.translate(getCtx(), "TrxAmt")).append("=").append(line.getTrxAmt()); if (line.getChargeAmt().compareTo(Env.ZERO) != 0) - description += ", " + Msg.translate(getCtx(), "ChargeAmt") + "=" + line.getChargeAmt(); + description.append(", ").append(Msg.translate(getCtx(), "ChargeAmt")).append("=").append(line.getChargeAmt()); if (line.getInterestAmt().compareTo(Env.ZERO) != 0) - description += ", " + Msg.translate(getCtx(), "InterestAmt") + "=" + line.getInterestAmt(); - description += ")"; - line.addDescription(description); + description.append(", ").append(Msg.translate(getCtx(), "InterestAmt")).append("=").append(line.getInterestAmt()); + description.append(")"); + line.addDescription(description.toString()); // line.setStmtAmt(Env.ZERO); line.setTrxAmt(Env.ZERO); @@ -585,7 +589,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getName()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MCStage.java b/org.adempiere.base/src/org/compiere/model/MCStage.java index fce725208e..8bf187e87c 100644 --- a/org.adempiere.base/src/org/compiere/model/MCStage.java +++ b/org.adempiere.base/src/org/compiere/model/MCStage.java @@ -263,7 +263,7 @@ public class MCStage extends X_CM_CStage */ protected boolean checkElements () { X_CM_Template thisTemplate = new X_CM_Template(getCtx(), this.getCM_Template_ID(), get_TrxName()); - StringBuilder thisElementList = new StringBuilder(thisTemplate.getElements()); + StringBuilder thisElementList = new StringBuilder().append(thisTemplate.getElements()); while (thisElementList.indexOf("\n")>=0) { String thisElement = thisElementList.substring(0,thisElementList.indexOf("\n")); thisElementList.delete(0,thisElementList.indexOf("\n")+1); diff --git a/org.adempiere.base/src/org/compiere/model/MCalendar.java b/org.adempiere.base/src/org/compiere/model/MCalendar.java index eba5b7a40a..c862e49d7c 100644 --- a/org.adempiere.base/src/org/compiere/model/MCalendar.java +++ b/org.adempiere.base/src/org/compiere/model/MCalendar.java @@ -113,7 +113,7 @@ public class MCalendar extends X_C_Calendar { super(client.getCtx(), 0, client.get_TrxName()); setClientOrg(client); - StringBuilder msgset = new StringBuilder(client.getName()).append(" ").append(Msg.translate(client.getCtx(), "C_Calendar_ID")); + StringBuilder msgset = new StringBuilder().append(client.getName()).append(" ").append(Msg.translate(client.getCtx(), "C_Calendar_ID")); setName(msgset.toString()); } // MCalendar diff --git a/org.adempiere.base/src/org/compiere/model/MCash.java b/org.adempiere.base/src/org/compiere/model/MCash.java index 90a2a6f582..4e4adf1f81 100644 --- a/org.adempiere.base/src/org/compiere/model/MCash.java +++ b/org.adempiere.base/src/org/compiere/model/MCash.java @@ -159,9 +159,10 @@ public class MCash extends X_C_Cash implements DocAction Timestamp today = TimeUtil.getDay(System.currentTimeMillis()); setStatementDate (today); // @#Date@ setDateAcct (today); // @#Date@ - String name = DisplayType.getDateFormat(DisplayType.Date).format(today) - + " " + MOrg.get(ctx, getAD_Org_ID()).getValue(); - setName (name); + + StringBuilder name = new StringBuilder(DisplayType.getDateFormat(DisplayType.Date).format(today)) + .append(" ").append(MOrg.get(ctx, getAD_Org_ID()).getValue()); + setName (name.toString()); setIsApproved(false); setPosted (false); // N setProcessed (false); @@ -193,9 +194,9 @@ public class MCash extends X_C_Cash implements DocAction { setStatementDate (today); setDateAcct (today); - String name = DisplayType.getDateFormat(DisplayType.Date).format(today) - + " " + cb.getName(); - setName (name); + StringBuilder name = new StringBuilder(DisplayType.getDateFormat(DisplayType.Date).format(today)) + .append(" ").append(cb.getName()); + setName (name.toString()); } m_book = cb; } // MCash @@ -254,7 +255,8 @@ public class MCash extends X_C_Cash implements DocAction */ public String getDocumentInfo() { - return Msg.getElement(getCtx(), "C_Cash_ID") + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(Msg.getElement(getCtx(), "C_Cash_ID")).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -265,7 +267,8 @@ public class MCash extends X_C_Cash implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) @@ -470,11 +473,11 @@ public class MCash extends X_C_Cash implements DocAction return DocAction.STATUS_Invalid; } // - String name = Msg.translate(getCtx(), "C_Cash_ID") + ": " + getName() - + " - " + Msg.translate(getCtx(), "Line") + " " + line.getLine(); + StringBuilder name = new StringBuilder().append(Msg.translate(getCtx(), "C_Cash_ID")).append(": ").append(getName()) + .append(" - ").append(Msg.translate(getCtx(), "Line")).append(" ").append(line.getLine()); MAllocationHdr hdr = new MAllocationHdr(getCtx(), false, getDateAcct(), line.getC_Currency_ID(), - name, get_TrxName()); + name.toString(), get_TrxName()); hdr.setAD_Org_ID(getAD_Org_ID()); if (!hdr.save()) { @@ -621,9 +624,10 @@ public class MCash extends X_C_Cash implements DocAction cashline.setAmount(Env.ZERO); cashline.setDiscountAmt(Env.ZERO); cashline.setWriteOffAmt(Env.ZERO); - cashline.addDescription(Msg.getMsg(getCtx(), "Voided") - + " (Amount=" + oldAmount + ", Discount=" + oldDiscount - + ", WriteOff=" + oldWriteOff + ", )"); + StringBuilder msgadd = new StringBuilder().append(Msg.getMsg(getCtx(), "Voided")) + .append(" (Amount=").append(oldAmount).append(", Discount=").append(oldDiscount) + .append(", WriteOff=").append(oldWriteOff).append(", )"); + cashline.addDescription(msgadd.toString()); if (MCashLine.CASHTYPE_BankAccountTransfer.equals(cashline.getCashType())) { if (cashline.getC_Payment_ID() == 0) @@ -659,8 +663,10 @@ public class MCash extends X_C_Cash implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgd = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgd.toString()); + } } // addDescription /** @@ -760,10 +766,10 @@ public class MCash extends X_C_Cash implements DocAction public void setProcessed (boolean processed) { super.setProcessed (processed); - String sql = "UPDATE C_CashLine SET Processed='" - + (processed ? "Y" : "N") - + "' WHERE C_Cash_ID=" + getC_Cash_ID(); - int noLine = DB.executeUpdate (sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE C_CashLine SET Processed='") + .append((processed ? "Y" : "N")) + .append("' WHERE C_Cash_ID=").append(getC_Cash_ID()); + int noLine = DB.executeUpdate (sql.toString(), get_TrxName()); m_lines = null; log.fine(processed + " - Lines=" + noLine); } // setProcessed @@ -774,7 +780,7 @@ public class MCash extends X_C_Cash implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MCash["); + StringBuilder sb = new StringBuilder ("MCash["); sb.append (get_ID ()) .append ("-").append (getName()) .append(", Balance=").append(getBeginningBalance()) @@ -789,7 +795,7 @@ public class MCash extends X_C_Cash implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getName()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MChangeRequest.java b/org.adempiere.base/src/org/compiere/model/MChangeRequest.java index f86ab7393b..78468ea331 100644 --- a/org.adempiere.base/src/org/compiere/model/MChangeRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MChangeRequest.java @@ -61,7 +61,7 @@ public class MChangeRequest extends X_M_ChangeRequest { this (request.getCtx(), 0, request.get_TrxName()); setClientOrg(request); - StringBuilder msgset = new StringBuilder(Msg.getElement(getCtx(), "R_Request_ID")).append(": ").append(request.getDocumentNo()); + StringBuilder msgset = new StringBuilder().append(Msg.getElement(getCtx(), "R_Request_ID")).append(": ").append(request.getDocumentNo()); setName(msgset.toString()); setHelp(request.getSummary()); // diff --git a/org.adempiere.base/src/org/compiere/model/MClient.java b/org.adempiere.base/src/org/compiere/model/MClient.java index 6702df7328..7ede0f8b9f 100644 --- a/org.adempiere.base/src/org/compiere/model/MClient.java +++ b/org.adempiere.base/src/org/compiere/model/MClient.java @@ -56,7 +56,7 @@ public class MClient extends X_AD_Client /** * */ - private static final long serialVersionUID = -6482473737885701403L; + private static final long serialVersionUID = 5428247545086634858L; /** @@ -311,7 +311,7 @@ public class MClient extends X_AD_Client while (rs.next()) { String value = rs.getString(1); - StringBuilder name = new StringBuilder(getName()).append(" ").append(rs.getString(2)); + StringBuilder name = new StringBuilder().append(getName()).append(" ").append(rs.getString(2)); // if (value.equals(X_AD_Tree.TREETYPE_Organization)) { @@ -979,4 +979,17 @@ public class MClient extends X_AD_Client return (Collections.binarySearch(m_fieldAccess, aDFieldID) > 0); } + + @Override + protected boolean beforeSave(boolean newRecord) + { + //gmail specific support + if ("smtp.gmail.com".equals(getSMTPHost())) + { + if (getSMTPPort() == 0) + setSMTPPort(587); + } + return true; + } + } // MClient diff --git a/org.adempiere.base/src/org/compiere/model/MClientShare.java b/org.adempiere.base/src/org/compiere/model/MClientShare.java index 330ca7132c..9334670bfb 100644 --- a/org.adempiere.base/src/org/compiere/model/MClientShare.java +++ b/org.adempiere.base/src/org/compiere/model/MClientShare.java @@ -218,7 +218,7 @@ public class MClientShare extends X_AD_ClientShare .append(getTableName()) .append(" SET AD_Org_ID=0 WHERE AD_Org_ID<>0 AND AD_Client_ID=?"); int no = DB.executeUpdate(sql.toString(), getAD_Client_ID(), get_TrxName()); - info = new StringBuilder(getTableName()).append(" set to Shared #").append(no); + info = new StringBuilder().append(getTableName()).append(" set to Shared #").append(no); log.info(info.toString()); } else if (isOrgLevelOnly()) @@ -227,7 +227,7 @@ public class MClientShare extends X_AD_ClientShare .append(getTableName()) .append(" WHERE AD_Org_ID=0 AND AD_Client_ID=?"); int no = DB.getSQLValue(get_TrxName(), sql.toString(), getAD_Client_ID()); - info = new StringBuilder(getTableName()).append(" Shared records #").append(no); + info = new StringBuilder().append(getTableName()).append(" Shared records #").append(no); log.info(info.toString()); } return info.toString(); diff --git a/org.adempiere.base/src/org/compiere/model/MColumn.java b/org.adempiere.base/src/org/compiere/model/MColumn.java index 60704a241e..624702cc6d 100644 --- a/org.adempiere.base/src/org/compiere/model/MColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MColumn.java @@ -345,7 +345,7 @@ public class MColumn extends X_AD_Column if (isVirtualColumn()) return null; - StringBuilder sql = new StringBuilder (getColumnName()) + StringBuilder sql = new StringBuilder ().append(getColumnName()) .append(" ").append(getSQLDataType()); // Default @@ -603,4 +603,24 @@ public class MColumn extends X_AD_Column else return false; } + + public String getReferenceTableName() { + String foreignTable = null; + if (DisplayType.TableDir == getAD_Reference_ID() + || (DisplayType.Search == getAD_Reference_ID() && getAD_Reference_Value_ID() == 0)) { + foreignTable = getColumnName().substring(0, getColumnName().length()-3); + } else if (DisplayType.Table == getAD_Reference_ID() || DisplayType.Search == getAD_Reference_ID()) { + X_AD_Reference ref = new X_AD_Reference(getCtx(), getAD_Reference_Value_ID(), get_TrxName()); + if (X_AD_Reference.VALIDATIONTYPE_TableValidation.equals(ref.getValidationType())) { + MRefTable rt = new MRefTable(getCtx(), getAD_Reference_Value_ID(), get_TrxName()); + if (rt != null) + foreignTable = rt.getAD_Table().getTableName(); + } + } else if (DisplayType.List == getAD_Reference_ID()) { + foreignTable = "AD_Ref_List"; + } + + return foreignTable; + } + } // MColumn diff --git a/org.adempiere.base/src/org/compiere/model/MGLCategory.java b/org.adempiere.base/src/org/compiere/model/MGLCategory.java index 87cf2bbc93..d0838b4bc2 100644 --- a/org.adempiere.base/src/org/compiere/model/MGLCategory.java +++ b/org.adempiere.base/src/org/compiere/model/MGLCategory.java @@ -167,7 +167,7 @@ public class MGLCategory extends X_GL_Category @Override public String toString() { - StringBuilder msgreturn = new StringBuilder(getClass().getSimpleName()).append("[").append(get_ID()) + StringBuilder msgreturn = new StringBuilder().append(getClass().getSimpleName()).append("[").append(get_ID()) .append(", Name=").append(getName()) .append(", IsDefault=").append(isDefault()) .append(", IsActive=").append(isActive()) diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 6d28cfe442..cd4aef7e28 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -564,8 +564,10 @@ public class MInOut extends X_M_InOut implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgd = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgd.toString()); + } } // addDescription /** @@ -574,7 +576,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MInOut[") + StringBuilder sb = new StringBuilder ("MInOut[") .append (get_ID()).append("-").append(getDocumentNo()) .append(",DocStatus=").append(getDocStatus()) .append ("]"); @@ -588,7 +590,8 @@ public class MInOut extends X_M_InOut implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -599,7 +602,8 @@ public class MInOut extends X_M_InOut implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) @@ -801,10 +805,10 @@ public class MInOut extends X_M_InOut implements DocAction super.setProcessed (processed); if (get_ID() == 0) return; - String sql = "UPDATE M_InOutLine SET Processed='" - + (processed ? "Y" : "N") - + "' WHERE M_InOut_ID=" + getM_InOut_ID(); - int noLine = DB.executeUpdate(sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE M_InOutLine SET Processed='") + .append((processed ? "Y" : "N")) + .append("' WHERE M_InOut_ID=").append(getM_InOut_ID()); + int noLine = DB.executeUpdate(sql.toString(), get_TrxName()); m_lines = null; log.fine(processed + " - Lines=" + noLine); } // setProcessed @@ -1045,12 +1049,12 @@ public class MInOut extends X_M_InOut implements DocAction if (is_ValueChanged("AD_Org_ID")) { - String sql = "UPDATE M_InOutLine ol" - + " SET AD_Org_ID =" - + "(SELECT AD_Org_ID" - + " FROM M_InOut o WHERE ol.M_InOut_ID=o.M_InOut_ID) " - + "WHERE M_InOut_ID=" + getC_Order_ID(); - int no = DB.executeUpdate(sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE M_InOutLine ol") + .append(" SET AD_Org_ID =") + .append("(SELECT AD_Org_ID") + .append(" FROM M_InOut o WHERE ol.M_InOut_ID=o.M_InOut_ID) ") + .append("WHERE M_InOut_ID=").append(getC_Order_ID()); + int no = DB.executeUpdate(sql.toString(), get_TrxName()); log.fine("Lines -> #" + no); } return true; @@ -1265,7 +1269,7 @@ public class MInOut extends X_M_InOut implements DocAction if (!isApproved()) approveIt(); log.info(toString()); - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); // For all lines MInOutLine[] lines = getLines(false); @@ -1970,7 +1974,8 @@ public class MInOut extends X_M_InOut implements DocAction if (old.signum() != 0) { line.setQty(Env.ZERO); - line.addDescription("Void (" + old + ")"); + StringBuilder msgadd = new StringBuilder("Void (").append(old).append(")"); + line.addDescription(msgadd.toString()); line.saveEx(get_TrxName()); } } @@ -2100,14 +2105,16 @@ public class MInOut extends X_M_InOut implements DocAction if (asset != null) { asset.setIsActive(false); - asset.addDescription("(" + reversal.getDocumentNo() + " #" + rLine.getLine() + "<-)"); + StringBuilder msgadd = new StringBuilder("(").append(reversal.getDocumentNo()).append(" #").append(rLine.getLine()).append("<-)"); + asset.addDescription(msgadd.toString()); asset.saveEx(); } } reversal.setC_Order_ID(getC_Order_ID()); // Set M_RMA_ID reversal.setM_RMA_ID(getM_RMA_ID()); - reversal.addDescription("{->" + getDocumentNo() + ")"); + StringBuilder msgadd = new StringBuilder("{->").append(getDocumentNo()).append(")"); + reversal.addDescription(msgadd.toString()); //FR1948157 reversal.setReversal_ID(getM_InOut_ID()); reversal.saveEx(get_TrxName()); @@ -2124,7 +2131,8 @@ public class MInOut extends X_M_InOut implements DocAction reversal.setDocAction(DOCACTION_None); reversal.saveEx(get_TrxName()); // - addDescription("(" + reversal.getDocumentNo() + "<-)"); + msgadd = new StringBuilder("(").append(reversal.getDocumentNo()).append("<-)"); + addDescription(msgadd.toString()); // // Void Confirmations @@ -2193,7 +2201,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(":") diff --git a/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java b/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java index 03d6dfdad4..4ec4f65472 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java +++ b/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java @@ -174,8 +174,10 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgd = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgd.toString()); + } } // addDescription /** @@ -193,7 +195,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MInOutConfirm["); + StringBuilder sb = new StringBuilder ("MInOutConfirm["); sb.append(get_ID()).append("-").append(getSummary()) .append ("]"); return sb.toString (); @@ -205,7 +207,8 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public String getDocumentInfo() { - return Msg.getElement(getCtx(), "M_InOutConfirm_ID") + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(Msg.getElement(getCtx(), "M_InOutConfirm_ID")).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -216,7 +219,8 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) @@ -249,11 +253,11 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction { int AD_User_ID = Env.getAD_User_ID(getCtx()); MUser user = MUser.get(getCtx(), AD_User_ID); - String info = user.getName() - + ": " - + Msg.translate(getCtx(), "IsApproved") - + " - " + new Timestamp(System.currentTimeMillis()); - addDescription(info); + StringBuilder info = new StringBuilder().append(user.getName()) + .append(": ") + .append(Msg.translate(getCtx(), "IsApproved")) + .append(" - ").append(new Timestamp(System.currentTimeMillis())); + addDescription(info.toString()); } super.setIsApproved (IsApproved); } // setIsApproved @@ -490,10 +494,12 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction if (split == null) { split = new MInOut (original, C_DocType_ID, original.getMovementDate()); - split.addDescription("Splitted from " + original.getDocumentNo()); + StringBuilder msgd = new StringBuilder("Splitted from ").append(original.getDocumentNo()); + split.addDescription(msgd.toString()); split.setIsInDispute(true); split.saveEx(); - original.addDescription("Split: " + split.getDocumentNo()); + msgd = new StringBuilder("Split: ").append(split.getDocumentNo()); + original.addDescription(msgd.toString()); original.saveEx(); } // @@ -508,12 +514,14 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction splitLine.setM_Product_ID(oldLine.getM_Product_ID()); splitLine.setM_Warehouse_ID(oldLine.getM_Warehouse_ID()); splitLine.setRef_InOutLine_ID(oldLine.getRef_InOutLine_ID()); - splitLine.addDescription("Split: from " + oldLine.getMovementQty()); + StringBuilder msgd = new StringBuilder("Split: from ").append(oldLine.getMovementQty()); + splitLine.addDescription(msgd.toString()); // Qtys splitLine.setQty(differenceQty); // Entered/Movement splitLine.saveEx(); // Old - oldLine.addDescription("Splitted: from " + oldLine.getMovementQty()); + msgd = new StringBuilder("Splitted: from ").append(oldLine.getMovementQty()); + oldLine.addDescription(msgd.toString()); oldLine.setQty(oldLine.getMovementQty().subtract(differenceQty)); oldLine.saveEx(); // Update Confirmation Line @@ -595,7 +603,8 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction if (m_creditMemo == null) { m_creditMemo = new MInvoice (inout, null); - m_creditMemo.setDescription(Msg.translate(getCtx(), "M_InOutConfirm_ID") + " " + getDocumentNo()); + StringBuilder msgd = new StringBuilder().append(Msg.translate(getCtx(), "M_InOutConfirm_ID")).append(" ").append(getDocumentNo()); + m_creditMemo.setDescription(msgd.toString()); m_creditMemo.setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_APCreditMemo); m_creditMemo.saveEx(); setC_Invoice_ID(m_creditMemo.getC_Invoice_ID()); @@ -620,7 +629,8 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction { MWarehouse wh = MWarehouse.get(getCtx(), inout.getM_Warehouse_ID()); m_inventory = new MInventory (wh, get_TrxName()); - m_inventory.setDescription(Msg.translate(getCtx(), "M_InOutConfirm_ID") + " " + getDocumentNo()); + StringBuilder msgd = new StringBuilder().append(Msg.translate(getCtx(), "M_InOutConfirm_ID")).append(" ").append(getDocumentNo()); + m_inventory.setDescription(msgd.toString()); m_inventory.saveEx(); setM_Inventory_ID(m_inventory.getM_Inventory_ID()); } @@ -794,7 +804,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MInventory.java b/org.adempiere.base/src/org/compiere/model/MInventory.java index 3a8a4f6cdc..66718de5e6 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventory.java +++ b/org.adempiere.base/src/org/compiere/model/MInventory.java @@ -162,8 +162,10 @@ public class MInventory extends X_M_Inventory implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgreturn = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgreturn.toString()); + } } // addDescription /** @@ -182,7 +184,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MInventory["); + StringBuilder sb = new StringBuilder ("MInventory["); sb.append (get_ID()) .append ("-").append (getDocumentNo()) .append (",M_Warehouse_ID=").append(getM_Warehouse_ID()) @@ -197,7 +199,8 @@ public class MInventory extends X_M_Inventory implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -208,7 +211,8 @@ public class MInventory extends X_M_Inventory implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) @@ -688,7 +692,8 @@ public class MInventory extends X_M_Inventory implements DocAction { line.setQtyInternalUse(Env.ZERO); line.setQtyCount(line.getQtyBook()); - line.addDescription("Void (" + oldCount + "/" + oldInternal + ")"); + StringBuilder msgd = new StringBuilder("Void (").append(oldCount).append("/").append(oldInternal).append(")"); + line.addDescription(msgd.toString()); line.saveEx(get_TrxName()); } } @@ -750,7 +755,8 @@ public class MInventory extends X_M_Inventory implements DocAction reversal.setIsApproved (false); reversal.setPosted(false); reversal.setProcessed(false); - reversal.addDescription("{->" + getDocumentNo() + ")"); + StringBuilder msgd = new StringBuilder("{->").append(getDocumentNo()).append(")"); + reversal.addDescription(msgd.toString()); //FR1948157 reversal.setReversal_ID(getM_Inventory_ID()); reversal.saveEx(); @@ -802,7 +808,8 @@ public class MInventory extends X_M_Inventory implements DocAction m_processMsg = reversal.getDocumentNo(); // Update Reversed (this) - addDescription("(" + reversal.getDocumentNo() + "<-)"); + msgd = new StringBuilder("(").append(reversal.getDocumentNo()).append("<-)"); + addDescription(msgd.toString()); // After reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); if (m_processMsg != null) @@ -863,7 +870,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index b9f4f4ae2c..3e7c0e281b 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -219,7 +219,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public static String getPDFFileName (String documentDir, int C_Invoice_ID) { - StringBuffer sb = new StringBuffer (documentDir); + StringBuilder sb = new StringBuilder (documentDir); if (sb.length() == 0) sb.append("."); if (!sb.toString().endsWith(File.separator)) @@ -825,8 +825,10 @@ public class MInvoice extends X_C_Invoice implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgd = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgd.toString()); + } } // addDescription /** @@ -851,11 +853,14 @@ public class MInvoice extends X_C_Invoice implements DocAction super.setProcessed (processed); if (get_ID() == 0) return; - String set = "SET Processed='" - + (processed ? "Y" : "N") - + "' WHERE C_Invoice_ID=" + getC_Invoice_ID(); - int noLine = DB.executeUpdate("UPDATE C_InvoiceLine " + set, get_TrxName()); - int noTax = DB.executeUpdate("UPDATE C_InvoiceTax " + set, get_TrxName()); + StringBuilder set = new StringBuilder("SET Processed='") + .append((processed ? "Y" : "N")) + .append("' WHERE C_Invoice_ID=").append(getC_Invoice_ID()); + + StringBuilder msgdb = new StringBuilder("UPDATE C_InvoiceLine ").append(set); + int noLine = DB.executeUpdate(msgdb.toString(), get_TrxName()); + msgdb = new StringBuilder("UPDATE C_InvoiceTax ").append(set); + int noTax = DB.executeUpdate(msgdb.toString(), get_TrxName()); m_lines = null; m_taxes = null; log.fine(processed + " - Lines=" + noLine + ", Tax=" + noTax); @@ -1021,7 +1026,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MInvoice[") + StringBuilder sb = new StringBuilder ("MInvoice[") .append(get_ID()).append("-").append(getDocumentNo()) .append(",GrandTotal=").append(getGrandTotal()); if (m_lines != null) @@ -1037,7 +1042,8 @@ public class MInvoice extends X_C_Invoice implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo @@ -1054,12 +1060,12 @@ public class MInvoice extends X_C_Invoice implements DocAction if (is_ValueChanged("AD_Org_ID")) { - String sql = "UPDATE C_InvoiceLine ol" - + " SET AD_Org_ID =" - + "(SELECT AD_Org_ID" - + " FROM C_Invoice o WHERE ol.C_Invoice_ID=o.C_Invoice_ID) " - + "WHERE C_Invoice_ID=" + getC_Invoice_ID(); - int no = DB.executeUpdate(sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE C_InvoiceLine ol") + .append(" SET AD_Org_ID =") + .append("(SELECT AD_Org_ID") + .append(" FROM C_Invoice o WHERE ol.C_Invoice_ID=o.C_Invoice_ID) ") + .append("WHERE C_Invoice_ID=").append(getC_Invoice_ID()); + int no = DB.executeUpdate(sql.toString(), get_TrxName()); log.fine("Lines -> #" + no); } return true; @@ -1161,7 +1167,7 @@ public class MInvoice extends X_C_Invoice implements DocAction public static void setIsPaid (Properties ctx, int C_BPartner_ID, String trxName) { List params = new ArrayList(); - StringBuffer whereClause = new StringBuffer("IsPaid='N' AND DocStatus IN ('CO','CL')"); + StringBuilder whereClause = new StringBuilder("IsPaid='N' AND DocStatus IN ('CO','CL')"); if (C_BPartner_ID > 1) { whereClause.append(" AND C_BPartner_ID=?"); @@ -1255,7 +1261,8 @@ public class MInvoice extends X_C_Invoice implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) @@ -1541,12 +1548,12 @@ public class MInvoice extends X_C_Invoice implements DocAction line.setPriceList (Env.ZERO); line.setLineNetAmt (Env.ZERO); // - String description = product.getName (); + StringBuilder description = new StringBuilder().append(product.getName ()); if (product.getDescription () != null) - description += " " + product.getDescription (); + description.append(" ").append(product.getDescription ()); if (line.getDescription () != null) - description += " " + line.getDescription (); - line.setDescription (description); + description.append(" ").append(line.getDescription ()); + line.setDescription (description.toString()); line.saveEx (get_TrxName()); } // for all lines with BOM @@ -1564,7 +1571,8 @@ public class MInvoice extends X_C_Invoice implements DocAction { log.fine(""); // Delete Taxes - DB.executeUpdateEx("DELETE C_InvoiceTax WHERE C_Invoice_ID=" + getC_Invoice_ID(), get_TrxName()); + StringBuilder msgdb = new StringBuilder("DELETE C_InvoiceTax WHERE C_Invoice_ID=").append(getC_Invoice_ID()); + DB.executeUpdateEx(msgdb.toString(), get_TrxName()); m_taxes = null; // Lines @@ -1706,7 +1714,7 @@ public class MInvoice extends X_C_Invoice implements DocAction if (!isApproved()) approveIt(); log.info(toString()); - StringBuffer info = new StringBuffer(); + StringBuilder info = new StringBuilder(); // POS supports multiple payments boolean fromPOS = false; @@ -1911,7 +1919,8 @@ public class MInvoice extends X_C_Invoice implements DocAction { MUser user = new MUser (getCtx(), getAD_User_ID(), get_TrxName()); user.setLastContact(new Timestamp(System.currentTimeMillis())); - user.setLastResult(Msg.translate(getCtx(), "C_Invoice_ID") + ": " + getDocumentNo()); + StringBuilder msgset = new StringBuilder().append(Msg.translate(getCtx(), "C_Invoice_ID")).append(": ").append(getDocumentNo()); + user.setLastResult(msgset.toString()); if (!user.save(get_TrxName())) { m_processMsg = "Could not update Business Partner User"; @@ -2124,7 +2133,8 @@ public class MInvoice extends X_C_Invoice implements DocAction line.setTaxAmt(Env.ZERO); line.setLineNetAmt(Env.ZERO); line.setLineTotalAmt(Env.ZERO); - line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); + StringBuilder msgadd = new StringBuilder(Msg.getMsg(getCtx(), "Voided")).append(" (").append(old).append(")"); + line.addDescription(msgadd.toString()); // Unlink Shipment if (line.getM_InOutLine_ID() != 0) { @@ -2252,7 +2262,8 @@ public class MInvoice extends X_C_Invoice implements DocAction } } reversal.setC_Order_ID(getC_Order_ID()); - reversal.addDescription("{->" + getDocumentNo() + ")"); + StringBuilder msgadd = new StringBuilder("{->").append(getDocumentNo()).append(")"); + reversal.addDescription(msgadd.toString()); //FR1948157 reversal.setReversal_ID(getC_Invoice_ID()); reversal.saveEx(get_TrxName()); @@ -2271,7 +2282,8 @@ public class MInvoice extends X_C_Invoice implements DocAction reversal.saveEx(get_TrxName()); m_processMsg = reversal.getDocumentNo(); // - addDescription("(" + reversal.getDocumentNo() + "<-)"); + msgadd = new StringBuilder("(").append(reversal.getDocumentNo()).append("<-)"); + addDescription(msgadd.toString()); // Clean up Reversed (this) MInvoiceLine[] iLines = getLines(false); @@ -2297,9 +2309,10 @@ public class MInvoice extends X_C_Invoice implements DocAction setIsPaid(true); // Create Allocation + StringBuilder msgall = new StringBuilder().append(Msg.translate(getCtx(), "C_Invoice_ID")).append(": ").append(getDocumentNo()).append("/").append(reversal.getDocumentNo()); MAllocationHdr alloc = new MAllocationHdr(getCtx(), false, getDateAcct(), getC_Currency_ID(), - Msg.translate(getCtx(), "C_Invoice_ID") + ": " + getDocumentNo() + "/" + reversal.getDocumentNo(), + msgall.toString(), get_TrxName()); alloc.setAD_Org_ID(getAD_Org_ID()); if (alloc.save()) @@ -2381,7 +2394,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Grand Total = 123.00 (#1) sb.append(": "). diff --git a/org.adempiere.base/src/org/compiere/model/MIssue.java b/org.adempiere.base/src/org/compiere/model/MIssue.java index 341128ff0b..5759ac9925 100644 --- a/org.adempiere.base/src/org/compiere/model/MIssue.java +++ b/org.adempiere.base/src/org/compiere/model/MIssue.java @@ -155,7 +155,7 @@ public class MIssue extends X_AD_Issue public MIssue (LogRecord record) { this (Env.getCtx(), 0, null); - StringBuilder summary = new StringBuilder(record.getMessage()); + String summary = record.getMessage(); setSourceClassName(record.getSourceClassName()); setSourceMethodName(record.getSourceMethodName()); setLoggerName(record.getLoggerName()); @@ -163,9 +163,9 @@ public class MIssue extends X_AD_Issue if (t != null) { if (summary != null && summary.length() > 0) - summary = new StringBuilder(t.toString()).append(" ").append(summary); + summary = t.toString() + " " + summary; if (summary == null || summary.length() == 0) - summary = new StringBuilder(t.toString()); + summary = t.toString(); // StringBuilder error = new StringBuilder(); StackTraceElement[] tes = t.getStackTrace(); @@ -179,7 +179,7 @@ public class MIssue extends X_AD_Issue error.append(s).append("\n"); if (count == 0) { - StringBuilder source = new StringBuilder(element.getClassName()) + StringBuilder source = new StringBuilder().append(element.getClassName()) .append(".").append(element.getMethodName()); setSourceClassName(source.toString()); setLineNo(element.getLineNumber()); @@ -197,7 +197,7 @@ public class MIssue extends X_AD_Issue setStackTrace(cWriter.toString()); } if (summary == null || summary.length() == 0) - summary = new StringBuilder("??"); + summary = "??"; setIssueSummary(summary.toString()); setRecord_ID(1); } // MIssue diff --git a/org.adempiere.base/src/org/compiere/model/MJournal.java b/org.adempiere.base/src/org/compiere/model/MJournal.java index 6dae4b1338..36915ebc0a 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournal.java +++ b/org.adempiere.base/src/org/compiere/model/MJournal.java @@ -203,8 +203,10 @@ public class MJournal extends X_GL_Journal implements DocAction String desc = getDescription(); if (desc == null) setDescription(description); - else - setDescription(desc + " | " + description); + else{ + StringBuilder msgd = new StringBuilder(desc).append(" | ").append(description); + setDescription(msgd.toString()); + } } /************************************************************************** @@ -279,10 +281,10 @@ public class MJournal extends X_GL_Journal implements DocAction super.setProcessed (processed); if (get_ID() == 0) return; - String sql = "UPDATE GL_JournalLine SET Processed='" - + (processed ? "Y" : "N") - + "' WHERE GL_Journal_ID=" + getGL_Journal_ID(); - int noLine = DB.executeUpdate(sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE GL_JournalLine SET Processed='") + .append((processed ? "Y" : "N")) + .append("' WHERE GL_Journal_ID=").append(getGL_Journal_ID()); + int noLine = DB.executeUpdate(sql.toString(), get_TrxName()); log.fine(processed + " - Lines=" + noLine); } // setProcessed @@ -372,11 +374,11 @@ public class MJournal extends X_GL_Journal implements DocAction private boolean updateBatch() { if (getGL_JournalBatch_ID()!=0) { // idempiere 344 - nmicoud - String sql = "UPDATE GL_JournalBatch jb" - + " SET (TotalDr, TotalCr) = (SELECT COALESCE(SUM(TotalDr),0), COALESCE(SUM(TotalCr),0)" - + " FROM GL_Journal j WHERE j.IsActive='Y' AND jb.GL_JournalBatch_ID=j.GL_JournalBatch_ID) " - + "WHERE GL_JournalBatch_ID=" + getGL_JournalBatch_ID(); - int no = DB.executeUpdate(sql, get_TrxName()); + StringBuilder sql = new StringBuilder("UPDATE GL_JournalBatch jb") + .append(" SET (TotalDr, TotalCr) = (SELECT COALESCE(SUM(TotalDr),0), COALESCE(SUM(TotalCr),0)") + .append(" FROM GL_Journal j WHERE j.IsActive='Y' AND jb.GL_JournalBatch_ID=j.GL_JournalBatch_ID) ") + .append("WHERE GL_JournalBatch_ID=").append(getGL_JournalBatch_ID()); + int no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 1) log.warning("afterSave - Update Batch #" + no); return no == 1; @@ -739,12 +741,14 @@ public class MJournal extends X_GL_Journal implements DocAction reverse.setC_Period_ID(getC_Period_ID()); reverse.setDateAcct(getDateAcct()); // Reverse indicator - reverse.addDescription("(->" + getDocumentNo() + ")"); + StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")"); + reverse.addDescription(msgd.toString()); //FR [ 1948157 ] reverse.setReversal_ID(getGL_Journal_ID()); if (!reverse.save()) return null; - addDescription("(" + reverse.getDocumentNo() + "<-)"); + msgd = new StringBuilder("(").append(reverse.getDocumentNo()).append("<-)"); + addDescription(msgd.toString()); // Lines reverse.copyLinesFrom(this, null, 'C'); @@ -797,12 +801,12 @@ public class MJournal extends X_GL_Journal implements DocAction reverse.set_ValueNoCheck ("C_Period_ID", null); // reset reverse.setDateAcct(reverse.getDateDoc()); // Reverse indicator - String description = reverse.getDescription(); - if (description == null) - description = "** " + getDocumentNo() + " **"; + StringBuilder description; + if (reverse.getDescription() == null) + description = new StringBuilder("** ").append(getDocumentNo()).append(" **"); else - description += " ** " + getDocumentNo() + " **"; - reverse.setDescription(description); + description = new StringBuilder(reverse.getDescription()).append(" ** ").append(getDocumentNo()).append(" **"); + reverse.setDescription(description.toString()); if (!reverse.save()) return null; @@ -848,7 +852,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") @@ -868,7 +872,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MJournal["); + StringBuilder sb = new StringBuilder ("MJournal["); sb.append(get_ID()).append(",").append(getDescription()) .append(",DR=").append(getTotalDr()) .append(",CR=").append(getTotalCr()) @@ -883,7 +887,8 @@ public class MJournal extends X_GL_Journal implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -894,7 +899,8 @@ public class MJournal extends X_GL_Journal implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java index f9085c4a67..95a7921e7d 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java @@ -633,12 +633,12 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction reverse.setC_Period_ID(getC_Period_ID()); reverse.setDateAcct(getDateAcct()); // Reverse indicator - String description = reverse.getDescription(); - if (description == null) - description = "** " + getDocumentNo() + " **"; + StringBuilder description; + if (reverse.getDescription() == null) + description = new StringBuilder("** ").append(getDocumentNo()).append(" **"); else - description += " ** " + getDocumentNo() + " **"; - reverse.setDescription(description); + description = new StringBuilder(reverse.getDescription()).append(" ** ").append(getDocumentNo()).append(" **"); + reverse.setDescription(description.toString()); //[ 1948157 ] reverse.setReversal_ID(getGL_JournalBatch_ID()); reverse.saveEx(); @@ -704,12 +704,12 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction reverse.setDateDoc(new Timestamp(System.currentTimeMillis())); reverse.setDateAcct(reverse.getDateDoc()); // Reverse indicator - String description = reverse.getDescription(); - if (description == null) - description = "** " + getDocumentNo() + " **"; + StringBuilder description; + if (reverse.getDescription() == null) + description = new StringBuilder("** ").append(getDocumentNo()).append(" **"); else - description += " ** " + getDocumentNo() + " **"; - reverse.setDescription(description); + description = new StringBuilder(reverse.getDescription()).append(" ** ").append(getDocumentNo()).append(" **"); + reverse.setDescription(description.toString()); reverse.saveEx(); // Reverse Journals @@ -778,7 +778,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public String getSummary() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // : Total Lines = 123.00 (#1) sb.append(": ") @@ -798,7 +798,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public String toString () { - StringBuffer sb = new StringBuffer ("MJournalBatch["); + StringBuilder sb = new StringBuilder ("MJournalBatch["); sb.append(get_ID()).append(",").append(getDescription()) .append(",DR=").append(getTotalDr()) .append(",CR=").append(getTotalCr()) @@ -813,7 +813,8 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + return msgreturn.toString(); } // getDocumentInfo /** @@ -824,7 +825,8 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction { try { - File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + StringBuilder msgfile = new StringBuilder().append(get_TableName()).append(get_ID()).append("_"); + File temp = File.createTempFile(msgfile.toString(), ".pdf"); return createPDF (temp); } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/model/MLanguage.java b/org.adempiere.base/src/org/compiere/model/MLanguage.java index 12d6754825..b72c8203fb 100644 --- a/org.adempiere.base/src/org/compiere/model/MLanguage.java +++ b/org.adempiere.base/src/org/compiere/model/MLanguage.java @@ -414,13 +414,13 @@ public class MLanguage extends X_AD_Language log.log(Level.SEVERE, "No Columns found for " + baseTable); return 0; } - StringBuffer cols = new StringBuffer(); + StringBuilder cols = new StringBuilder(); for (int i = 0; i < columns.size(); i++) cols.append(",").append(columns.get(i)); // Insert Statement int AD_User_ID = Env.getAD_User_ID(getCtx()); - String keyColumn = baseTable + "_ID"; + StringBuilder keyColumn = new StringBuilder(baseTable).append("_ID"); StringBuilder insert = new StringBuilder("INSERT INTO ").append(tableName) .append("(AD_Language,IsTranslated, AD_Client_ID,AD_Org_ID, ") .append("Createdby,UpdatedBy, ") @@ -441,7 +441,7 @@ public class MLanguage extends X_AD_Language if (column != null) UUIDGenerator.updateUUID(column, get_TrxName()); // - StringBuilder msglog = new StringBuilder(tableName).append(" #").append(no); + StringBuilder msglog = new StringBuilder().append(tableName).append(" #").append(no); log.fine(msglog.toString()); return no; } // addTable diff --git a/org.adempiere.base/src/org/compiere/model/MLookup.java b/org.adempiere.base/src/org/compiere/model/MLookup.java index 6af60303be..020bd58603 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MLookup.java @@ -668,7 +668,7 @@ public final class MLookup extends Lookup implements Serializable long startTime = System.currentTimeMillis(); if (Ini.isClient()) MLookupCache.loadStart (m_info); - StringBuilder sql = new StringBuilder(m_info.Query); + StringBuilder sql = new StringBuilder().append(m_info.Query); // not validated if (!m_info.IsValidated) @@ -737,7 +737,7 @@ public final class MLookup extends Lookup implements Serializable { if (rows++ > MAX_ROWS) { - StringBuilder s = new StringBuilder(m_info.KeyColumn).append(": Loader - Too many records"); + StringBuilder s = new StringBuilder().append(m_info.KeyColumn).append(": Loader - Too many records"); if (m_info.Column_ID > 0) { MColumn mColumn = MColumn.get(m_info.ctx, m_info.Column_ID); @@ -754,7 +754,7 @@ public final class MLookup extends Lookup implements Serializable break; // load data - StringBuilder name = new StringBuilder(rs.getString(3)); + StringBuilder name = new StringBuilder().append(rs.getString(3)); boolean isActive = rs.getString(4).equals("Y"); if (!isActive) { diff --git a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java index 6d91dde21a..d7e150ddb1 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java +++ b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java @@ -513,7 +513,7 @@ public class MLookupFactory ZoomWindow = overrideZoomWindow; ZoomWindowPO = 0; } - StringBuilder msginf = new StringBuilder(TableName).append(".").append(KeyColumn); + StringBuilder msginf = new StringBuilder().append(TableName).append(".").append(KeyColumn); retValue = new MLookupInfo (realSQL.toString(), TableName, msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery); s_cacheRefTable.put(key.toString(), retValue.cloneIt()); @@ -721,7 +721,7 @@ public class MLookupFactory if (i > 0) displayColumn.append(" ||'_'|| " ); LookupDisplayColumn ldc = (LookupDisplayColumn)list.get(i); - StringBuilder msg = new StringBuilder(TableName).append(".").append(ldc.ColumnName); + StringBuilder msg = new StringBuilder().append(TableName).append(".").append(ldc.ColumnName); String columnSQL = ldc.IsVirtual ? ldc.ColumnSQL : msg.toString(); displayColumn.append("NVL("); @@ -797,7 +797,7 @@ public class MLookupFactory if (CLogMgt.isLevelFinest()) s_log.fine("ColumnName=" + ColumnName + " - " + realSQL); - StringBuilder msginf = new StringBuilder(TableName).append(".").append(KeyColumn); + StringBuilder msginf = new StringBuilder().append(TableName).append(".").append(KeyColumn); MLookupInfo lInfo = new MLookupInfo(realSQL.toString(), TableName, msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery); s_cacheRefTable.put(cacheKey.toString(), lInfo.cloneIt()); @@ -892,7 +892,7 @@ public class MLookupFactory if (i > 0) embedSQL.append("||' - '||" ); LookupDisplayColumn ldc = (LookupDisplayColumn)list.get(i); - StringBuilder msg = new StringBuilder(TableName).append(".").append(ldc.ColumnName); + StringBuilder msg = new StringBuilder().append(TableName).append(".").append(ldc.ColumnName); String columnSQL = ldc.IsVirtual ? ldc.ColumnSQL : msg.toString(); // translated diff --git a/org.adempiere.base/src/org/compiere/model/MMailText.java b/org.adempiere.base/src/org/compiere/model/MMailText.java index 3ecbb103fb..62716e1752 100644 --- a/org.adempiere.base/src/org/compiere/model/MMailText.java +++ b/org.adempiere.base/src/org/compiere/model/MMailText.java @@ -307,7 +307,7 @@ public class MMailText extends X_R_MailText { if (m_bpartner != null && m_bpartner.getAD_Language() != null) { - StringBuilder key = new StringBuilder(m_bpartner.getAD_Language()).append(get_ID()); + StringBuilder key = new StringBuilder().append(m_bpartner.getAD_Language()).append(get_ID()); MMailTextTrl trl = s_cacheTrl.get(key); if (trl == null) { diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_Client.java b/org.adempiere.base/src/org/compiere/model/X_AD_Client.java index a1a5961db0..2e49340394 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_Client.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_Client.java @@ -30,7 +30,7 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent /** * */ - private static final long serialVersionUID = 20120802L; + private static final long serialVersionUID = 20121008L; /** Standard Constructor */ public X_AD_Client (Properties ctx, int AD_Client_ID, String trxName) @@ -42,6 +42,8 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent // N setIsMultiLingualDocument (false); setIsPostImmediate (false); +// N + setIsSecureSMTP (false); // N setIsServerEMail (false); setIsSmtpAuthorization (false); @@ -126,8 +128,8 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent return (org.compiere.model.I_AD_PasswordRule)MTable.get(getCtx(), org.compiere.model.I_AD_PasswordRule.Table_Name) .getPO(getAD_PasswordRule_ID(), get_TrxName()); } - /** Set AD_PasswordRule. - @param AD_PasswordRule_ID AD_PasswordRule */ + /** Set Password Policies. + @param AD_PasswordRule_ID Password Policies */ public void setAD_PasswordRule_ID (int AD_PasswordRule_ID) { if (AD_PasswordRule_ID < 1) @@ -136,8 +138,8 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent set_Value (COLUMNNAME_AD_PasswordRule_ID, Integer.valueOf(AD_PasswordRule_ID)); } - /** Get AD_PasswordRule. - @return AD_PasswordRule */ + /** Get Password Policies. + @return Password Policies */ public int getAD_PasswordRule_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_PasswordRule_ID); @@ -301,6 +303,30 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent return false; } + /** Set SMTP SSL/TLS. + @param IsSecureSMTP + Use SSL/TLS for SMTP + */ + public void setIsSecureSMTP (boolean IsSecureSMTP) + { + set_Value (COLUMNNAME_IsSecureSMTP, Boolean.valueOf(IsSecureSMTP)); + } + + /** Get SMTP SSL/TLS. + @return Use SSL/TLS for SMTP + */ + public boolean isSecureSMTP () + { + Object oo = get_Value(COLUMNNAME_IsSecureSMTP); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set Server EMail. @param IsServerEMail Send EMail from Server @@ -545,6 +571,26 @@ public class X_AD_Client extends PO implements I_AD_Client, I_Persistent return (String)get_Value(COLUMNNAME_SMTPHost); } + /** Set SMTP Port. + @param SMTPPort + SMTP Port Number + */ + public void setSMTPPort (int SMTPPort) + { + set_Value (COLUMNNAME_SMTPPort, Integer.valueOf(SMTPPort)); + } + + /** Get SMTP Port. + @return SMTP Port Number + */ + public int getSMTPPort () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SMTPPort); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Store Archive On File System. @param StoreArchiveOnFileSystem Store Archive On File System */ public void setStoreArchiveOnFileSystem (boolean StoreArchiveOnFileSystem) diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 8a8e06bd78..8f0ec3ada1 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -1867,6 +1867,11 @@ public final class DB if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys) { int m_sequence_id = CConnection.get().getDatabase().getNextID(TableName+"_SQ"); + if (m_sequence_id == -1) { + // try to create the sequence and try again + MSequence.createTableSequence(Env.getCtx(), TableName, trxName, true); + m_sequence_id = CConnection.get().getDatabase().getNextID(TableName+"_SQ"); + } return m_sequence_id; } diff --git a/org.adempiere.base/src/org/compiere/util/DisplayType.java b/org.adempiere.base/src/org/compiere/util/DisplayType.java index 77e9e4ae2b..23ce0efcee 100644 --- a/org.adempiere.base/src/org/compiere/util/DisplayType.java +++ b/org.adempiere.base/src/org/compiere/util/DisplayType.java @@ -130,6 +130,10 @@ public final class DisplayType /** Default Amount Precision */ private static final int AMOUNT_FRACTION = 2; + public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss"; + public static final String DEFAULT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss"; + public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; + /** Logger */ private static CLogger s_log = CLogger.getCLogger (DisplayType.class); @@ -398,7 +402,7 @@ public final class DisplayType */ static public SimpleDateFormat getDateFormat_JDBC() { - return new SimpleDateFormat ("yyyy-MM-dd"); + return new SimpleDateFormat (DEFAULT_DATE_FORMAT); } // getDateFormat_JDBC /** @@ -407,9 +411,14 @@ public final class DisplayType */ static public SimpleDateFormat getTimestampFormat_Default() { - return new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); + return new SimpleDateFormat (DEFAULT_TIMESTAMP_FORMAT); } // getTimestampFormat_JDBC + static public SimpleDateFormat getTimeFormat_Default() + { + return new SimpleDateFormat (DEFAULT_TIME_FORMAT); + } // getTimeFormat_Default + /** * Return Storage Class. * (used for MiniTable) diff --git a/org.adempiere.base/src/org/compiere/util/EMail.java b/org.adempiere.base/src/org/compiere/util/EMail.java index 5a5d399e68..dd91d35857 100644 --- a/org.adempiere.base/src/org/compiere/util/EMail.java +++ b/org.adempiere.base/src/org/compiere/util/EMail.java @@ -85,7 +85,7 @@ public final class EMail implements Serializable public EMail (MClient client, String from, String to, String subject, String message) { - this (client.getCtx(), client.getSMTPHost(), from, to, subject, message); + this (client.getCtx(), client.getSMTPHost(), client.getSMTPPort(), client.isSecureSMTP(), from, to, subject, message, false); } // EMail /** @@ -100,7 +100,7 @@ public final class EMail implements Serializable public EMail (MClient client, String from, String to, String subject, String message, boolean html) { - this (client.getCtx(), client.getSMTPHost(), from, to, subject, message, html); + this (client.getCtx(), client.getSMTPHost(), client.getSMTPPort(), client.isSecureSMTP(), from, to, subject, message, html); } // EMail /** @@ -115,7 +115,7 @@ public final class EMail implements Serializable public EMail (Properties ctx, String smtpHost, String from, String to, String subject, String message) { - this(ctx, smtpHost, from, to, subject, message, false); + this(ctx, smtpHost, 0, false, from, to, subject, message, false); } /** @@ -131,6 +131,26 @@ public final class EMail implements Serializable public EMail (Properties ctx, String smtpHost, String from, String to, String subject, String message, boolean html) { + this(ctx, smtpHost, 0, false, from, to, subject, message, html); + } + + /** + * Full Constructor + * @param ctx context + * @param smtpHost The mail server + * @param smtpPort + * @param isSecureSmtp + * @param from Sender's EMail address + * @param to Recipient EMail address + * @param subject Subject of message + * @param message The message + * @param html html email + */ + + public EMail (Properties ctx, String smtpHost, int smtpPort, boolean isSecureSmtp, String from, String to, + String subject, String message, boolean html) + { + setSmtpHost(smtpHost); setFrom(from); String bccAddressForAllMails = MSysConfig.getValue(MSysConfig.MAIL_SEND_BCC_TO_ADDRESS, Env.getAD_Client_ID(Env.getCtx())); @@ -150,7 +170,17 @@ public final class EMail implements Serializable setMessageText (message); } m_valid = isValid (true); + setSmtpPort(smtpPort); + setSecureSmtp(isSecureSmtp); } // EMail + + private void setSecureSmtp(boolean isSecureSmtp) { + m_secureSmtp = isSecureSmtp; + } + + private void setSmtpPort(int smtpPort) { + m_smtpPort = smtpPort; + } /** From Address */ private InternetAddress m_from; @@ -170,14 +200,14 @@ public final class EMail implements Serializable private String m_messageHTML; /** Mail SMTP Server */ private String m_smtpHost; - /** Mail SMTP Server Port */ - // @TODO - make port configurable - private int m_smtpPort = 0; - /** SMTP enable start TLS */ - // @TODO - make tls configurable - private boolean m_smtpStarttlsEnable = false; + private int m_smtpPort; + private boolean m_secureSmtp; + + /** Attachments */ private ArrayList m_attachments; /** UserName and Password */ - private EMailAuthenticator m_auth = null; + private transient EMailAuthenticator m_auth = null; /** Message */ private SMTPMessage m_msg = null; /** Context - may be null */ @@ -192,7 +222,7 @@ public final class EMail implements Serializable public static final String SENT_OK = "OK"; /** Logger */ - protected static CLogger log = CLogger.getCLogger (EMail.class); + protected transient static CLogger log = CLogger.getCLogger (EMail.class); /** * Send Mail direct @@ -201,6 +231,8 @@ public final class EMail implements Serializable public String send () { log.info("(" + m_smtpHost + ") " + m_from + " -> " + m_to); + log.info("(m_auth) " + m_auth); + m_sentMsg = null; // if (!isValid(true)) @@ -224,10 +256,12 @@ public final class EMail implements Serializable { if (m_auth != null) // createAuthenticator was called props.put("mail.smtp.auth", "true"); - if (m_smtpHost.equalsIgnoreCase("smtp.gmail.com")) { - // TODO: make it configurable - // Enable gmail port and ttls - Hardcoded - props.put("mail.smtp.port", "587"); + if (m_smtpPort > 0) + { + props.put("mail.smtp.port", String.valueOf(m_smtpPort)); + } + if (m_secureSmtp) + { props.put("mail.smtp.starttls.enable", "true"); } @@ -247,6 +281,7 @@ public final class EMail implements Serializable return e.toString(); } + Transport t = null; try { // m_msg = new MimeMessage(session); @@ -283,7 +318,7 @@ public final class EMail implements Serializable // log.fine("message =" + m_msg); // // Transport.send(msg); - Transport t = session.getTransport("smtp"); + t = session.getTransport("smtp"); // log.fine("transport=" + t); t.connect(); // t.connect(m_smtpHost, user, password); @@ -380,6 +415,17 @@ public final class EMail implements Serializable m_sentMsg = e.getLocalizedMessage(); return e.getLocalizedMessage(); } + finally + { + if(t != null) + { + try { + t.close(); + } catch (Exception e) { + } + t = null; + } + } // if (CLogMgt.isLevelFinest()) dumpMessage(); diff --git a/org.adempiere.base/src/org/compiere/util/ValueNamePair.java b/org.adempiere.base/src/org/compiere/util/ValueNamePair.java index 12506e666e..a36fa15c5d 100644 --- a/org.adempiere.base/src/org/compiere/util/ValueNamePair.java +++ b/org.adempiere.base/src/org/compiere/util/ValueNamePair.java @@ -83,6 +83,16 @@ public final class ValueNamePair extends NamePair return false; } // equals + + /** + * Get the Object representation of the value + * @return value + */ + public Object getValueObject() + { + return m_value; + } + /** * Return Hashcode of value * @return hascode diff --git a/org.adempiere.extend/.classpath b/org.adempiere.extend/.classpath index 3496c3b589..aec6ab1f7d 100644 --- a/org.adempiere.extend/.classpath +++ b/org.adempiere.extend/.classpath @@ -1,9 +1,9 @@ - + diff --git a/org.adempiere.extend/META-INF/MANIFEST.MF b/org.adempiere.extend/META-INF/MANIFEST.MF index 143d9338f3..caa4981dfb 100644 --- a/org.adempiere.extend/META-INF/MANIFEST.MF +++ b/org.adempiere.extend/META-INF/MANIFEST.MF @@ -4,12 +4,13 @@ Bundle-Name: org.adempiere.extend Bundle-SymbolicName: org.adempiere.extend;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-ClassPath: extend.jar, - spiffy-with_source-all-0.05.jar, - SuperCSV-with_src-1.52.jar + spiffy-with_source-all-0.05.jar Eclipse-RegisterBuddy: org.adempiere.tools Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: compiere.model, test Fragment-Host: org.adempiere.base;bundle-version="0.0.0" Eclipse-PatchFragment: true -Import-Package: junit.framework;version="3.8.2" +Import-Package: junit.framework;version="3.8.2", + org.supercsv.io, + org.supercsv.prefs diff --git a/org.adempiere.extend/build.properties b/org.adempiere.extend/build.properties index 5134fd22a6..41403dca88 100644 --- a/org.adempiere.extend/build.properties +++ b/org.adempiere.extend/build.properties @@ -1,8 +1,7 @@ output.extend.jar = build/ bin.includes = META-INF/,\ extend.jar,\ - spiffy-with_source-all-0.05.jar,\ - SuperCSV-with_src-1.52.jar + spiffy-with_source-all-0.05.jar jars.compile.order = extend.jar source.extend.jar = src/ diff --git a/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java b/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java index f9d95910f4..3468ca553e 100644 --- a/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java +++ b/org.adempiere.extend/src/test/functional/inventory/CSVFactory.java @@ -80,7 +80,7 @@ public class CSVFactory private String[] getCSVHeader() throws IOException { - String[] header = reader.getCSVHeader(true); + String[] header = reader.getHeader(true); for (int i = 0; i < header.length; i++) { header[i] = header[i].trim().replaceAll("\\s", ""); diff --git a/org.adempiere.install/install.app.launch b/org.adempiere.install/install.app.launch index 13ba2d1018..b6a0ca30cd 100644 --- a/org.adempiere.install/install.app.launch +++ b/org.adempiere.install/install.app.launch @@ -19,7 +19,7 @@ - + diff --git a/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java b/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java index 6bbdbc6e90..f1f3c4fc96 100644 --- a/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java +++ b/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java @@ -23,6 +23,7 @@ import java.awt.HeadlessException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; @@ -86,11 +87,14 @@ public class KeyStoreDialog extends JDialog implements ActionListener private JTextField fS = new JTextField(20); private JLabel lC = new JLabel("(C) Country (2 Char)"); private JTextField fC = new JTextField(2); - - private JButton bOK = ConfirmPanel.createOKButton("OK"); - private JButton bCancel = ConfirmPanel.createCancelButton("Cancel"); + // Invert OK/Cancel IDEMPIERE-77 + private JButton bOK = ConfirmPanel.createOKButton(""); + private JButton bCancel = ConfirmPanel.createCancelButton(""); private boolean m_ok = false; + + + /** * Static Layout */ @@ -115,12 +119,14 @@ public class KeyStoreDialog extends JDialog implements ActionListener getContentPane().add (panel, BorderLayout.CENTER); // JPanel confirmPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - confirmPanel.add(bCancel); + // Invert OK/Cancel IDEMPIERE-77 confirmPanel.add(bOK); + confirmPanel.add(bCancel); getContentPane().add (confirmPanel, BorderLayout.SOUTH); // - bCancel.addActionListener(this); bOK.addActionListener(this); + bCancel.addActionListener(this); + } // jbInit /** diff --git a/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java b/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java index 235c0fc327..07d4a5f389 100644 --- a/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java +++ b/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java @@ -24,6 +24,7 @@ import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import javax.swing.Icon; +import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; @@ -48,7 +49,8 @@ public final class ConfirmPanel extends JPanel * */ private static final long serialVersionUID = 6041019802043360966L; - + private static ImageIcon ImagenCancel = new ImageIcon("/images/Cancel24.png"); + private static ImageIcon ImagenOk = new ImageIcon("/images/Ok24.png"); /** * Create OK Button with label text and F4 Shortcut @@ -61,6 +63,7 @@ public final class ConfirmPanel extends JPanel JButton button = (JButton)aa.getButton(); button.setMargin(s_insets); button.setDefaultCapable(true); + button.setIcon(ImagenOk); return button; } // createOKButton @@ -86,6 +89,7 @@ public final class ConfirmPanel extends JPanel AppsAction aa = new AppsAction (A_CANCEL, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), text); JButton button = (JButton)aa.getButton(); button.setMargin(s_insets); + button.setIcon(ImagenCancel); return button; } // createCancelButton @@ -494,10 +498,11 @@ public final class ConfirmPanel extends JPanel // JPanel okCancel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); okCancel.setOpaque(false); - bCancel = createCancelButton(withText); - okCancel.add(bCancel); + // Invert OK/Cancel IDEMPIERE-77 bOK = createOKButton(withText); okCancel.add(bOK); + bCancel = createCancelButton(withText); + okCancel.add(bCancel); setCancelVisible(withCancelButton); this.add(okCancel, BorderLayout.EAST); // diff --git a/org.adempiere.server-feature/feature.xml b/org.adempiere.server-feature/feature.xml index 8f9774052f..78597df8cc 100644 --- a/org.adempiere.server-feature/feature.xml +++ b/org.adempiere.server-feature/feature.xml @@ -1,311 +1,318 @@ - - - - - [Enter Feature Description here.] - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.adempiere.server-feature/server.product.launch b/org.adempiere.server-feature/server.product.launch index 048eb04018..c9fc508ee6 100644 --- a/org.adempiere.server-feature/server.product.launch +++ b/org.adempiere.server-feature/server.product.launch @@ -1,33 +1,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.adempiere.server/src/main/servlet/org/adempiere/web/server/command/SendEmailCommand.java b/org.adempiere.server/src/main/servlet/org/adempiere/web/server/command/SendEmailCommand.java index bcec437bb5..bd292b56ec 100644 --- a/org.adempiere.server/src/main/servlet/org/adempiere/web/server/command/SendEmailCommand.java +++ b/org.adempiere.server/src/main/servlet/org/adempiere/web/server/command/SendEmailCommand.java @@ -23,6 +23,7 @@ import org.compiere.util.EMail; import org.compiere.util.Env; import org.restlet.representation.Representation; import org.restlet.representation.StringRepresentation; +import org.restlet.resource.Post; import org.restlet.resource.ResourceException; import org.restlet.resource.ServerResource; @@ -31,8 +32,8 @@ import org.restlet.resource.ServerResource; * @author hengsin */ public class SendEmailCommand extends ServerResource { - @Override - protected Representation post(Representation entity) + @Post + public Representation sendEmail(Representation entity) throws ResourceException { try { HashMap map = RestletUtil.toObject(entity); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java index ab4f117c39..a736952143 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java @@ -670,16 +670,16 @@ public final class Find extends CDialog { GridField field = m_findFields[c]; String columnName = field.getColumnName(); - StringBuilder header = new StringBuilder(field.getHeader()); + String header = field.getHeader(); if (header == null || header.length() == 0) { - header = new StringBuilder(Msg.translate(Env.getCtx(), columnName)); + header = Msg.translate(Env.getCtx(), columnName); if (header == null || header.length() == 0) continue; } if (field.isKey()) - header.append((" (ID)")); - ValueNamePair pp = new ValueNamePair(columnName, header.toString()); + header += (" (ID)"); + ValueNamePair pp = new ValueNamePair(columnName, header); // System.out.println(pp + " = " + field); items.add(pp); } @@ -1056,15 +1056,15 @@ public final class Find extends CDialog Object value = ved.getValue(); if (value != null && value.toString().length() > 0) { - StringBuilder ColumnName = new StringBuilder(((Component)ved).getName ()); - msglog = new StringBuilder(ColumnName).append("=").append(value); + String ColumnName = ((Component)ved).getName (); + msglog = new StringBuilder().append(ColumnName).append("=").append(value); log.fine(msglog.toString()); // globalqss - Carlos Ruiz - 20060711 // fix a bug with virtualColumn + isSelectionColumn not yielding results GridField field = getTargetMField(ColumnName.toString()); boolean isProductCategoryField = isProductCategoryField(field.getAD_Column_ID()); - StringBuilder ColumnSQL = new StringBuilder(field.getColumnSQL(false)); + StringBuilder ColumnSQL = new StringBuilder().append(field.getColumnSQL(false)); // // Be more permissive for String columns if (isSearchLike(field)) @@ -1078,11 +1078,11 @@ public final class Find extends CDialog } // if (value.toString().indexOf('%') != -1) - m_query.addRestriction(ColumnSQL.toString(), MQuery.LIKE, value, ColumnName.toString(), ved.getDisplay()); + m_query.addRestriction(ColumnSQL.toString(), MQuery.LIKE, value, ColumnName, ved.getDisplay()); else if (isProductCategoryField && value instanceof Integer) m_query.addRestriction(getSubCategoryWhereClause(((Integer) value).intValue())); else - m_query.addRestriction(ColumnSQL.toString(), MQuery.EQUAL, value, ColumnName.toString(), ved.getDisplay()); + m_query.addRestriction(ColumnSQL.toString(), MQuery.EQUAL, value, ColumnName, ved.getDisplay()); /* if (value.toString().indexOf('%') != -1) m_query.addRestriction(ColumnName, MQuery.LIKE, value, ColumnName, ved.getDisplay()); @@ -1163,17 +1163,17 @@ public final class Find extends CDialog Object column = advancedTable.getValueAt(row, INDEX_COLUMNNAME); if (column == null) continue; - StringBuilder ColumnName = new StringBuilder(column instanceof ValueNamePair ? - ((ValueNamePair)column).getValue() : column.toString()); - StringBuilder infoName = new StringBuilder(column.toString()); + String ColumnName = column instanceof ValueNamePair ? + ((ValueNamePair)column).getValue() : column.toString(); + String infoName = column.toString(); // GridField field = getTargetMField(ColumnName.toString()); if (field == null) continue; boolean isProductCategoryField = isProductCategoryField(field.getAD_Column_ID()); - StringBuilder ColumnSQL = new StringBuilder(field.getColumnSQL(false)); + String ColumnSQL = field.getColumnSQL(false); - StringBuilder lBrackets = new StringBuilder((String) advancedTable.getValueAt(row, INDEX_LEFTBRACKET)); + String lBrackets = (String) advancedTable.getValueAt(row, INDEX_LEFTBRACKET); if ( lBrackets != null ) openBrackets += lBrackets.length(); String rBrackets = (String) advancedTable.getValueAt(row, INDEX_RIGHTBRACKET); @@ -1196,12 +1196,12 @@ public final class Find extends CDialog if ( MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op) || MQuery.OPERATORS[MQuery.NOT_EQUAL_INDEX].equals(op) ) { - m_query.addRestriction(ColumnSQL.toString(), Operator, null, - infoName.toString(), null, and, openBrackets); + m_query.addRestriction(ColumnSQL, Operator, null, + infoName, null, and, openBrackets); if (code.length() > 0) code.append(SEGMENT_SEPARATOR); - code.append(ColumnName.toString()) + code.append(ColumnName) .append(FIELD_SEPARATOR) .append(Operator) .append(FIELD_SEPARATOR) @@ -1241,8 +1241,8 @@ public final class Find extends CDialog String infoDisplay_to = value2.toString(); if (parsedValue2 == null) continue; - m_query.addRangeRestriction(ColumnSQL.toString(), parsedValue, parsedValue2, - infoName.toString(), infoDisplay, infoDisplay_to, and, openBrackets); + m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2, + infoName, infoDisplay, infoDisplay_to, and, openBrackets); } else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op)) { if (!(parsedValue instanceof Integer)) { @@ -1253,8 +1253,8 @@ public final class Find extends CDialog .addRestriction(getSubCategoryWhereClause(((Integer) parsedValue).intValue()), and, openBrackets); } else - m_query.addRestriction(ColumnSQL.toString(), Operator, parsedValue, - infoName.toString(), infoDisplay, and, openBrackets); + m_query.addRestriction(ColumnSQL, Operator, parsedValue, + infoName, infoDisplay, and, openBrackets); if (code.length() > 0) code.append(SEGMENT_SEPARATOR); @@ -1276,17 +1276,17 @@ public final class Find extends CDialog } Object selected = fQueryName.getSelectedItem(); if (selected != null && saveQuery) { - StringBuilder name = new StringBuilder(selected.toString()); + String name = selected.toString(); if (Util.isEmpty(name.toString(), true)) { ADialog.warn(m_targetWindowNo, this, "FillMandatory", Msg.translate(Env.getCtx(), "Name")); return; } - MUserQuery uq = MUserQuery.get(Env.getCtx(), m_AD_Tab_ID, name.toString()); + MUserQuery uq = MUserQuery.get(Env.getCtx(), m_AD_Tab_ID, name); if (uq == null && code.length() > 0) { uq = new MUserQuery (Env.getCtx(), 0, null); - uq.setName (name.toString()); + uq.setName (name); uq.setAD_Tab_ID(m_AD_Tab_ID); //red1 UserQuery [ 1798539 ] taking in new field from Compiere uq.setAD_User_ID(Env.getAD_User_ID(Env.getCtx())); //red1 - [ 1798539 ] missing in Compiere delayed source :-) } @@ -1294,11 +1294,11 @@ public final class Find extends CDialog { if (uq.delete(true)) { - ADialog.info (m_targetWindowNo, this, "Deleted", name.toString()); + ADialog.info (m_targetWindowNo, this, "Deleted", name); refreshUserQueries(); } else - ADialog.warn (m_targetWindowNo, this, "DeleteError", name.toString()); + ADialog.warn (m_targetWindowNo, this, "DeleteError", name); return; } @@ -1307,11 +1307,11 @@ public final class Find extends CDialog // if (uq.save()) { - ADialog.info (m_targetWindowNo, this, "Saved", name.toString()); + ADialog.info (m_targetWindowNo, this, "Saved", name); refreshUserQueries(); } else - ADialog.warn (m_targetWindowNo, this, "SaveError", name.toString()); + ADialog.warn (m_targetWindowNo, this, "SaveError", name); } } // cmd_save @@ -1401,7 +1401,8 @@ public final class Find extends CDialog } } log.fine(ret.toString()); - return ret.toString() + productCategoryId; + StringBuilder msgreturn = new StringBuilder(ret.toString()).append(productCategoryId); + return msgreturn.toString(); } /** @@ -1472,7 +1473,7 @@ public final class Find extends CDialog } catch (Exception e) { - StringBuilder msglog = new StringBuilder(in.toString()).append("(").append(in.getClass()).append(")").append(e); + StringBuilder msglog = new StringBuilder().append(in.toString()).append("(").append(in.getClass()).append(")").append(e); log.log(Level.SEVERE, msglog.toString()); time = DisplayType.getDateFormat(dt).parse(in.toString()).getTime(); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 1ee9cb763c..89f0c1579b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -1883,7 +1883,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements div.appendChild(hbox); Button btnOk = new Button(); - btnOk.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "OK"))); + // Invert - Unify OK/Cancel IDEMPIERE-77 + //btnOk.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "OK"))); btnOk.setImage("/images/Ok16.png"); btnOk.addEventListener(Events.ON_CLICK, new EventListener() { @@ -1933,7 +1934,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements hbox.appendChild(btnOk); Button btnCancel = new Button(); - btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Cancel"))); + //btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Cancel"))); btnCancel.setImage("/images/Cancel16.png"); btnCancel.addEventListener(Events.ON_CLICK, new EventListener() { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index 96cf91f251..aa785b23d4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -42,6 +42,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Td; +import org.zkoss.zhtml.Text; import org.zkoss.zhtml.Tr; import org.zkoss.zk.au.out.AuEcho; import org.zkoss.zk.ui.Component; @@ -167,15 +168,17 @@ public class ProcessDialog extends Window implements EventListener, IProc Div div = new Div(); Hbox hbox = new Hbox(); String label = Msg.getMsg(Env.getCtx(), "Start"); - bOK = new Button(label.replaceAll("&", "")); + // Invert - Unify OK/Cancel IDEMPIERE-77 + //bOK = new Button(label.replaceAll("&", "")); + bOK = new Button(); bOK.setImage("/images/Ok16.png"); bOK.setId("Ok"); bOK.addEventListener(Events.ON_CLICK, this); bOK.setSclass("action-image-text-button"); hbox.appendChild(bOK); - label = Msg.getMsg(Env.getCtx(), "Cancel"); - Button btn = new Button(label.replaceAll("&", "")); + //label = Msg.getMsg(Env.getCtx(), "Cancel"); + Button btn = new Button(); btn.setImage("/images/Cancel16.png"); btn.setId("Cancel"); btn.addEventListener(Events.ON_CLICK, this); @@ -469,9 +472,10 @@ public class ProcessDialog extends Window implements EventListener, IProc private void appendRecordLogInfo(ProcessInfoLog[] m_logs) { if (m_logs == null) - return ; - - SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date); + return; + + SimpleDateFormat dateFormat = DisplayType + .getDateFormat(DisplayType.Date); logMessageTable = new Table(); logMessageTable.setId("logrecords"); @@ -479,51 +483,73 @@ public class ProcessDialog extends Window implements EventListener, IProc logMessageTable.setDynamicProperty("cellpadding", "0"); logMessageTable.setDynamicProperty("cellspacing", "0"); logMessageTable.setDynamicProperty("width", "100%"); - - this.appendChild(logMessageTable); - for (int i = 0; i < m_logs.length; i++) - { - - Tr tr = new Tr(); - logMessageTable.appendChild(tr); - - ProcessInfoLog log = m_logs[i]; - - if (log.getP_Date() != null){ - Label label = new Label(dateFormat.format(log.getP_Date())); - //label.setStyle("padding-right:100px"); - Td td = new Td(); - td = new Td(); - td.appendChild(label); - tr.appendChild(td); - - } - - if (log.getP_Number() != null){ - Label labelPno= new Label(""+log.getP_Number()); - Td td = new Td(); - td.appendChild(labelPno); - tr.appendChild(td); - } - - A recordLink = null; - if (log.getP_Msg() != null){ - recordLink = new A(); - recordLink.setLabel(log.getP_Msg()); + this.appendChild(logMessageTable); - if (log.getAD_Table_ID() > 0 && log.getRecord_ID()> 0) { - recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_ID())); - recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAD_Table_ID())); - recordLink.addEventListener(Events.ON_CLICK, this); - + boolean datePresents = false; + boolean numberPresents = false; + boolean msgPresents = false; + + for (ProcessInfoLog log : m_logs) { + if (log.getP_Date() != null) + datePresents = true; + if (log.getP_Number() != null) + numberPresents = true; + if (log.getP_Msg() != null) + msgPresents = true; + } + + for (int i = 0; i < m_logs.length; i++) { + + Tr tr = new Tr(); + logMessageTable.appendChild(tr); + + ProcessInfoLog log = m_logs[i]; + + if (datePresents) { + Td td = new Td(); + if (log.getP_Date() != null) { + Label label = new Label(dateFormat.format(log.getP_Date())); + td.appendChild(label); + // label.setStyle("padding-right:100px"); } + tr.appendChild(td); + + } + + if (numberPresents) { + Td td = new Td(); - td.appendChild(recordLink); - tr.appendChild(td); + if (log.getP_Number() != null) { + Label labelPno = new Label("" + log.getP_Number()); + td.appendChild(labelPno); + } + tr.appendChild(td); + } + + if (msgPresents) { + Td td = new Td(); + if (log.getP_Msg() != null) { + if (log.getAD_Table_ID() > 0 && log.getRecord_ID() > 0) { + A recordLink = new A(); + recordLink.setLabel(log.getP_Msg()); + recordLink.setAttribute("Record_ID", + String.valueOf(log.getRecord_ID())); + recordLink.setAttribute("AD_Table_ID", + String.valueOf(log.getAD_Table_ID())); + recordLink.addEventListener(Events.ON_CLICK, this); + td.appendChild(recordLink); + } else { + Text t = new Text(); + t.setEncode(false); + t.setValue(log.getP_Msg()); + td.appendChild(t); + } + } + tr.appendChild(td); } } - messageDiv.appendChild(logMessageTable); + messageDiv.appendChild(logMessageTable); } private void restart() { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessModalDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessModalDialog.java index 2ddcd6ab6c..2aa9899175 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessModalDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessModalDialog.java @@ -174,13 +174,15 @@ public class ProcessModalDialog extends Window implements EventListener, Hbox hbox = new Hbox(); hbox.setWidth("100%"); hbox.setStyle("margin-top: 10px"); - Button btn = new Button("Ok"); + Button btn = new Button(""); + btn.setImage("/images/Ok24.png"); LayoutUtils.addSclass("action-text-button", btn); btn.setId("Ok"); btn.addEventListener(Events.ON_CLICK, this); hbox.appendChild(btn); - btn = new Button("Cancel"); + btn = new Button(""); + btn.setImage("/images/Cancel24.png"); btn.setId("Cancel"); LayoutUtils.addSclass("action-text-button", btn); btn.addEventListener(Events.ON_CLICK, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java index b8f5e24117..2c32a26c5c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java @@ -58,6 +58,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Td; +import org.zkoss.zhtml.Text; import org.zkoss.zhtml.Tr; import org.zkoss.zk.au.out.AuEcho; import org.zkoss.zk.ui.event.Event; @@ -486,6 +487,20 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen this.appendChild(logMessageTable); + boolean datePresents = false; + boolean numberPresents = false; + boolean msgPresents = false; + + for (ProcessInfoLog log : m_logs) { + if (log.getP_Date() != null) + datePresents = true; + if (log.getP_Number() != null) + numberPresents = true; + if (log.getP_Msg() != null) + msgPresents = true; + } + + for (int i = 0; i < m_logs.length; i++) { @@ -494,37 +509,47 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen ProcessInfoLog log = m_logs[i]; - if (log.getP_Date() != null){ - Label label = new Label(dateFormat.format(log.getP_Date())); - //label.setStyle("padding-right:100px"); + if (datePresents) { Td td = new Td(); - td = new Td(); - td.appendChild(label); - tr.appendChild(td); - - } - - if (log.getP_Number() != null){ - Label labelPno= new Label(""+log.getP_Number()); - Td td = new Td(); - td.appendChild(labelPno); - tr.appendChild(td); - } - - A recordLink = null; - if (log.getP_Msg() != null){ - recordLink = new A(); - recordLink.setLabel(log.getP_Msg()); - - if (log.getAD_Table_ID() > 0 && log.getRecord_ID()> 0) { - recordLink.setAttribute("Record_ID", String.valueOf(log.getRecord_ID())); - recordLink.setAttribute("AD_Table_ID", String.valueOf(log.getAD_Table_ID())); - recordLink.addEventListener(Events.ON_CLICK, this); - + if (log.getP_Date() != null) { + Label label = new Label(dateFormat.format(log.getP_Date())); + td.appendChild(label); + // label.setStyle("padding-right:100px"); } + tr.appendChild(td); + + } + + if (numberPresents) { + Td td = new Td(); - td.appendChild(recordLink); - tr.appendChild(td); + if (log.getP_Number() != null) { + Label labelPno = new Label("" + log.getP_Number()); + td.appendChild(labelPno); + } + tr.appendChild(td); + } + + if (msgPresents) { + Td td = new Td(); + if (log.getP_Msg() != null) { + if (log.getAD_Table_ID() > 0 && log.getRecord_ID() > 0) { + A recordLink = new A(); + recordLink.setLabel(log.getP_Msg()); + recordLink.setAttribute("Record_ID", + String.valueOf(log.getRecord_ID())); + recordLink.setAttribute("AD_Table_ID", + String.valueOf(log.getAD_Table_ID())); + recordLink.addEventListener(Events.ON_CLICK, this); + td.appendChild(recordLink); + } else { + Text t = new Text(); + t.setEncode(false); + t.setValue(log.getP_Msg()); + td.appendChild(t); + } + } + tr.appendChild(td); } } messageDiv.appendChild(logMessageTable); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java index 2ec6451698..5facd56c37 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java @@ -56,7 +56,7 @@ public final class ConfirmPanel extends Hbox public static final String A_HISTORY = "History"; /** Action String Zoom. */ public static final String A_ZOOM = "Zoom"; - + /** Action String Process. */ public static final String A_PROCESS = "Process"; /** Action String Print. */ @@ -171,11 +171,11 @@ public final class ConfirmPanel extends Hbox init(); + addComponentsRight(createButton(A_OK)); + setVisible(A_CANCEL, withCancelButton); if (withCancelButton) - addComponentsRight(createButton(A_CANCEL)); - - addComponentsRight(createButton(A_OK)); + addComponentsRight(createButton(A_CANCEL)); if (withRefreshButton) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java index 27472b251e..7643c79d98 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java @@ -112,13 +112,13 @@ public class Messagebox extends Window implements EventListener Properties ctx = Env.getCtx(); lblMsg.setEncode(false); lblMsg.setValue(msg); - - btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK"))); + // Invert - Unify OK/Cancel IDEMPIERE-77 + //btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK"))); btnOk.setImage("/images/Ok16.png"); btnOk.addEventListener(Events.ON_CLICK, this); LayoutUtils.addSclass("action-text-button", btnOk); - btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel"))); + //btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel"))); btnCancel.setImage("/images/Cancel16.png"); btnCancel.addEventListener(Events.ON_CLICK, this); LayoutUtils.addSclass("action-text-button", btnCancel); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java index 1ad3734235..a1d6f0b0f1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java @@ -271,7 +271,7 @@ public class CustomizeGridViewPanel extends Panel southPanel.setAlign("Right"); southPanel.setStyle("margin-top: 2px; margin-right: 4px"); String label = Msg.getMsg(Env.getCtx(), "save"); - Button bOK = new Button(label); + Button bOK = new Button(); bOK.setImage("/images/Ok16.png"); bOK.setId("Ok"); EventListener onClickListener = new EventListener() @@ -290,7 +290,7 @@ public class CustomizeGridViewPanel extends Panel bOK.setSclass("action-button"); southPanel.appendChild(bOK); label = Msg.getMsg(Env.getCtx(), "Cancel"); - Button btn = new Button(label.replaceAll("&", "")); + Button btn = new Button(); btn.setImage("/images/Cancel16.png"); btn.setId("Cancel"); EventListener onClickCancelListener = new EventListener() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index 7cc87033c6..09b6488c99 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -291,8 +291,9 @@ public class WAttachment extends Window implements EventListener confirmPanel.appendChild(bDeleteAll); confirmPanel.appendChild(bRefresh); - confirmPanel.appendChild(bCancel); confirmPanel.appendChild(bOk); + confirmPanel.appendChild(bCancel); + text.setTooltiptext(Msg.getElement(Env.getCtx(), "TextMsg")); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 9cc7a9d175..a381614b41 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -893,16 +893,16 @@ public class FindWindow extends Window implements EventListener, ValueCha GridField field = m_findFields[c]; String columnName = field.getColumnName(); - StringBuilder header = new StringBuilder(field.getHeader()); + String header = field.getHeader(); if (header == null || header.length() == 0) { - header = new StringBuilder(Msg.translate(Env.getCtx(), columnName)); + header = Msg.translate(Env.getCtx(), columnName); if (header == null || header.length() == 0) continue; } if (field.isKey()) - header.append((" (ID)")); + header += (" (ID)"); ValueNamePair pp = new ValueNamePair(columnName, header.toString()); items.add(pp); } @@ -1249,7 +1249,7 @@ public class FindWindow extends Window implements EventListener, ValueCha } catch (Exception e) { - StringBuilder msglog = new StringBuilder(in.toString()).append("(").append(in.getClass()).append(")").append(e); + StringBuilder msglog = new StringBuilder().append(in.toString()).append("(").append(in.getClass()).append(")").append(e); log.log(Level.SEVERE, msglog.toString()); time = DisplayType.getDateFormat(dt).parse(in).getTime(); } @@ -1953,7 +1953,8 @@ public class FindWindow extends Window implements EventListener, ValueCha } } log.fine(ret.toString()); - return ret.toString() + productCategoryId; + StringBuilder msgreturn = new StringBuilder(ret.toString()).append(productCategoryId); + return msgreturn.toString(); } // getSubCategoriesString diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java index 142f2b92c3..eefbae2304 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java @@ -254,15 +254,15 @@ public class WLocatorDialog extends Window implements EventListener boxButtons.setWidth("100%"); boxButtons.setStyle("padding: 5px;"); boxButtons.setPack("end"); + + btnOk.setImage("/images/Ok16.png"); + btnOk.addEventListener(Events.ON_CLICK, this); btnCancel.setImage("/images/Cancel16.png"); btnCancel.addEventListener(Events.ON_CLICK, this); - btnOk.setImage("/images/Ok16.png"); - btnOk.addEventListener(Events.ON_CLICK, this); - - boxButtons.appendChild(btnCancel); boxButtons.appendChild(btnOk); + boxButtons.appendChild(btnCancel); mainBox.setWidth("250px"); mainBox.setStyle("text-align:right"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java index 36c1a1e2ce..ce4aee7799 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WMediaDialog.java @@ -180,14 +180,14 @@ public class WMediaDialog extends Window implements EventListener southPane.appendChild(confirmPanel); southPane.setHeight("30px"); - bCancel.setImage("/images/Cancel24.png"); - bCancel.addEventListener(Events.ON_CLICK, this); - bOk.setImage("/images/Ok24.png"); bOk.addEventListener(Events.ON_CLICK, this); + + bCancel.setImage("/images/Cancel24.png"); + bCancel.addEventListener(Events.ON_CLICK, this); - confirmPanel.appendChild(bCancel); confirmPanel.appendChild(bOk); + confirmPanel.appendChild(bCancel); addEventListener(Events.ON_UPLOAD, this); } diff --git a/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java b/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java index 047a2bd53f..e59687a822 100644 --- a/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java +++ b/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java @@ -995,7 +995,7 @@ public class DB_Oracle implements AdempiereDatabase System.out.println(myString.length()); System.out.println(Util.size(myString.toString())); // - myString = new StringBuilder(Util.trimSize(myString.toString(), 2000)); + myString = new StringBuilder().append(Util.trimSize(myString.toString(), 2000)); System.out.println(myString.length()); System.out.println(Util.size(myString.toString())); // diff --git a/org.idempiere.webservices/.classpath b/org.idempiere.webservices/.classpath new file mode 100644 index 0000000000..00507cc099 --- /dev/null +++ b/org.idempiere.webservices/.classpath @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.idempiere.webservices/.project b/org.idempiere.webservices/.project new file mode 100644 index 0000000000..06105d6c9b --- /dev/null +++ b/org.idempiere.webservices/.project @@ -0,0 +1,28 @@ + + + org.idempiere.webservices + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs b/org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f287d53cf4 --- /dev/null +++ b/org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs b/org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..b7e72d019c --- /dev/null +++ b/org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/org.idempiere.webservices/META-INF/MANIFEST.MF b/org.idempiere.webservices/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..e939c9af2e --- /dev/null +++ b/org.idempiere.webservices/META-INF/MANIFEST.MF @@ -0,0 +1,39 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Webservices +Bundle-SymbolicName: org.idempiere.webservices;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.idempiere.webservices.Activator +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: javax.servlet;version="3.0.0", + javax.servlet.http;version="3.0.0", + org.apache.commons.codec;version="1.3.0", + org.apache.commons.codec.binary;version="1.3.0", + org.apache.commons.logging;version="1.1.1", + org.osgi.framework;version="1.3.0" +Require-Bundle: org.adempiere.base;bundle-version="1.0.0", + org.adempiere.report.jasper.library;bundle-version="1.0.0", + org.adempiere.ui;bundle-version="1.0.0", + org.apache.ecs;bundle-version="1.0.0" +Bundle-ClassPath: WEB-INF/lib/stax2-api-3.1.1.jar, + WEB-INF/lib/spring-web-3.0.7.RELEASE.jar, + ., + WEB-INF/lib/spring-context-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-core-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar, + WEB-INF/lib/wsdl4j-1.6.2.jar, + WEB-INF/lib/cxf-2.6.2.jar, + WEB-INF/lib/neethi-3.0.2.jar, + WEB-INF/lib/xmlschema-core-2.0.3.jar, + WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar, + WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar, + WEB-INF/lib/generated_xbeans.jar, + WEB-INF/lib/xmlbeans-2.5.0.jar, + WEB-INF/lib/composite_XMLSBean.jar +Export-Package: com._3e.ADInterface, + com.adaxa.ws, + com.adaxa.ws.impl, + com.globalqss.ObPOSInterface +Web-ContextPath: ADInterface diff --git a/org.idempiere.webservices/Notes/HowToAddNewWebService.txt b/org.idempiere.webservices/Notes/HowToAddNewWebService.txt new file mode 100644 index 0000000000..169c5043aa --- /dev/null +++ b/org.idempiere.webservices/Notes/HowToAddNewWebService.txt @@ -0,0 +1,31 @@ +How to add a new WebService in 3E_WebServices + +i.e. +we're going to add a webservice to complete documents +the new webservice will have the following parameters: +* ADLoginRequest - it's already defined in ADInterface/src/xsd/schema.xsd with the following parameters: + user, pass, lang, ClientID, RoleID, OrgID, WarehouseID, stage +* TableName String -> M_InOut +* Record_ID int -> 1000002 +* DocStatus String -> CO + +Note, if you need to define new datatypes you need to define them in ADInterface/src/xsd/schema.xsd +and generate the pl3xe.jar again with this command: + scomp -out ./lib/pl3xE.jar ADInterface/src/xsd/schema.xsd +scomp will generate the corresponding classes to manipulate the xml objects from the messages + + +The method will be called modelSetDocAction - the model in name indicates that the web service is going to be based on model classes, current web services are based in UI instead of model. + +So, we add this line: + public StandardResponseDocument modelSetDocAction(String tableName, int recordID, String newDocStatus, ADLoginRequestDocument reqlogin) throws XFireFault; +at the interface 3E_WebServices/ADInterface/src/main/com/_3e/ADInterface/ADService.java +NOTE: In parameters, complex data must be at the end + +Now, we need to implement the method, so we open the file +3E_WebServices/ADInterface/src/main/com/_3e/ADInterface/ADServiceImpl.java + +And add the new method and define the corresponding logic within. + + + diff --git a/org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt b/org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt new file mode 100644 index 0000000000..721cc5ce09 --- /dev/null +++ b/org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt @@ -0,0 +1,93 @@ +-- Example about how to call modelSetDocAction from oracle pl/sql function +-- Following sample from http://technology.amis.nl/blog/358/consuming-web-services-from-plsql-part-ii-a-pure-plsql-solution-using-utl_http-oracle-9i-or-10g + +CREATE OR REPLACE FUNCTION ws_modelsetdocaction ( + p_table IN ad_table.tablename%TYPE, + p_recordid IN m_inout.m_inout_id%TYPE, + p_newdocstatus IN m_inout.docstatus%TYPE, + p_user IN ad_user.NAME%TYPE, + p_password IN ad_user.PASSWORD%TYPE, + p_language IN ad_language.ad_language%TYPE, + p_client_id IN ad_client.ad_client_id%TYPE, + p_role_id IN ad_role.ad_role_id%TYPE, + p_org_id IN ad_org.ad_org_id%TYPE, + p_warehouse_id IN m_warehouse.m_warehouse_id%TYPE +) + RETURN VARCHAR2 +AS + server VARCHAR2 (100) := '127.0.0.1:8081'; + soap_request VARCHAR2 (30000); + soap_respond VARCHAR2 (30000); + http_req UTL_HTTP.req; + http_resp UTL_HTTP.resp; + resp XMLTYPE; +BEGIN + soap_request := + ' + + + + ' || p_table || ' + ' || p_recordid || ' + ' || p_newdocstatus || ' + + ' || p_user || ' + ' || p_password || ' + ' || p_language || ' + ' || p_client_id || ' + ' || p_role_id || ' + ' || p_org_id || ' + ' || p_warehouse_id || ' + + + + +'; + UTL_HTTP.set_transfer_timeout (5); + http_req := + UTL_HTTP.begin_request ( 'http://' || server || '/ADInterface/services/ADService', + 'POST', + 'HTTP/1.1' + ); + UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml'); + UTL_HTTP.set_header (http_req, 'Content-Length', LENGTH (soap_request)); + UTL_HTTP.write_text (http_req, soap_request); + http_resp := UTL_HTTP.get_response (http_req); + UTL_HTTP.read_text (http_resp, soap_respond); + UTL_HTTP.end_response (http_resp); + RETURN soap_respond; +/* + -- Create an XMLType variable containing the Response XML + resp := XMLTYPE.createxml (soap_respond); + -- extract from the XMLType Resp the child-nodes of the element + resp := + resp.EXTRACT ('/soap:Envelope/soap:Body/child::node()', + 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' + ); + -- extract from the XMLType Resp the text() nodes from the n:getRateResponse/Result element + resp := + resp.EXTRACT ('n:getRateResponse/Result/text()', + 'xmlns:n="urn:xmethods-CurrencyExchange"' + ); + RETURN resp.getclobval (); +*/ +END; +/ + + +-- Now you can make a call to the function with this example: +-- example to COmplete M_InOut with M_Inout_ID=1000002 +/* +select ws_modelsetdocaction ( + 'M_InOut', + 1000002, + 'CO', + 'SuperUser', + 'System', + 'es_CO', + 11, + 102, + 11, + 103) + from dual; +*/ diff --git a/org.idempiere.webservices/Notes/notes.txt b/org.idempiere.webservices/Notes/notes.txt new file mode 100644 index 0000000000..71fbd02ad9 --- /dev/null +++ b/org.idempiere.webservices/Notes/notes.txt @@ -0,0 +1,42 @@ +== structure of exchanged data records: + + + + + + + + ... + + + + ... + + + + ... + + + +== Example. Still not finished! +open questions: +Where does it specify Table name? + + + + + 100000 + + + + + + 100000 + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml b/org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml new file mode 100644 index 0000000000..3d17e74718 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml b/org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml new file mode 100644 index 0000000000..32b51508ad --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.idempiere.webservices/WEB-INF/src/META-INF/context.xml b/org.idempiere.webservices/WEB-INF/src/META-INF/context.xml new file mode 100644 index 0000000000..3d17e74718 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml b/org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml new file mode 100644 index 0000000000..32b51508ad --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java new file mode 100644 index 0000000000..a96ae189dd --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java @@ -0,0 +1,87 @@ +package com._3e.ADInterface; + +import java.util.Properties; + +import org.compiere.model.DataStatusEvent; +import org.compiere.model.DataStatusListener; +import org.compiere.util.CLogger; +import org.compiere.util.Msg; + + +public class ADDataStatusListener implements DataStatusListener { + + protected static CLogger log = CLogger.getCLogger( ADDataStatusListener.class); + public String m_status_data; + public boolean m_is_status_error; + public String m_error_message; + public String m_error_info; + public boolean m_is_error; + private Properties m_ctx; + + public ADDataStatusListener( Properties _ctx ) + { + m_ctx = _ctx; + m_is_status_error = false; + m_is_error = false; + } + + public void dataStatusChanged(DataStatusEvent e) + { + this.m_status_data = e.getInfo(); + + + String dbInfo = e.getMessage(); + //if (curTab != null && curTab.isQueryActive()) + // dbInfo = "[ " + dbInfo + " ]"; + //m_status_db = dbInfo; + + log.info( "dataStatusChanged : "+e.getMessage() +" "+e.getInfo()+" "+e.getAD_Message()+" "); + //System.out.println( "dataStatusChanged : "+e.getMessage() +" "+e.getInfo()+" "+e.getAD_Message()+" "); + + // Set Message / Info + if (e.getAD_Message() != null || e.getInfo() != null) + { + StringBuffer sb = new StringBuffer(); + String msg = e.getMessage(); + if (msg != null && msg.length() > 0) + sb.append(Msg.getMsg(m_ctx, e.getAD_Message())); + String info = e.getInfo(); + if (info != null && info.length() > 0) + { + if (sb.length() > 0 && !sb.toString().trim().endsWith(":")) + sb.append(": "); + sb.append(info); + } + if (sb.length() > 0) + { + int pos = sb.indexOf("\n"); + if (pos != -1) // replace CR/NL + sb.replace(pos, pos+1, " - "); + setStatusLine (sb.toString (), e.isError ()); + } + } + + // Confirm Error + if (e.isError() && !e.isConfirmed()) + { + m_is_error = true; + m_error_message = e.getAD_Message(); + m_error_info = e.getInfo(); + //setStatusError( Msg.getMsg(m_ctx, e.getAD_Message()), Msg.getMsg(m_ctx, e.getInfo())); + e.setConfirmed(true); // show just once - if GridTable.setCurrentRow is involved the status event is re-issued + } else + m_is_error = false; + } + + public void setStatusLine( String msg, boolean is_error ) + { + this.m_status_data = msg ; + this.m_is_status_error = is_error; + //else + // this.m_status_data = " "+msg+" "; + } + + + + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java new file mode 100644 index 0000000000..2c6ad6e124 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java @@ -0,0 +1,16 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.SQLException; + +import pl.x3E.adInterface.DataRow; + +public interface ADInfo { + public void setParameters( PreparedStatement pstmt, boolean forCount) throws SQLException; + //public String getSQLWhere(); + public String getSQL(); + public String getSQLCount(); + + public DataRow getColumns(); + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java new file mode 100644 index 0000000000..c365c8c07a --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java @@ -0,0 +1,528 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.model.GridField; +import org.compiere.model.Lookup; +import org.compiere.model.MLookup; +import org.compiere.model.MRole; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.ValueNamePair; +import org.compiere.util.WebSessionCtx; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; +import pl.x3E.adInterface.DataSet; +import pl.x3E.adInterface.LookupValue; +import pl.x3E.adInterface.LookupValues; + +/* + * ADEMPIERE/COMPIERE + * + * zamiana: + * GridField na GridField + * GridField + */ + +// TODO: Implement a better replacement for ROWNUM / LIMIT syntax + +public class ADLookup { + + + static final int TYPE_PRODUCT = 001; + static final int TYPE_ORDER = 002; + static final int TYPE_BUISNESS_PARTNER = 002; + + private String m_columnName; + private int m_type; + private String m_tableName; + private String m_keyColumnName; + private Boolean IsQueryJoin; + private boolean m_isSOTRX; + + private final int MAX_PRODUCT_ROWS=500; + + private WebSessionCtx wsc; + private Lookup m_lookup; + + protected static CLogger log = CLogger.getCLogger(ADLookup.class); + + + public ADLookup( String columnName ) + { + m_columnName = columnName; + + } + + + public ArrayList GetLookupData() + { + + return null; + } + + + + private String getWhereClause( String keyColumn, DataRow params ) { + String whereClause = "IsSummary='N'"; + String lookupColumn = keyColumn; + + return whereClause; + } + + private DataSet getResult( com._3e.ADInterface.ADInfo info, DataSet ds, int count, String mode ) { + if ("count".equals(mode) && count > 1) { + DataRow dr = ds.addNewDataRow(); + DataField df = dr.addNewField(); + df.setVal( ""+count ); + df.setColumn( "__count" ); + df.setType( "string" ); + return ds; + } + + try { + + PreparedStatement pstmt = DB.prepareStatement( info.getSQL() ); + info.setParameters( pstmt, false ); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + DataRow dr = ds.addNewDataRow(); + DataField df = null; + //DataField df = dr.addNewField(); + + DataRow cols = info.getColumns(); + + for (int i=0; i< cols.sizeOfFieldArray(); i++ ) { + df = dr.addNewField(); + DataField f = cols.getFieldArray(i); + //if ("string".equalsIgnoreCase(f.getType())) { + { + df.setVal(rs.getString( i + 1 )); + df.setColumn( f.getColumn() ); + df.setType( f.getType() ); + df.setLval( f.getLval() ); + } + } + + } + rs.close(); + pstmt.close(); + } + catch (Exception e) + { + System.out.println( e.getMessage() ); + } + return ds; + } + + + + + public void getLookupSearchValues( DataRow adr, DataSet ds, Properties ctx, int windowNo ) + { + //String whereClause = getWhere(adr); + String whereClause = getWhereClause(m_columnName, adr); + String finalSQL=""; + + IsQueryJoin = false; + + String mode = "normal"; + for (int i=0; i< adr.sizeOfFieldArray(); i++) { + DataField f = adr.getFieldArray(i); + if ("mode".equalsIgnoreCase(f.getColumn())) mode = f.getVal(); + } + + + ADInfo info = null; + + // TODO: Implement info for generic lookups !! + + if (m_columnName.equals("C_BPartner_ID")) + { + //finalSQL = getBuisnessPartnerSQL(whereClause, adr); + info = new InfoBPartner( adr, whereClause ); + } else if (m_columnName.equals("M_Product_ID")) + { + info = new InfoProduct( adr, whereClause, ctx, windowNo ); + //finalSQL = getProductSQL(whereClause); + }else if (m_columnName.equals("C_Order_ID")) { + //finalSQL = getOrderAccessSQL(whereClause); + } + if (finalSQL.equals("")) { + //finalSQL = getDirectAccessSQL(whereClause); + } + + + //Sprawdzam czy przy wykonaniu FinalSql zwr�ci mi 0, 1 lub wiele wierszy + //Je�eli zwr�ci mi 0 wierszy to ko�cz� + //Je�eli zwr�ci mi 1 wiersz to ko�cowy wynik b�dzie kwerend� normaln� (w przypadku join�w, np.: bp zostanie wykonana alternatywna kwerenda bez join�w) + //Je�eli zwr�ci mi n wierszy to zwracam je + int id = 0; + log.info("Starting execution to base"); + try + { + /* + PreparedStatement pstmt = DB.prepareStatement( finalSQL ); + info.setParameters( pstmt, true); + ResultSet rs = pstmt.executeQuery(); + //Wykonuje zapytanie do bazy z "normalnym" sql i sprawdzam ile, mam wierszy wyniku + int ile = 0; + while (rs.next()) + { + ile = ile+1; + }*/ + int ile = 0; + finalSQL = info.getSQLCount(); + PreparedStatement pstmt = DB.prepareStatement(finalSQL, null); + info.setParameters (pstmt, true); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + ile = rs.getInt(1); + rs.close(); + pstmt.close(); + + System.out.println("Znalaz�em " + ile + " wierszy / rekord�w"); + //Je�eli jest 0 wierszy to ko�czymy + //w kliencie spowoduje to wyswietlenie pustego okna lookUp + if (ile==0) + { + System.out.println("Nie znalaz�em rekord�w. W kliencie zostanie wy�wietlone okno LookUp'a bez rekord�w."); + } + //Je�eli jest tylko jeden wiersz to odpowiednie tabele b�d� wywo�ywane bez + //join�w + if ((ile==1)) + { + System.out.println("Znalaz�em 1 rekord wi�c szukam dla bez join. W kliencie zostanie automatycznie uzupe�niona warto�c"); + IsQueryJoin = false; + } + //Jesli wiecej niz jeden to uzywamy join�w + //Spowoduje to wyswietlenie rekord�w spe�niajacych kryterium + //w oknie LookUp'a + if (ile>1) + { + System.out.println("Znalaz�em wi�cej ni� 1 rekord wi�c szukam dla whereClause i z joinami. W kliencie zostanie wy�wietlone LookUpWindow z przefiltrowanymi rekordami."); + IsQueryJoin = true; + + } + ds = getResult(info, ds, ile, mode); + } + catch (Exception e) + { + log.log(Level.SEVERE, finalSQL, e); + id = -2; + } + // No (unique) result + if (id <= 0) + { + if (id == 0) + log.fine("Not Found - " + finalSQL); + else + log.fine("Not Unique - " + finalSQL); + //m_value = null; // force re-display + //actionButton(m_text.getText()); + //return r; + } + log.fine("Unique ID=" + id); + + } // actionText + + /** + * Generate Access SQL for Search. + * The SQL returns the ID of the value entered + * Also sets m_tableName and m_keyColumnName + * @param text uppercase text for LIKE comparison + * @return sql or "" + * Example + * SELECT C_Payment_ID FROM C_Payment WHERE UPPER(DocumentNo) LIKE x OR ... + */ + private String getDirectAccessSQL (String text) + { + //Tutaj trzeba doda� dodatkowe pole dla odpowiednich typ�w wyszukiwania w selectach + StringBuffer sql = new StringBuffer(); + m_tableName = m_columnName.substring(0, m_columnName.length()-3); // without _ID + m_keyColumnName = m_columnName; + if (m_columnName.equals("C_Invoice_ID")) + { + sql.append("SELECT C_Invoice_ID, DocumentNo FROM C_Invoice WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("M_InOut_ID")) + { + sql.append("SELECT M_InOut_ID, '' FROM M_InOut WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("C_Payment_ID")) + { + sql.append("SELECT C_Payment_ID, DocumentNo FROM C_Payment WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("GL_JournalBatch_ID")) + { + sql.append("SELECT GL_JournalBatch_ID, '' FROM GL_JournalBatch WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("SalesRep_ID")) + { + sql.append("SELECT AD_User_ID, NAME FROM AD_User WHERE UPPER(Name) LIKE ") + .append(DB.TO_STRING(text)); + m_tableName = "AD_User"; + m_keyColumnName = "AD_User_ID"; + } + + // Predefined + if (sql.length() > 0) + { + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + sql.append(" AND IsActive='Y'"); + + if (DB.isOracle()) + sql.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" "); + // *** + //log.finest("(predefined) " + sql.toString()); + + String sqlret = MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + if (DB.isPostgreSQL()) + sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS; + + return sqlret; + } + + // Check if it is a Table Reference + // TODO dorobic obsluge where z ad_ref_table !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + if (m_lookup != null && m_lookup instanceof MLookup) + { + int AD_Reference_ID = ((MLookup)m_lookup).getAD_Reference_Value_ID(); + if (AD_Reference_ID != 0) + { + String query = "SELECT kc.ColumnName, dc.ColumnName, t.TableName " + + "FROM AD_Ref_Table rt" + + " INNER JOIN AD_Column kc ON (rt.AD_Key=kc.AD_Column_ID)" + + " INNER JOIN AD_Column dc ON (rt.AD_Display=dc.AD_Column_ID)" + + " INNER JOIN AD_Table t ON (rt.AD_Table_ID=t.AD_Table_ID) " + + "WHERE rt.AD_Reference_ID=?"; + String displayColumnName = null; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query); + pstmt.setInt(1, AD_Reference_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + m_keyColumnName = rs.getString(1); + displayColumnName = rs.getString(2); + m_tableName = rs.getString(3); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + //log.log(Level.SEVERE, "getDirectAccessSQL", e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + if (displayColumnName != null) + { + sql = new StringBuffer(); + sql.append("SELECT ").append(m_keyColumnName).append(", "+displayColumnName) // kolec - bylo m_displayColumnName + .append(" FROM ").append(m_tableName) + .append(" WHERE UPPER(").append(displayColumnName) + .append(") LIKE ").append(DB.TO_STRING(text)) + .append(" AND IsActive='Y'"); + + if (DB.isOracle()) + sql.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" "); + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + // *** + //log.finest("(Table) " + sql.toString()); + + String sqlret = MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + if (DB.isPostgreSQL()) + sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS; + + return sqlret; + } + } // Table Reference + } // MLookup + + /** Check Well Known Columns of Table - assumes TableDir **/ + String query = "SELECT t.TableName, c.ColumnName " + + "FROM AD_Column c " + + " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID AND t.IsView='N') " + + "WHERE (c.ColumnName IN ('DocumentNo', 'Value', 'Name') OR c.IsIdentifier='Y')" + + " AND c.AD_Reference_ID IN (10,14)" + + " AND EXISTS (SELECT * FROM AD_Column cc WHERE cc.AD_Table_ID=t.AD_Table_ID" + + " AND cc.IsKey='Y' AND cc.ColumnName=?)"; + m_keyColumnName = m_columnName; + sql = new StringBuffer(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query); + pstmt.setString(1, m_keyColumnName); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + if (sql.length() != 0) + sql.append(" OR "); + m_tableName = rs.getString(1); + sql.append("UPPER(").append(rs.getString(2)).append(") LIKE ").append(DB.TO_STRING(text)); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (SQLException ex) + { + log.log(Level.SEVERE, "getDirectAccessSQL", ex); + } + try + { + if (pstmt != null) + pstmt.close(); + } + catch (SQLException ex1) + { + } + pstmt = null; + // + if (sql.length() == 0) + { + log.log(Level.SEVERE, "(TableDir) - no standard/identifier columns"); + return ""; + } + // + StringBuffer retValue = new StringBuffer ("SELECT ") + .append(m_columnName).append(" , NAME").append(" FROM ").append(m_tableName) + .append(" WHERE ").append(sql) + .append(" AND IsActive='Y' "); + + if (DB.isOracle()) + retValue.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" "); + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + retValue.append(" AND ").append(wc); + // *** + log.finest("(TableDir) " + sql.toString()); + + String sqlret = MRole.getDefault().addAccessSQL(retValue.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + if (DB.isPostgreSQL()) + sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS; + + return sqlret; + } // getDirectAccessSQL + + /** + * Get Where Clause + * @return where clause or "" + */ + private String getWhereClause() + { + String whereClause = ""; + if (m_lookup == null) + return ""; + if (m_lookup.getZoomQuery() != null) + whereClause = m_lookup.getZoomQuery().getWhereClause(); + String validation = m_lookup.getValidation(); + if (whereClause.length() == 0) + whereClause = validation; + else + if (validation.length()>0) // kolec + whereClause += " AND " + validation; + // log.finest("ZoomQuery=" + (m_lookup.getZoomQuery()==null ? "" : m_lookup.getZoomQuery().getWhereClause()) + // + ", Validation=" + m_lookup.getValidation()); + if (whereClause.indexOf('@') != -1) + { + String validated = Env.parseContext(wsc.ctx, m_lookup.getWindowNo(), whereClause, false); + if (validated.length() == 0) + log.severe("Cannot Parse=" + whereClause); + else + { + log.fine("Parsed: " + validated); + return validated; + } + } + return whereClause; + } // getWhereClause + + + + + + public static void fillLookupValues( LookupValues lvs, KeyNamePair[] kp ) + { + if (kp!=null && lvs != null) + for (int i=0; i deps = ff.getDependentOn(); + Lookup lookup = ff.getLookup(); + + LookupInfo li = f.addNewLookupInfo(); + if (fo.lookupInfo!=null) { + li.setZoomWindow( fo.lookupInfo.ZoomWindow ); + li.setZoomWindow( fo.lookupInfo.ZoomWindow ); + } + + //if (deps.size()==0) + if (lookup!=null && (fo.ValidationCode==null || (fo.ValidationCode!=null && fo.ValidationCode.length()==0))) { + LookupValues lvs = f.addNewLookup(); + //System.out.println( "lookup "+fo.ColumnName+" "+lookup.getSize() ); + + //if(lookup.size() == 0) - nie robic tego + // System.out.println("lookup refresh ["+fo.ColumnName+"]= "+lookup.refresh()); + /*if(lookup.getSize() > 0)*/ + ArrayList ar = lookup.getData(ff.isMandatory(false), true, !ff.isReadOnly(), true); // the last was false, 2007-05-11 + if (ar != null && ar.size()>0) { + Object[] list = ar.toArray(); + + for (int i=0; iFields = to.getFields(); // adempiere + //ArrayListFields = to.Fields; // compiere + + if (Fields !=null) { + FieldList fl = t.addNewFields(); + for (int i=0; i + 1000000 + + + 1000000 + */ + +// method to convert Document to String + public String getStringFromDocument(Document doc) + { + try + { + DOMSource domSource = new DOMSource(doc); + StringWriter writer = new StringWriter(); + StreamResult result = new StreamResult(writer); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + transformer.transform(domSource, result); + return writer.toString(); + } + catch(TransformerException ex) + { + ex.printStackTrace(); + return null; + } + } + + + private Map WindowStatusMap = new HashMap(); + + /* + public WindowTabDataDocument getWindowTabData(int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData) { + return getWindowTabData(WindowNo, AD_Window_ID, AD_Menu_ID, TabNo, PrevTabNo, PrevRecNo, getData, 0, -1); + } + + public WindowTabDataDocument getWindowTabData(int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData, int RowStart, int RowCount) + { + return null; //TODO + + }*/ + + private MQuery createQuery( String table_name, DataRow dr ) { + MQuery q = new MQuery(table_name); + DataField df[] = dr.getFieldArray(); + for (int i=0; i0 ) + { + q.addRestriction("UPPER("+df[i].getColumn()+")", MQuery.LIKE, df[i].getVal().toUpperCase(), df[i].getColumn(), df[i].getVal().toUpperCase()); + } + } + return q; + } + + + void authenticate(String webServiceName, String method) { + if (!m_cs.isLoggedIn()) + throw new IdempiereServiceFault( new Exception( "You need to login" ) ); + // TODO: Authenticate webservice and method + // TODO: Search for a service type for client and role access with the same value as the method + + // TODO: Increase security! + } + + public WindowTabDataDocument getWindowTabData(WindowTabDataReqDocument reqd) { + authenticate(webServiceName, "getWindowTabData"); + + WindowTabDataReq req = reqd.getWindowTabDataReq(); + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, req.getWindowNo(), false, 0, false, 0); + if (ws == null) + { + GridWindowVO wo = getWindowVO( req.getWindowNo(), req.getADWindowID(), req.getADMenuID() ); + ws = new WWindowStatus(wo); + WindowStatusMap.put(new Integer(req.getWindowNo()), ws); + + ws.curTab.query(ws.mWindow.isTransaction()); //!!!!!!!!!! + ws.curTab.navigate(0); + ws.curTab.setSingleRow(true); + } + + if (ws.curTab.getTabNo() != req.getPrevTabNo()) + { + ws.curTab.removeDataStatusListener(ws.ads); + ws.curTab = ws.mWindow.getTab(req.getPrevTabNo()); + ws.curTab.query(ws.mWindow.isTransaction()); // false + ws.curTab.navigate(0); + ws.updateRecIDMap(); + } + /* + if (ws.curTab.getCurrentRow() != req.getPrevRecNo()) + { + if (req.getPrevRecNo() >=0) + ws.curTab.navigate( req.getPrevRecNo() ); + } + */ + int prevRecNo = ws.getRowNoFromRecordID( req.getPrevRecNo()); // we assume that it RecordID + if (ws.curTab.getCurrentRow() != prevRecNo) + { + if (prevRecNo >=0) + ws.curTab.navigate( prevRecNo ); + } + + + WWindowStatus.changeTabIfNeeded( ws, req.getTabNo() ); + + if (req.getGetData()) + { + if (req.getFromZoom()) { + WWindowStatus ws2 = WWindowStatus.get(WindowStatusMap, req.getFromZoomWindowID(), true, req.getFromZoomTabID(), true, req.getFromZoomRowID()); + System.out.println(ws2.curTab.getTableName()); + GridField field = ws2.curTab.getField(req.getFromZoomColumnName()); + ws2 = null; + if (field == null) return null; + MLookup lookup = (MLookup)field.getLookup(); + if (lookup == null) + return null; + // + MQuery zoomQuery = lookup.getZoomQuery(); + Object value = field.getValue(); + if (value == null) + { + value = req.getFromZoomColumnValue(); + } + // If not already exist or exact value + if (zoomQuery == null || value != null) + { + zoomQuery = new MQuery(); // ColumnName might be changed in GridTab.validateQuery + zoomQuery.addRestriction( req.getFromZoomColumnName(), MQuery.EQUAL, value); + } + ws.curTab.setQuery(zoomQuery); + //ws.curTab.query(ws.mWindow.isTransaction()); + + // ADEMPIERE/COMPIERE + ws.curTab.query(false, 0, 0); // adempiere + //ws.curTab.query(false, 0); // compiere + + } else + { + DataRow findDR = req.getFindCriteria(); + MQuery currentQuery = ws.curTab.getQuery(); + MQuery newQuery = createQuery( ws.curTab.getTableName(), findDR ); + if (findDR.getFieldArray().length>0) { //(!currentQuery.getWhereClause().equals( newQuery.getWhereClause() )) { // change the query for zak�adki + ws.curTab.setQuery(newQuery); + //ws.curTab.query(ws.mWindow.isTransaction()); + + //ADEMPIERE/COMPIERE + ws.curTab.query(false, 0, 0); // adempiere + //ws.curTab.query(false, 0); // compiere + } + } + + + + int rc = 0; + if (req.getRowCount()>0) + rc = req.getRowCount(); else rc = ws.curTab.getRowCount(); + int initRowNo = 0; + if (req.getRowStart() > 0) initRowNo = req.getRowStart(); + + int lastRow = Math.min(rc, initRowNo + MAX_ROWS); //ok + //initRowNo + 5; // only for testing + + wd.setNumRows( lastRow ); + //lastRow += initRowNo; + + wd.setTotalRows( ws.curTab.getRowCount() ); // ok + //wd.setTotalRows( 5 ); // only for testing + + wd.setStartRow(initRowNo); + + Map RecordIDMap = ws.getRecordIDMap(); + try { + RecordIDMap.clear(); + for (int lineNo = initRowNo; lineNo < lastRow; lineNo++) + { + ws.curTab.navigate(lineNo); + + int recID = ws.curTab.getRecord_ID(); + RecordIDMap.put( recID, lineNo ); + + DataRow dr = ds.addNewDataRow(); + //System.out.println("row "+lineNo); + fillDataRow( dr, ws, false, false ); + + } + } catch (Exception ex) { ex.printStackTrace(); }; + + + if ( lastRow <= ws.curTab.getRowCount() ) { //last row + ws.updateRecIDMap(); + } + } + + + return ret; + + } + + + + public WindowTabDataDocument getDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "getDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + DataRow dr = ds.addNewDataRow(); + fillDataRow( dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + } + + return ret; + } + + public WindowTabDataDocument updateDataRow(int WindowNo, int TabNo, int RowNo, WindowTabDataDocument data ) { + authenticate(webServiceName, "updateDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + DataRow ret_dr = ds.addNewDataRow(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + DataRow[] dr = data.getWindowTabData().getDataSet().getDataRowArray(); + if (dr.length == 1) + { + DataRow dr0 = dr[0]; + boolean err = updateFields( ws, dr0 ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + //ws.curTab.dataRefresh(); + fillDataRow( ret_dr, ws, true, false ); + + } + + } + + return ret; + } + + private final String recordIDfield = "_rowNo"; + + + private void fillDataRow( DataRow dr, WWindowStatus ws, boolean handleLookups, boolean onlyUpdated ) { + authenticate(webServiceName, "fillDataRow"); + + int noFields = ws.curTab.getFieldCount(); + + //m_cs.dateFormat = new SimpleDateFormat( m_cs.datePattern ); + //m_cs.dateTimeFormat = new SimpleDateFormat( m_cs.datePattern ); + + String column = ""; + boolean isEditable = false; + // for all columns + + if (onlyUpdated) { + java.util.Date clientUpdated = new java.util.Date(); + java.util.Date updated = (java.util.Date)ws.curTab.getValue("Updated"); + if (!updated.after(clientUpdated)) { + DataField df = dr.addNewField(); + df.setColumn( recordIDfield ); + df.setDisp(false); + df.setVal( Integer.toString( ws.curTab.getRecord_ID() )); + return; + } + } + + for (int colNo = 0; colNo < noFields; colNo++) + { + GridField field = ws.curTab.getField(colNo); + column = field.getColumnName(); + + + if (!field.isDisplayed(true)) + { + DataField df = dr.addNewField(); + df.setColumn( column ); + df.setDisp(false); + df.setVal("" ); + //System.out.println(" *** not displayed: "+field.getColumnName()+" | "+field.getDisplayLogic()); + continue; + } + + if (field.getDisplayType() == DisplayType.Button) + continue; + + DataField df = dr.addNewField(); + + isEditable = field.isEditable(true); + df.setEdit(isEditable); + + // Get Data - turn to string + Object data = ws.curTab.getValue( column ); + String info = null; + //System.out.println( " displaytype = "+field.getDisplayType()); + // + if (data == null && !DisplayType.isLookup( field.getDisplayType())) + info = ""; + else + { + int dt = field.getDisplayType(); + switch (dt) + { + + case DisplayType.Date: + info = m_cs.dateFormat.format(data); + //System.out.println( "Date: "+info ); + break; + case DisplayType.DateTime: + // TODO + info = m_cs.dateFormat.format(data); //m_cs.dateTimeFormat.format(data); + //System.out.println( "DateTime: "+info ); + break; + case DisplayType.Amount: + info = m_cs.amountFormat.format(data); + break; + case DisplayType.Number: + case DisplayType.CostPrice: + info = m_cs.numberFormat.format(data); + break; + case DisplayType.Quantity: + info = m_cs.quantityFormat.format(data); + break; + case DisplayType.Integer: + info = m_cs.integerFormat.format(data); + break; + case DisplayType.YesNo: + info = data.toString(); + if ("Y".equals(info)) info="true"; + if ("N".equals(info)) info="false"; + //info = Msg.getMsg(ws.ctx, data.toString()); + break; + case DisplayType.Location: + info = data.toString(); + if (handleLookups) { + String x = DB.getSQLValueString(null, "select l.address1||', '||l.postal||', '||l.city from c_location l where c_location_id=?", Integer.parseInt(info)); + df.setLval( x ); + System.out.println( " location = "+x ); + } + break; + + default: + if (DisplayType.isLookup(dt)) + { + Lookup lookup = field.getLookup(); + //ArrayList deps = field.getDependentOn(); + + String lookupValue = null; + if (field.getValue()!=null) + { + lookupValue = lookup.getDisplay( field.getValue() ); + } + //lookup.refresh(); + if (data!=null) + { + info = lookup.getDisplay(data); + if (info==null) + { + lookup.refresh(); + info = lookup.getDisplay(data); + } + } + df.setLval(lookupValue); + + //System.out.println(field.getVO().ValidationCode); + + if (handleLookups /*&& isEditable*/ && lookup!=null + && (field.getVO().ValidationCode!=null && field.getVO().ValidationCode.length()>0))//deps.size()>0) + { + if (data!=null) + info = lookup.getDisplay(data); + + + LookupValues lvs = df.addNewLookup(); + + ADLookup.fillLookupValues( lvs, lookup, field ); + + } + if (data!=null) + info = data.toString(); + + } + else + { + info = data.toString(); + //System.out.println(">>>>>>>> UNKNOWN > "+field.getColumnName() +" = "+info); + } + } + } + //System.out.println(" "+column+" = "+info); + if ("M_Product_ID".equals(field.getColumnName())) + System.out.println("--- "+info); + + df.setDisp(true); + df.setVal( info ); + df.setColumn(field.getColumnName()); + if (field.isError()) + { + df.setError(true); + df.setErrorVal(field.getErrorValue()); + } + } + DataField df = dr.addNewField(); + df.setColumn( recordIDfield ); + df.setVal(Integer.toString( ws.curTab.getRecord_ID() )); + } + + + + public WindowTabDataDocument saveDataRow(int WindowNo, int TabNo, int RowNo, WindowTabDataDocument data ) { + authenticate(webServiceName, "saveDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + DataRow ret_dr = ds.addNewDataRow(); + + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + DataRow[] dr = data.getWindowTabData().getDataSet().getDataRowArray(); + if (dr.length == 1) + { + DataRow dr0 = dr[0]; + boolean error = updateFields( ws, dr0 ); + + DataField f[] = dr0.getFieldArray(); + HashMap fmap = new HashMap(); + for (int i=0; i " + (value==null ? "null" : value.toString())); + // same = both null + * + */ + + if (dbValue == null && value == null) + continue; + // new value null + else if (dbValue != null && value == null) + ws.curTab.setValue (GridField, null); + // from null to new value + else if (dbValue == null && value != null) + { + fieldError = !setFieldValue (ws, GridField, value); + } + // same + + else if (dbValue.equals(value)) + continue; + else + fieldError = !setFieldValue (ws, GridField, value); + + // + if (!error && fieldError) + { + //log.info("Error: " + GridField.getColumnName()); + error = true; + } + } + } // for all parameteres + + // Re-Do Changed Column to overwrite + /* + String columnName = f.getColumn(); //WebUtil.getParameter (request, P_ChangedColumn); + if (columnName != null && columnName.length() > 0) + { + ws.m_needSave = true; + GridField GridField = ws.curTab.getField(columnName); + if (GridField != null) + { + String value = "";//WebUtil.getParameter(request, columnName); + Object newValue = getFieldValue (GridField, value); + if (!ERROR.equals(newValue)) + { + // De-Selected Check Boxes are null + if (newValue == null && GridField.getDisplayType() == DisplayType.YesNo) + newValue = "N"; + //log.fine("ChangedColumn: " + columnName + "=" + newValue); + ws.curTab.setValue(GridField, newValue); + } + } + } + */ + + return error; + } // updateFields + + + /************************************************************************** + * Set Field Value + * @param wsc web session + * @param ws window status + * @param GridField field + * @param value as String + * @return true if correct + */ + private boolean setFieldValue ( WWindowStatus ws, + GridField GridField, String value) + { + Object newValue = getFieldValue (GridField, value); + if (ERROR.equals(newValue)) + { + GridField.setErrorValue(value); + return false; + } + Object dbValue = GridField.getValue(); + if ((newValue == null && dbValue != null) + || (newValue != null && !newValue.equals(dbValue))) + { + //GridField.setValue(newValue,true); + ws.curTab.setValue(GridField, newValue); + + } + return true; + } // setFieldValue + + + /** + * Get Field value (convert value to datatype of GridField) + * @param wsc session context + * @param GridField field + * @param value String Value + * @return converted Field Value + */ + private Object getFieldValue ( GridField GridField, String value) + { + if (value == null || value.length() == 0) + return null; + + int dt = GridField.getDisplayType(); + String columnName = GridField.getColumnName(); + + // BigDecimal + if (DisplayType.isNumeric(dt)) + { + BigDecimal bd = null; + try + { + Number nn = null; + if (dt == DisplayType.Amount) + nn = m_cs.amountFormat.parse(value); + else if (dt == DisplayType.Quantity) + nn = m_cs.quantityFormat.parse(value); + else // DisplayType.CostPrice + nn = m_cs.numberFormat.parse(value); + if (nn instanceof BigDecimal) + bd = (BigDecimal)nn; + else + bd = new BigDecimal(nn.toString()); + } + catch (Exception e) + { + //log.warning("BigDecimal: " + columnName + "=" + value + ERROR); + return ERROR; + } + //log.fine("BigDecimal: " + columnName + "=" + value + " -> " + bd); + return bd; + } + + // ID + else if (DisplayType.isID(dt)) + { + Integer ii = null; + try + { + ii = new Integer (value); + } + catch (Exception e) + { + //log.log(Level.WARNING, "ID: " + columnName + "=" + value, e); + ii = null; + } + // -1 indicates NULL + if (ii != null && ii.intValue() == -1) + ii = null; + //log.fine("ID: " + columnName + "=" + value + " -> " + ii); + return ii; + } + + + // Date/DateTime + else if (DisplayType.isDate(dt)) + { + Timestamp ts = null; + try + { + java.util.Date d = null; + + if (DisplayType.Date == dt) + d = m_cs.dateFormat.parse(value); + else if (DisplayType.DateTime == dt) + d = m_cs.dateTimeFormat.parse(value); + else if (DisplayType.Time == dt) + { + value = "2000/01/01 "+ value; + d = m_cs.dateTimeFormat.parse(value); + } + ts = new Timestamp(d.getTime()); + } + catch (Exception e) + { + //log.warning("Date: " + columnName + "=" + value + ERROR); + return ERROR; + } + //log.fine("Date: " + columnName + "=" + value + " -> " + ts); + return ts; + } + + // Checkbox + else if (dt == DisplayType.YesNo) + { + Boolean retValue = Boolean.FALSE; + if (value.equals("true")) + retValue = Boolean.TRUE; + //log.fine("YesNo: " + columnName + "=" + value + " -> " + retValue); + return retValue; + } + + // treat as string + //log.fine(columnName + "=" + value); + return value; + } // getFieldValue + + + public WindowTabDataDocument addNewDataRow(int WindowNo, int TabNo ) { + authenticate(webServiceName, "addNewDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, false, 0); + if (ws != null) + { + if (ws.curTab.dataNew(false)) + { + //ws.curTab.setSingleRow(true); + wd.setSuccess(true); + DataRow dr = ds.addNewDataRow(); + fillDataRow( dr, ws, true, false ); + updateRecIDMap( ws ); + System.out.println("New Row no = "+ws.curTab.getCurrentRow()); + } else + { + ws.curTab.dataIgnore(); + wd.setSuccess(false); + } + } + + return ret; + } + + public WindowTabDataDocument deleteDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "deleteDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + wd.setSuccess( + ws.curTab.dataDelete() + ); + + DataRow ret_dr = ds.addNewDataRow(); + fillDataRow( ret_dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + updateRecIDMap( ws ); + } + return ret; + } + + public WindowTabDataDocument ignoreDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "ignoreDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + ws.curTab.dataIgnore(); + + wd.setSuccess(true); + + DataRow ret_dr = ds.addNewDataRow(); + fillDataRow( ret_dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + updateRecIDMap( ws ); + + } + return ret; + } + + public WindowTabDataDocument refreshDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "refreshDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + ws.curTab.dataRefresh(); + + wd.setSuccess(true); + + DataRow ret_dr = ds.addNewDataRow(); + fillDataRow( ret_dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + } + return ret; + + } + + public WindowTabDataDocument getLookupSearchData(GetLookupSearchDataReqDocument req) + { //int WindowNo, int TabNo, int RowNo, DataRow dr + authenticate(webServiceName, "getLookupSearchData"); + + GetLookupSearchDataReq reqt = req.getGetLookupSearchDataReq(); + + DataField[] df = reqt.getParams().getFieldArray(); + for (int i=0; i0 ) + log.info("LookUp COlumn: "+ df[i].getColumn()+ " " + df[i].getVal()); + } + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + int WindowNo = reqt.getWindowNo(); + int TabNo = reqt.getTabNo(); + int RowNo = reqt.getTabNo(); + + WWindowStatus ws = null; + if (WindowNo>0) + ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); //<-- Note changes to the active record (bledne action), probably are not properly communicated parameters + if (ws != null) { + + ADLookup lk = new ADLookup( df[0].getVal()); + lk.getLookupSearchValues( reqt.getParams(), ds, ws.ctx, WindowNo ); + } else { + ADLookup lk = new ADLookup( df[0].getVal()); + lk.getLookupSearchValues( reqt.getParams(), ds, this.m_cs.getM_ctx(), 0 ); + } + return ret; + } + + public WindowTabDataDocument getLookupData(int WindowNo, int TabNo, int RowNo, String columnName ) + { + authenticate(webServiceName, "getLookupData"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + DataRow dr = ds.addNewDataRow(); + DataField df = dr.addNewField(); + GridField field = ws.curTab.getField(columnName); + Lookup lookup = field.getLookup(); + + df.setColumn(field.getColumnName()); + + String lookupValue = null; + if (field.getValue()!=null) + lookupValue = lookup.getDisplay( field.getValue() ); + df.setLval(lookupValue); + if (field.getValue()!=null) + df.setVal(field.getValue().toString()); + + LookupValues lvs = df.addNewLookup(); + + ADLookup.fillLookupValues(lvs, lookup, field); + } + return ret; + } + + + public ADMenuDocument getADMenu(int AD_Role_ID) + { + authenticate(webServiceName, "getADMenu"); + + ADMenuDocument res = ADMenuDocument.Factory.newInstance(); + ADMenuItem menu = res.addNewADMenu(); + menu.setName("Menu"); + menu.setType("Summary"); + + AD_Role_ID = Integer.parseInt( m_cs.getM_ctx().getProperty("#AD_Role_ID") ); + + // Load Menu Structure ---------------------- + int AD_Tree_ID = DB.getSQLValue(null, + "SELECT COALESCE(r.AD_Tree_Menu_ID, ci.AD_Tree_Menu_ID)" + + "FROM AD_ClientInfo ci" + + " INNER JOIN AD_Role r ON (ci.AD_Client_ID=r.AD_Client_ID) " + + "WHERE AD_Role_ID=?", AD_Role_ID); + if (AD_Tree_ID <= 0) + AD_Tree_ID = 10; // Menu + + //log.fine("doPost - AD_Tree_ID=" + AD_Tree_ID + " - " + Env.getAD_Language(wsc.ctx)); + + MTree tree = new MTree (m_cs.getM_ctx(), AD_Tree_ID, false, false, null); // Language set in WLogin + // Trim tree + MTreeNode root = tree.getRoot(); + Enumeration en = root.preorderEnumeration(); + + + ADMenuItemList itl = null;// menu.addNewItems(); + ADMenuItem it = menu;//, it_last = null; + + Stack stack = new Stack(); + //stack.push( itl ); + + while (en.hasMoreElements()) + { + MTreeNode nd = (MTreeNode)en.nextElement(); + if (nd.isTask() + || nd.isWorkbench() + || nd.isWorkFlow() + || nd.getNode_ID() == 383 // Reset Cache - kills the server + ) + { + MTreeNode parent = (MTreeNode)nd.getParent(); + parent.remove(nd); + } + } + tree.trimTree(); + + // Print tree + StringBuffer buf = new StringBuffer(); + StringBuffer barbuf = new StringBuffer(); + en = root.preorderEnumeration(); + int oldLevel = 0; + while (en.hasMoreElements()) + { + MTreeNode nd = (MTreeNode)en.nextElement(); + + // Level + int level = nd.getLevel(); // 0 == root + if (level == 0) + continue; + // + while (oldLevel < level) + { + if (itl != null) stack.push( itl ); + itl = it.addNewItems(); + oldLevel++; + } + while (oldLevel > level) + { + oldLevel--; + itl = (ADMenuItemList)stack.pop(); + } + + // Print Node + ADMenuItem it_last = printNode(nd, m_cs.getM_ctx(), itl ); + if (nd.isSummary()) + it = it_last; + //if(nd.isOnBar() && !nd.isSummary()) + //barbuf.append(printNode(nd, m_cs.getM_ctx() )); + } + // Final + + return res; + } + + private ADMenuItem printNode (MTreeNode node, Properties ctx, ADMenuItemList itl) + { + ADMenuItem i = itl.addNewItem(); + i.setName( node.getName() ); + i.setDescription(node.getDescription() ); + i.setADMenuID( node.getNode_ID()); + String type = ""; + if(node.isWindow())type="Window";else + if(node.isForm())type="Form";else + if(node.isReport())type="Report";else + if(node.isProcess())type="Process";else + if(node.isSummary())type="Summary";else + if(node.isTask())type="Task";else + if(node.isWorkbench())type="Workbench";else + if(node.isWorkFlow())type="Workbench"; + i.setType( type ); + return i; + } + + + + public ADLoginResponseDocument login( ADLoginRequestDocument req ) + { + authenticate(webServiceName, "login"); + + // TODO: Implement security layer + log.log(Level.SEVERE, "Warning: Security layer not implemented yet - opening web service " + webServiceName + " implies a security risk for server"); + + ADLoginResponseDocument res = ADLoginResponseDocument.Factory.newInstance(); + ADLoginResponse lr = res.addNewADLoginResponse(); + + ADLoginRequest r = req.getADLoginRequest(); + + if (r.getStage()==0) // initial phase - return possible translations + { + LookupValues langs = lr.addNewLangs(); + for (int i = 0; i < Language.getLanguageCount(); i++) + { + Language language = Language.getLanguage(i); + LookupValue lv = langs.addNewLv(); + lv.setKey( language.getAD_Language() ); + lv.setVal( language.getName() ); + } + } else + if (r.getStage()==1) // Verify user and pass + { + KeyNamePair[] roles = null; + KeyNamePair[] clients = null; + KeyNamePair[] orgs = null; + KeyNamePair[] warehouses = null; + + Login login = new Login(m_cs.getM_ctx()); + + roles = login.getRoles(r.getUser(), r.getPass()); + if (roles == null) + { + lr.setStatus(-1); + return res; + } else + { + if (r.getRoleID()==-1 && roles != null && roles.length>0) + r.setRoleID( Integer.parseInt( roles[0].getID() ) ); + if (r.getRoleID()>-1) clients = login.getClients( new KeyNamePair(r.getRoleID(), "" ) ); + + if (r.getClientID()==-1 && clients != null && clients.length>0) + r.setClientID( Integer.parseInt( clients[0].getID() ) ); + if (r.getClientID()>-1) orgs = login.getOrgs( new KeyNamePair(r.getClientID(), "" ) ); + + if (r.getOrgID()==-1 && orgs != null && orgs.length>0) + r.setOrgID( Integer.parseInt( orgs[0].getID() ) ); + if (r.getOrgID()>-1) warehouses = login.getWarehouses( new KeyNamePair(r.getOrgID(), "" ) ); + + ADLookup.fillLookupValues( lr.addNewRoles(), roles ); + ADLookup.fillLookupValues( lr.addNewClients(), clients ); + ADLookup.fillLookupValues( lr.addNewOrgs(), orgs ); + ADLookup.fillLookupValues( lr.addNewWarehouses(), warehouses ); + } + } else + if (r.getStage()==2) // Verify user and pass + { + Login login = new Login(m_cs.getM_ctx()); + KeyNamePair[] roles = login.getRoles(r.getUser(), r.getPass()); + if (roles != null) + { + KeyNamePair org = new KeyNamePair(r.getRoleID(), Integer.toString(r.getRoleID())); + String error = login.validateLogin(org); + if (error != null && error.length() > 0) + { + lr.setStatus(-1); + return res; + } + + int AD_User_ID = Env.getAD_User_ID(m_cs.getM_ctx()); + + if ( !m_cs.login( AD_User_ID, r.getRoleID(), r.getClientID(), r.getOrgID(), r.getWarehouseID(), r.getLang() ) ) { + lr.setStatus(-1); + return res; + } + } + else + { + lr.setStatus(-1); + return res; + } + } + + return res; + } + + + + + public ProcessParamsDocument getProcessParams( GetProcessParamsDocument req ) + { + authenticate(webServiceName, "getProcessParams"); + return Process.getProcessParams(m_cs, req ); + } + + public RunProcessResponseDocument runProcess( RunProcessDocument req ) + { + authenticate(webServiceName, "runProcess"); + return Process.runProcess(m_cs, req); + } + + public StandardResponseDocument saveLocation( LocationDocument req ) + { + authenticate(webServiceName, "saveLocation"); + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + + Location rloc = req.getLocation(); + + MLocation location = new MLocation(m_cs.getM_ctx(), rloc.getCLocationID(), null); + //log.fine("doPost updating C_Location_ID=" + C_Location_ID + " - " + targetBase); + + location.setAddress1 (rloc.getAddress1()); + location.setAddress2 (rloc.getAddress2()); + location.setCity ( rloc.getCity() ); + location.setPostal ( rloc.getPostalCode() ); + location.setC_Country_ID ( rloc.getCCountryID() ); + location.setC_Region_ID ( rloc.getCRegionID() ); + + // Save Location + location.save(); + resp.setRecordID( location.getC_Location_ID() ); + + return ret; + + } + + + public LocationDocument getLocation(@WebParam(name="req", targetNamespace="http://3e.pl/ADInterface") LocationDocument req ) + { + authenticate(webServiceName, "getLocation"); + LocationDocument ret = LocationDocument.Factory.newInstance(); + Location loc = ret.addNewLocation(); + + MLocation location = new MLocation(m_cs.getM_ctx(), req.getLocation().getCLocationID(), null); + loc.setAddress1( location.getAddress1() ); + loc.setAddress2( location.getAddress2() ); + loc.setCity( location.getCity() ); + loc.setPostalCode( location.getPostal() ); + loc.setCCountryID( location.getC_Country_ID() ); + loc.setCRegionID( location.getC_Region_ID()); + + loc.setCountries( this.getCountry( location )); + + return ret; + } + + private LookupValues getCountry (MLocation location) + { + MCountry[] countries = MCountry.getCountries (location.getCtx()); + int comp = location.getC_Country_ID(); + if (comp == 0) + comp = Env.getContextAsInt(m_cs.getM_ctx(), "C_Country_ID"); + + LookupValues lvs = LookupValues.Factory.newInstance(); + for (int i = 0; i < countries.length; i++) + { + LookupValue lv = lvs.addNewLv(); + lv.setKey(String.valueOf(countries[i].getC_Country_ID())); + lv.setVal( countries[i].getName() ); + } + + + return lvs; + } + + private LookupValues getRegion (MLocation location) + { + MRegion[] regions = MRegion.getRegions (location.getCtx(), location.getC_Country_ID()); + int comp = location.getC_Region_ID(); + if (comp == 0) + comp = Env.getContextAsInt(m_cs.getM_ctx(), "C_Region_ID"); + + LookupValues lvs = LookupValues.Factory.newInstance(); + for (int i = 0; i < regions.length; i++) + { + LookupValue lv = lvs.addNewLv(); + lv.setKey(String.valueOf(regions[i].getC_Region_ID())); + lv.setVal( regions[i].getName() ); + } + + return lvs; + } + + public DocActionDocument getDocAction(int WindowNo, int TabNo, int RowNo, String ColName ) + { + authenticate(webServiceName, "getDocAction"); + DocActionDocument ret = DocActionDocument.Factory.newInstance(); + DocAction da = ret.addNewDocAction(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + LookupValues lvs = da.addNewAction(); + Process.renderDocActionOptions(lvs, ws.curTab); + } + + return ret; + } + + public StandardResponseDocument setDocAction(int WindowNo, int TabNo, int RowNo, String ColName, String docAction ) + { + authenticate(webServiceName, "setDocAction"); + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse sr = ret.addNewStandardResponse(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + ws.curTab.setValue("DocAction", docAction); + boolean result = false; + if (ws.curTab.needSave(true, false)) //slain - do not dispose of error, if not write musiales + { + if (! (result = ws.curTab.dataSave(true))) + ws.curTab.dataIgnore(); + + } + sr.setIsError(!result); + + } else + sr.setIsError( true ); + + return ret; + } + + + private void updateRecIDMap(WWindowStatus ws) { + ws.updateRecIDMap(); + /* + int rc = ws.curTab.getRowCount(); + int initRowNo = 0; + + Map RecordIDMap = ws.getRecordIDMap(); + + RecordIDMap.clear(); + + for (int lineNo = initRowNo; lineNo < rc; lineNo++) + { + int recID = ws.curTab.getKeyID( lineNo ); + //System.out.println(""+lineNo+" - "+recID); + RecordIDMap.put( recID, lineNo ); + + } */ + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java new file mode 100644 index 0000000000..7a64257895 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java @@ -0,0 +1,339 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Properties; + +import org.compiere.model.MUser; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Language; +import org.compiere.util.Login; + +public class CompiereService { + + private static CLogger log = CLogger.getCLogger(CompiereService.class); + + public final static String datePattern = "dd-MM-yyyy"; + + private Properties m_ctx; + private String m_trx_name; + + private int m_AD_Client_ID; + private int m_AD_Org_ID; + private int m_AD_User_ID; + private int m_AD_Role_ID; + private int m_AD_Warehouse_ID; + private String m_Lang; + private String m_User; + + private boolean LoggedIn = false; + + + /** Localized Date format */ + public SimpleDateFormat dateFormat = null; + /** Localized Timestamp format */ + public SimpleDateFormat dateTimeFormat = null; + + /** Localized Amount format */ + public DecimalFormat amountFormat = null; + /** Localized Integer format */ + public DecimalFormat integerFormat = null; + /** Localized Number format */ + public DecimalFormat numberFormat = null; + /** Localized Quantity format */ + public DecimalFormat quantityFormat = null; + + /** Localized Date format */ + public SimpleDateFormat modelDateFormat = null; + /** Localized Timestamp format */ + public SimpleDateFormat modelDateTimeFormat = null; + + /** Localized Amount format */ + public DecimalFormat modelAmountFormat = null; + /** Localized Integer format */ + public DecimalFormat modelIntegerFormat = null; + /** Localized Number format */ + public DecimalFormat modelNumberFormat = null; + /** Localized Quantity format */ + public DecimalFormat modelQuantityFormat = null; + + private Language m_lang; + + public final String dateFormatOnlyForCtx = "yyyy-MM-dd"; + + public int getM_AD_Client_ID() { + return m_AD_Client_ID; + } + + public void setM_AD_Client_ID(int client_ID) { + m_AD_Client_ID = client_ID; + } + + public int getM_AD_Org_ID() { + return m_AD_Org_ID; + } + + public void setM_AD_Org_ID(int org_ID) { + m_AD_Org_ID = org_ID; + } + + public Properties getM_ctx() { + return m_ctx; + } + + public void setM_ctx(Properties m_ctx) { + this.m_ctx = m_ctx; + } + + public String getM_trx_name() { + return m_trx_name; + } + + public void setM_trx_name(String m_trx_name) { + this.m_trx_name = m_trx_name; + } + + + public CompiereService() + { + m_trx_name= null; //Trx.createTrxName(); + m_ctx = new Properties(); + LoggedIn = false; + } + + public void connect() + { + CompiereUtil.initWeb(); + + Env.setCtx(m_ctx); + Env.setContext( m_ctx, "#AD_Language", "en_US" ); + m_lang = Language.getLanguage("en_US"); + + // These variables are needed for ADClient.exe + Language m_lang2 = Language.getLanguage("pl_PL"); + + //dateFormat = DisplayType.getDateFormat(DisplayType.Date, m_lang2); + //dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, m_lang2); + + dateFormat = new SimpleDateFormat( datePattern ); + dateTimeFormat = new SimpleDateFormat( datePattern ); + + //dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, m_lang2); + // + amountFormat = DisplayType.getNumberFormat(DisplayType.Amount, m_lang2); + integerFormat = DisplayType.getNumberFormat(DisplayType.Integer, m_lang2); + numberFormat = DisplayType.getNumberFormat(DisplayType.Number, m_lang2); + quantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, m_lang2); + + + } + + public Language getM_lang() { + return m_lang; + } + + public void setM_lang(Language m_lang) { + this.m_lang = m_lang; + } + + public boolean isLoggedIn() { + return LoggedIn; + } + + /* + public static Properties testLogin (boolean isClient) + { + //logger.entering("Env", "initTest"); + Compiere.startupEnvironment(true); + // Test Context + Properties ctx = Env.getCtx(); + org.compiere.util.Login login = new org.compiere.util.Login(ctx); + KeyNamePair[] roles = login.getRoles("SuperUser", "System1969"); + // load role + if (roles != null && roles.length > 0) + { + int x = -1; + for (int i=0; i 0) + { + KeyNamePair[] orgs = login.getOrgs(clients[0]); + // load org + if (orgs != null && orgs.length > 0) + { + KeyNamePair[] whs = login.getWarehouses(orgs[0]); + // + login.loadPreferences(orgs[0], null, null, null); + } + } + } + // + Env.setContext(ctx, "#Date", "2006-01-26"); + // logger.exiting("Env", "initTest"); + return ctx; + } // testInit + */ + + + + /** + * Check Login information and set context. + * @returns true if login info are OK + * @param ctx context + * @param AD_User_ID user + * @param AD_Role_ID role + * @param AD_Client_ID client + * @param AD_Org_ID org + * @param M_Warehouse_ID warehouse + */ + private String checkLogin (Properties ctx, int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int M_Warehouse_ID) + { + // Get Login Info + String loginInfo = null; + // Verify existance of User/Client/Org/Role and User's acces to Client & Org + String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name || ' [' || INITCAP(USER) || ']' AS Text " + + "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur " + + "WHERE u.AD_User_ID=?" // #1 + + " AND c.AD_Client_ID=?" // #2 + + " AND o.AD_Org_ID=?" // #3 + + " AND ur.AD_Role_ID=?" // #4 + + " AND ur.AD_User_ID=u.AD_User_ID" + + " AND (o.AD_Client_ID = 0 OR o.AD_Client_ID=c.AD_Client_ID)" + + " AND c.AD_Client_ID IN (SELECT AD_Client_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)" + + " AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, AD_User_ID); + pstmt.setInt(2, AD_Client_ID); + pstmt.setInt(3, AD_Org_ID); + pstmt.setInt(4, AD_Role_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + loginInfo = rs.getString(1); + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + // log.log(Level.SEVERE, "checkLogin", e); + } + + // not verified + if (loginInfo == null) + return null; + + // Set Preferences + KeyNamePair org = new KeyNamePair(AD_Org_ID, String.valueOf(AD_Org_ID)); + KeyNamePair wh = null; + if (M_Warehouse_ID > 0) + wh = new KeyNamePair(M_Warehouse_ID, String.valueOf(M_Warehouse_ID)); + // + Timestamp date = null; + String printer = null; + Login login = new Login(ctx); + login.loadPreferences(org, wh, date, printer); + // Don't Show Acct/Trl Tabs on HTML UI + Env.setContext(ctx, "#ShowAcct", "N"); + Env.setContext(ctx, "#ShowTrl", "N"); + // + return loginInfo; + } // checkLogin + + public boolean login( int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int AD_Warehouse_ID, String Lang ) { + LoggedIn = false; + String loginInfo = checkLogin (getM_ctx(), AD_User_ID, AD_Role_ID, AD_Client_ID, AD_Org_ID, AD_Warehouse_ID ); + if (loginInfo == null) + return false; + + m_AD_Client_ID = AD_Client_ID; + m_AD_Org_ID = AD_Org_ID; + m_AD_User_ID = AD_User_ID; + m_AD_Role_ID = AD_Role_ID; + m_AD_Warehouse_ID = AD_Warehouse_ID; + m_Lang = Lang; + m_User = MUser.getNameOfUser(m_AD_User_ID); + + Env.setCtx(m_ctx); + Env.setContext( m_ctx, "#AD_Language", Lang); + m_lang = Language.getLanguage(Lang); + Env.verifyLanguage( getM_ctx(), m_lang ); + + modelDateFormat = new SimpleDateFormat( datePattern ); + modelDateTimeFormat = new SimpleDateFormat( datePattern ); + + modelAmountFormat = DisplayType.getNumberFormat(DisplayType.Amount, m_lang); + modelIntegerFormat = DisplayType.getNumberFormat(DisplayType.Integer, m_lang); + modelNumberFormat = DisplayType.getNumberFormat(DisplayType.Number, m_lang); + modelQuantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, m_lang); + + // Set Date + Timestamp ts = new Timestamp(System.currentTimeMillis()); + + SimpleDateFormat dateFormat4Timestamp = new SimpleDateFormat( dateFormatOnlyForCtx ); + Env.setContext( getM_ctx(), "#Date", dateFormat4Timestamp.format(ts)+" 00:00:00" ); // JDBC format + log.info(" #Date = "+ Env.getContextAsDate( getM_ctx(), "#Date")); + + Env.setContext( getM_ctx(), "#M_Warehouse_ID", AD_Warehouse_ID ); + Env.setContext(m_ctx, Env.LANGUAGE, m_lang.getAD_Language()); + //Env.setContext( getM_ctx(), "#AD_Language", Lang ); + + LoggedIn = true; + return true; + } + + public void setM_AD_User_ID(int m_AD_User_ID) { + this.m_AD_User_ID = m_AD_User_ID; + } + + public int getM_AD_User_ID() { + return m_AD_User_ID; + } + + public void setM_AD_Role_ID(int m_AD_Role_ID) { + this.m_AD_Role_ID = m_AD_Role_ID; + } + + public int getM_AD_Role_ID() { + return m_AD_Role_ID; + } + + public void setM_Lang(String m_Lang) { + this.m_Lang = m_Lang; + } + + public String getM_Lang() { + return m_Lang; + } + + public void setM_AD_Warehouse_ID(int m_AD_Warehouse_ID) { + this.m_AD_Warehouse_ID = m_AD_Warehouse_ID; + } + + public int getM_AD_Warehouse_ID() { + return m_AD_Warehouse_ID; + } + + public void setUser(String m_User) { + this.m_User = m_User; + } + + public String getUser() { + return m_User; + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java new file mode 100644 index 0000000000..7465b3adb0 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java @@ -0,0 +1,62 @@ +package com._3e.ADInterface; + + +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.Adempiere; +import org.compiere.model.MClient; +import org.compiere.model.MSystem; +import org.compiere.util.CLogger; + + +public class CompiereUtil { + + private static CLogger log = CLogger.getCLogger(CompiereUtil.class); + private static boolean s_initOK = false; + + + public static boolean initWeb() + { + if (s_initOK) + { + //log.info(context.getServletContextName()); + return true; + } + + // TODO: + // Load Environment Variables (serverApps/src/web/WEB-INF/web.xml) + + + try + { + //CLogMgt.setLevel(Level.OFF); + + /* ADEMPIERE/COMPIERE */ + //s_initOK = Compiere.startup(false); + s_initOK = Adempiere.startup(false); + } + catch (Exception ex) + { + log.log(Level.SEVERE, "startup", ex); + } + if (!s_initOK) + return false; + + // Logging now initiated + //log.info(info.toString()); + + // + Properties ctx = new Properties(); + MClient client = MClient.get(ctx, 0); + MSystem system = MSystem.get(ctx); + + // Env.setContext( ctx, "#AD_Language", "pl_PL" ); + //client.sendEMail(client.getRequestEMail(), + // "Server started: " + system.getName() + // ,"ServerInfo: " + context.getServerInfo() + //); + + return s_initOK; + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java new file mode 100644 index 0000000000..8f9635650d --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java @@ -0,0 +1,312 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.ArrayList; + +import org.compiere.model.MRole; +import org.compiere.util.CLogger; +import org.compiere.util.Env; +import org.compiere.util.Msg; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; + + +public class InfoBPartner implements ADInfo { + + private static String s_partnerFROM = "C_BPartner" + + " LEFT OUTER JOIN C_BPartner_Location l ON (C_BPartner.C_BPartner_ID=l.C_BPartner_ID AND l.IsActive='Y')" + + " LEFT OUTER JOIN AD_User c ON (C_BPartner.C_BPartner_ID=c.C_BPartner_ID AND (c.C_BPartner_Location_ID IS NULL OR c.C_BPartner_Location_ID=l.C_BPartner_Location_ID) AND c.IsActive='Y')" + + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)"; + + private DataRow params; + private boolean m_isSOTrx = true; + private String m_tableName = "C_BPartner"; + + public InfoBPartner(DataRow dr, String whereClause) { + params = dr; + m_isSOTrx = true; // TODO + + StringBuffer where = new StringBuffer(); + where.append("C_BPartner.IsSummary='N' AND C_BPartner.IsActive='Y'"); + if (whereClause != null && whereClause.length() > 0) + where.append(" AND ").append(whereClause); + + prepareTable(s_partnerFROM, where.toString(), "C_BPartner.Value"); + + setupParamsFromDataRow(); + } + + void setupParamsFromDataRow() { + for (int i=0; i< params.sizeOfFieldArray(); i++) { + DataField f = params.getFieldArray(i); + System.out.println(f.getColumn() +" - '"+f.getVal()+"'"); + if ("value".equalsIgnoreCase(f.getColumn())) fieldValue = f.getVal(); + if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal(); + if ("contact".equalsIgnoreCase(f.getColumn())) fieldContact = f.getVal(); + if ("checkCustomer".equalsIgnoreCase(f.getColumn())) checkCustomer = "Y".equalsIgnoreCase(f.getVal()); + if ("checkAND".equalsIgnoreCase(f.getColumn())) checkAND = "Y".equalsIgnoreCase(f.getVal()); + } + } + + String fieldValue = ""; + String fieldName = ""; + String fieldContact = ""; + String fieldEMail = ""; + String fieldPhone = ""; + + String fieldPostal = ""; + boolean checkAND = false; + boolean checkCustomer = false; + + + + protected CLogger log = CLogger.getCLogger(getClass()); + + + + public String getSQLWhere() + { + ArrayList list = new ArrayList(); + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) + list.add ("UPPER(C_BPartner.Value) LIKE ?"); + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + list.add ("UPPER(C_BPartner.Name) LIKE ?"); + // => Contact + String contact = fieldContact.toUpperCase(); + if (!(contact.equals("") || contact.equals("%"))) + list.add ("UPPER(c.Name) LIKE ?"); + // => EMail + String email = fieldEMail.toUpperCase(); + if (!(email.equals("") || email.equals("%"))) + list.add ("UPPER(c.EMail) LIKE ?"); + // => Phone + String phone = fieldPhone.toUpperCase(); + if (!(phone.equals("") || phone.equals("%"))) + list.add ("UPPER(c.Phone) LIKE ?"); + // => Postal + String postal = fieldPostal.toUpperCase(); + if (!(postal.equals("") || postal.equals("%"))) + list.add ("UPPER(a.Postal) LIKE ?"); + + StringBuffer sql = new StringBuffer(); + int size = list.size(); + // Just one + if (size == 1) + sql.append(" AND ").append(list.get(0)); + else if (size > 1) + { + boolean AND = checkAND; + sql.append(" AND "); + if (!AND) + sql.append("("); + for (int i = 0; i < size; i++) + { + if (i > 0) + sql.append(AND ? " AND " : " OR "); + sql.append(list.get(i)); + } + if (!AND) + sql.append(")"); + } + + // Static SQL + if (checkCustomer) + { + sql.append(" AND "); + if (m_isSOTrx) + sql.append ("C_BPartner.IsCustomer='Y'"); + else + sql.append ("C_BPartner.IsVendor='Y'"); + } + System.out.println( sql.toString() ); + return sql.toString(); + } // getSQLWhere + + + + public void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + { + int index = 1; + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) + { + if (!value.endsWith("%")) + value += "%"; + pstmt.setString(index++, value); + log.fine("Value: " + value); + } + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + { + if (!name.endsWith("%")) + name += "%"; + pstmt.setString(index++, name); + log.fine("Name: " + name); + } + // => Contact + String contact = fieldContact.toUpperCase(); + if (!(contact.equals("") || contact.equals("%"))) + { + if (!contact.endsWith("%")) + contact += "%"; + pstmt.setString(index++, contact); + log.fine("Contact: " + contact); + } + // => EMail + String email = fieldEMail.toUpperCase(); + if (!(email.equals("") || email.equals("%"))) + { + if (!email.endsWith("%")) + email += "%"; + pstmt.setString(index++, email); + log.fine("EMail: " + email); + } + // => Phone + String phone = fieldPhone.toUpperCase(); + if (!(phone.equals("") || phone.equals("%"))) + { + if (!phone.endsWith("%")) + phone += "%"; + pstmt.setString(index++, phone); + log.fine("Phone: " + phone); + } + // => Postal + String postal = fieldPostal.toUpperCase(); + if (!(postal.equals("") || postal.equals("%"))) + { + if (!postal.endsWith("%")) + postal += "%"; + pstmt.setString(index++, postal); + log.fine("Postal: " + postal); + } + } // setParameters + + String m_sqlMain = ""; + String m_sqlCount = ""; + String m_sqlOrder = ""; + + + protected void prepareTable ( String from, String staticWhere, String orderBy) + { + + StringBuffer sql = new StringBuffer ("SELECT "); + // add columns & sql + sql.append( " C_BPartner.C_BPartner_ID, C_BPartner.Value, C_BPartner.Name, c.Name AS Contact, " ); + sql.append( " C_BPartner.SO_CreditLimit-C_BPartner.SO_CreditUsed AS SO_CreditAvailable, "); + sql.append( " C_BPartner.SO_CreditUsed, c.Phone, a.Postal, a.City, C_BPartner.TotalOpenBalance, C_BPartner.ActualLifetimeValue "); + + sql.append( " FROM ").append(from); + // + sql.append(" WHERE ").append(staticWhere); + m_sqlMain = sql.toString(); + m_sqlCount = "SELECT COUNT(*) FROM " + from + " WHERE " + staticWhere; + // + m_sqlOrder = ""; + if (orderBy != null && orderBy.length() > 0) + m_sqlOrder = " ORDER BY " + orderBy; + + //if (m_keyColumnIndex == -1) + // log.log(Level.SEVERE, "No KeyColumn - " + sql); + + } // prepareTable + + + public DataRow getColumns() { + DataRow col = DataRow.Factory.newInstance(); + DataField f = null; + + f = col.addNewField(); //0 + f.setType("int"); + f.setColumn("key" ); + f.setLval("20,0"); + + f = col.addNewField(); //1 + f.setType("string"); + f.setColumn("value" ); + f.setLval("20,100"); + + f = col.addNewField(); //2 + f.setType("string"); + f.setColumn("name" ); + f.setLval("20, 140"); + + f = col.addNewField(); //3 + f.setType("string"); + f.setColumn("contact" ); + f.setLval("20, 70"); + + f = col.addNewField(); //4 + f.setType("string"); + f.setColumn("SO_CreditAvailable" ); + f.setLval("20, 50"); + + f = col.addNewField(); //5 + f.setType("string"); + f.setColumn("SO_CreditUsed" ); + f.setLval("20, 40"); + + f = col.addNewField(); //6 + f.setType("string"); + f.setColumn("Phone" ); + f.setLval("20,50"); + + f = col.addNewField(); //7 + f.setType("string"); + f.setColumn("Postal" ); + f.setLval("20, 40"); + + f = col.addNewField(); //8 + f.setType("string"); + f.setColumn("City" ); + f.setLval("20, 50"); + + f = col.addNewField(); //9 + f.setType("string"); + f.setColumn("TotalOpenBalance" ); + f.setLval("10,50"); + + f = col.addNewField(); //10 + f.setType("string"); + f.setColumn("ActualLifetimeValue" ); + f.setLval("10,50"); + + return col; + } + + + public String getSQL() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlMain); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + sql.append(m_sqlOrder); + String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + dataSql = MRole.getDefault().addAccessSQL(dataSql, m_tableName, + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + + return dataSql; + } + + public String getSQLCount() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlCount); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + countSql = MRole.getDefault().addAccessSQL(countSql, m_tableName, + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + //log.finer(countSql); + + return countSql; + + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java new file mode 100644 index 0000000000..14de8166f8 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java @@ -0,0 +1,473 @@ +package com._3e.ADInterface; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.minigrid.IDColumn; +import org.compiere.model.MRole; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Msg; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; + + +public class InfoProduct implements ADInfo { + + private static final String s_productFrom = + "M_Product p" + + " LEFT OUTER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID AND pr.IsActive='Y')" + + " LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID)"; + + private DataRow params; + private boolean m_isSOTrx = true; + private String m_tableName = "M_Product"; + + Properties m_ctx; + int p_WindowNo; + + public InfoProduct(DataRow dr, String whereClause, Properties ctx, int WindowNo) { + params = dr; + m_ctx = ctx; + p_WindowNo = WindowNo; + + this.getProductLayout(); + + this.M_PriceList_ID = Env.getContextAsInt( m_ctx, "#M_PriceList_ID"); + + M_PriceList_Version_ID = findPLV (M_PriceList_ID); +/* // Set Value or Name + if (value.startsWith("@") && value.endsWith("@")) + fieldName.setText(value.substring(1,value.length()-1)); + else + fieldValue.setText(value); + // Set Warehouse + if (M_Warehouse_ID == 0) + M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID"); + + //fillPicks(M_PriceList_ID); + int M_PriceList_Version_ID = 0; //findPLV (M_PriceList_ID); + // Set Value or Name +*/ + // Set Warehouse // TODO + if (M_Warehouse_ID == 0) + M_Warehouse_ID = Env.getContextAsInt( m_ctx, "#M_Warehouse_ID"); + + //if (M_Warehouse_ID != 0) + // setWarehouse (M_Warehouse_ID); + // Set PriceList Version + //if (M_PriceList_Version_ID != 0) + // setPriceListVersion (M_PriceList_Version_ID); + + // Create Grid + StringBuffer where = new StringBuffer(); + where.append("p.IsActive='Y'"); + if (M_Warehouse_ID != 0) + where.append(" AND p.IsSummary='N'"); + // dynamic Where Clause + //if (p_whereClause != null && p_whereClause.length() > 0) + // where.append(" AND ") // replace fully qalified name with alias + // .append(Util.replace(p_whereClause, "M_Product.", "p.")); + // + + prepareTable(s_productFrom, where.toString(), "QtyAvailable DESC, Margin DESC" ); + + setupParamsFromDataRow(); + } + + void setupParamsFromDataRow() { + for (int i=0; i< params.sizeOfFieldArray(); i++) { + DataField f = params.getFieldArray(i); + System.out.println(f.getColumn() +" - '"+f.getVal()+"'"); + if ("value".equalsIgnoreCase(f.getColumn())) fieldValue = f.getVal(); + if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal(); + if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal(); + if ("upc".equalsIgnoreCase(f.getColumn())) fieldUPC = f.getVal(); + if ("upc".equalsIgnoreCase(f.getColumn())) fieldUPC = f.getVal(); + if ("sku".equalsIgnoreCase(f.getColumn())) fieldSKU = f.getVal(); + if ("M_PriceList_Version_ID".equalsIgnoreCase(f.getColumn())) M_PriceList_Version_ID = Integer.parseInt(f.getVal()); + if ("M_Warehouse_ID".equalsIgnoreCase(f.getColumn())) M_Warehouse_ID = Integer.parseInt(f.getVal()); + } + } + + + protected CLogger log = CLogger.getCLogger(getClass()); + + String m_pAttributeWhere = null; + String fieldValue =""; + String fieldName =""; + String fieldUPC =""; + String fieldSKU =""; + //int M_PriceList_Version_ID = 1000037; //104; + //int M_Warehouse_ID = 1000001; //103; + //int M_PriceList_ID = 1000022; //101 + int M_PriceList_Version_ID = 104; + int M_Warehouse_ID = 103; + int M_PriceList_ID = 101; + + String getSQLWhere() { + StringBuffer where = new StringBuffer(); + + // Optional PLV + //int M_PriceList_Version_ID = 0; + if (M_PriceList_Version_ID != 0) + where.append(" AND pr.M_PriceList_Version_ID=?"); + + // Product Attribute Search + if (m_pAttributeWhere != null) + { + where.append(m_pAttributeWhere); + return where.toString(); + } + + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) { + where.append(" AND UPPER(p.Value) LIKE ?"); + } + + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + where.append(" AND UPPER(p.Name) LIKE ?"); + + // => UPC + String upc = fieldUPC.toUpperCase(); + if (!(upc.equals("") || upc.equals("%"))) + where.append(" AND UPPER(p.UPC) LIKE ?"); + + // => SKU + String sku = fieldSKU.toUpperCase(); + if (!(sku.equals("") || sku.equals("%"))) + where.append(" AND UPPER(p.SKU) LIKE ?"); + + return where.toString(); + } // getSQLWhere + + /** + * Set Parameters for Query + * (as defined in getSQLWhere) + * + * @param pstmt pstmt + * @param forCount for counting records + * @throws SQLException + */ + public void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + { + int index = 1; + + //M_Warehouse_ID = 103; + //this.M_PriceList_Version_ID = 104; + //this.M_PriceList_ID = 101; + + //fieldValue = "%tree%"; + + // => Warehouse + //int M_Warehouse_ID = 0; + if (!forCount) // parameters in select + { + for (int i = 0; i < s_productLayout.length; i++) + { + if (s_productLayout[i].getColSQL().indexOf("?") != -1) + pstmt.setInt(index++, M_Warehouse_ID); + } + } + log.fine("M_Warehouse_ID=" + M_Warehouse_ID + " (" + (index-1) + "*)"); + + // => PriceList + //int M_PriceList_Version_ID = 0; + + if (M_PriceList_Version_ID != 0) + { + pstmt.setInt(index++, M_PriceList_Version_ID); + log.fine("M_PriceList_Version_ID=" + M_PriceList_Version_ID); + } + // Rest of Parameter in Query for Attribute Search + if (m_pAttributeWhere != null) + return; + + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) + { + if (!value.endsWith("%")) + value += "%"; + pstmt.setString(index++, value); + log.fine("Value: " + value); + } + + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + { + if (!name.endsWith("%")) + name += "%"; + pstmt.setString(index++, name); + log.fine("Name: " + name); + } + + // => UPC + String upc = fieldUPC.toUpperCase(); + if (!(upc.equals("") || upc.equals("%"))) + { + if (!upc.endsWith("%")) + upc += "%"; + pstmt.setString(index++, upc); + log.fine("UPC: " + upc); + } + + // => SKU + String sku = fieldSKU.toUpperCase(); + if (!(sku.equals("") || sku.equals("%"))) + { + if (!sku.endsWith("%")) + sku += "%"; + pstmt.setString(index++, sku); + log.fine("SKU: " + sku); + } + + } // setParameters + + + String m_sqlMain = ""; + String m_sqlCount = ""; + String m_sqlOrder = ""; + + int m_keyColumnIndex = -1; + + protected void prepareTable ( String from, String staticWhere, String orderBy) + { + + StringBuffer sql = new StringBuffer ("SELECT "); + + for (int i = 0; i < s_productLayout.length; i++) + { + if (i > 0) + sql.append(", "); + sql.append(s_productLayout[i].getColSQL()); + // adding ID column + if (s_productLayout[i].isIDcol()) + sql.append(",").append(s_productLayout[i].getIDcolSQL()); + // add to model + //p_table.addColumn(s_productLayout[i].getColHeader()); + //if (s_productLayout[i].isColorColumn()) + //p_table.setColorColumn(i); + if (s_productLayout[i].getColClass() == IDColumn.class) + m_keyColumnIndex = i; + } + + sql.append( " FROM ").append(from); + // + sql.append(" WHERE ").append(staticWhere); + m_sqlMain = sql.toString(); + m_sqlCount = "SELECT COUNT(*) FROM " + from + " WHERE " + staticWhere; + // + m_sqlOrder = ""; + if (orderBy != null && orderBy.length() > 0) + m_sqlOrder = " ORDER BY " + orderBy; + + //if (m_keyColumnIndex == -1) + // log.log(Level.SEVERE, "No KeyColumn - " + sql); + + } // prepareTable + + + Info_Column[] s_productLayout = null; + + private Info_Column[] getProductLayout() { + ArrayList list = new ArrayList(); + list.add(new Info_Column(" ", "p.M_Product_ID", IDColumn.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Discontinued").substring(0, 1), "p.Discontinued", Boolean.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Value"), "p.Value", String.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Name"), "p.Name", String.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyAvailable"), "bomQtyAvailable(p.M_Product_ID,?,0) AS QtyAvailable", Double.class, true, true, null)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceList"), "bomPriceList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceStd"), "bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyOnHand"), "bomQtyOnHand(p.M_Product_ID,?,0) AS QtyOnHand", Double.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyReserved"), "bomQtyReserved(p.M_Product_ID,?,0) AS QtyReserved", Double.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyOrdered"), "bomQtyOrdered(p.M_Product_ID,?,0) AS QtyOrdered", Double.class)); + /*if (isUnconfirmed()) + { + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyUnconfirmed"), "(SELECT SUM(c.TargetQty) FROM M_InOutLineConfirm c INNER JOIN M_InOutLine il ON (c.M_InOutLine_ID=il.M_InOutLine_ID) INNER JOIN M_InOut i ON (il.M_InOut_ID=i.M_InOut_ID) WHERE c.Processed='N' AND i.M_Warehouse_ID=? AND il.M_Product_ID=p.M_Product_ID) AS QtyUnconfirmed", Double.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyUnconfirmedMove"), "(SELECT SUM(c.TargetQty) FROM M_MovementLineConfirm c INNER JOIN M_MovementLine ml ON (c.M_MovementLine_ID=ml.M_MovementLine_ID) INNER JOIN M_Locator l ON (ml.M_LocatorTo_ID=l.M_Locator_ID) WHERE c.Processed='N' AND l.M_Warehouse_ID=? AND ml.M_Product_ID=p.M_Product_ID) AS QtyUnconfirmedMove", Double.class)); + }*/ + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Margin"), "bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceLimit"), "bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "IsInstanceAttribute"), "pa.IsInstanceAttribute", Boolean.class)); + s_productLayout = new Info_Column[list.size()]; + list.toArray(s_productLayout); + //INDEX_NAME = 3; + //INDEX_PATTRIBUTE = s_productLayout.length - 1; // last item + return s_productLayout; + + } + + public DataRow getColumns() { + DataRow col = DataRow.Factory.newInstance(); + DataField f = null; + f = col.addNewField(); //0 + f.setType("int"); + f.setLval("20, 0"); + f.setColumn("key" ); + + f = col.addNewField(); //1 + f.setType("string"); + f.setLval("1, 15"); + f.setColumn("Discontinued" ); + + f = col.addNewField(); //2 + f.setType("string"); + f.setLval("40, 110"); + f.setColumn("Value" ); + + f = col.addNewField(); //3 + f.setType("string"); + f.setLval("60, 140"); + f.setColumn("Name" ); + + f = col.addNewField(); //4 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyAvailable" ); + + f = col.addNewField(); //5 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("PriceList" ); + + f = col.addNewField(); //6 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("PriceStd" ); + + f = col.addNewField(); //7 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyOnHand" ); + + f = col.addNewField(); //8 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyReserved" ); + + f = col.addNewField(); //9 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyOrdered" ); + + f = col.addNewField(); //10 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("Margin" ); + + f = col.addNewField(); //10 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("PriceLimit" ); + + f = col.addNewField(); //10 + f.setType("string"); + f.setLval("1, 20"); + f.setColumn("IsInstanceAttribute" ); + + + return col; + } + + + public String getSQL() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlMain); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + + sql.append(m_sqlOrder); + + System.out.println( "GetSQL = "+sql.toString()); + String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + dataSql = MRole.getDefault().addAccessSQL(dataSql, "p", + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + + return dataSql; + } + + public String getSQLCount() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlCount); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + + String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + countSql = MRole.getDefault().addAccessSQL(countSql, "p", + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + //log.finer(countSql); + + + return countSql; + + } + + /** + * Find Price List Version and update context + * + * @param M_PriceList_ID price list + * @return M_PriceList_Version_ID price list version + */ + private int findPLV (int M_PriceList_ID) + { + Timestamp priceDate = null; + // Sales Order Date + String dateStr = Env.getContext(m_ctx, p_WindowNo, "DateOrdered"); + if (dateStr != null && dateStr.length() > 0) + priceDate = Env.getContextAsDate( m_ctx, p_WindowNo, "DateOrdered"); + else // Invoice Date + { + dateStr = Env.getContext(m_ctx, p_WindowNo, "DateInvoiced"); + if (dateStr != null && dateStr.length() > 0) + priceDate = Env.getContextAsDate(m_ctx, p_WindowNo, "DateInvoiced"); + } + // Today + if (priceDate == null) + priceDate = new Timestamp(System.currentTimeMillis()); + // + log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); + int retValue = 0; + String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom " + + "FROM M_PriceList pl, M_PriceList_Version plv " + + "WHERE pl.M_PriceList_ID=plv.M_PriceList_ID" + + " AND plv.IsActive='Y'" + + " AND pl.M_PriceList_ID=? " // 1 + + "ORDER BY plv.ValidFrom DESC"; + // find newest one + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, M_PriceList_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next() && retValue == 0) + { + Timestamp plDate = rs.getTimestamp(2); + if (!priceDate.before(plDate)) + retValue = rs.getInt(1); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + Env.setContext(m_ctx, p_WindowNo, "M_PriceList_Version_ID", retValue); + return retValue; + } // findPLV + + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java new file mode 100644 index 0000000000..c19a62e846 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java @@ -0,0 +1,143 @@ +/****************************************************************************** + * The contents of this file are subject to the Compiere License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * You may obtain a copy of the License at http://www.compiere.org/license.html + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial + * Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke + * are Copyright (C) 1999-2005 Jorg Janke. + * All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved. + * Contributor(s): ______________________________________. + *****************************************************************************/ +package com._3e.ADInterface; + +/** + * Info Column Details + * + * @author Jorg Janke + * @version $Id: Info_Column.java,v 1.7 2005/12/17 19:55:47 jjanke Exp $ + */ +public class Info_Column +{ + /** + * Create Info Column (r/o and not color column) + * + * @param colHeader Column Header + * @param colSQL SQL select code for column + * @param colClass class of column - determines display + */ + public Info_Column (String colHeader, String colSQL, Class colClass) + { + this(colHeader, colSQL, colClass, true, false, null); + } // Info_Column + + /** + * Create Info Column (r/o and not color column) + * + * @param colHeader Column Header + * @param colSQL SQL select code for column + * @param colClass class of column - determines display + * @param IDcolSQL SQL select for the ID of the for the displayed column (KeyNamePair) + */ + public Info_Column (String colHeader, String colSQL, Class colClass, String IDcolSQL) + { + this(colHeader, colSQL, colClass, true, false, IDcolSQL); + } // Info_Column + + /** + * Create Info Column + * + * @param colHeader Column Header + * @param colSQL SQL select code for column + * @param colClass class of column - determines display + * @param readOnly column is read only + * @param colorColumn if true, value of column determines foreground color + * @param IDcolSQL SQL select for the ID of the for the displayed column + */ + public Info_Column (String colHeader, String colSQL, Class colClass, + boolean readOnly, boolean colorColumn, String IDcolSQL) + { + setColHeader(colHeader); + setColSQL(colSQL); + setColClass(colClass); + setReadOnly(readOnly); + setColorColumn(colorColumn); + setIDcolSQL(IDcolSQL); + } // Info_Column + + + private String m_colHeader; + private String m_colSQL; + private Class m_colClass; + private boolean m_readOnly; + private boolean m_colorColumn; + private String m_IDcolSQL = ""; + + public Class getColClass() + { + return m_colClass; + } + public String getColHeader() + { + return m_colHeader; + } + public String getColSQL() + { + return m_colSQL; + } + public boolean isReadOnly() + { + return m_readOnly; + } + public void setColClass(Class colClass) + { + m_colClass = colClass; + } + public void setColHeader(String colHeader) + { + m_colHeader = colHeader; + if (colHeader != null) + { + int index = colHeader.indexOf('&'); + if (index != -1) + m_colHeader = colHeader.substring(0, index) + colHeader.substring(index+1); + } + } + public void setColSQL(String colSQL) + { + m_colSQL = colSQL; + } + public void setReadOnly(boolean readOnly) + { + m_readOnly = readOnly; + } + public void setColorColumn(boolean colorColumn) + { + m_colorColumn = colorColumn; + } + public boolean isColorColumn() + { + return m_colorColumn; + } + /** + * Add ID column SQL for the displayed column + * The Class for this should be KeyNamePair + */ + public void setIDcolSQL(String IDcolSQL) + { + m_IDcolSQL = IDcolSQL; + if (m_IDcolSQL == null) + m_IDcolSQL = ""; + } + public String getIDcolSQL() + { + return m_IDcolSQL; + } + public boolean isIDcol() + { + return m_IDcolSQL.length() > 0; + } +} // infoColumn + diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java new file mode 100644 index 0000000000..2a46a1c6ce --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java @@ -0,0 +1,69 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com._3e.ADInterface; + + +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.jws.soap.SOAPBinding.ParameterStyle; +import javax.jws.soap.SOAPBinding.Style; +import javax.jws.soap.SOAPBinding.Use; + +import pl.x3E.adInterface.ModelCRUDRequestDocument; +import pl.x3E.adInterface.ModelGetListRequestDocument; +import pl.x3E.adInterface.ModelRunProcessRequestDocument; +import pl.x3E.adInterface.ModelSetDocActionRequestDocument; +import pl.x3E.adInterface.RunProcessResponseDocument; +import pl.x3E.adInterface.StandardResponseDocument; +import pl.x3E.adInterface.WindowTabDataDocument; + +@WebService(targetNamespace="http://3e.pl/ADInterface") +@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED) +public interface ModelADService { + + /* Model oriented web services */ + + public StandardResponseDocument setDocAction(ModelSetDocActionRequestDocument req); + + public RunProcessResponseDocument runProcess(ModelRunProcessRequestDocument req); + + public WindowTabDataDocument getList(ModelGetListRequestDocument req); + + public StandardResponseDocument createData(ModelCRUDRequestDocument req); + + public StandardResponseDocument updateData(ModelCRUDRequestDocument req); + + public StandardResponseDocument deleteData(ModelCRUDRequestDocument req); + + public WindowTabDataDocument readData(ModelCRUDRequestDocument req); + + public WindowTabDataDocument queryData(ModelCRUDRequestDocument req); + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java new file mode 100644 index 0000000000..695817f2bb --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java @@ -0,0 +1,1058 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com._3e.ADInterface; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import javax.jws.WebService; +import javax.xml.namespace.QName; + +import org.apache.xmlbeans.StringEnumAbstractBase.Table; +import org.compiere.model.MColumn; +import org.compiere.model.MRefTable; +import org.compiere.model.MRole; +import org.compiere.model.MTable; +import org.compiere.model.MWebService; +import org.compiere.model.MWebServiceType; +import org.compiere.model.PO; +import org.compiere.model.POInfo; +import org.compiere.model.X_AD_Reference; +import org.compiere.model.X_WS_WebServiceMethod; +import org.compiere.model.X_WS_WebService_Para; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Login; +import org.compiere.util.Trx; +import org.idempiere.webservices.fault.IdempiereServiceFault; + +import pl.x3E.adInterface.ADLoginRequest; +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; +import pl.x3E.adInterface.DataSet; +import pl.x3E.adInterface.ModelCRUD; +import pl.x3E.adInterface.ModelCRUDRequestDocument; +import pl.x3E.adInterface.ModelGetList; +import pl.x3E.adInterface.ModelGetListRequestDocument; +import pl.x3E.adInterface.ModelRunProcess; +import pl.x3E.adInterface.ModelRunProcessRequestDocument; +import pl.x3E.adInterface.ModelSetDocAction; +import pl.x3E.adInterface.ModelSetDocActionRequestDocument; +import pl.x3E.adInterface.RunProcess; +import pl.x3E.adInterface.RunProcessDocument; +import pl.x3E.adInterface.RunProcessResponse; +import pl.x3E.adInterface.RunProcessResponseDocument; +import pl.x3E.adInterface.StandardResponse; +import pl.x3E.adInterface.StandardResponseDocument; +import pl.x3E.adInterface.WindowTabData; +import pl.x3E.adInterface.WindowTabDataDocument; +import pl.x3E.adInterface.ModelCRUD.Action.Enum; + +/* + * ADEMPIERE/COMPIERE + * + * replacement: + * GridField by GridFieldVO + * GridTabVO by GridTabVO + * GridWindowVO by GridWindowVO + * + * Contributors: Carlos Ruiz - globalqss + * Add model oriented method modelSetDocAction + * Some Polish messages translated to english using google translate + */ + + +/** + * + * @author kolec + * + */ +@WebService(endpointInterface="com._3e.ADInterface.ModelADService", serviceName="ModelADService",targetNamespace="http://3e.pl/ADInterface") +public class ModelADServiceImpl implements ModelADService { + + private static CLogger log = CLogger.getCLogger(ModelADServiceImpl.class); + + private static String webServiceName = new String("ModelADService"); + + private CompiereService m_cs; + + private MWebService m_webservice = null; + private X_WS_WebServiceMethod m_webservicemethod; + private MWebServiceType m_webservicetype; + + public ModelADServiceImpl() + { + m_cs = new CompiereService(); + m_cs.connect(); + + log.info("Creating session object ADService"); + } + + public String getVersion() { + return "0.7.0"; + } + + /* + * Model oriented web service to change DocAction for documents, i.e. Complete a Material Receipt + * WARNING!!! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow + * To complete documents using workflow it's better to use the runProcess web service + */ + public StandardResponseDocument setDocAction( + ModelSetDocActionRequestDocument req) { + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelSetDocAction modelSetDocAction = req.getModelSetDocActionRequest().getModelSetDocAction(); + String serviceType = modelSetDocAction.getServiceType(); + + ADLoginRequest reqlogin = req.getModelSetDocActionRequest().getADLoginRequest(); + + String err = modelLogin(reqlogin, webServiceName, "setDocAction", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + Properties ctx = m_cs.getM_ctx(); + + // Validate parameters + modelSetDocAction.setTableName(validateParameter("tableName", modelSetDocAction.getTableName())); + modelSetDocAction.setRecordID(validateParameter("recordID", modelSetDocAction.getRecordID())); + modelSetDocAction.setDocAction(validateParameter("docAction", modelSetDocAction.getDocAction())); + + String tableName = modelSetDocAction.getTableName(); + int recordID = modelSetDocAction.getRecordID(); + String docAction = modelSetDocAction.getDocAction(); + resp.setRecordID (recordID); + + // start a trx + String trxName = Trx.createTrxName("ws_modelSetDocAction"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + PO po = table.getPO(recordID, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "No Record " + recordID + " in " + tableName); + + // set explicitly the column DocAction to avoid automatic process of default option + po.set_ValueOfColumn("DocAction", docAction); + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save before set docAction: " + CLogger.retrieveErrorString("no log message")); + + // call process it + try { + if (! ((org.compiere.process.DocAction) po).processIt(docAction)) + return rollbackAndSetError(trx, resp, ret, true, "Couldn't set docAction: " + ((org.compiere.process.DocAction) po).getProcessMsg()); + } catch (Exception e) { + return rollbackAndSetError(trx, resp, ret, true, e.toString()); + } + + // close the trx + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save after set docAction: " + CLogger.retrieveErrorString("no log message")); + + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit after docAction"); + + trx.close(); + + // resp.setError(""); + resp.setIsError(false); + return ret; + } + + private String validateParameter(String parameterName, String string) { + X_WS_WebService_Para para = m_webservicetype.getParameter(parameterName); + if (para == null && (string == null || string.length() == 0)) + // if parameter not configured but didn't receive value (optional param) + return null; + + if (para == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": invalid parameter " + + parameterName, + new QName("validateParameter")); + + if (X_WS_WebService_Para.PARAMETERTYPE_Constant.equals(para.getParameterType())) { + if (string == null || string.length() == 0) { + log.log(Level.INFO, "Web service type " + + m_webservicetype.getValue() + ": constant parameter " + + parameterName + " set to " + + para.getConstantValue()); + return para.getConstantValue(); + } else if (! para.getConstantValue().equals(string)) { + log.log(Level.WARNING, "Web service type " + + m_webservicetype.getValue() + ": constant parameter " + + parameterName + " changed to " + + para.getConstantValue()); + return para.getConstantValue(); + } + } + + // it must be parameter FREE + return string; + } + + private int validateParameter(String parameterName, int i) { + Integer io = Integer.valueOf(i); + String string = validateParameter(parameterName, io.toString()); + if (string == null) + return -1; + if (string.equals(io.toString())) + return i; + return Integer.parseInt(string); + } + + private Enum validateParameter(String parameterName, Enum action, Table table) { + String string = null; + if (action == null) + string = validateParameter(parameterName, string); + else + string = validateParameter(parameterName, action.toString()); + if (string == null) + return (Enum) table.forInt(-1); + if (action != null && string.equals(action.toString())) + return action; + return (Enum) table.forString(string); + } + + private StandardResponseDocument rollbackAndSetError(Trx trx, + StandardResponse resp, StandardResponseDocument ret, boolean isError, + String string) { + resp.setError(string); + resp.setIsError(isError); + trx.rollback(); + trx.close(); + return ret; + } + + private String modelLogin(ADLoginRequest r, String webService, String method, String serviceType) { + + // TODO: Share login between different sessions + if ( m_cs.isLoggedIn() + && m_cs.getM_AD_Client_ID() == r.getClientID() + && m_cs.getM_AD_Org_ID() == r.getOrgID() + && m_cs.getM_AD_Role_ID() == r.getRoleID() + && m_cs.getM_AD_Warehouse_ID() == r.getWarehouseID() + && r.getUser().equals(m_cs.getUser()) + ) + return authenticate(webService, method, serviceType); // already logged with same data + + Login login = new Login(m_cs.getM_ctx()); + KeyNamePair[] roles = login.getRoles(r.getUser(), r.getPass()); + if (roles != null) + { + boolean okrole = false; + for (KeyNamePair role : roles) { + if (role.getKey() == r.getRoleID()) { + okrole = true; + break; + } + } + if (!okrole) + return "Error logging in - role not allowed for this user"; + + KeyNamePair[] clients = login.getClients( new KeyNamePair(r.getRoleID(), "" ) ); + boolean okclient = false; + for (KeyNamePair client : clients) { + if (client.getKey() == r.getClientID()) { + okclient = true; + break; + } + } + if (!okclient) + return "Error logging in - client not allowed for this role"; + + m_cs.getM_ctx().setProperty("#AD_Client_ID", "" + r.getClientID()); + + KeyNamePair[] orgs = login.getOrgs( new KeyNamePair(r.getRoleID(), "" )); + + if (orgs == null) + return "Error logging in - no organizations for this role"; + + KeyNamePair orglogin = null; + boolean okorg = false; + for (KeyNamePair org : orgs) { + if (org.getKey() == r.getOrgID()) { + okorg = true; + orglogin = org; + break; + } + } + if (!okorg) + return "Error logging in - org not allowed for this role"; + + KeyNamePair[] warehouses = login.getWarehouses( new KeyNamePair(r.getOrgID(), "" ) ); + boolean okwh = false; + for (KeyNamePair warehouse : warehouses) { + if (warehouse.getKey() == r.getWarehouseID()) { + okwh = true; + break; + } + } + if (!okwh) + return "Error logging in - warehouse not allowed for this org"; + + String error = login.validateLogin(orglogin); + if (error != null && error.length() > 0) + return error; + + int AD_User_ID = Env.getAD_User_ID(m_cs.getM_ctx()); + + if ( !m_cs.login( AD_User_ID, r.getRoleID(), r.getClientID(), r.getOrgID(), r.getWarehouseID(), r.getLang() ) ) + return "Error logging in"; + } + else + { + return "Error logging in - no roles or user/pwd invalid for user " + r.getUser(); + } + + return authenticate(webService, method, serviceType); + } + + private String authenticate(String webServiceValue, String methodValue, String serviceTypeValue) { + m_webservice = MWebService.get(m_cs.getM_ctx(), webServiceValue); + if (m_webservice == null || ! m_webservice.isActive()) + return "Web Service " + webServiceValue + " not registered"; + + m_webservicemethod = m_webservice.getMethod(methodValue); + if (m_webservicemethod == null || ! m_webservicemethod.isActive()) + return "Method " + methodValue + " not registered"; + + m_webservicetype = null; + final String sql = "SELECT * FROM WS_WebServiceType " + + "WHERE AD_Client_ID=? " + + "AND WS_WebService_ID=? " + + "AND WS_WebServiceMethod_ID=? " + + "AND Value=? " + + "AND IsActive='Y'"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt(1, m_cs.getM_AD_Client_ID()); + pstmt.setInt(2, m_webservice.getWS_WebService_ID()); + pstmt.setInt(3, m_webservicemethod.getWS_WebServiceMethod_ID()); + pstmt.setString(4, serviceTypeValue); + rs = pstmt.executeQuery (); + if (rs.next ()) + m_webservicetype = new MWebServiceType (m_cs.getM_ctx(), rs, null); + } + catch (Exception e) + { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("authenticate")); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + + if (m_webservicetype == null) + return "Service type " + serviceTypeValue + " not configured"; + + return null; + } + + public RunProcessResponseDocument runProcess(ModelRunProcessRequestDocument req) { + RunProcessResponseDocument resbadlogin = RunProcessResponseDocument.Factory.newInstance(); + RunProcessResponse rbadlogin = resbadlogin.addNewRunProcessResponse(); + ModelRunProcess modelRunProcess = req.getModelRunProcessRequest().getModelRunProcess(); + String serviceType = modelRunProcess.getServiceType(); + + ADLoginRequest reqlogin = req.getModelRunProcessRequest().getADLoginRequest(); + + String err = modelLogin(reqlogin, webServiceName, "runProcess", serviceType); + if (err != null && err.length() > 0) { + rbadlogin.setError(err); + rbadlogin.setIsError( true ); + return resbadlogin; + } + + // Validate parameters + modelRunProcess.setADMenuID(validateParameter("AD_Menu_ID", modelRunProcess.getADMenuID())); + modelRunProcess.setADProcessID(validateParameter("AD_Process_ID", modelRunProcess.getADProcessID())); + modelRunProcess.setADRecordID(validateParameter("AD_Record_ID", modelRunProcess.getADRecordID())); + modelRunProcess.setDocAction(validateParameter("DocAction", modelRunProcess.getDocAction())); + + RunProcessDocument docprocess = RunProcessDocument.Factory.newInstance(); + RunProcess reqprocess = docprocess.addNewRunProcess(); + reqprocess.setParamValues(modelRunProcess.getParamValues()); + reqprocess.setADProcessID(modelRunProcess.getADProcessID()); + reqprocess.setADMenuID(modelRunProcess.getADMenuID()); + reqprocess.setADRecordID(modelRunProcess.getADRecordID()); + reqprocess.setDocAction(modelRunProcess.getDocAction()); + return Process.runProcess(m_cs, docprocess); + } + + public WindowTabDataDocument getList(ModelGetListRequestDocument req) { + WindowTabDataDocument resdoc = WindowTabDataDocument.Factory.newInstance(); + WindowTabData res = resdoc.addNewWindowTabData(); + DataSet ds = res.addNewDataSet(); + ModelGetList modelGetList = req.getModelGetListRequest().getModelGetList(); + String serviceType = modelGetList.getServiceType(); + int cnt = 0; + + ADLoginRequest reqlogin = req.getModelGetListRequest().getADLoginRequest(); + + String err = modelLogin(reqlogin, webServiceName, "getList", serviceType); + if (err != null && err.length() > 0) { + res.setError(err); + res.setErrorInfo(err); + res.setSuccess(false); + return resdoc; + } + int roleid = reqlogin.getRoleID(); + + // Validate parameters + modelGetList.setADReferenceID(validateParameter("AD_Reference_ID", modelGetList.getADReferenceID())); + modelGetList.setFilter(validateParameter("Filter", modelGetList.getFilter())); + + int ref_id = modelGetList.getADReferenceID(); + String filter = modelGetList.getFilter(); + if (filter == null || filter.length() == 0) + filter = ""; + else + filter = " AND " + filter; + + Properties ctx = m_cs.getM_ctx(); + + X_AD_Reference ref = new X_AD_Reference(ctx, ref_id, null); + + String sql = null; + ArrayList listColumnNames = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + if (X_AD_Reference.VALIDATIONTYPE_ListValidation.equals(ref.getValidationType())) { + // Fill List Reference + String ad_language = Env.getAD_Language(ctx); + boolean isBaseLanguage = Env.isBaseLanguage(ad_language, "AD_Ref_List"); + sql = isBaseLanguage ? + "SELECT AD_Ref_List.AD_Ref_List_ID, AD_Ref_List.Value, AD_Ref_List.Name, AD_Ref_List.Description " + + "FROM AD_Ref_List " + + "WHERE AD_Ref_List.AD_Reference_ID=? AND AD_Ref_List.IsActive='Y' " + + filter + + " ORDER BY AD_Ref_List.Name" + : + "SELECT AD_Ref_List.AD_Ref_List_ID, AD_Ref_List.Value, AD_Ref_List_Trl.Name, AD_Ref_List_Trl.Description " + + "FROM AD_Ref_List, AD_Ref_List_Trl " + + "WHERE AD_Ref_List.AD_Reference_ID=? AND AD_Ref_List.IsActive='Y' AND AD_Ref_List_Trl.AD_Language=? AND AD_Ref_List.AD_Ref_List_ID=AD_Ref_List_Trl.AD_Ref_List_ID " + + filter + + " ORDER BY AD_Ref_List_Trl.Name"; + listColumnNames.add("AD_Ref_List_ID"); + listColumnNames.add("Value"); + listColumnNames.add("Name"); + listColumnNames.add("Description"); + try { + pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, ref_id); + if (!isBaseLanguage) + pstmt.setString(2, ad_language); + rs = pstmt.executeQuery(); + } catch (SQLException e) + { + res.setError(e.getMessage()); + res.setErrorInfo(sql); + res.setSuccess(false); + DB.close(rs, pstmt); + rs = null; pstmt = null; + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("getList")); + } + + } else if (X_AD_Reference.VALIDATIONTYPE_TableValidation.equals(ref.getValidationType())) { + // Fill values from a reference table + MRole role = new MRole(ctx, roleid, null); + String sqlrt = "SELECT * FROM AD_Ref_Table WHERE AD_Reference_ID=?"; + MRefTable rt = null; + PreparedStatement pstmtrt = null; + ResultSet rsrt = null; + try + { + pstmtrt = DB.prepareStatement (sqlrt, null); + pstmtrt.setInt (1, ref_id); + rsrt = pstmtrt.executeQuery (); + if (rsrt.next ()) + rt = new MRefTable(ctx, rsrt, null); + } + catch (Exception e) + { + // ignore this exception + } + finally + { + DB.close(rsrt, pstmtrt); + rsrt = null; pstmtrt = null; + } + if (rt == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": reference table " + + ref_id + " not found", + new QName("getList")); + + MTable table = new MTable(ctx, rt.getAD_Table_ID(), null); + MColumn column = new MColumn(ctx, rt.getAD_Key(), null); + + // TODO: if any value or identifier column is translated, then get them from trl table (and client has multilanguage documents enabled) + sql = "SELECT " + column.getColumnName(); + listColumnNames.add(column.getColumnName()); + if (rt.isValueDisplayed()) { + sql += ",Value"; + listColumnNames.add("Value"); + } + + String sqlident = "SELECT ColumnName FROM AD_Column WHERE AD_Table_ID=? AND IsActive='Y' AND IsIdentifier='Y' ORDER BY SeqNo"; + PreparedStatement pstmtident = null; + ResultSet rsident = null; + try + { + pstmtident = DB.prepareStatement (sqlident, null); + pstmtident.setInt (1, rt.getAD_Table_ID()); + rsident = pstmtident.executeQuery (); + while (rsident.next ()) { + String colnameident = rsident.getString("ColumnName"); + if (rt.isValueDisplayed() && colnameident.equalsIgnoreCase("Value")) { + // Value already added + } else { + sql += "," + colnameident; + listColumnNames.add(colnameident); + } + } + } + catch (Exception e) + { + // ignore this exception + } + finally + { + DB.close(rsident, pstmtident); + rsident = null; pstmtident = null; + } + + sql += " FROM " + table.getTableName() + " WHERE IsActive='Y'"; + sql = role.addAccessSQL(sql, table.getTableName(), true, true); + sql += filter; + if (rt.getWhereClause() != null && rt.getWhereClause().length() > 0) + sql += " AND " + rt.getWhereClause(); + if (rt.getOrderByClause() != null && rt.getOrderByClause().length() > 0) + sql += " ORDER BY " + rt.getOrderByClause(); + + try { + pstmt = DB.prepareStatement(sql, null); + rs = pstmt.executeQuery(); + } catch (SQLException e) { + res.setError(e.getMessage()); + res.setErrorInfo(sql); + res.setSuccess(false); + DB.close(rs, pstmt); + rs = null; pstmt = null; + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("getList")); + } + + } else { + // Don't fill - wrong type + } + + if (rs != null) { + try + { + while (rs.next()) { + cnt++; + // Add values to the dataset + DataRow dr = ds.addNewDataRow(); + for (String listColumnName : listColumnNames) { + if (m_webservicetype.isOutputColumnNameAllowed(listColumnName)) { + DataField dfid = dr.addNewField(); + dfid.setColumn(listColumnName); + dfid.setVal(rs.getString(listColumnName)); + } + } + } + res.setSuccess(true); + } + catch (SQLException e) + { + res.setError(e.getMessage()); + res.setErrorInfo(sql); + res.setSuccess(false); + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("getList")); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + } + + res.setRowCount(cnt); + res.setNumRows(cnt); + res.setTotalRows(cnt); + res.setStartRow(1); + + return resdoc; + } // getList + + public StandardResponseDocument deleteData(ModelCRUDRequestDocument req) { + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "deleteData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + String tableName = modelCRUD.getTableName(); + int recordID = modelCRUD.getRecordID(); + resp.setRecordID (recordID); + + Properties ctx = m_cs.getM_ctx(); + + // start a trx + String trxName = Trx.createTrxName("ws_modelDeleteData"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + PO po = table.getPO(recordID, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "No Record " + recordID + " in " + tableName); + + if (!po.delete(false)) + return rollbackAndSetError(trx, resp, ret, true, "Cannot delete record " + recordID + " in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); + + // close the trx + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit transaction after delete record " + recordID + " in " + tableName); + + trx.close(); + + return ret; + } + + private void validateCRUD(ModelCRUD modelCRUD) { + modelCRUD.setTableName(validateParameter("TableName", modelCRUD.getTableName())); + modelCRUD.setRecordID(validateParameter("RecordID", modelCRUD.getRecordID())); + modelCRUD.setFilter(validateParameter("Filter", modelCRUD.getFilter())); + modelCRUD.setAction(validateParameter("Action", modelCRUD.getAction(), ModelCRUD.Action.Enum.table)); + } + + public StandardResponseDocument createData(ModelCRUDRequestDocument req){ + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "createData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + String tableName = modelCRUD.getTableName(); + + Properties ctx = m_cs.getM_ctx(); + + // start a trx + String trxName = Trx.createTrxName("ws_modelCreateData"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + + PO po = table.getPO(0, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "Cannot create PO for " + tableName); + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + + DataRow dr = modelCRUD.getDataRow(); + + for (DataField field : dr.getFieldArray()) { + // TODO: Implement lookup + if (m_webservicetype.isInputColumnNameAllowed(field.getColumn())) { + int idxcol = po.get_ColumnIndex(field.getColumn()); + if (idxcol < 0) { + // The column doesn't exist - it must exist as it's defined in security + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " does not exist"); + } else { + try { + setValueAccordingToClass(po, poinfo, field, idxcol); + } + catch (IdempiereServiceFault e) { + log.log(Level.WARNING, "Error setting value", e); + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " value could not be set: " + e.getLocalizedMessage()); + } + } + } else { + + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " not allowed"); + } + } + + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); + + int recordID = po.get_ID(); + resp.setRecordID (recordID); + + // close the trx + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit transaction after create record " + recordID + " in " + tableName); + + trx.close(); + + return ret; + } // createData + + private void setValueAccordingToClass(PO po, POInfo poinfo, + DataField field, int idxcol) { + // Evaluate the type of the column and assign a proper variable + Class columnClass = poinfo.getColumnClass(idxcol); + Object value = null; + if (field.getVal() == null || field.getVal().length() == 0) { + value = null; + } else if (columnClass == Boolean.class) { + if ("Y".equalsIgnoreCase(field.getVal()) || "true".equalsIgnoreCase(field.getVal())) + value = new Boolean(true); + else if ("N".equalsIgnoreCase(field.getVal()) || "false".equalsIgnoreCase(field.getVal())) + value = new Boolean(false); + else + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " wrong value " + field.getVal(), + new QName("setValueAccordingToClass")); + } else if (columnClass == Integer.class) { + try { + value = Integer.parseInt(field.getVal()); + } catch (NumberFormatException e) { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " for " + field.getColumn(), e.getCause(), new QName("setValueAccordingToClass")); + } + } else if (columnClass == BigDecimal.class) { + try { + value = new BigDecimal(field.getVal()); + } catch (Exception e) { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " for " + field.getColumn(), e.getCause(), new QName("setValueAccordingToClass")); + } + } else if (columnClass == Timestamp.class) { + try { + value = Timestamp.valueOf(field.getVal()); + } catch (Exception e) { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " for " + field.getColumn(), e.getCause(), new QName("setValueAccordingToClass")); + } + } else if (columnClass == byte[].class) { + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " LOB not supported", + new QName("setValueAccordingToClass")); + } else { + value = field.getVal(); + } + if (!po.set_ValueOfColumnReturningBoolean(field.getColumn(), value)) + throw new IdempiereServiceFault("Cannot set value of column " + + field.getColumn(), + new QName("setValueAccordingToClass")); + } + + public StandardResponseDocument updateData(ModelCRUDRequestDocument req){ + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "updateData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + String tableName = modelCRUD.getTableName(); + int recordID = modelCRUD.getRecordID(); + resp.setRecordID (recordID); + + Properties ctx = m_cs.getM_ctx(); + + // start a trx + String trxName = Trx.createTrxName("ws_modelUpdateData"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + PO po = table.getPO(recordID, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "No Record " + recordID + " in " + tableName); + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + + DataRow dr = modelCRUD.getDataRow(); + for (DataField field : dr.getFieldArray()) { + // TODO: Implement lookup + if (m_webservicetype.isInputColumnNameAllowed(field.getColumn())) { + int idxcol = po.get_ColumnIndex(field.getColumn()); + if (idxcol < 0) { + // The column doesn't exist - it must exist as it's defined in security + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " does not exist"); + } else { + try { + setValueAccordingToClass(po, poinfo, field, idxcol); + } + catch (IdempiereServiceFault e) { + log.log(Level.WARNING, "Error setting value", e); + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " value could not be set: " + e.getLocalizedMessage()); + } + } + } else { + + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " not allowed"); + } + } + + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); + + // close the trx + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit transaction after delete record " + recordID + " in " + tableName); + + trx.close(); + + return ret; + } // updateData + + public WindowTabDataDocument readData(ModelCRUDRequestDocument req) { + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData resp = ret.addNewWindowTabData(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + int cnt = 0; + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "readData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + Properties ctx = m_cs.getM_ctx(); + String tableName = modelCRUD.getTableName(); + int recordID = modelCRUD.getRecordID(); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": table " + + tableName + " not found", + new QName("readData")); + PO po = table.getPO(recordID, null); + if (po == null) { + resp.setSuccess(false); + resp.setRowCount(cnt); + resp.setNumRows(cnt); + resp.setTotalRows(cnt); + resp.setStartRow(0); + return ret; + } + cnt = 1; + + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + + DataSet ds = resp.addNewDataSet(); + DataRow dr = ds.addNewDataRow(); + for (int i = 0; i < poinfo.getColumnCount(); i++) { + String columnName = poinfo.getColumnName(i); + if (m_webservicetype.isOutputColumnNameAllowed(columnName)) { + DataField dfid = dr.addNewField(); + dfid.setColumn(columnName); + if (po.get_Value(i) != null) + dfid.setVal(po.get_Value(i).toString()); + else + dfid.setVal(null); + } + } + + resp.setSuccess(true); + resp.setRowCount(cnt); + resp.setNumRows(cnt); + resp.setTotalRows(cnt); + resp.setStartRow(1); + + return ret; + } + + public WindowTabDataDocument queryData(ModelCRUDRequestDocument req) { + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData resp = ret.addNewWindowTabData(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "queryData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + Properties ctx = m_cs.getM_ctx(); + String tableName = modelCRUD.getTableName(); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": table " + + tableName + " not found", + new QName("queryData")); + + int roleid = reqlogin.getRoleID(); + MRole role = new MRole(ctx, roleid, null); + + String sqlquery = "SELECT * FROM " + tableName; + sqlquery = role.addAccessSQL(sqlquery, tableName, true, true); + + for (DataField field : modelCRUD.getDataRow().getFieldArray()) { + if (m_webservicetype.isInputColumnNameAllowed(field.getColumn())) { + sqlquery += " AND " + field.getColumn() + "=?"; + } else { + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " not allowed", new QName("queryData")); + } + } + + if (modelCRUD.getFilter() != null && modelCRUD.getFilter().length() > 0) + sqlquery += " AND " + modelCRUD.getFilter(); + + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + int cnt = 0; + + PreparedStatement pstmtquery = null; + ResultSet rsquery = null; + try + { + pstmtquery = DB.prepareStatement (sqlquery, null); + int p = 1; + for (DataField field : modelCRUD.getDataRow().getFieldArray()) { + int idx = poinfo.getColumnIndex(field.getColumn()); + Class c = poinfo.getColumnClass(idx); + if (c == Integer.class) + pstmtquery.setInt(p++, Integer.valueOf(field.getVal())); + else if (c == Timestamp.class) + pstmtquery.setTimestamp(p++, Timestamp.valueOf(field.getVal())); + else if (c == Boolean.class || c == String.class) + pstmtquery.setString(p++, field.getVal()); + } + rsquery = pstmtquery.executeQuery (); + // Angelo Dabala' (genied) must create just one DataSet, moved outside of the while loop + DataSet ds = resp.addNewDataSet(); + while (rsquery.next ()) { + cnt++; + DataRow dr = ds.addNewDataRow(); + for (int i = 0; i < poinfo.getColumnCount(); i++) { + String columnName = poinfo.getColumnName(i); + if (m_webservicetype.isOutputColumnNameAllowed(columnName)) { + DataField dfid = dr.addNewField(); + dfid.setColumn(columnName); + dfid.setVal(rsquery.getString(columnName)); + } + } + } + } + catch (Exception e) + { + // ignore this exception + } + finally + { + DB.close(rsquery, pstmtquery); + rsquery = null; pstmtquery = null; + } + + resp.setSuccess(true); + resp.setRowCount(cnt); + resp.setNumRows(cnt); + resp.setTotalRows(cnt); + resp.setStartRow(1); + + return ret; + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java new file mode 100644 index 0000000000..fcdf28885a --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java @@ -0,0 +1,1090 @@ +package com._3e.ADInterface; + +import java.io.ByteArrayOutputStream; +import java.io.CharArrayWriter; +import java.io.File; +import java.io.IOException; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.HashMap; +import java.util.Properties; +import java.util.logging.Level; + +import net.sf.compilo.report.ReportProcessor; +import net.sf.jasperreports.engine.JasperPrint; + +import org.compiere.model.GridField; +import org.compiere.model.GridTab; +import org.compiere.model.Lookup; +import org.compiere.model.MAllocationHdr; +import org.compiere.model.MBankStatement; +import org.compiere.model.MInOut; +import org.compiere.model.MInvoice; +import org.compiere.model.MJournal; +import org.compiere.model.MJournalBatch; +import org.compiere.model.MOrder; +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.model.MPaySelectionCheck; +import org.compiere.model.MPayment; +import org.compiere.model.MProcess; +import org.compiere.model.MProcessPara; +import org.compiere.model.MQuery; +import org.compiere.model.MTable; +import org.compiere.model.PO; +import org.compiere.model.PrintInfo; +import org.compiere.print.MPrintFormat; +import org.compiere.print.ReportEngine; +import org.compiere.process.DocumentEngine; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.NamePair; +import org.compiere.util.Trx; +import org.compiere.wf.MWFProcess; +import org.compiere.wf.MWorkflow; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; +import pl.x3E.adInterface.GetProcessParamsDocument; +import pl.x3E.adInterface.LookupValue; +import pl.x3E.adInterface.LookupValues; +import pl.x3E.adInterface.ProcessParam; +import pl.x3E.adInterface.ProcessParamList; +import pl.x3E.adInterface.ProcessParams; +import pl.x3E.adInterface.ProcessParamsDocument; +import pl.x3E.adInterface.RunProcess; +import pl.x3E.adInterface.RunProcessDocument; +import pl.x3E.adInterface.RunProcessResponse; +import pl.x3E.adInterface.RunProcessResponseDocument; + +/* + * ADEMPIERE/COMPIERE + * + * GridField na GridField + * GridTab na GridTab + */ + +public class Process { + + private static CLogger log = CLogger.getCLogger(Process.class); + + public static ProcessParamsDocument getProcessParams( CompiereService cs, GetProcessParamsDocument req ) + { + ProcessParamsDocument res = ProcessParamsDocument.Factory.newInstance(); + ProcessParams params = res.addNewProcessParams(); + ProcessParamList PL = params.addNewParams(); + + int AD_Menu_ID = req.getGetProcessParams().getADMenuID(); + int AD_Process_ID = req.getGetProcessParams().getADProcessID(); + MProcess process = null; + + if (AD_Menu_ID>0 && AD_Process_ID==0 ) + process = MProcess.getFromMenu( cs.getM_ctx(), AD_Menu_ID); + else + if (AD_Menu_ID==0 && AD_Process_ID>0 ) + process = new MProcess( cs.getM_ctx(), AD_Process_ID, null); + + if (process != null) + { + + params.setDescription(process.getDescription()); + params.setHelp(process.getHelp()); + params.setName( process.getName() ); + params.setADProcessID( process.getAD_Process_ID()); + + MProcessPara[] parameter = process.getParameters(); + for (int i = 0; i < parameter.length; i++) + { + MProcessPara para = parameter[i]; + + ProcessParam p = PL.addNewParam(); + p.setName( para.getName() ); + p.setDescription( para.getDescription() ); + p.setDisplayType( para.getAD_Reference_ID() ); + p.setIsMandatory( para.isMandatory() ); + p.setFieldLength( para.getFieldLength() ); + p.setIsRange( para.isRange() ); + p.setColumnName( para.getColumnName() ); + p.setDefaultValue( para.getDefaultValue() ); + p.setDefaultValue2( para.getDefaultValue2() ); + if (para.getDefaultValue()!=null ) + { + if (DisplayType.isDate(para.getAD_Reference_ID())) + { + if (para.getDefaultValue().indexOf( "@#Date@")>=0) { + //Object t = Env.getContextAsDate( cs.getM_ctx(), "#Date" ); + //String t = Env.getContext( cs.getM_ctx(), "#Date" ); + String t= cs.dateFormat.format( Env.getContextAsDate( cs.getM_ctx(), "#Date") ); + + p.setDefaultValue( t ); //cs.dateFormat.format( t )); + } + } else + if (DisplayType.YesNo ==para.getAD_Reference_ID() ) + { + if ("Y".equalsIgnoreCase(para.getDefaultValue())) + p.setDefaultValue("true"); + else + p.setDefaultValue("false"); + } + } else { + if (DisplayType.YesNo ==para.getAD_Reference_ID()) + p.setDefaultValue("false"); + } + + if (para.getDefaultValue2()!=null) + { + if (DisplayType.isDate(para.getAD_Reference_ID())) + { + if (para.getDefaultValue2().indexOf( "@#Date@")>=0) { + //Object t = Env.getContextAsDate( cs.getM_ctx(), "#Date" ); + //String t = Env.getContext( cs.getM_ctx(), "#Date" ); + String t= cs.dateFormat.format( Env.getContextAsDate( cs.getM_ctx(), "#Date") ); + p.setDefaultValue2( t ); //cs.dateFormat.format( t ) ); + } + } + } + + + if (para.isLookup()) + { + LookupValues lvs = p.addNewLookup(); + Lookup lookup = para.getLookup(); + try { + ADLookup.fillLookupValues( lvs, lookup, para.isMandatory(), false /*isReadOnly*/ ); + } catch (Exception ex) { + System.out.println("getProcessParams exception: " +ex.getMessage()); + ex.printStackTrace(); + } + } + } + } + + return res; + } + + + /************************************************************************** + * Create Process Page + * @param AD_Process_ID Process + * @return Page + */ + public static RunProcessResponseDocument runProcess (CompiereService m_cs, RunProcessDocument req ) + { + RunProcessResponseDocument res = RunProcessResponseDocument.Factory.newInstance(); + RunProcessResponse r= res.addNewRunProcessResponse(); + + RunProcess rp = req.getRunProcess(); + int AD_Process_ID = rp.getADProcessID(); + int m_record_id = rp.getADRecordID(); + //WebSessionCtx wsc = WebSessionCtx.get (request); + + MProcess process = MProcess.get (m_cs.getM_ctx() , AD_Process_ID); + // need to check if Role can access + if (process == null) + { + // WebDoc doc = WebDoc.createWindow("Process not found"); + r.setError("Process not found"); + r.setIsError( true ); + return res; + } + //process.getDescription() + //process.getHelp() + + // Evaluate DocAction, if call have DocAction parameter, then try to set DocAction before calling workflow process + String docAction = rp.getDocAction(); + if (docAction != null && docAction.length() > 0) { + // Requirements + // - the process must be a workflow document + if (process.getAD_Workflow_ID() > 0) { + MWorkflow wf = MWorkflow.get(m_cs.getM_ctx(), process.getAD_Workflow_ID()); + if (wf.getWorkflowType().equals(MWorkflow.WORKFLOWTYPE_DocumentProcess)) { + // - get the table associated with the workflow document + // - set DocAction in such table + + // get the PO for the tablename and record ID + MTable table = MTable.get(m_cs.getM_ctx(), wf.getAD_Table_ID()); + if (table != null) { + PO po = table.getPO(m_record_id, null); + if (po != null) { + po.set_ValueOfColumn("DocAction", docAction); + po.save(); + } + } + } + } + } + + // Create Process Instance + MPInstance pInstance = null; + try + { + pInstance = fillParameter (m_cs, rp.getParamValues(), process); + } + catch (Exception ex) + { + //center.addElement(new p("B��d: " + ex.getMessage(), AlignType.LEFT).setClass("ProcesResultError")); + r.setError(ex.getMessage()); + r.setIsError( true ); + return res; + } + + if (m_record_id>0) + { + pInstance.setRecord_ID( m_record_id); + pInstance.save(); + } + // + ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID()); + pi.setAD_User_ID(Env.getAD_User_ID(m_cs.getM_ctx())); + pi.setAD_Client_ID(Env.getAD_Client_ID(m_cs.getM_ctx())); + pi.setAD_PInstance_ID(pInstance.getAD_PInstance_ID()); + if (m_record_id >0) + pi.setRecord_ID( m_record_id ); + + // Info + //p p = new p(); + //p.addElement(Msg.translate(wsc.ctx, "AD_PInstance_ID") + ": " + pInstance.getAD_PInstance_ID()); + //center.addElement(p); + boolean processOK = false; + + boolean jasperreport = (process != null && process.getClassname()!=null && process.getClassname().indexOf( "net.sf.compilo.report.ReportStarter" ) >=0 ); + + if (jasperreport) + { + //this.jasperReport( request, response, wsc.ctx, pi); + processOK = true; + } + + // Start + if (process.isWorkflow()) + { + try + { + int AD_Workflow_ID = process.getAD_Workflow_ID(); + MWorkflow wf = MWorkflow.get (Env.getCtx(), AD_Workflow_ID); + MWFProcess wfProcess = wf.startWait(pi); // may return null + if(wfProcess != null) + { + //wynik + r.setSummary(pi.getSummary()); + r.setLogInfo(pi.getLogInfo(true)); + r.setIsError( false ); + return res; + } + } + catch(Exception ex) + { + r.setError(ex.getMessage()); + r.setLogInfo(pi.getLogInfo(true) ); + r.setIsError( true ); + return res; + //Wyj�tek: pi.getLogInfo(true) pi.getLogInfo(true) + } + //started = wfProcess != null; + } + + if (process.isJavaProcess() && !jasperreport) + { + Trx trx = Trx.get(Trx.createTrxName("WebPrc"), true); + try + { + processOK = process.processIt(pi, trx); + trx.commit(); + trx.close(); + } + catch (Throwable t) + { + trx.rollback(); + trx.close(); + } + if (!processOK || pi.isError()) + { + // b��d: pi.getSummary() + r.setSummary(pi.getSummary()); + r.setLogInfo(pi.getLogInfo(true)); + r.setIsError( true ); + processOK = false; + } + else + { + r.setSummary(pi.getSummary()); + r.setLogInfo(pi.getLogInfo(true)); + r.setIsError( false ); + //return res; + // wynik - String summary = pi.getSummary(); + } + } + + // Report + if (/*processOK &&*/ (process.isReport() || jasperreport))//&& !m_jasperreport) + { + r.setIsReport(true); + //if (m_jasperreport) + //{ + // center.addElement(new p("JASPER REPORT", AlignType.LEFT).setClass("Cerror")); + //} + //else + { + ReportEngine re=null; + if (!jasperreport) + re = start(pi); + //ReportEngine.get(m_cs.getM_ctx(), pi); + if (re == null && !jasperreport) + { + //b��d: "Nie uda�o si� uruchomi� silnika raport�w (ReportEngine)", + } + else + { + try + { + boolean ok = false; + File file; + String file_type = "pdf"; + if (!jasperreport) + { + //file = File.createTempFile("WProcess", ".pdf"); + //ok = re.createPDF(file); + MPrintFormat pf = re.getPrintFormat(); + if (pf.isTableBased()) + { + CharArrayWriter wr = new CharArrayWriter(); + //file = File.createTempFile("WProcess", ".xls"); + ok = ReportEngineEx.createEXCEL_HTML_wr( re, m_cs.getM_ctx(), wr, false, re.getPrintFormat().getLanguage() ); + //ok = re.createXML( file ); + file_type ="xls"; + String data = wr.toString(); + if (data!=null) + r.setData(data.getBytes()); + r.setReportFormat(file_type); + } else + { + byte dat[] = re.createPDFData(); + file_type ="pdf"; + r.setData(dat); + r.setReportFormat(file_type); + } + + //r.setReportFormat("xls"); + ok = true; + } + else + { + JasperPrint jp = getJasperReportPrint( m_cs.getM_ctx(), pi); + //file = File.createTempFile("WProcess", ".pdf"); + ByteArrayOutputStream wr = new ByteArrayOutputStream(); + net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfStream(jp, wr); + //exportReportToPdfFile( jp, file.getAbsolutePath() ); + file_type ="pdf"; + r.setData(wr.toByteArray()); + r.setReportFormat(file_type); + ok = true; + } + + if (ok) + { + //pInstance.getAD_PInstance_ID() + //file.getAbsolutePath() + + // Marker that Process is OK + m_cs.getM_ctx().put("AD_PInstance_ID=" + pInstance.getAD_PInstance_ID(), "ok"); + } + else + { + r.setError("Cannot create report"); + r.setLogInfo(pi.getLogInfo(true) ); + r.setIsError( true ); + return res; + //"Cannot create report:", + } + } + catch (Exception e) + { + r.setError("Cannot create report:" + e.getMessage()); + r.setLogInfo(pi.getLogInfo(true) ); + r.setIsError( true ); + return res; + // , + } + } + } + } + return res; + } // createProcessPage + + + + private static MPInstance fillParameter(CompiereService m_cs, DataRow dr, MProcess process) throws Exception + { + MPInstance pInstance = new MPInstance (process, 0); + + DataField f[] = dr.getFieldArray(); + HashMap fmap = new HashMap(); + for (int i=0; i "; + + doc.appendHead( new style().addElement(st)); + doc.appendBody( table1 ); + doc.appendBody(table); + doc.output(w); + } + w.flush(); + w.close(); + } + catch (Exception e) + { + log.log(Level.SEVERE, "createHTML(w)", e); + } + return false; + } // createHTML + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java new file mode 100644 index 0000000000..39c3c1919b --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java @@ -0,0 +1,200 @@ +package com._3e.ADInterface; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.compiere.model.GridTab; +import org.compiere.model.GridWindow; +import org.compiere.model.GridWindowVO; +import org.compiere.model.MQuery; + +/* + * ADEMPIERE/COMPIERE + * + * A: + * Replace GridWindowVO with GridWindowVO + * GridWindow with GridWindow + * GridTab with GridTab + */ + +public class WWindowStatus +{ + public class AD_WrongTabException extends Exception + { + public AD_WrongTabException( String msg ) { + super(msg); + } + } + + public static WWindowStatus get (Map cache, int WinNo, boolean changeTab, int TabNo, boolean changeRow, /*int RowNo*/int RecordID ) //throws AD_WrongTabException + { + WWindowStatus ws = (WWindowStatus)cache.get(new Integer(WinNo)); + if (ws != null) + { + if (changeTab &&ws.curTab.getTabNo()!=TabNo) + { + //if (!changeTab) + // return null; + //throw ws.new AD_WrongTabException(""); + WWindowStatus.changeTabIfNeeded( ws, TabNo ); + ws.updateRecIDMap(); + } + /* + if (changeRow) + { + if (RowNo<0) RowNo = 0; + if (ws.curTab.getCurrentRow() != RowNo) + { + int r = ws.curTab.navigate(RowNo); + if (r==-1) + ws.curTab.dataRefresh(); + } + }*/ + // zakladamy ze dostajemy teraz RecordID zamiast RowNo; + if (changeRow) { + int RowNo = ws.getRowNoFromRecordID( RecordID ); + + if (RowNo<0) RowNo = 0; + if (ws.curTab.getCurrentRow() != RowNo) + { + int r = ws.curTab.navigate(RowNo); + if (r==-1) + ws.curTab.dataRefresh(); + } + } + + } + +// ADEMPIERE/COMPIERE + if (ws!=null && !ws.curTab.getTableModel().isOpen()) + ws.curTab.getTableModel(). + open(0); // adempiere + //open(); // compiere + + return ws; + } // get + + + /************************************************************************** + * Constructor - First Tab - First Row - Single Row. + *
+ * Initialize Formats + * @param GridWindowVO window VO + */ + public WWindowStatus ( GridWindowVO GridWindowVO) + { + mWindow = new GridWindow(GridWindowVO); + curTab = mWindow.getTab(0); + curTab.setSingleRow(true); + + ctx = GridWindowVO.ctx; + m_needSave = false; + + ads = new ADDataStatusListener(ctx); + curTab.addDataStatusListener( ads ); + + RecordIDMap = new HashMap(); + } // WWindowStatus + + + /** The GridWindow */ + protected GridWindow mWindow; + /** The current GridTab */ + protected GridTab curTab; + + + /** Window Context */ + public Properties ctx = null; + + public ADDataStatusListener ads = null; + + public int TabNo = 0; + public MQuery findQuery = null; + public boolean hasFindParams = false; + public boolean findQueryApplied = false; + public boolean m_needSave = false; + + + /** + * String representation + * @return String representation + */ + public String toString() + { + return "WWindowStatus[" + mWindow + + " - " + curTab + "]"; + } // toString + + + + public static void changeTabIfNeeded(WWindowStatus ws, int TabNo) + { + if (ws.curTab.getTabNo() != TabNo) // tab change + { + //ws.curTab = ws.mWindow.getTab(TabNo); + if (TabNo > ws.curTab.getTabNo()) + { + //if (ws.curTab.getTableModel().isInserting() ) // kolec + // return; + + ws.curTab.removeDataStatusListener( ws.ads ); + // ADEMPIERE/COMPIERE + ws.mWindow.initTab(TabNo); //adempiere specific + ws.curTab = ws.mWindow.getTab(TabNo); + ws.curTab.addDataStatusListener( ws.ads ); + ws.curTab.query(ws.mWindow.isTransaction()); // false + ws.curTab.navigate(0); + ws.m_needSave = false; + ws.updateRecIDMap(); + } + // move back + else if (TabNo < ws.curTab.getTabNo()) + { + ws.curTab.removeDataStatusListener( ws.ads ); +// ADEMPIERE/COMPIERE + ws.mWindow.initTab(TabNo); //adempiere specific + ws.curTab = ws.mWindow.getTab(TabNo); + ws.curTab.addDataStatusListener( ws.ads ); + // ws.curTab.dataRefresh(); // bylo + ws.curTab.query(ws.mWindow.isTransaction()); // false + ws.curTab.navigate(0); + ws.m_needSave = false; + ws.updateRecIDMap(); + } + } + } + + + + Map RecordIDMap = null; + + public int getRowNoFromRecordID( int RecordID ) { + Integer rowNo = this.RecordIDMap.get( RecordID ); + if (rowNo == null) rowNo = new Integer(-1); + System.out.println("getRowNo From RecID "+RecordID+" = "+rowNo.intValue()); + return rowNo.intValue(); + } + + public Map getRecordIDMap() { + return RecordIDMap; + } + + public void updateRecIDMap() { + int rc = curTab.getRowCount(); + int initRowNo = 0; + + //Map RecordIDMap = ws.getRecordIDMap(); + + RecordIDMap.clear(); + + for (int lineNo = initRowNo; lineNo < rc; lineNo++) + { + int recID = curTab.getKeyID( lineNo ); + //System.out.println(""+lineNo+" - "+recID); + RecordIDMap.put( recID, lineNo ); + + } + } + +} // WWindowStatus diff --git a/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java new file mode 100644 index 0000000000..e9c0ecb39b --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java @@ -0,0 +1,22 @@ +/** + * + */ +package com.adaxa.ws; + +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.jws.soap.SOAPBinding.ParameterStyle; +import javax.jws.soap.SOAPBinding.Style; +import javax.jws.soap.SOAPBinding.Use; + + +/** + * @author ashley + * + */ +@WebService(targetNamespace="http://3e.pl/ADInterface") +@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED) +public interface WebstoreService +{ + public ProcessResponseDocument runProcess(ProcessRequestDocument requestDoc); +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java new file mode 100644 index 0000000000..07cd49dc47 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java @@ -0,0 +1,579 @@ +/** + * + */ +package com.adaxa.ws; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.logging.Level; + +import javax.jws.WebService; + +import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.Lookup; +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.model.MProcess; +import org.compiere.model.MProcessPara; +import org.compiere.model.MWebService; +import org.compiere.model.MWebServiceType; +import org.compiere.model.X_WS_WebServiceMethod; +import org.compiere.model.X_WS_WebService_Para; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Login; +import org.compiere.util.NamePair; +import org.compiere.util.Trx; +import org.compiere.util.ValueNamePair; + +import com._3e.ADInterface.CompiereService; + +/** + * @author ashley + */ +@WebService(endpointInterface="com.adaxa.ws.WebstoreService", serviceName="WebstoreService", targetNamespace="http://3e.pl/ADInterface") +public class WebstoreServiceImpl implements WebstoreService +{ + + protected static final CLogger logger = CLogger + .getCLogger(WebstoreService.class); + public static final String WEB_SERVICE_NAME = "WebstoreService"; + private CompiereService compiereService; + private MWebService webService; + private X_WS_WebServiceMethod webServiceMethod; + private MWebServiceType webServiceType; + + public WebstoreServiceImpl() + { + compiereService = new CompiereService(); + compiereService.connect(); + } + + protected void login(LoginRequest loginRequest) throws Exception + { + Login login = new Login(compiereService.getM_ctx()); + + // Validate user credentials + KeyNamePair[] roles = login.getRoles(loginRequest.getUser(), + loginRequest.getPass()); + + if (roles == null) + { + throw new Exception("Login Error: Invalid user credentials"); + } + + // Validate role + KeyNamePair loginRole = null; + for (KeyNamePair role : roles) + { + if (role.getKey() == loginRequest.getRoleID()) + { + loginRole = role; + break; + } + } + + if (loginRole == null) + { + throw new Exception( + "Login Error: Role is not allowed for this user"); + } + + // Validate client + KeyNamePair[] clients = login.getClients(loginRole); + + if (clients == null) + { + throw new Exception( + "Login Error: Client is not allowed for this user with the defined role"); + } + + KeyNamePair loginClient = null; + for (KeyNamePair client : clients) + { + if (client.getKey() == loginRequest.getClientID()) + { + loginClient = client; + break; + } + } + + if (loginClient == null) + { + throw new Exception( + "Login Error: Client is not allowed for this user with the defined role"); + } + + compiereService.getM_ctx().setProperty("#AD_Client_ID", "" + loginRequest.getClientID()); + + // Validate org + KeyNamePair[] orgs = login.getOrgs(loginRole); + if (orgs == null) + { + throw new Exception( + "Login Error: Organization is not allowed for this user"); + } + + KeyNamePair loginOrg = null; + for (KeyNamePair org : orgs) + { + if (org.getKey() == loginRequest.getOrgID()) + { + loginOrg = org; + break; + } + } + + if (loginOrg == null) + { + throw new Exception( + "Login Error: Organization is not allowed for this user"); + } + + // Validate Warehouse + KeyNamePair[] warehouses = login.getWarehouses(loginOrg); + + if (warehouses == null) + { + throw new Exception( + "Login Error: Warehouse is not allowed for this user"); + } + + KeyNamePair loginWarehouse = null; + for (KeyNamePair warehouse : warehouses) + { + if (warehouse.getKey() == loginRequest.getWarehouseID()) + { + loginWarehouse = warehouse; + break; + } + } + + if (loginWarehouse == null) + { + throw new Exception( + "Login Error: Warehouse is not allowed for this user"); + } + + String error = login.validateLogin(loginOrg); + + if (error != null && error.length() > 0) + { + throw new Exception("Login Error: " + error); + } + + int AD_User_ID = Env.getAD_User_ID(compiereService.getM_ctx()); + + if (!compiereService.login(AD_User_ID, loginRequest.getRoleID(), + loginRequest.getClientID(), loginRequest.getOrgID(), + loginRequest.getWarehouseID(), loginRequest.getLang())) + { + throw new Exception( + "Login Error: Could not initialize login details"); + } + } + + private void initWebServiceType(String webserviceValue, String methodValue, + String serviceTypeValue) throws Exception + { + webService = MWebService.get(compiereService.getM_ctx(), + webserviceValue); + if (webService == null || !webService.isActive()) + { + throw new Exception("Web Service Configuration Error: Web Service " + + webserviceValue + " not registered"); + } + + webServiceMethod = webService.getMethod(methodValue); + if (webServiceMethod == null || !webServiceMethod.isActive()) + { + throw new Exception("Web Service Configuration Error: Method " + + methodValue + " not registered"); + } + + String sql = "SELECT * FROM WS_WebServiceType " + + "WHERE AD_Client_ID=? " + "AND WS_WebService_ID=? " + + "AND WS_WebServiceMethod_ID=? " + "AND Value=? " + + "AND IsActive='Y'"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, compiereService.getM_AD_Client_ID()); + pstmt.setInt(2, webService.getWS_WebService_ID()); + pstmt.setInt(3, webServiceMethod.getWS_WebServiceMethod_ID()); + pstmt.setString(4, serviceTypeValue); + rs = pstmt.executeQuery(); + if (rs.next()) + { + webServiceType = new MWebServiceType( + compiereService.getM_ctx(), rs, null); + } + } + catch (Exception ex) + { + logger.log(Level.SEVERE, "Could not get web service type", ex); + throw new Exception( + "Web Service Error: Could not get web service with type '" + + serviceTypeValue + "'"); + } + finally + { + DB.close(rs, pstmt); + } + + if (webServiceType == null) + { + throw new Exception("Web Service Error: Web service type '" + + serviceTypeValue + "' is not configured"); + } + + String accessSql = "SELECT IsReadWrite FROM WS_WebServiceTypeAccess WHERE AD_Role_ID=? " + + "AND WS_WebServiceType_ID=? AND IsActive='Y'"; + + String hasAccess = DB.getSQLValueString(null, accessSql, + Env.getAD_Role_ID(compiereService.getM_ctx()), + webServiceType.get_ID()); + + if (!"Y".equals(hasAccess)) + { + throw new Exception( + "Web Service Error: Login role does not have access to the service type"); + } + } + + @SuppressWarnings("unchecked") + private T formatValue(String value, Class type) throws Exception + { + try + { + if (value == null) + { + return null; + } + else if (String.class == type) + { + return (T) value; + } + else if (value.trim().length() == 0) + { + return null; + } + else if (Integer.class == type) + { + return (T) Integer.valueOf(value); + } + else if (BigDecimal.class == type) + { + return (T) new BigDecimal(value); + } + else if (Boolean.class == type) + { + if ("Y".equalsIgnoreCase(value)) + { + return (T) Boolean.TRUE; + } + else if ("N".equalsIgnoreCase(value)) + { + return (T) Boolean.FALSE; + } + + return (T) Boolean.valueOf(value); + } + else if (Timestamp.class == type) + { + Date date = compiereService.dateFormat.parse(value); + return (T) new Timestamp(date.getTime()); + } + else + { + + throw new Exception("Casting to type '" + + type.getClass().getName() + "' is not defined"); + } + } + catch (Exception ex) + { + throw new Exception("Cannot cast parameter to type: " + + type.getClass().getName() + ", cause: " + ex.getMessage()); + } + } + + public String formatValue(Object value) + { + if (value == null) + { + return ""; + } + else if (value instanceof Timestamp) + { + Date date = new Date(((Timestamp) value).getTime()); + return compiereService.dateFormat.format(date); + } + + return String.valueOf(value); + } + + private T getConstantParameterValue(MWebServiceType serviceType, + String parameterName, Class type) throws Exception + { + X_WS_WebService_Para processIdParameter = webServiceType + .getParameter(parameterName); + + if (processIdParameter == null + || !X_WS_WebService_Para.PARAMETERTYPE_Constant + .equals(processIdParameter.getParameterType())) + { + logger.severe("Invalid configuration for '" + parameterName + + "' parameter in the web service type: " + + serviceType.getName()); + throw new Exception("Web Service Error: Invalid configuraiton"); + } + + String parameterValue = processIdParameter.getConstantValue(); + + try + { + return formatValue(parameterValue, type); + } + catch (Exception ex) + { + logger.severe("Error in formatting value, cause: " + + ex.getMessage()); + throw new Exception( + "Web Service Error: Invalid configuration for parameter '" + + parameterName + "' and service type '" + + serviceType.getName() + "'"); + } + } + + private MPInstance fillParameters(MProcess process, + Parameter parameters[], int recordId) throws Exception + { + MPInstance processInstance = new MPInstance(process, recordId); + MPInstancePara[] instanceParameters = processInstance.getParameters(); + HashMap parametersMap = new HashMap(); + for (Parameter parameter : parameters) + { + parametersMap.put(parameter.getName(), parameter.getValue()); + } + + for (int i = 0; i < instanceParameters.length; i++) + { + MPInstancePara instanceParameter = instanceParameters[i]; + String parameterName = instanceParameter.getParameterName(); + MProcessPara processParameter = process.getParameter(parameterName); + + if (processParameter == null) + { + logger.severe("Parameter '" + parameterName + + "' not found for process with value '" + + process.getValue() + "'"); + continue; + } + + int displayType = processParameter.getAD_Reference_ID(); + + String value = parametersMap.get(parameterName); + String valueTo = null; + + if (value != null) + { + value = value.trim(); + } + + if (processParameter.isRange()) + { + valueTo = parametersMap.get(parameterName + "_2"); + + if (valueTo != null) + { + valueTo = valueTo.trim(); + } + } + + if (value != null && value.length() == 0) + value = null; + + if (value != null + && (DisplayType.List == displayType + || DisplayType.TableDir == displayType || DisplayType.Table == displayType) + && value.equals("-1")) + { + value = null; + } + + if (value == null && processParameter.isMandatory()) + { + throw new Exception("Parameter '" + parameterName + + "' is mandatory"); + } + + if (DisplayType.isNumeric(displayType) + || DisplayType.isID(displayType)) + { + instanceParameter.setP_Number(formatValue(value, + BigDecimal.class)); + if (processParameter.isRange()) + { + instanceParameter.setP_Number_To(formatValue(valueTo, + BigDecimal.class)); + } + } + else if (DisplayType.isDate(displayType)) + { + instanceParameter + .setP_Date(formatValue(value, Timestamp.class)); + if (processParameter.isRange()) + { + instanceParameter.setP_Date_To(formatValue(valueTo, + Timestamp.class)); + } + } + else if (DisplayType.YesNo == processParameter.getAD_Reference_ID()) + { + boolean booleanValue = formatValue(value, Boolean.class); + instanceParameter.setP_String((booleanValue ? "Y" : "N")); + } + if (processParameter.isLookup()) + { + Lookup lookup = processParameter.getLookup(); + if (lookup != null) + { + NamePair namePair = lookup.getDirect(value, false, false); + if (namePair != null) + { + instanceParameter.setInfo(namePair.getName()); + } + } + } + else + { + instanceParameter.setP_String(value); + instanceParameter.setP_String_To(valueTo); + } + + instanceParameter.saveEx(); + } + + processInstance.saveEx(); + + return processInstance; + } + + private void fillOutputValues(MProcess process, ProcessInfo processInfo, + ProcessResponse processResponse) + { + if (processInfo.getSerializableObject() != null + && processInfo.getSerializableObject() instanceof List) + { + List outputValues = (List) processInfo + .getSerializableObject(); + for (Object obj : outputValues) + { + if (obj instanceof ValueNamePair) + { + ValueNamePair outputValueNamePair = (ValueNamePair)obj; + OutputData outputData = processResponse.addNewOuptutData(); + outputData.setName(outputValueNamePair.getName()); + outputData.setValue(formatValue(outputValueNamePair.getValueObject())); + } + } + } + } + + public ProcessResponseDocument runProcess(ProcessRequestDocument requestDoc) + { + ProcessResponseDocument responseDoc = ProcessResponseDocument.Factory.newInstance(); + ProcessResponse response = responseDoc.addNewProcessResponse(); + + LoginRequest loginRequest = requestDoc.getProcessRequest() + .getLoginRequest(); + + String serviceType = requestDoc.getProcessRequest().getServiceType(); + + try + { + login(loginRequest); + initWebServiceType(WEB_SERVICE_NAME, "runProcess", serviceType); + String processValue = getConstantParameterValue(webServiceType, + "PROCESS", String.class); + + int processId = MProcess.getProcess_ID(processValue, null); + + if (processId <= 0) + { + logger.severe("Process with value '" + processValue + "' not found"); + throw new Exception("Configuration error - Process not found"); + } + + MProcess process = MProcess.get(compiereService.getM_ctx(), + processId); + + String accessSql = "SELECT IsReadWrite FROM AD_Process_Access " + + "WHERE AD_Role_ID=? AND AD_Process_ID=? AND IsActive='Y'"; + String hasAccess = DB.getSQLValueString(null, accessSql, + Env.getAD_Role_ID(compiereService.getM_ctx()), processId); + + if (!"Y".equals(hasAccess)) + { + throw new Exception("Configuration Error: Login role doesn not have access to the process"); + } + + Parameter[] parameters = requestDoc.getProcessRequest().getProcessData().getParameterArray(); + MPInstance processInstance = fillParameters(process, parameters, 0); + + ProcessInfo processInfo = new ProcessInfo (process.getName(), process.getAD_Process_ID()); + processInfo.setAD_User_ID(Env.getAD_User_ID(compiereService.getM_ctx())); + processInfo.setAD_Client_ID(Env.getAD_Client_ID(compiereService.getM_ctx())); + processInfo.setAD_PInstance_ID(processInstance.getAD_PInstance_ID()); + + boolean success = false; + + Trx trx = Trx.get(Trx.createTrxName("WSProcess"), true); + try + { + success = process.processIt(processInfo, trx); + fillOutputValues(process, processInfo, response); + trx.commit(); + } + finally + { + trx.rollback(); + trx.close(); + } + + if (success && !processInfo.isError()) + { + response.setIsError(false); + } + else + { + response.setIsError(true); + response.setError(processInfo.getSummary()); + } + } + catch (AdempiereException ex) + { + response.setIsError(true); + response.setError(ex.getMessage()); + } + catch (Exception ex) + { + response.setIsError(true); + response.setError(ex.getMessage()); + } + + return responseDoc; + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java new file mode 100644 index 0000000000..dd2b9625ce --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java @@ -0,0 +1,56 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import javax.jws.WebService; + +import org.openbravo.erpCommon.ws.externalSales.ArrayOfTns1Order; +import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponseDocument; + +@WebService +public interface ExternalSales { + + public ProductsPlusCatalogResponseDocument getProductsPlusCatalog(int entityId, int organizationId, int salesChannel, String username, String password); + + public UploadOrdersResponseDocument uploadOrders(int entityId, int organizationId, int salesChannel, ArrayOfTns1Order newOrders, String username, String password); + + public ProductsCatalogResponseDocument getProductsCatalog(int entityId, int organizationId, int salesChannel, String username, String password); + + /* methods to implement */ + + /* + + public GetOrdersResponseDocument getOrders(GetOrdersRequestDocument req) throws XFireFault; + + */ + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java new file mode 100644 index 0000000000..20f6a88407 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java @@ -0,0 +1,171 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +import javax.xml.namespace.QName; + +import org.apache.commons.codec.binary.Base64; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.SecureEngine; +import org.idempiere.webservices.fault.IdempiereServiceFault; +import org.openbravo.erpCommon.ws.externalSales.ArrayOfTns1Order; +import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponse; +import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponse; +import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponse; +import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponseDocument; + +/* + * ADEMPIERE/COMPIERE + * + * Web Service interface for openbravo pos + * + * Contributors: Carlos Ruiz - globalqss + */ + + +/** + * + * @author Carlos Ruiz - globalqss + * + */ +public class ExternalSalesImpl implements ExternalSales { + + private static CLogger log = CLogger.getCLogger(ExternalSalesImpl.class); + + private static String webServiceName = new String("ExternalSales"); + + public ExternalSalesImpl() + { + log.info("Creating session object ExternalSales"); + } + + public String getVersion() { + return "0.1.0"; + } + + public UploadOrdersResponseDocument uploadOrders(int entityId, + int organizationId, int salesChannel, ArrayOfTns1Order newOrders, + String username, String password) { + // TODO Auto-generated method stub + UploadOrdersResponseDocument resdoc = UploadOrdersResponseDocument.Factory.newInstance(); + UploadOrdersResponse res = resdoc.addNewUploadOrdersResponse(); + + authenticate(username, password, webServiceName, "uploadOrders"); + + return resdoc; + } + + public ProductsCatalogResponseDocument getProductsCatalog(int entityId, + int organizationId, int salesChannel, String username, + String password) { + // TODO Auto-generated method stub + + ProductsCatalogResponseDocument resdoc = ProductsCatalogResponseDocument.Factory.newInstance(); + ProductsCatalogResponse res = resdoc.addNewProductsCatalogResponse(); + + authenticate(username, password, webServiceName, "getProductsCatalog"); + + return resdoc; + } + + public ProductsPlusCatalogResponseDocument getProductsPlusCatalog( + int entityId, int organizationId, int salesChannel, + String username, String password) { + // TODO Auto-generated method stub + ProductsPlusCatalogResponseDocument resdoc = ProductsPlusCatalogResponseDocument.Factory.newInstance(); + ProductsPlusCatalogResponse res = resdoc.addNewProductsPlusCatalogResponse(); + + authenticate(username, password, webServiceName, "getProductsPlusCatalog"); + + /* + * Sample of needed work + * + ArrayOfTns1ProductPlus app = res.addNewArrayOfTns1ProductPlus(); + // Iterate in M_Product for the organization / warehouse? + + for (MProduct product : products) ... + + ProductPlus prds = app.addNewProducts(); + Category cat = prds.addNewCategory(); + cat.setDescription(product.getM_Category().getDescription()); + cat.setId(product.getM_Category_ID()); + cat.setName(product.getM_Category().getName()); + Tax tax = prds.addNewTax(); + tax.setName(product.getC_Tax().getName()); + tax.setId(product.getC_Tax_ID()); + tax.setPercentage(product.getC_Tax().getRate()); + prds.setDescription(product.getDescription()); + prds.setEan(product.getEAN()); + prds.setId(product.getM_Product_ID()); + prds.setListPrice(product.getPriceList()); // we would need a price list related to the POS + prds.setName(product.getName()); + prds.setNumber(product.getNumber()); // number? + prds.setPurchasePrice(product.getPurchasePrice()); // we would need a purchase price list related to the POS + prds.setQtyonhand(product.getQtyOnHand()); // we would need a warehouse or locator related to the POS + */ + + return resdoc; + } + + public static void authenticate(String username, String password, String webServiceName, String method) { + String dbpwd = DB.getSQLValueString(null, "SELECT Password FROM AD_User WHERE Name=? AND Password IS NOT NULL", username); // and ad_client_id in (0,?) + if (dbpwd == null || dbpwd.length() <= 0) + throw new IdempiereServiceFault("Invalid user/password", new QName("username")); + + String isencr = DB.getSQLValueString(null, "SELECT IsEncrypted FROM AD_Column WHERE AD_Column_ID=417"); + if ("Y".equals(isencr)) + dbpwd = SecureEngine.decrypt(dbpwd); + + String hashPassword = null; + try { + hashPassword = new String(Base64.encodeBase64(MessageDigest.getInstance("SHA-1").digest(dbpwd.getBytes("UTF-8"))), "ASCII"); + } catch (UnsupportedEncodingException e1) { + throw new IdempiereServiceFault("Error hashing db password", e1, new QName("username")); + } catch (NoSuchAlgorithmException e1) { + throw new IdempiereServiceFault("Error hashing db password", e1, new QName("username")); + } + + if (! hashPassword.equals(password)) + /* Invalid password */ + throw new IdempiereServiceFault("Invalid user/password", new QName("password")); + + throw new IdempiereServiceFault("Security not implemented yet", new QName("webServiceName")); + // TODO: authenticate web service and method + // TODO: Search for a service type for client and role access with the same value as the method + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java new file mode 100644 index 0000000000..41221a8d7e --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java @@ -0,0 +1,60 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponseDocument; + +@javax.jws.WebService +public interface WebService { + + /* methods to implement */ + + public GetCustomersResponseDocument getCustomers(int clientId, String username, String password); + + /* + public GetCustomerResponseDocument getCustomer(GetCustomerRequestDocument req) throws XFireFault; + + public GetCustomerResponse1Document getCustomer(GetCustomerRequest1Document req) throws XFireFault; + + public UpdateCustomerResponseDocument updateCustomer(UpdateCustomerRequestDocument req) throws XFireFault; + + public GetCustomerAddressesResponseDocument getCustomerAddresses(GetCustomerAddressesRequestDocument req) throws XFireFault; + + public GetCustomerLocationResponseDocument getCustomerLocation(GetCustomerLocationRequestDocument req) throws XFireFault; + + public UpdateAddressResponseDocument updateAddress(UpdateAddressRequestDocument req) throws XFireFault; + + public GetCustomerContactResponseDocument getCustomerContact(GetCustomerContactRequestDocument req) throws XFireFault; + + public UpdateContactResponseDocument updateContact(UpdateContactRequestDocument req) throws XFireFault; + + */ + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java new file mode 100644 index 0000000000..2c7058735e --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java @@ -0,0 +1,78 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import org.compiere.util.CLogger; +import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponse; +import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponseDocument; + +/* + * ADEMPIERE/COMPIERE + * + * Web Service interface for openbravo pos + * + * Contributors: Carlos Ruiz - globalqss + */ + + +/** + * + * @author Carlos Ruiz - globalqss + * + */ +public class WebServiceImpl implements WebService { + + private static CLogger log = CLogger.getCLogger(WebServiceImpl.class); + + private static String webServiceName = new String("WebService"); + + public WebServiceImpl() + { + log.info("Creating session object ExternalSales"); + } + + public String getVersion() { + return "0.1.0"; + } + + public GetCustomersResponseDocument getCustomers(int clientId, String username, String password) + { + // TODO Auto-generated method stub + GetCustomersResponseDocument resdoc = GetCustomersResponseDocument.Factory.newInstance(); + GetCustomersResponse res = resdoc.addNewGetCustomersResponse(); + + ExternalSalesImpl.authenticate(username, password, webServiceName, "getCustomers"); + + // TODO Auto-generated method stub + + return resdoc; + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java new file mode 100644 index 0000000000..042d88bcd4 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java @@ -0,0 +1,51 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +import java.util.HashMap; +import java.util.Properties; + +import net.sf.compilo.report.ReportInfo; + +import org.compiere.process.ProcessInfo; + +/** + * CompiereDataSourceFactory + * + * @author Peter Shen + * @version $Id: CompiereDataSourceFactory.java,v 1.2 2005/08/04 09:42:41 pshen Exp $ + * @description: CompiereDataSourceFactory + */ +public class CompiereDataSourceFactory +{ + + public static compiereDataSource createDataSource(Properties ctx, ReportInfo ri, ProcessInfo pi, HashMap params) + { + if(ri.getReportViewID() > 0) + return new ReportViewDataSource(ctx, pi, params); + + return new DBDataSource(ctx, ri, params); + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java new file mode 100644 index 0000000000..daa55cc3bb --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java @@ -0,0 +1,241 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Properties; + +import net.sf.compilo.report.ReportInfo; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRField; +import net.sf.jasperreports.engine.JRParameter; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.util.JRQueryExecuter; + +import org.compiere.util.DB; + +/** + * DBDataSource + * + * @author Peter Shen + * @version $Id: DBDataSource.java,v 1.3 2005/08/04 09:42:41 pshen Exp $ + * @description: DBDataSource + */ +public class DBDataSource extends compiereDataSource +{ + private PreparedStatement m_pstmt = null; + private ResultSet m_resultSet = null; + + public DBDataSource(Properties ctx, ReportInfo ri, HashMap params) + { + JasperReport jr = ri.getJasperReport(); + //Generate parameters map + HashMap parametersMap = new HashMap(); + JRParameter[] jpara = jr.getParameters(); + for (int i=0; i= m_printData.getRowCount()) + return false; + + m_printData.setRowIndex(m_index++); + return true; + } + + /* (non-Javadoc) + * @see net.sf.jasperreports.engine.JRDataSource#getFieldValue(net.sf.jasperreports.engine.JRField) + */ + public Object getFieldValue(JRField field) throws JRException + { + PrintDataElement pde = (PrintDataElement)m_printData.getNode(field.getName()); + if(pde == null || pde.isNull()) + return null; + + if(pde.isDate()) + return (java.util.Date)pde.getValue(); + if(pde.isNumeric()) + return (BigDecimal)pde.getValue(); + if(pde.isID() && field.getValueClassName().indexOf("Integer") >= 0) + return (Integer)pde.getValue(); + else if(pde.isID() && field.getValueClassName().indexOf("String") >= 0) + return pde.getValue().toString(); + if(pde.isYesNo()) + return (Boolean)pde.getValue(); + + return pde.getValue().toString(); + } + + + /* (non-Javadoc) + * @see net.sf.compilo.data.compiereDataSource#close() + */ + public void close() + { + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java new file mode 100644 index 0000000000..ee68a607fc --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java @@ -0,0 +1,49 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +import net.sf.jasperreports.engine.JRDataSource; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRField; + +import org.compiere.util.CLogger; + +/** + * compiereDataSource + * + * @author Peter Shen + * @version $Id: compiereDataSource.java,v 1.4 2005/08/04 09:42:41 pshen Exp $ + * @description: compiereDataSource + */ +public abstract class compiereDataSource implements JRDataSource +{ + protected CLogger log = CLogger.getCLogger(compiereDataSource.class); + + public abstract Object getFieldValue(JRField field) throws JRException; + + public abstract boolean next() throws JRException; + + public abstract void close(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java new file mode 100644 index 0000000000..be70b77770 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java @@ -0,0 +1,44 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +/** + * @author Peter Shen + * @version $Id: sqlProcessor.java,v 1.1 2005/07/15 10:29:40 pshen Exp $ + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +public class sqlProcessor +{ + /** + * + */ + public sqlProcessor() + { + super(); + // TODO Auto-generated constructor stub + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java new file mode 100644 index 0000000000..678b0dd1a2 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java @@ -0,0 +1,63 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.report; + +import java.io.File; +import java.io.FilenameFilter; + +/** + * @author Peter Shen + * @version $Id: FileFilter.java,v 1.2 2005/07/16 02:39:17 pshen Exp $ + **/ +public class FileFilter implements FilenameFilter + { + private String reportStart; + private File directory; + private String extension[]; + + public FileFilter(String reportStart, File directory, String[] extension) + { + this.reportStart = reportStart; + this.directory = directory; + this.extension = extension; + } + + public boolean accept(File file, String name) + { + if (file.equals( directory)) + { + if (name.startsWith( reportStart)) + { + for(int i=0; i jasperFile.lastModified()) + { + return true; + } + } + else + return true; + + return false; + } + + public String toString() + { + return "AD_Process_ID:" + m_AD_Process_ID + " XMLFile:" + this.reportFile + " ReportView_ID:" + this.ReportViewID; + } + /** + * @return Returns the reportViewID. + */ + public int getReportViewID() + { + return ReportViewID; + } + /** + * @param reportViewID The reportViewID to set. + */ + protected void setReportViewID(int reportViewID) + { + ReportViewID = reportViewID; + } + /** + * @return Returns the directPrint. + */ + protected boolean isDirectPrint() + { + return directPrint; + } + /** + * @return Returns the errorMsg. + */ + protected ArrayList getErrorMsg() + { + return errorMsg; + } + /** + * @return Returns the hasError. + */ + protected boolean hasError() + { + return hasError; + } + /** + * @return Returns the jasperReport. + */ + public JasperReport getJasperReport() + { + return jasperReport; + } + /** + * @return Returns the subReport. + */ + protected HashMap getSubReport() + { + return subReport; + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java new file mode 100644 index 0000000000..e6eee8573c --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java @@ -0,0 +1,102 @@ +/** + * reportServer for JasperReport. Copyright (C) 2004 Peter Shen. Shanghai, + * China. Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library 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 Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. lombardo@mayking.com, + * mar9000@gmail.com Italy. + */ +package net.sf.compilo.report; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Set; + +import org.compiere.util.CLogger; + +; + +/** + * ReportPool + * + * @author Peter Shen + * @version $Id: ReportPool.java,v 1.2 2005/08/03 10:33:00 pshen Exp $ + * @description: JasperReport Object Pool + */ +public class ReportPool +{ + private static HashMap pool = new HashMap(); + + private static final int MAXNUM = 15; + private static int size = 0; + + private CLogger log = CLogger.getCLogger(ReportPool.class); + + public ReportInfo getReport (int AD_Process_ID ) + { +/* ReportInfo reportinfo = (ReportInfo) pool.get(new Integer(AD_Process_ID)); + if (reportinfo == null) + { + reportinfo = loadReport(AD_Process_ID); + addReport(AD_Process_ID, reportinfo, false); + } + else if(reportinfo.isDirty()) + { + log.info("ReportInfo " + reportinfo + "dirty, Refresh"); + reportinfo = loadReport(AD_Process_ID); + if(!reportinfo.hasError()) + addReport(AD_Process_ID, reportinfo, true); + } +*/ + ReportInfo reportinfo; + reportinfo = loadReport(AD_Process_ID); + return reportinfo; + } + + private ReportInfo loadReport (int AD_Process_ID ) + { + ReportInfo reportinfo = new ReportInfo(AD_Process_ID); + return reportinfo; + } + + private synchronized void addReport(int AD_Process_ID, ReportInfo reportinfo, boolean refresh) + { + if(refresh) + { + pool.put(new Integer(AD_Process_ID), reportinfo); + } + else + { + while(size > MAXNUM) + { + Set s = pool.keySet(); + Iterator it = s.iterator(); + if (it.hasNext()) + { + Integer key = (Integer)it.next(); + log.info("Remove " + key + " from the report pool"); + pool.remove(key); + } + size--; + } + + pool.put(new Integer(AD_Process_ID), reportinfo); + size++; + } + log.info("Load " + reportinfo + " into Report Pool" + " Size=" + size); + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java new file mode 100644 index 0000000000..d4e8977a37 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java @@ -0,0 +1,268 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.report; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import net.sf.compilo.data.CompiereDataSourceFactory; +import net.sf.compilo.data.compiereDataSource; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; + +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Language; + +/** + * Report Server + * + * @author Peter Shen + * @version $Id: ReportProcessor.java,v 1.7 2005/09/03 04:09:51 pshen Exp $ + * @description: report server + */ +public class ReportProcessor +{ + public static final String REPORT_PATH__fix = "c:/compiere/compiere-all/reports"; + + public static File REPORT_HOME = null; + private static CLogger log = CLogger.getCLogger(ReportProcessor.class); + + static + { + String reportPath = REPORT_PATH__fix;// "c:/compiere/compiere-all/reports";//System.getProperty("REPORT_HOME"); + if (reportPath == null || reportPath.length() == 0) + reportPath = System.getProperty("COMPIERE_HOME")+ System.getProperty("file.separator")+ "reports"; + //System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRCompiler"); + String classpath = Thread.currentThread().getContextClassLoader().getResource("net/sf/jasperreports/engine").toString(); + System.setProperty("jasper.reports.compile.temp", reportPath); + System.setProperty("jasper.reports.compile.class.path", classpath.split("file:/")[1].split("!")[0]); + //System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRBshCompiler"); + + REPORT_HOME = new File(reportPath); + if(!REPORT_HOME.exists()) + log.saveError("The Report_Home not exists", REPORT_HOME.getAbsolutePath()); + + log.info("Set REPORT_HOME to " + REPORT_HOME.getAbsolutePath()); + } + + public ReportProcessor (Properties ctx, ProcessInfo pi) + { + System.setProperty("jasper.reports.compile.keep.java.file", "true"); + m_AD_PInstance_ID = pi.getAD_PInstance_ID(); + m_AD_Process_ID = pi.getAD_Process_ID(); + m_Record_ID = pi.getRecord_ID(); + //m_isPrint = pi.getIsPrint(); + m_Param = new HashMap(); + m_ctx = ctx; + m_pi = pi; + } // ReportServer + + public JasperPrint runReport() + { + System.setProperty("jasper.reports.compile.keep.java.file", "true"); + ReportPool rp = new ReportPool(); + ReportInfo reportInfo = rp.getReport(m_AD_Process_ID); + rp = null; + + if (!reportInfo.hasError() && reportInfo.getJasperReport()!= null) + { + // add parameter + m_Param.putAll(reportInfo.getSubReport()); + addProcessParameters( m_AD_PInstance_ID, m_Param); + m_Param.put("RECORD_ID", new Integer( m_Record_ID)); + // Marco LOMBARDO: REPORT_HOME used to express subreports path. + m_Param.put("REPORT_HOME", REPORT_PATH__fix ); //System.getProperty("REPORT_HOME")); + // End Marco LOMBARDO. + Language currLang = Env.getLanguage(Env.getCtx()); + m_Param.put("CURRENT_LANG", currLang.getAD_Language()); + + java.sql.Connection conn = DB.getConnectionRO(); + m_Param.put("REPORT_CONNECTION", conn ); //DB_CONN + m_Param.put("DB_CONN", conn ); + System.out.println( "REPORT_CONNECTION = "+conn.toString() ); + log.saveError("REPORT_CONNECTION = "+conn.toString(), ""); + //System.out.println( "REPORT_HOME = "+System.getProperty("REPORT_HOME") ); + + // fill report + try + { + compiereDataSource ds = CompiereDataSourceFactory.createDataSource(m_ctx, reportInfo, m_pi, m_Param); + //compiereDataSource ds = new compiereDataSource (m_ctx, reportInfo.getJasperReport()); + m_jasperPrint = JasperFillManager.fillReport( reportInfo.getJasperReport(), m_Param, ds); + ds.close(); + + log.finest("ReportProcessor.fillReport"); + } + catch (JRException e) + { + m_jasperPrint = null; + e.printStackTrace(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + else + System.out.println("Error:" + reportInfo.getErrorMsg()); + + return m_jasperPrint; + }// runReport + + + private void addProcessParameters( int AD_PInstance_ID, Map params) + { + log.finest("ReportStarter.addProcessParameters"); + MPInstance pinstance = new MPInstance(m_ctx, AD_PInstance_ID, null); + MPInstancePara[] pinstancePara = pinstance.getParameters(); + + m_Record_ID = pinstance.getRecord_ID(); + params.put("AD_Client_ID",new Integer(pinstance.getAD_Client_ID())); + params.put("AD_Org_ID",new Integer(pinstance.getAD_Org_ID())); + + for(int i=0; i 0) + { + StringBuffer sbuffer = new StringBuffer(); + JRQueryChunk chunk = null; + for(int i = 0; i < chunks.length; i++) + { + chunk = chunks[i]; + switch (chunk.getType()) + { + case JRQueryChunk.TYPE_PARAMETER_CLAUSE : + { + String parameterName = chunk.getText(); + Object parameterValue = parameterValues.get(parameterName); + sbuffer.append(String.valueOf(parameterValue)); + //parameterNames.add(parameterName); +break; + } + case JRQueryChunk.TYPE_PARAMETER : + { + sbuffer.append("?"); + parameterNames.add(chunk.getText()); + break; + } + case JRQueryChunk.TYPE_TEXT : + default : + { + sbuffer.append(chunk.getText()); + break; + } + } + } + + queryString = sbuffer.toString(); + } + } + } + + + /** + * + */ + private PreparedStatement getStatement(Connection conn) throws JRException + { + PreparedStatement pstmt = null; + + if (queryString != null && queryString.trim().length() > 0) + { + try + { + pstmt = conn.prepareStatement(queryString); + + if (parameterNames != null && parameterNames.size() > 0) + { + JRParameter parameter = null; + String parameterName = null; + Class clazz = null; + Object parameterValue = null; + for(int i = 0; i < parameterNames.size(); i++) + { + parameterName = (String)parameterNames.get(i); + parameter = (JRParameter)parametersMap.get(parameterName); + clazz = parameter.getValueClass(); + //FIXMEparameterValue = jrParameter.getValue(); +parameterValue = parameterValues.get(parameterName); + + if ( clazz.equals(java.lang.Object.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.JAVA_OBJECT); + } + else + { + pstmt.setObject(i + 1, parameterValue); + } + } + else if ( clazz.equals(java.lang.Boolean.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.BIT); + } + else + { + pstmt.setBoolean(i + 1, ((Boolean)parameterValue).booleanValue()); + } + } + else if ( clazz.equals(java.lang.Byte.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.TINYINT); + } + else + { + pstmt.setByte(i + 1, ((Byte)parameterValue).byteValue()); + } + } + else if ( clazz.equals(java.lang.Double.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.DOUBLE); + } + else + { + pstmt.setDouble(i + 1, ((Double)parameterValue).doubleValue()); + } + } + else if ( clazz.equals(java.lang.Float.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.FLOAT); + } + else + { + pstmt.setFloat(i + 1, ((Float)parameterValue).floatValue()); + } + } + else if ( clazz.equals(java.lang.Integer.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.INTEGER); + } + else + { + pstmt.setInt(i + 1, ((Integer)parameterValue).intValue()); + } + } + else if ( clazz.equals(java.lang.Long.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.BIGINT); + } + else + { + pstmt.setLong(i + 1, ((Long)parameterValue).longValue()); + } + } + else if ( clazz.equals(java.lang.Short.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.SMALLINT); + } + else + { + pstmt.setShort(i + 1, ((Short)parameterValue).shortValue()); + } + } + else if ( clazz.equals(java.math.BigDecimal.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.DECIMAL); + } + else + { + pstmt.setBigDecimal(i + 1, (BigDecimal)parameterValue); + } + } + else if ( clazz.equals(java.lang.String.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.VARCHAR); + } + else + { + pstmt.setString(i + 1, parameterValue.toString()); + } + } + else if ( clazz.equals(java.util.Date.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.DATE); + } + else + { + pstmt.setDate( i + 1, new java.sql.Date( ((java.util.Date)parameterValue).getTime() ) ); + } + } + else if ( clazz.equals(java.sql.Timestamp.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.TIMESTAMP); + } + else + { + pstmt.setTimestamp( i + 1, (java.sql.Timestamp)parameterValue ); + } + } + else if ( clazz.equals(java.sql.Time.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.TIME); + } + else + { + pstmt.setTime( i + 1, (java.sql.Time)parameterValue ); + } + } + else + { + throw new JRException("Parameter type not supported in query : " + parameterName + " class " + clazz.getName()); + } + } + } + } + catch (SQLException e) + { + throw new JRException("Error preparing statement for executing the report query : " + "\n\n" + queryString + "\n\n", e); + } + } + + return pstmt; + } + + +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java new file mode 100644 index 0000000000..ac01699c40 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebService + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebService +{ + + /** TableName=WS_WebService */ + public static final String Table_Name = "WS_WebService"; + + /** AD_Table_ID=53162 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 4 - System + */ + BigDecimal accessLevel = BigDecimal.valueOf(4); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name WS_WebService_ID */ + public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID"; + + /** Set Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID); + + /** Get Web Service */ + public int getWS_WebService_ID(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java new file mode 100644 index 0000000000..a3d3746a36 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java @@ -0,0 +1,144 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceFieldInput + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceFieldInput +{ + + /** TableName=WS_WebServiceFieldInput */ + public static final String Table_Name = "WS_WebServiceFieldInput"; + + /** AD_Table_ID=53166 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Column_ID */ + public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; + + /** Set Column. + * Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID); + + /** Get Column. + * Column in the table + */ + public int getAD_Column_ID(); + + public I_AD_Column getAD_Column() throws RuntimeException; + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebServiceFieldInput_ID */ + public static final String COLUMNNAME_WS_WebServiceFieldInput_ID = "WS_WebServiceFieldInput_ID"; + + /** Set Web Service Field Input */ + public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID); + + /** Get Web Service Field Input */ + public int getWS_WebServiceFieldInput_ID(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java new file mode 100644 index 0000000000..b94ffc6887 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java @@ -0,0 +1,144 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceFieldOutput + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceFieldOutput +{ + + /** TableName=WS_WebServiceFieldOutput */ + public static final String Table_Name = "WS_WebServiceFieldOutput"; + + /** AD_Table_ID=53167 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Column_ID */ + public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; + + /** Set Column. + * Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID); + + /** Get Column. + * Column in the table + */ + public int getAD_Column_ID(); + + public I_AD_Column getAD_Column() throws RuntimeException; + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebServiceFieldOutput_ID */ + public static final String COLUMNNAME_WS_WebServiceFieldOutput_ID = "WS_WebServiceFieldOutput_ID"; + + /** Set Web Service Field Output */ + public void setWS_WebServiceFieldOutput_ID (int WS_WebServiceFieldOutput_ID); + + /** Get Web Service Field Output */ + public int getWS_WebServiceFieldOutput_ID(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java new file mode 100644 index 0000000000..3622b73c84 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java @@ -0,0 +1,181 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceMethod + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceMethod +{ + + /** TableName=WS_WebServiceMethod */ + public static final String Table_Name = "WS_WebServiceMethod"; + + /** AD_Table_ID=53163 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 4 - System + */ + BigDecimal accessLevel = BigDecimal.valueOf(4); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name WS_WebService_ID */ + public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID"; + + /** Set Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID); + + /** Get Web Service */ + public int getWS_WebService_ID(); + + public I_WS_WebService getWS_WebService() throws RuntimeException; + + /** Column name WS_WebServiceMethod_ID */ + public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID"; + + /** Set Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID); + + /** Get Web Service Method */ + public int getWS_WebServiceMethod_ID(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java new file mode 100644 index 0000000000..ddb89d7a90 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java @@ -0,0 +1,207 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceType + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceType +{ + + /** TableName=WS_WebServiceType */ + public static final String Table_Name = "WS_WebServiceType"; + + /** AD_Table_ID=53164 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_Table_ID */ + public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID"; + + /** Set Table. + * Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID); + + /** Get Table. + * Database Table information + */ + public int getAD_Table_ID(); + + public I_AD_Table getAD_Table() throws RuntimeException; + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name WS_WebService_ID */ + public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID"; + + /** Set Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID); + + /** Get Web Service */ + public int getWS_WebService_ID(); + + public I_WS_WebService getWS_WebService() throws RuntimeException; + + /** Column name WS_WebServiceMethod_ID */ + public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID"; + + /** Set Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID); + + /** Get Web Service Method */ + public int getWS_WebServiceMethod_ID(); + + public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException; + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java new file mode 100644 index 0000000000..0df41f4b74 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java @@ -0,0 +1,148 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceTypeAccess + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceTypeAccess +{ + + /** TableName=WS_WebServiceTypeAccess */ + public static final String Table_Name = "WS_WebServiceTypeAccess"; + + /** AD_Table_ID=53168 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_Role_ID */ + public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID"; + + /** Set Role. + * Responsibility Role + */ + public void setAD_Role_ID (int AD_Role_ID); + + /** Get Role. + * Responsibility Role + */ + public int getAD_Role_ID(); + + public I_AD_Role getAD_Role() throws RuntimeException; + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name IsReadWrite */ + public static final String COLUMNNAME_IsReadWrite = "IsReadWrite"; + + /** Set Read Write. + * Field is read / write + */ + public void setIsReadWrite (boolean IsReadWrite); + + /** Get Read Write. + * Field is read / write + */ + public boolean isReadWrite(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java new file mode 100644 index 0000000000..66e5feea41 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java @@ -0,0 +1,160 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebService_Para + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebService_Para +{ + + /** TableName=WS_WebService_Para */ + public static final String Table_Name = "WS_WebService_Para"; + + /** AD_Table_ID=53165 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name ConstantValue */ + public static final String COLUMNNAME_ConstantValue = "ConstantValue"; + + /** Set Constant Value. + * Constant value + */ + public void setConstantValue (String ConstantValue); + + /** Get Constant Value. + * Constant value + */ + public String getConstantValue(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name ParameterName */ + public static final String COLUMNNAME_ParameterName = "ParameterName"; + + /** Set Parameter Name */ + public void setParameterName (String ParameterName); + + /** Get Parameter Name */ + public String getParameterName(); + + /** Column name ParameterType */ + public static final String COLUMNNAME_ParameterType = "ParameterType"; + + /** Set Parameter Type */ + public void setParameterType (String ParameterType); + + /** Get Parameter Type */ + public String getParameterType(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebService_Para_ID */ + public static final String COLUMNNAME_WS_WebService_Para_ID = "WS_WebService_Para_ID"; + + /** Set Web Service Parameters */ + public void setWS_WebService_Para_ID (int WS_WebService_Para_ID); + + /** Get Web Service Parameters */ + public int getWS_WebService_Para_ID(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java new file mode 100644 index 0000000000..d4af46b820 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java @@ -0,0 +1,214 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package org.compiere.model; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.util.CCache; +import org.compiere.util.CLogger; +import org.compiere.util.DB; + +/** + * Web Services Model + * + * @author Carlos Ruiz + */ +public class MWebService extends X_WS_WebService +{ + /** + * + */ + private static final long serialVersionUID = 3561409141850981248L; + + /** + * Get MWebService from Cache + * @param ctx context + * @param WS_WebService_ID id + * @return MWebService + */ + public static MWebService get (Properties ctx, int WS_WebService_ID) + { + Integer key = new Integer (WS_WebService_ID); + MWebService retValue = (MWebService) s_cache.get (key); + if (retValue != null) + return retValue; + retValue = new MWebService (ctx, WS_WebService_ID, null); + if (retValue.get_ID () != 0) + s_cache.put (key, retValue); + return retValue; + } // get + + /** + * Get WebService from Cache + * @param ctx context + * @param webServiceValue + * @return Table + */ + public static MWebService get (Properties ctx, String webServiceValue) + { + if (webServiceValue == null) + return null; + Iterator it = s_cache.values().iterator(); + while (it.hasNext()) + { + MWebService retValue = it.next(); + if (webServiceValue.equals(retValue.getValue())) + return retValue; + } + // + MWebService retValue = null; + String sql = "SELECT * FROM WS_WebService WHERE Value=?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setString(1, webServiceValue); + rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MWebService (ctx, rs, null); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + if (retValue != null) + { + Integer key = new Integer (retValue.getWS_WebService_ID()); + s_cache.put (key, retValue); + } + return retValue; + } // get + + /** Methods */ + private X_WS_WebServiceMethod[] m_methods = null; + + /** + * Get Methods + * @param requery requery + * @return array of methods + */ + public X_WS_WebServiceMethod[] getMethods (boolean requery) + { + if (m_methods != null && !requery) + return m_methods; + String sql = "SELECT * FROM WS_WebServiceMethod WHERE WS_WebService_ID=? AND IsActive='Y' ORDER BY Value"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebService_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new X_WS_WebServiceMethod (getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_methods = new X_WS_WebServiceMethod[list.size ()]; + list.toArray (m_methods); + return m_methods; + } // getMethods + + /** + * Get Method + * @param methodValue + * @return method if found + */ + public X_WS_WebServiceMethod getMethod (String methodValue) + { + if (methodValue == null || methodValue.length() == 0) + return null; + getMethods(false); + // + for (int i = 0; i < m_methods.length; i++) + { + if (methodValue.equals(m_methods[i].getValue())) + return m_methods[i]; + } + return null; + } // getMethod + + /** Cache */ + private static CCache s_cache = new CCache("WS_WebService", 20); + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MWebService.class); + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param WS_WebService_ID + * @param trxName transaction + */ + public MWebService (Properties ctx, int WS_WebService_ID, String trxName) + { + super (ctx, WS_WebService_ID, trxName); + /** if (WS_WebService_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + } */ + } // MWebService + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MWebService (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MWebService + +} // MWebService diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java new file mode 100644 index 0000000000..7d9e9a1f91 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java @@ -0,0 +1,273 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* 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., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package org.compiere.model; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.DB; + +/** + * Web Services Type Model + * + * @author Carlos Ruiz + */ +public class MWebServiceType extends X_WS_WebServiceType +{ + /** + * + */ + private static final long serialVersionUID = 134887822892217528L; + + /** Parameters */ + private X_WS_WebService_Para[] m_para = null; + + /** Allowed input columns */ + private String[] m_inputcolumnnames = null; + /** Allowed output columns */ + private String[] m_outputcolumnnames = null; + + + /** + * Get Parameters + * @param requery requery + * @return array of methods + */ + public X_WS_WebService_Para[] getParameters (boolean requery) + { + if (m_para != null && !requery) + return m_para; + String sql = "SELECT * FROM WS_WebService_Para WHERE WS_WebServiceType_ID=? AND IsActive='Y' ORDER BY ParameterName"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebServiceType_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new X_WS_WebService_Para (getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_para = new X_WS_WebService_Para[list.size ()]; + list.toArray (m_para); + return m_para; + } // getParameters + + /** + * Get Parameter + * @param parameterName + * @return parameter if found + */ + public X_WS_WebService_Para getParameter (String parameterName) + { + if (parameterName == null || parameterName.length() == 0) + return null; + getParameters(false); + // + for (int i = 0; i < m_para.length; i++) + { + if (parameterName.equals(m_para[i].getParameterName())) + return m_para[i]; + } + return null; + } // getParameter + + /** + * Get Input Columnnames + * @param requery requery + * @return array of methods + */ + public String[] getInputColumnNames (boolean requery) + { + if (m_inputcolumnnames != null && !requery) + return m_inputcolumnnames; + String sql = "SELECT c.ColumnName FROM WS_WebServiceFieldInput f, AD_Column c " + + "WHERE f.WS_WebServiceType_ID=? " + + "AND c.AD_Column_ID=f.AD_Column_ID " + + "AND c.IsActive='Y' " + + "AND f.IsActive='Y' " + + "ORDER BY c.ColumnName"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebServiceType_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (rs.getString(1)); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_inputcolumnnames = new String[list.size ()]; + list.toArray (m_inputcolumnnames); + return m_inputcolumnnames; + } // getInputColumnNames + + /** + * Is Input Column Name Allowed + * @param columnName + * @return true if allowed + */ + public boolean isInputColumnNameAllowed (String columnName) + { + if (columnName == null || columnName.length() == 0) + return false; + getInputColumnNames(false); + // + for (int i = 0; i < m_inputcolumnnames.length; i++) + { + if (columnName.equals(m_inputcolumnnames[i])) + return true; + } + return false; + } // isInputColumnNameAllowed + + /** + * Get Output Columnnames + * @param requery requery + * @return array of methods + */ + public String[] getOutputColumnNames (boolean requery) + { + if (m_outputcolumnnames != null && !requery) + return m_outputcolumnnames; + String sql = "SELECT c.ColumnName FROM WS_WebServiceFieldOutput f, AD_Column c " + + "WHERE f.WS_WebServiceType_ID=? " + + "AND c.AD_Column_ID=f.AD_Column_ID " + + "AND c.IsActive='Y' " + + "AND f.IsActive='Y' " + + "ORDER BY c.ColumnName"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebServiceType_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (rs.getString(1)); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_outputcolumnnames = new String[list.size ()]; + list.toArray (m_outputcolumnnames); + return m_outputcolumnnames; + } // getOutputColumnNames + + /** + * Is Output Column Name Allowed + * @param columnName + * @return true if allowed + */ + public boolean isOutputColumnNameAllowed (String columnName) + { + if (columnName == null || columnName.length() == 0) + return false; + getOutputColumnNames(false); + // + for (int i = 0; i < m_outputcolumnnames.length; i++) + { + if (columnName.equals(m_outputcolumnnames[i])) + return true; + } + return false; + } // isOutputColumnNameAllowed + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MWebServiceType.class); + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param WS_WebServiceType_ID + * @param trxName transaction + */ + public MWebServiceType (Properties ctx, int WS_WebServiceType_ID, String trxName) + { + super (ctx, WS_WebServiceType_ID, trxName); + /** if (WS_WebServiceType_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + setWS_WebServiceMethod_ID (0); + setWS_WebServiceType_ID (0); + } */ + } // MWebServiceType + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MWebServiceType (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MWebServiceType + +} // MWebServiceType diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java new file mode 100644 index 0000000000..286d6bf5f5 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebService + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebService extends PO implements I_WS_WebService, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebService (Properties ctx, int WS_WebService_ID, String trxName) + { + super (ctx, WS_WebService_ID, trxName); + /** if (WS_WebService_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebService (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 4 - System + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebService[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Set Web Service. + @param WS_WebService_ID Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID) + { + if (WS_WebService_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID)); + } + + /** Get Web Service. + @return Web Service */ + public int getWS_WebService_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java new file mode 100644 index 0000000000..c7a0ba6901 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java @@ -0,0 +1,154 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceFieldInput + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceFieldInput extends PO implements I_WS_WebServiceFieldInput, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceFieldInput (Properties ctx, int WS_WebServiceFieldInput_ID, String trxName) + { + super (ctx, WS_WebServiceFieldInput_ID, trxName); + /** if (WS_WebServiceFieldInput_ID == 0) + { + setWS_WebServiceFieldInput_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceFieldInput (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceFieldInput[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Column getAD_Column() throws RuntimeException + { + return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name) + .getPO(getAD_Column_ID(), get_TrxName()); } + + /** Set Column. + @param AD_Column_ID + Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID) + { + if (AD_Column_ID < 1) + set_Value (COLUMNNAME_AD_Column_ID, null); + else + set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID)); + } + + /** Get Column. + @return Column in the table + */ + public int getAD_Column_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Web Service Field Input. + @param WS_WebServiceFieldInput_ID Web Service Field Input */ + public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID) + { + if (WS_WebServiceFieldInput_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, Integer.valueOf(WS_WebServiceFieldInput_ID)); + } + + /** Get Web Service Field Input. + @return Web Service Field Input */ + public int getWS_WebServiceFieldInput_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldInput_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getWS_WebServiceFieldInput_ID())); + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java new file mode 100644 index 0000000000..88e6b40ed4 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java @@ -0,0 +1,154 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceFieldOutput + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceFieldOutput extends PO implements I_WS_WebServiceFieldOutput, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceFieldOutput (Properties ctx, int WS_WebServiceFieldOutput_ID, String trxName) + { + super (ctx, WS_WebServiceFieldOutput_ID, trxName); + /** if (WS_WebServiceFieldOutput_ID == 0) + { + setWS_WebServiceFieldOutput_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceFieldOutput (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceFieldOutput[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Column getAD_Column() throws RuntimeException + { + return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name) + .getPO(getAD_Column_ID(), get_TrxName()); } + + /** Set Column. + @param AD_Column_ID + Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID) + { + if (AD_Column_ID < 1) + set_Value (COLUMNNAME_AD_Column_ID, null); + else + set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID)); + } + + /** Get Column. + @return Column in the table + */ + public int getAD_Column_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Web Service Field Output. + @param WS_WebServiceFieldOutput_ID Web Service Field Output */ + public void setWS_WebServiceFieldOutput_ID (int WS_WebServiceFieldOutput_ID) + { + if (WS_WebServiceFieldOutput_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldOutput_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldOutput_ID, Integer.valueOf(WS_WebServiceFieldOutput_ID)); + } + + /** Get Web Service Field Output. + @return Web Service Field Output */ + public int getWS_WebServiceFieldOutput_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldOutput_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getWS_WebServiceFieldOutput_ID())); + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java new file mode 100644 index 0000000000..77cb660e6f --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java @@ -0,0 +1,195 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceMethod + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceMethod extends PO implements I_WS_WebServiceMethod, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceMethod (Properties ctx, int WS_WebServiceMethod_ID, String trxName) + { + super (ctx, WS_WebServiceMethod_ID, trxName); + /** if (WS_WebServiceMethod_ID == 0) + { + setName (null); + setValue (null); + setWS_WebServiceMethod_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceMethod (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 4 - System + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceMethod[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + public I_WS_WebService getWS_WebService() throws RuntimeException + { + return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_Name) + .getPO(getWS_WebService_ID(), get_TrxName()); } + + /** Set Web Service. + @param WS_WebService_ID Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID) + { + if (WS_WebService_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID)); + } + + /** Get Web Service. + @return Web Service */ + public int getWS_WebService_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getWS_WebService_ID())); + } + + /** Set Web Service Method. + @param WS_WebServiceMethod_ID Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID) + { + if (WS_WebServiceMethod_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceMethod_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceMethod_ID, Integer.valueOf(WS_WebServiceMethod_ID)); + } + + /** Get Web Service Method. + @return Web Service Method */ + public int getWS_WebServiceMethod_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceMethod_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java new file mode 100644 index 0000000000..20650b5da3 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java @@ -0,0 +1,250 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceType + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceType extends PO implements I_WS_WebServiceType, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceType (Properties ctx, int WS_WebServiceType_ID, String trxName) + { + super (ctx, WS_WebServiceType_ID, trxName); + /** if (WS_WebServiceType_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + setWS_WebServiceMethod_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceType (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceType[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Table getAD_Table() throws RuntimeException + { + return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name) + .getPO(getAD_Table_ID(), get_TrxName()); } + + /** Set Table. + @param AD_Table_ID + Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID) + { + if (AD_Table_ID < 1) + set_Value (COLUMNNAME_AD_Table_ID, null); + else + set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); + } + + /** Get Table. + @return Database Table information + */ + public int getAD_Table_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + public I_WS_WebService getWS_WebService() throws RuntimeException + { + return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_Name) + .getPO(getWS_WebService_ID(), get_TrxName()); } + + /** Set Web Service. + @param WS_WebService_ID Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID) + { + if (WS_WebService_ID < 1) + set_Value (COLUMNNAME_WS_WebService_ID, null); + else + set_Value (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID)); + } + + /** Get Web Service. + @return Web Service */ + public int getWS_WebService_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException + { + return (I_WS_WebServiceMethod)MTable.get(getCtx(), I_WS_WebServiceMethod.Table_Name) + .getPO(getWS_WebServiceMethod_ID(), get_TrxName()); } + + /** Set Web Service Method. + @param WS_WebServiceMethod_ID Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID) + { + if (WS_WebServiceMethod_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceMethod_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceMethod_ID, Integer.valueOf(WS_WebServiceMethod_ID)); + } + + /** Get Web Service Method. + @return Web Service Method */ + public int getWS_WebServiceMethod_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceMethod_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java new file mode 100644 index 0000000000..dbe493a5f7 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java @@ -0,0 +1,151 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for WS_WebServiceTypeAccess + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceTypeAccess extends PO implements I_WS_WebServiceTypeAccess, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceTypeAccess (Properties ctx, int WS_WebServiceTypeAccess_ID, String trxName) + { + super (ctx, WS_WebServiceTypeAccess_ID, trxName); + /** if (WS_WebServiceTypeAccess_ID == 0) + { + setAD_Role_ID (0); + setIsReadWrite (true); +// Y + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceTypeAccess (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceTypeAccess[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Role getAD_Role() throws RuntimeException + { + return (I_AD_Role)MTable.get(getCtx(), I_AD_Role.Table_Name) + .getPO(getAD_Role_ID(), get_TrxName()); } + + /** Set Role. + @param AD_Role_ID + Responsibility Role + */ + public void setAD_Role_ID (int AD_Role_ID) + { + if (AD_Role_ID < 0) + set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null); + else + set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); + } + + /** Get Role. + @return Responsibility Role + */ + public int getAD_Role_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Read Write. + @param IsReadWrite + Field is read / write + */ + public void setIsReadWrite (boolean IsReadWrite) + { + set_Value (COLUMNNAME_IsReadWrite, Boolean.valueOf(IsReadWrite)); + } + + /** Get Read Write. + @return Field is read / write + */ + public boolean isReadWrite () + { + Object oo = get_Value(COLUMNNAME_IsReadWrite); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java new file mode 100644 index 0000000000..345fe07365 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * 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. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for WS_WebService_Para + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebService_Para extends PO implements I_WS_WebService_Para, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebService_Para (Properties ctx, int WS_WebService_Para_ID, String trxName) + { + super (ctx, WS_WebService_Para_ID, trxName); + /** if (WS_WebService_Para_ID == 0) + { + setParameterType (null); + setWS_WebService_Para_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebService_Para (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebService_Para[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Constant Value. + @param ConstantValue + Constant value + */ + public void setConstantValue (String ConstantValue) + { + set_Value (COLUMNNAME_ConstantValue, ConstantValue); + } + + /** Get Constant Value. + @return Constant value + */ + public String getConstantValue () + { + return (String)get_Value(COLUMNNAME_ConstantValue); + } + + /** Set Parameter Name. + @param ParameterName Parameter Name */ + public void setParameterName (String ParameterName) + { + set_ValueNoCheck (COLUMNNAME_ParameterName, ParameterName); + } + + /** Get Parameter Name. + @return Parameter Name */ + public String getParameterName () + { + return (String)get_Value(COLUMNNAME_ParameterName); + } + + /** ParameterType AD_Reference_ID=53288 */ + public static final int PARAMETERTYPE_AD_Reference_ID=53288; + /** Constant = C */ + public static final String PARAMETERTYPE_Constant = "C"; + /** Free = F */ + public static final String PARAMETERTYPE_Free = "F"; + /** Set Parameter Type. + @param ParameterType Parameter Type */ + public void setParameterType (String ParameterType) + { + + set_Value (COLUMNNAME_ParameterType, ParameterType); + } + + /** Get Parameter Type. + @return Parameter Type */ + public String getParameterType () + { + return (String)get_Value(COLUMNNAME_ParameterType); + } + + /** Set Web Service Parameters. + @param WS_WebService_Para_ID Web Service Parameters */ + public void setWS_WebService_Para_ID (int WS_WebService_Para_ID) + { + if (WS_WebService_Para_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebService_Para_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebService_Para_ID, Integer.valueOf(WS_WebService_Para_ID)); + } + + /** Get Web Service Parameters. + @return Web Service Parameters */ + public int getWS_WebService_Para_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_Para_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java new file mode 100644 index 0000000000..d9c948cd4e --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java @@ -0,0 +1,28 @@ +package org.idempiere.webservices; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class WebServiceActivator implements BundleActivator{ + private static BundleContext bundleContext = null; + + /* (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + bundleContext = context; + } + + /* (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + bundleContext = null; + } + + public static BundleContext getBundleContext() { + return bundleContext; + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java new file mode 100644 index 0000000000..0c882cddf2 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java @@ -0,0 +1,27 @@ +package org.idempiere.webservices.fault; + +import javax.xml.namespace.QName; +import javax.xml.ws.WebFault; + +@WebFault(name="IdempiereServiceFault") +public class IdempiereServiceFault extends RuntimeException{ + + public IdempiereServiceFault(String string, QName qName) { + // TODO Auto-generated constructor stub + } + + public IdempiereServiceFault(String string, Throwable cause, QName qName) { + // TODO Auto-generated constructor stub + } + + public IdempiereServiceFault(Exception exception) { + // TODO Auto-generated constructor stub + } + + /** + * + */ + private static final long serialVersionUID = -5899509711372844325L; + + +} diff --git a/org.idempiere.webservices/WEB-INF/web.xml b/org.idempiere.webservices/WEB-INF/web.xml new file mode 100644 index 0000000000..919c265dab --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/web.xml @@ -0,0 +1,31 @@ + + + + + + + CXFServlet + CXF Servlet + + org.apache.cxf.transport.servlet.CXFServlet + + + config-location + /META-INF/cxf/services.xml + + 1 + + + + CXFServlet + /services/* + + + + 15 + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd b/org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd new file mode 100644 index 0000000000..c0a5100754 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/obschema.xsd b/org.idempiere.webservices/WEB-INF/xsd/obschema.xsd new file mode 100644 index 0000000000..6a7a15dc6b --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/obschema.xsd @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/schema.xsd b/org.idempiere.webservices/WEB-INF/xsd/schema.xsd new file mode 100644 index 0000000000..200a0caa40 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/schema.xsd @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/build.properties b/org.idempiere.webservices/build.properties new file mode 100644 index 0000000000..9312434dee --- /dev/null +++ b/org.idempiere.webservices/build.properties @@ -0,0 +1,28 @@ +source.. = src/,\ + WEB-INF/src/ +output.. = WEB-INF/classes/ +bin.includes = META-INF/,\ + .,\ + WEB-INF/classes/,\ + WEB-INF/web.xml,\ + WEB-INF/xsd/,\ + WEB-INF/lib/spring-web-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-context-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-core-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar,\ + WEB-INF/lib/wsdl4j-1.6.2.jar,\ + WEB-INF/lib/cxf-2.6.2.jar,\ + WEB-INF/lib/neethi-3.0.2.jar,\ + WEB-INF/lib/xmlschema-core-2.0.3.jar,\ + WEB-INF/lib/stax2-api-3.1.1.jar,\ + WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar,\ + WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar,\ + WEB-INF/lib/generated_xbeans.jar,\ + WEB-INF/lib/xmlbeans-2.5.0.jar,\ + WEB-INF/lib/composite_XMLSBean.jar +src.includes = WEB-INF/classes/,\ + WEB-INF/lib/,\ + WEB-INF/web.xml,\ + WEB-INF/xsd/ diff --git a/org.idempiere.webservices/migration/oracle/WS001_WebServices.sql b/org.idempiere.webservices/migration/oracle/WS001_WebServices.sql new file mode 100644 index 0000000000..843eaf48ef --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS001_WebServices.sql @@ -0,0 +1,1538 @@ +-- Jan 30, 2009 5:51:53 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53067,TO_DATE('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Definition','N',TO_DATE('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53067 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53067,TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53067,TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53067,TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53068,TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Security','N',TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53068 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53068,TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53068,TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53068,TO_DATE('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53162,53067,'N',TO_DATE('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service','L','WS_WebService',TO_DATE('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53162 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53256,TO_DATE('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService',1,'Y','N','Y','Y','WS_WebService','N',1000000,TO_DATE('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56694,102,0,19,53162,129,'AD_Client_ID',TO_DATE('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56694 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56695,113,0,19,53162,104,'AD_Org_ID',TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56695 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56696,245,0,16,53162,'Created',TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56696 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56697,246,0,18,110,53162,'CreatedBy',TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56697 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56698,275,0,10,53162,'Description',TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56698 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56699,326,0,14,53162,'Help',TO_DATE('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56699 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56700,348,0,20,53162,'IsActive',TO_DATE('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56700 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53766,0,'WS_WebService_ID',TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service','Web Service',TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53766 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56701,53766,0,13,53162,'WS_WebService_ID',TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service',0,TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56701 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56702,469,0,10,53162,'Name',TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56702 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56703,607,0,16,53162,'Updated',TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56703 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56704,608,0,18,110,53162,'UpdatedBy',TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56704 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56705,620,0,10,53162,'Value',TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56705 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53163,53067,'N',TO_DATE('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Method','L','WS_WebServiceMethod',TO_DATE('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53163 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53257,TO_DATE('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceMethod',1,'Y','N','Y','Y','WS_WebServiceMethod','N',1000000,TO_DATE('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56706,102,0,19,53163,129,'AD_Client_ID',TO_DATE('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56706 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56707,113,0,19,53163,104,'AD_Org_ID',TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56707 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56708,245,0,16,53163,'Created',TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56708 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56709,246,0,18,110,53163,'CreatedBy',TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56709 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56710,275,0,10,53163,'Description',TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56710 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56711,326,0,14,53163,'Help',TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56711 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56712,348,0,20,53163,'IsActive',TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56712 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53767,0,'WS_WebServiceMethod_ID',TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Method','Web Service Method',TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53767 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56713,53767,0,13,53163,'WS_WebServiceMethod_ID',TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Method',0,TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56713 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56714,469,0,10,53163,'Name',TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56714 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56715,607,0,16,53163,'Updated',TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56715 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56716,608,0,18,110,53163,'UpdatedBy',TO_DATE('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56716 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56717,620,0,10,53163,'Value',TO_DATE('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_DATE('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56717 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56718,53766,0,19,53163,'WS_WebService_ID',TO_DATE('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','Y','N','N','Y','N','N','N','N','Web Service',1,TO_DATE('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56718 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebService (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, Value NVARCHAR2(40) NOT NULL, WS_WebService_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebService_Key PRIMARY KEY (WS_WebService_ID)) +; + +CREATE TABLE WS_WebServiceMethod (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, Value NVARCHAR2(40) NOT NULL, WS_WebService_ID NUMBER(10), WS_WebServiceMethod_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceMethod_Key PRIMARY KEY (WS_WebServiceMethod_ID)) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53185,53162,53067,TO_DATE('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service','N',10,0,TO_DATE('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53185 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56718,0,53186,53163,53067,TO_DATE('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Method','N',20,1,TO_DATE('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53186 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56700,56628,0,53185,TO_DATE('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56628 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56694,56629,0,53185,TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56629 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56699,56630,0,53185,TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56630 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56698,56631,0,53185,TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56631 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56702,56632,0,53185,TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56632 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56695,56633,0,53185,TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56633 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56705,56634,0,53185,TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56634 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56701,56635,0,53185,TO_DATE('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service',TO_DATE('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56635 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56712,56636,0,53186,TO_DATE('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56636 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56706,56637,0,53186,TO_DATE('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56637 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56711,56638,0,53186,TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56638 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56710,56639,0,53186,TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56639 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56714,56640,0,53186,TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56640 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56707,56641,0,53186,TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56641 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56717,56642,0,53186,TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56642 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56718,56643,0,53186,TO_DATE('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_DATE('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56643 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56713,56644,0,53186,TO_DATE('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Method',TO_DATE('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56644 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56629 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56634 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56632 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56631 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56630 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56628 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56637 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56643 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56642 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56640 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56639 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56638 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56636 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:06:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 18:07:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56643 +; + +INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53200,0,53067,TO_DATE('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Services',TO_DATE('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53200 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 53200, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53200) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=450 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=446 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=439 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=440 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=594 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50009 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53200 +; + +INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53201,0,53068,TO_DATE('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Service Security',TO_DATE('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53201 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 53201, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53201) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=147 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=487 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=150 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=495 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50007 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=362 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=366 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=483 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=368 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=508 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53201 +; + +-- Jan 30, 2009 6:13:02 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53164,53068,'N',TO_DATE('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type','L','WS_WebServiceType',TO_DATE('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53164 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53258,TO_DATE('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceType',1,'Y','N','Y','Y','WS_WebServiceType','N',1000000,TO_DATE('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53165,53068,'N',TO_DATE('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Parameters','L','WS_WebService_Para',TO_DATE('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53165 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53259,TO_DATE('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService_Para',1,'Y','N','Y','Y','WS_WebService_Para','N',1000000,TO_DATE('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53166,53068,'N',TO_DATE('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Input','L','WS_WebServiceFieldInput',TO_DATE('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53166 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53260,TO_DATE('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldInput',1,'Y','N','Y','Y','WS_WebServiceFieldInput','N',1000000,TO_DATE('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53167,53068,'N',TO_DATE('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Output','L','WS_WebServiceFieldOutput',TO_DATE('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53167 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53261,TO_DATE('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldOutput',1,'Y','N','Y','Y','WS_WebServiceFieldOutput','N',1000000,TO_DATE('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53168,53068,'N',TO_DATE('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type Access','L','WS_WebServiceTypeAccess',TO_DATE('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53168 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53262,TO_DATE('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceTypeAccess',1,'Y','N','Y','Y','WS_WebServiceTypeAccess','N',1000000,TO_DATE('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Table SET IsChangeLog='N',Updated=TO_DATE('2009-01-30 18:15:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53168 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56719,102,0,19,53164,129,'AD_Client_ID',TO_DATE('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56719 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56720,113,0,19,53164,104,'AD_Org_ID',TO_DATE('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56720 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56721,245,0,16,53164,'Created',TO_DATE('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56721 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56722,246,0,18,110,53164,'CreatedBy',TO_DATE('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56722 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56723,275,0,10,53164,'Description',TO_DATE('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56723 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56724,326,0,14,53164,'Help',TO_DATE('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56724 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56725,348,0,20,53164,'IsActive',TO_DATE('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56725 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53768,0,'WS_WebServiceType_ID',TO_DATE('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Type','Web Service Type',TO_DATE('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53768 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56726,53768,0,13,53164,'WS_WebServiceType_ID',TO_DATE('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Type',0,TO_DATE('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56726 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56727,469,0,10,53164,'Name',TO_DATE('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_DATE('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56727 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56728,607,0,16,53164,'Updated',TO_DATE('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56728 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56729,608,0,18,110,53164,'UpdatedBy',TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56729 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56730,620,0,10,53164,'Value',TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56730 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56731,53766,0,19,53164,'WS_WebService_ID',TO_DATE('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service',0,TO_DATE('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56731 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52044,'WS_WebService_ID=@WS_WebService_ID@',TO_DATE('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Methods from Web Service','S',TO_DATE('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56732,53767,0,19,53164,52044,'WS_WebServiceMethod_ID',TO_DATE('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service Method',0,TO_DATE('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56732 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56733,126,0,19,53164,'AD_Table_ID',TO_DATE('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','N','N','N','N','N','N','N','N','N','Y','Table',0,TO_DATE('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56733 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2009-01-30 18:21:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56732 +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2009-01-30 18:21:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56731 +; + +CREATE TABLE WS_WebServiceType (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Table_ID NUMBER(10), Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, Value NVARCHAR2(40) NOT NULL, WS_WebService_ID NUMBER(10) NOT NULL, WS_WebServiceMethod_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceType_Key PRIMARY KEY (WS_WebServiceType_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56734,102,0,19,53165,'AD_Client_ID',TO_DATE('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56734 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56735,113,0,19,53165,104,'AD_Org_ID',TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56735 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56736,128,0,13,53165,'AD_Task_ID',TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56736 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53769,0,'WS_WebService_Para_ID',TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Parameters','Web Service Parameters',TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53769 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56737,53769,0,13,53165,'WS_WebService_Para_ID',TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Parameters',1,TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56737 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56738,245,0,16,53165,'Created',TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56738 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56739,246,0,18,110,53165,'CreatedBy',TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56739 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56740,348,0,20,53165,'IsActive',TO_DATE('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56740 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56741,607,0,16,53165,'Updated',TO_DATE('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56741 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56742,608,0,18,110,53165,'UpdatedBy',TO_DATE('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56742 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsIdentifier='N', IsUpdateable='N', SeqNo=0,Updated=TO_DATE('2009-01-30 18:27:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56737 +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_DATE('2009-01-30 18:28:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56736 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56736 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56736 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,ColumnSQL,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56743,1196,0,10,53165,'ParameterName','A',TO_DATE('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,'D',60,'Y','N','N','N','N','N','N','N','N','N','N','Parameter Name',0,TO_DATE('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56743 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53770,0,'ParameterType',TO_DATE('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Parameter Type','Parameter Type',TO_DATE('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53770 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,Help,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53288,TO_DATE('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'D',NULL,'Y','N','WS Parameter Type',TO_DATE('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53288 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53451,TO_DATE('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Constant',TO_DATE('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53451 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53452,TO_DATE('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Free',TO_DATE('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'F') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53452 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56744,53770,0,17,53288,53165,'ParameterType',TO_DATE('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,'D',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Parameter Type',0,TO_DATE('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56744 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56745,1322,0,10,53165,'ConstantValue',TO_DATE('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,'Constant value','D',60,'Y','N','N','N','N','N','N','N','N','N','Y','Constant Value',0,TO_DATE('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56745 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_DATE('2009-01-30 18:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56734 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_DATE('2009-01-30 18:35:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56735 +; + +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_DATE('2009-01-30 18:35:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56746,102,0,19,53166,'AD_Client_ID',TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56746 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56747,113,0,19,53166,104,'AD_Org_ID',TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56747 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56748,128,0,13,53166,'AD_Task_ID',TO_DATE('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_DATE('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56748 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53771,0,'WS_WebServiceFieldInput_ID',TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Input','Web Service Field Input',TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53771 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56749,53771,0,13,53166,'WS_WebServiceFieldInput_ID',TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Input',1,TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56749 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56750,245,0,16,53166,'Created',TO_DATE('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56750 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56751,246,0,18,110,53166,'CreatedBy',TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56751 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56752,348,0,20,53166,'IsActive',TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56752 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56753,607,0,16,53166,'Updated',TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56753 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56754,608,0,18,110,53166,'UpdatedBy',TO_DATE('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56754 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_DATE('2009-01-30 18:37:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56748 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56748 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56748 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56755,104,0,19,53166,100,'AD_Column_ID',TO_DATE('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_DATE('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56755 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_DATE('2009-01-30 18:39:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56746 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_DATE('2009-01-30 18:39:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56747 +; + +CREATE TABLE WS_WebServiceFieldInput (AD_Client_ID NUMBER(10) NOT NULL, AD_Column_ID NUMBER(10), AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10), WS_WebServiceFieldInput_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceFieldInput_Key PRIMARY KEY (WS_WebServiceFieldInput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56756,102,0,19,53167,'AD_Client_ID',TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56756 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56757,104,0,19,53167,100,'AD_Column_ID',TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56757 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56758,113,0,19,53167,104,'AD_Org_ID',TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56758 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56759,245,0,16,53167,'Created',TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56759 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56760,246,0,18,110,53167,'CreatedBy',TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56760 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56761,348,0,20,53167,'IsActive',TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56761 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56762,607,0,16,53167,'Updated',TO_DATE('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56762 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56763,608,0,18,110,53167,'UpdatedBy',TO_DATE('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56763 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53772,0,'WS_WebServiceFieldOutput_ID',TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Output','Web Service Field Output',TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53772 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56764,53772,0,13,53167,'WS_WebServiceFieldOutput_ID',TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Output',1,TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56764 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56765,53768,0,19,53167,'WS_WebServiceType_ID',TO_DATE('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','Y','N','N','N','N','Y','Web Service Type',0,TO_DATE('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56765 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebServiceFieldOutput (AD_Client_ID NUMBER(10) NOT NULL, AD_Column_ID NUMBER(10), AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10), WS_WebServiceFieldOutput_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceFieldOutput_Key PRIMARY KEY (WS_WebServiceFieldOutput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56766,102,0,19,53168,'AD_Client_ID',TO_DATE('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56766 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56767,113,0,19,53168,104,'AD_Org_ID',TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56767 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56768,123,0,19,53168,'AD_Role_ID',TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role','D',22,'The Role determines security and access a user who has this Role will have in the System.','Y','N','N','N','N','Y','Y','N','N','N','N','Role',0,TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56768 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56769,143,0,19,53168,'AD_Window_ID',TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window','D',22,'The Window field identifies a unique Window in the system.','Y','N','N','N','N','Y','Y','N','N','N','N','Window',0,TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56769 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56770,245,0,16,53168,'Created',TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56770 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56771,246,0,18,110,53168,'CreatedBy',TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56771 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56772,348,0,20,53168,'IsActive',TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56772 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56773,406,0,20,53168,'IsReadWrite',TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write','D',1,'The Read Write indicates that this field may be read and updated.','Y','N','N','N','N','Y','N','N','N','N','Y','Read Write',0,TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56773 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56774,607,0,16,53168,'Updated',TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56774 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56775,608,0,18,110,53168,'UpdatedBy',TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56775 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, IsUpdateable='N', Name='Web Service Type',Updated=TO_DATE('2009-01-30 18:41:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56769 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56769 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56769 AND IsCentrallyMaintained='Y' +; + +UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2009-01-30 18:41:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56773 +; + +CREATE TABLE WS_WebServiceTypeAccess (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Role_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsReadWrite CHAR(1) DEFAULT 'Y' CHECK (IsReadWrite IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceTypeAccess_Key PRIMARY KEY (AD_Role_ID, WS_WebServiceType_ID)) +; + +UPDATE AD_Column SET ColumnSQL=NULL,Updated=TO_DATE('2009-01-30 18:45:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56743 +; + +CREATE TABLE WS_WebService_Para (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, ConstantValue NVARCHAR2(60), Created DATE NOT NULL, CreatedBy NUMBER(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, ParameterName NVARCHAR2(60), ParameterType CHAR(1) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10), WS_WebService_Para_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebService_Para_Key PRIMARY KEY (WS_WebService_Para_ID)) +; + +ALTER TABLE WS_WebServiceFieldInput ADD (CONSTRAINT ADColumn_WSWebServiceFieldInpu FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column); + +ALTER TABLE WS_WebServiceFieldInput ADD (CONSTRAINT WSWebServiceType_WSWebServicFI FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +ALTER TABLE WS_WebServiceFieldOutput ADD (CONSTRAINT ADColumn_WSWebServiceFieldOutp FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column); + +ALTER TABLE WS_WebServiceFieldOutput ADD (CONSTRAINT WSWebServiceType_WSWebServicFO FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +ALTER TABLE WS_WebServiceMethod ADD (CONSTRAINT WSWebService_WSWebServiceMetho FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService); + +ALTER TABLE WS_WebService_Para ADD (CONSTRAINT WSWebServiceType_WSWebServiceP FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +ALTER TABLE WS_WebServiceType ADD (CONSTRAINT ADTable_WSWebServiceType FOREIGN KEY (AD_Table_ID) REFERENCES AD_Table); + +ALTER TABLE WS_WebServiceType ADD (CONSTRAINT WSWebService_WSWebServiceType FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService); + +ALTER TABLE WS_WebServiceType ADD (CONSTRAINT WSWebServiceMethod_WSWebServic FOREIGN KEY (WS_WebServiceMethod_ID) REFERENCES WS_WebServiceMethod); + +ALTER TABLE WS_WebServiceTypeAccess ADD (CONSTRAINT ADRole_WSWebServiceTypeAccess FOREIGN KEY (AD_Role_ID) REFERENCES AD_Role); + +ALTER TABLE WS_WebServiceTypeAccess ADD (CONSTRAINT WSWebServiceType_WSWebServiceT FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +-- Jan 30, 2009 6:55:49 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53187,53164,53068,TO_DATE('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','Y','N','N','Web Service Type','N',10,0,TO_DATE('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53187 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56725,56645,0,53187,TO_DATE('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56645 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56719,56646,0,53187,TO_DATE('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56646 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56724,56647,0,53187,TO_DATE('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_DATE('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56647 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56723,56648,0,53187,TO_DATE('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56648 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56727,56649,0,53187,TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56649 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56720,56650,0,53187,TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56650 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56730,56651,0,53187,TO_DATE('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_DATE('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56651 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56733,56652,0,53187,TO_DATE('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',TO_DATE('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56652 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56731,56653,0,53187,TO_DATE('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_DATE('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56653 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56732,56654,0,53187,TO_DATE('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service Method',TO_DATE('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56654 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56726,56655,0,53187,TO_DATE('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56655 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56646 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56650 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56651 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56649 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56653 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56654 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56652 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56648 +; + +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=56647 +; + +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=56645 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:57:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56650 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56736,0,53188,53165,53068,TO_DATE('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Parameters','N',20,1,TO_DATE('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53188 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56740,56656,0,53188,TO_DATE('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56656 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56734,56657,0,53188,TO_DATE('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56657 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56745,56658,0,53188,TO_DATE('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100,'Constant value',60,'D','Y','Y','Y','N','N','N','N','N','Constant Value',TO_DATE('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56658 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56735,56659,0,53188,TO_DATE('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56659 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56743,56660,0,53188,TO_DATE('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100,60,'D','Y','Y','Y','N','N','N','N','N','Parameter Name',TO_DATE('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56660 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56744,56661,0,53188,TO_DATE('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Parameter Type',TO_DATE('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56661 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56737,56662,0,53188,TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Parameters',TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56662 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56736,56663,0,53188,TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56663 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56657 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56663 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56660 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56661 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56656 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:58:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:59:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET DisplayLogic='@ParameterType@=''C''',Updated=TO_DATE('2009-01-30 18:59:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Column SET ReadOnlyLogic='@ParameterType@!C',Updated=TO_DATE('2009-01-30 18:59:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56748,0,53189,53166,53068,TO_DATE('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Input','N',30,1,TO_DATE('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53189 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56752,56664,0,53189,TO_DATE('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56664 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56746,56665,0,53189,TO_DATE('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56665 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56755,56666,0,53189,TO_DATE('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_DATE('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56666 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56747,56667,0,53189,TO_DATE('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56667 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56749,56668,0,53189,TO_DATE('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Input',TO_DATE('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56668 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56748,56669,0,53189,TO_DATE('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56669 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56665 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56669 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56666 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56664 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 19:03:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 19:03:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56669 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53190,53167,53068,TO_DATE('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Output','N',40,1,TO_DATE('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53190 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56761,56670,0,53190,TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56670 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56756,56671,0,53190,TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56671 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56757,56672,0,53190,TO_DATE('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_DATE('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56672 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56758,56673,0,53190,TO_DATE('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56673 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56764,56674,0,53190,TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Output',TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56674 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56765,56675,0,53190,TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56675 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56671 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56675 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56672 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56670 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 19:03:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 19:04:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56675 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56769,0,53191,53168,53068,TO_DATE('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Access','N',50,1,TO_DATE('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53191 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56772,56676,0,53191,TO_DATE('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56676 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56766,56677,0,53191,TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56677 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56767,56678,0,53191,TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56678 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56773,56679,0,53191,TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write',1,'D','The Read Write indicates that this field may be read and updated.','Y','Y','Y','N','N','N','N','N','Read Write',TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56679 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56768,56680,0,53191,TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role',22,'D','The Role determines security and access a user who has this Role will have in the System.','Y','Y','Y','N','N','N','N','N','Role',TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56680 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56769,56681,0,53191,TO_DATE('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56681 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=56679 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56677 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56681 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56680 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56676 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 19:05:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 19:05:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56681 +; + +-- Jan 30, 2009 7:07:51 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53264,TO_DATE('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_DATE('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53265,TO_DATE('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_DATE('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53266,TO_DATE('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_DATE('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53268,TO_DATE('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_DATE('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53269,TO_DATE('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_DATE('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53270,TO_DATE('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_DATE('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2009-01-30 20:03:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +-- Feb 1, 2009 7:49:10 PM COT +-- Web Service Definition and Security +UPDATE AD_Tab SET AD_Column_ID=56765,Updated=TO_DATE('2009-02-01 19:49:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53190 +; + diff --git a/org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql b/org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql new file mode 100644 index 0000000000..86c5e0818b --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql @@ -0,0 +1,145 @@ +-- Jan 30, 2009 7:13:26 PM COT +-- Web Service Definition and Security +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.3e.pl/ - intended to enable work of clients like ADClient.exe','WARNING! This is disabled by default as security is not implemented yet','Y','UI Oriented Adempiere Web Services',TO_DATE('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'ADService',50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADWindow',TO_DATE('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'getADWindow',50000,50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','getWindowTabData',TO_DATE('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'getWindowTabData',50000,50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDataRow',TO_DATE('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'getDataRow',50000,50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','updateDataRow',TO_DATE('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'updateDataRow',50000,50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveDataRow',TO_DATE('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'saveDataRow',50000,50004) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','addNewDataRow',TO_DATE('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'addNewDataRow',50000,50005) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','deleteDataRow',TO_DATE('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'deleteDataRow',50000,50006) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','ignoreDataRow',TO_DATE('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'ignoreDataRow',50000,50007) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','refreshDataRow',TO_DATE('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'refreshDataRow',50000,50008) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupSearchData',TO_DATE('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'getLookupSearchData',50000,50009) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupData',TO_DATE('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'getLookupData',50000,50010) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADMenu',TO_DATE('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'getADMenu',50000,50011) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','login',TO_DATE('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'login',50000,50012) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProcessParams',TO_DATE('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'getProcessParams',50000,50013) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','runProcess',TO_DATE('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50000,50014) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveLocation',TO_DATE('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'saveLocation',50000,50015) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLocation',TO_DATE('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'getLocation',50000,50016) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDocAction',TO_DATE('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'getDocAction',50000,50017) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','setDocAction',TO_DATE('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50000,50018) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','getVersion',TO_DATE('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'getVersion',50000,50019) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','isLoggedIn',TO_DATE('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'isLoggedIn',50000,50020) +; + +UPDATE WS_WebService SET IsActive='N',Updated=TO_DATE('2009-01-30 19:16:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebService_ID=50000 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.globalqss.com - implemented security','This web services are very generic - so it''s necessary to configure the security layer in the web services security window to make them work. You can take a look to GardenWorld samples.','Y','Model Oriented Web Services',TO_DATE('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'ModelADService',50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'To invoke corresponding methods of documents when changing document action.','Change DocAction for documents, i.e. Complete a Material Receipt +WARNING! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow. +To complete documents using workflow it''s better to use the runProcess web service','Y','Set Document Action',TO_DATE('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50001,50021) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'Run a process or report - if the process is a document workflow a document action can be configured','Y','Run Process',TO_DATE('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50001,50022) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Get Reference Lists or Reference Tables',TO_DATE('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'getList',50001,50023) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to create data following the persistence model of Adempiere','Web Service to create data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Create Data',TO_DATE('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'createData',50001,50024) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to modify data following the persistence model of Adempiere','Web Service to modify data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Update Data',TO_DATE('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'updateData',50001,50025) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to delete data following the persistence model of Adempiere','Web Service to delete data following the persistence model of Adempiere, this is calling properly before/afterDelete methods - and configured model validators.','Y','Delete Data',TO_DATE('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'deleteData',50001,50026) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'Access a record via its ID and return the corresponding data','Y','Read Data',TO_DATE('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'readData',50001,50027) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'Access records via conditions on columns - return data rows','Y','Query Data',TO_DATE('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'queryData',50001,50028) +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','External Sales - web service',TO_DATE('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'ExternalSales',50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsPlusCatalog',TO_DATE('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'getProductsPlusCatalog',50002,50029) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','uploadOrders',TO_DATE('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'uploadOrders',50002,50030) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsCatalog',TO_DATE('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'getProductsCatalog',50002,50031) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','getOrders',TO_DATE('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'getOrders',50002,50032) +; + +UPDATE WS_WebServiceMethod SET IsActive='N',Updated=TO_DATE('2009-01-30 19:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebServiceMethod_ID=50032 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','WebService - web service',TO_DATE('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'WebService',50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','getCustomers',TO_DATE('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'getCustomers',50003,50033) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomer',TO_DATE('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'getCustomer',50003,50034) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'N','updateCustomer',TO_DATE('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'updateCustomer',50003,50035) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerAddresses',TO_DATE('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerAddresses',50003,50036) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerLocation',TO_DATE('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerLocation',50003,50037) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'N','updateAddress',TO_DATE('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'updateAddress',50003,50038) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerContact',TO_DATE('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerContact',50003,50039) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'N','updateContact',TO_DATE('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'updateContact',50003,50040) +; + diff --git a/org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql b/org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql new file mode 100644 index 0000000000..5ef9900135 --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql @@ -0,0 +1,83 @@ +-- Jan 30, 2009 7:44:20 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_Order,Allow_Info_Payment,Allow_Info_Product,Allow_Info_Resource,Allow_Info_Schedule,AmtApproval,C_Currency_ID,ConfirmQueryRecords,Created,CreatedBy,IsAccessAllOrgs,IsActive,IsCanApproveOwnDoc,IsCanExport,IsCanReport,IsChangeLog,IsManual,IsPersonalAccess,IsPersonalLock,IsShowAcct,IsUseUserOrgAccess,MaxQueryRecords,Name,OverwritePriceLimit,PreferenceType,Supervisor_ID,Updated,UpdatedBy,UserDiscount,UserLevel) VALUES (11,0,50004,'N','N','N','N','N','N','N','N','N','N','N',0,100,0,TO_DATE('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','N','Y','Y','N','N','N','N',0,'Web Service Execution','N','N',101,TO_DATE('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,0.00,' CO') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,11,50004,100,TO_DATE('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,0,50004,TO_DATE('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,11,50004,TO_DATE('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,12,50004,TO_DATE('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_User (AD_Client_ID,AD_Org_ID,AD_User_ID,Created,CreatedBy,IsActive,IsFullBPAccess,Name,NotificationType,Password,Processing,Updated,UpdatedBy,Value) VALUES (11,0,50001,TO_DATE('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','WebService','X','WebService','N',TO_DATE('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'webserv') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,0,50004,50001,TO_DATE('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Process_Access (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy) VALUES (11,0,111,50004,TO_DATE('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of run process web service to process invoices','Y','Process Invoice',TO_DATE('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'ProcessInvoice',50001,50022,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'111',TO_DATE('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Process_ID','C',TO_DATE('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,50000,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'CO',TO_DATE('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','DocAction','C',TO_DATE('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,50001,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'0',TO_DATE('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Menu_ID','C',TO_DATE('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,50002,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Record_ID','F',TO_DATE('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,50003,50000) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_DATE('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,50000) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,291,TO_DATE('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of Create Data web service to create business partners','Y','Create BPartner',TO_DATE('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'CreateBPartner',50001,50024,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'C_BPartner',TO_DATE('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,'Y','TableName','C',TO_DATE('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','RecordID','F',TO_DATE('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'Create',TO_DATE('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Action','C',TO_DATE('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2901,0,TO_DATE('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,50000,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2902,0,TO_DATE('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,50001,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2909,0,TO_DATE('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,50002,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2915,0,TO_DATE('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,50003,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2916,0,TO_DATE('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,3082,0,TO_DATE('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4216,0,TO_DATE('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4940,0,TO_DATE('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,50007,50001) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_DATE('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,50001) +; + diff --git a/org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql b/org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql new file mode 100644 index 0000000000..623775be2e --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql @@ -0,0 +1 @@ +update AD_Column set SeqNo=2 WHERE AD_Column_ID=56714; diff --git a/org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql b/org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql new file mode 100644 index 0000000000..ad901a7ecd --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql @@ -0,0 +1,1538 @@ +-- Jan 30, 2009 5:51:53 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53067,TO_TIMESTAMP('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Definition','N',TO_TIMESTAMP('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53067 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53067,TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53067,TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53067,TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53068,TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Security','N',TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53068 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53068,TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53068,TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53068,TO_TIMESTAMP('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53162,53067,'N',TO_TIMESTAMP('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service','L','WS_WebService',TO_TIMESTAMP('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53162 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53256,TO_TIMESTAMP('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService',1,'Y','N','Y','Y','WS_WebService','N',1000000,TO_TIMESTAMP('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56694,102,0,19,53162,129,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56694 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56695,113,0,19,53162,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56695 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56696,245,0,16,53162,'Created',TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56696 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56697,246,0,18,110,53162,'CreatedBy',TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56697 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56698,275,0,10,53162,'Description',TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56698 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56699,326,0,14,53162,'Help',TO_TIMESTAMP('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_TIMESTAMP('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56699 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56700,348,0,20,53162,'IsActive',TO_TIMESTAMP('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56700 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53766,0,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service','Web Service',TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53766 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56701,53766,0,13,53162,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service',0,TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56701 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56702,469,0,10,53162,'Name',TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56702 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56703,607,0,16,53162,'Updated',TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56703 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56704,608,0,18,110,53162,'UpdatedBy',TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56704 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56705,620,0,10,53162,'Value',TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56705 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53163,53067,'N',TO_TIMESTAMP('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Method','L','WS_WebServiceMethod',TO_TIMESTAMP('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53163 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53257,TO_TIMESTAMP('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceMethod',1,'Y','N','Y','Y','WS_WebServiceMethod','N',1000000,TO_TIMESTAMP('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56706,102,0,19,53163,129,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56706 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56707,113,0,19,53163,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56707 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56708,245,0,16,53163,'Created',TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56708 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56709,246,0,18,110,53163,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56709 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56710,275,0,10,53163,'Description',TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56710 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56711,326,0,14,53163,'Help',TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56711 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56712,348,0,20,53163,'IsActive',TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56712 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53767,0,'WS_WebServiceMethod_ID',TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Method','Web Service Method',TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53767 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56713,53767,0,13,53163,'WS_WebServiceMethod_ID',TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Method',0,TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56713 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56714,469,0,10,53163,'Name',TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56714 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56715,607,0,16,53163,'Updated',TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56715 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56716,608,0,18,110,53163,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56716 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56717,620,0,10,53163,'Value',TO_TIMESTAMP('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_TIMESTAMP('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56717 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56718,53766,0,19,53163,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','Y','N','N','Y','N','N','N','N','Web Service',1,TO_TIMESTAMP('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56718 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebService (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, Value VARCHAR(40) NOT NULL, WS_WebService_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebService_Key PRIMARY KEY (WS_WebService_ID)) +; + +CREATE TABLE WS_WebServiceMethod (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, Value VARCHAR(40) NOT NULL, WS_WebService_ID NUMERIC(10), WS_WebServiceMethod_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceMethod_Key PRIMARY KEY (WS_WebServiceMethod_ID)) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53185,53162,53067,TO_TIMESTAMP('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service','N',10,0,TO_TIMESTAMP('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53185 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56718,0,53186,53163,53067,TO_TIMESTAMP('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Method','N',20,1,TO_TIMESTAMP('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53186 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56700,56628,0,53185,TO_TIMESTAMP('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56628 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56694,56629,0,53185,TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56629 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56699,56630,0,53185,TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56630 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56698,56631,0,53185,TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56631 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56702,56632,0,53185,TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56632 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56695,56633,0,53185,TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56633 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56705,56634,0,53185,TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56634 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56701,56635,0,53185,TO_TIMESTAMP('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service',TO_TIMESTAMP('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56635 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56712,56636,0,53186,TO_TIMESTAMP('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56636 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56706,56637,0,53186,TO_TIMESTAMP('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56637 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56711,56638,0,53186,TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56638 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56710,56639,0,53186,TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56639 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56714,56640,0,53186,TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56640 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56707,56641,0,53186,TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56641 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56717,56642,0,53186,TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56642 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56718,56643,0,53186,TO_TIMESTAMP('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_TIMESTAMP('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56643 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56713,56644,0,53186,TO_TIMESTAMP('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Method',TO_TIMESTAMP('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56644 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56629 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56634 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56632 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56631 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56630 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56628 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56637 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56643 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56642 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56640 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56639 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56638 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56636 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:06:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 18:07:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56643 +; + +INSERT INTO AD_Menu ("action",AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53200,0,53067,TO_TIMESTAMP('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Services',TO_TIMESTAMP('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53200 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0,t.AD_Tree_ID, 53200, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53200) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=450 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=446 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=439 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=440 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=594 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50009 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53200 +; + +INSERT INTO AD_Menu ("action",AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53201,0,53068,TO_TIMESTAMP('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Service Security',TO_TIMESTAMP('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53201 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0,t.AD_Tree_ID, 53201, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53201) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=147 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=487 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=150 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=495 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50007 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=362 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=366 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=483 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=368 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=508 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53201 +; + +-- Jan 30, 2009 6:13:02 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53164,53068,'N',TO_TIMESTAMP('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type','L','WS_WebServiceType',TO_TIMESTAMP('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53164 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53258,TO_TIMESTAMP('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceType',1,'Y','N','Y','Y','WS_WebServiceType','N',1000000,TO_TIMESTAMP('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53165,53068,'N',TO_TIMESTAMP('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Parameters','L','WS_WebService_Para',TO_TIMESTAMP('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53165 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53259,TO_TIMESTAMP('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService_Para',1,'Y','N','Y','Y','WS_WebService_Para','N',1000000,TO_TIMESTAMP('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53166,53068,'N',TO_TIMESTAMP('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Input','L','WS_WebServiceFieldInput',TO_TIMESTAMP('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53166 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53260,TO_TIMESTAMP('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldInput',1,'Y','N','Y','Y','WS_WebServiceFieldInput','N',1000000,TO_TIMESTAMP('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53167,53068,'N',TO_TIMESTAMP('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Output','L','WS_WebServiceFieldOutput',TO_TIMESTAMP('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53167 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53261,TO_TIMESTAMP('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldOutput',1,'Y','N','Y','Y','WS_WebServiceFieldOutput','N',1000000,TO_TIMESTAMP('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53168,53068,'N',TO_TIMESTAMP('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type Access','L','WS_WebServiceTypeAccess',TO_TIMESTAMP('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53168 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53262,TO_TIMESTAMP('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceTypeAccess',1,'Y','N','Y','Y','WS_WebServiceTypeAccess','N',1000000,TO_TIMESTAMP('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Table SET IsChangeLog='N',Updated=TO_TIMESTAMP('2009-01-30 18:15:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53168 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56719,102,0,19,53164,129,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56719 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56720,113,0,19,53164,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56720 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56721,245,0,16,53164,'Created',TO_TIMESTAMP('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56721 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56722,246,0,18,110,53164,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56722 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56723,275,0,10,53164,'Description',TO_TIMESTAMP('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_TIMESTAMP('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56723 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56724,326,0,14,53164,'Help',TO_TIMESTAMP('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_TIMESTAMP('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56724 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56725,348,0,20,53164,'IsActive',TO_TIMESTAMP('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56725 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53768,0,'WS_WebServiceType_ID',TO_TIMESTAMP('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Type','Web Service Type',TO_TIMESTAMP('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53768 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56726,53768,0,13,53164,'WS_WebServiceType_ID',TO_TIMESTAMP('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Type',0,TO_TIMESTAMP('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56726 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56727,469,0,10,53164,'Name',TO_TIMESTAMP('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_TIMESTAMP('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56727 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56728,607,0,16,53164,'Updated',TO_TIMESTAMP('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56728 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56729,608,0,18,110,53164,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56729 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56730,620,0,10,53164,'Value',TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56730 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56731,53766,0,19,53164,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service',0,TO_TIMESTAMP('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56731 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52044,'WS_WebService_ID=@WS_WebService_ID@',TO_TIMESTAMP('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Methods from Web Service','S',TO_TIMESTAMP('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56732,53767,0,19,53164,52044,'WS_WebServiceMethod_ID',TO_TIMESTAMP('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service Method',0,TO_TIMESTAMP('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56732 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56733,126,0,19,53164,'AD_Table_ID',TO_TIMESTAMP('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','N','N','N','N','N','N','N','N','N','Y','Table',0,TO_TIMESTAMP('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56733 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2009-01-30 18:21:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56732 +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2009-01-30 18:21:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56731 +; + +CREATE TABLE WS_WebServiceType (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Table_ID NUMERIC(10), Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, Value VARCHAR(40) NOT NULL, WS_WebService_ID NUMERIC(10) NOT NULL, WS_WebServiceMethod_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceType_Key PRIMARY KEY (WS_WebServiceType_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56734,102,0,19,53165,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56734 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56735,113,0,19,53165,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56735 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56736,128,0,13,53165,'AD_Task_ID',TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56736 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53769,0,'WS_WebService_Para_ID',TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Parameters','Web Service Parameters',TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53769 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56737,53769,0,13,53165,'WS_WebService_Para_ID',TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Parameters',1,TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56737 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56738,245,0,16,53165,'Created',TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56738 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56739,246,0,18,110,53165,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56739 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56740,348,0,20,53165,'IsActive',TO_TIMESTAMP('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56740 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56741,607,0,16,53165,'Updated',TO_TIMESTAMP('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56741 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56742,608,0,18,110,53165,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56742 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsIdentifier='N', IsUpdateable='N', SeqNo=0,Updated=TO_TIMESTAMP('2009-01-30 18:27:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56737 +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_TIMESTAMP('2009-01-30 18:28:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56736 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56736 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56736 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,ColumnSQL,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56743,1196,0,10,53165,'ParameterName','A',TO_TIMESTAMP('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,'D',60,'Y','N','N','N','N','N','N','N','N','N','N','Parameter Name',0,TO_TIMESTAMP('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56743 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53770,0,'ParameterType',TO_TIMESTAMP('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Parameter Type','Parameter Type',TO_TIMESTAMP('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53770 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,Help,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53288,TO_TIMESTAMP('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'D',NULL,'Y','N','WS Parameter Type',TO_TIMESTAMP('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53288 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53451,TO_TIMESTAMP('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Constant',TO_TIMESTAMP('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53451 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53452,TO_TIMESTAMP('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Free',TO_TIMESTAMP('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'F') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53452 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56744,53770,0,17,53288,53165,'ParameterType',TO_TIMESTAMP('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,'D',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Parameter Type',0,TO_TIMESTAMP('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56744 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56745,1322,0,10,53165,'ConstantValue',TO_TIMESTAMP('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,'Constant value','D',60,'Y','N','N','N','N','N','N','N','N','N','Y','Constant Value',0,TO_TIMESTAMP('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56745 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56734 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:35:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56735 +; + +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_TIMESTAMP('2009-01-30 18:35:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56746,102,0,19,53166,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56746 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56747,113,0,19,53166,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56747 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56748,128,0,13,53166,'AD_Task_ID',TO_TIMESTAMP('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_TIMESTAMP('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56748 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53771,0,'WS_WebServiceFieldInput_ID',TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Input','Web Service Field Input',TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53771 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56749,53771,0,13,53166,'WS_WebServiceFieldInput_ID',TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Input',1,TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56749 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56750,245,0,16,53166,'Created',TO_TIMESTAMP('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56750 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56751,246,0,18,110,53166,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56751 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56752,348,0,20,53166,'IsActive',TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56752 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56753,607,0,16,53166,'Updated',TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56753 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56754,608,0,18,110,53166,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56754 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_TIMESTAMP('2009-01-30 18:37:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56748 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56748 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56748 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56755,104,0,19,53166,100,'AD_Column_ID',TO_TIMESTAMP('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_TIMESTAMP('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56755 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:39:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56746 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:39:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56747 +; + +CREATE TABLE WS_WebServiceFieldInput (AD_Client_ID NUMERIC(10) NOT NULL, AD_Column_ID NUMERIC(10), AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), WS_WebServiceFieldInput_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceFieldInput_Key PRIMARY KEY (WS_WebServiceFieldInput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56756,102,0,19,53167,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56756 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56757,104,0,19,53167,100,'AD_Column_ID',TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56757 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56758,113,0,19,53167,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56758 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56759,245,0,16,53167,'Created',TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56759 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56760,246,0,18,110,53167,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56760 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56761,348,0,20,53167,'IsActive',TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56761 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56762,607,0,16,53167,'Updated',TO_TIMESTAMP('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56762 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56763,608,0,18,110,53167,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56763 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53772,0,'WS_WebServiceFieldOutput_ID',TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Output','Web Service Field Output',TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53772 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56764,53772,0,13,53167,'WS_WebServiceFieldOutput_ID',TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Output',1,TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56764 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56765,53768,0,19,53167,'WS_WebServiceType_ID',TO_TIMESTAMP('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','Y','N','N','N','N','Y','Web Service Type',0,TO_TIMESTAMP('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56765 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebServiceFieldOutput (AD_Client_ID NUMERIC(10) NOT NULL, AD_Column_ID NUMERIC(10), AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), WS_WebServiceFieldOutput_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceFieldOutput_Key PRIMARY KEY (WS_WebServiceFieldOutput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56766,102,0,19,53168,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56766 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56767,113,0,19,53168,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56767 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56768,123,0,19,53168,'AD_Role_ID',TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role','D',22,'The Role determines security and access a user who has this Role will have in the System.','Y','N','N','N','N','Y','Y','N','N','N','N','Role',0,TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56768 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56769,143,0,19,53168,'AD_Window_ID',TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window','D',22,'The Window field identifies a unique Window in the system.','Y','N','N','N','N','Y','Y','N','N','N','N','Window',0,TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56769 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56770,245,0,16,53168,'Created',TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56770 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56771,246,0,18,110,53168,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56771 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56772,348,0,20,53168,'IsActive',TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56772 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56773,406,0,20,53168,'IsReadWrite',TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write','D',1,'The Read Write indicates that this field may be read and updated.','Y','N','N','N','N','Y','N','N','N','N','Y','Read Write',0,TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56773 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56774,607,0,16,53168,'Updated',TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56774 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56775,608,0,18,110,53168,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56775 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, IsUpdateable='N', Name='Web Service Type',Updated=TO_TIMESTAMP('2009-01-30 18:41:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56769 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56769 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56769 AND IsCentrallyMaintained='Y' +; + +UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2009-01-30 18:41:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56773 +; + +CREATE TABLE WS_WebServiceTypeAccess (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Role_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsReadWrite CHAR(1) DEFAULT 'Y' CHECK (IsReadWrite IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceTypeAccess_Key PRIMARY KEY (AD_Role_ID, WS_WebServiceType_ID)) +; + +UPDATE AD_Column SET ColumnSQL=NULL,Updated=TO_TIMESTAMP('2009-01-30 18:45:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56743 +; + +CREATE TABLE WS_WebService_Para (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, ConstantValue VARCHAR(60), Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, ParameterName VARCHAR(60), ParameterType CHAR(1) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), WS_WebService_Para_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebService_Para_Key PRIMARY KEY (WS_WebService_Para_ID)) +; + +ALTER TABLE WS_WebServiceFieldInput ADD CONSTRAINT ADColumn_WSWebServiceFieldInpu FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column; + +ALTER TABLE WS_WebServiceFieldInput ADD CONSTRAINT WSWebServiceType_WSWebServicFI FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +ALTER TABLE WS_WebServiceFieldOutput ADD CONSTRAINT ADColumn_WSWebServiceFieldOutp FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column; + +ALTER TABLE WS_WebServiceFieldOutput ADD CONSTRAINT WSWebServiceType_WSWebServicFO FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +ALTER TABLE WS_WebServiceMethod ADD CONSTRAINT WSWebService_WSWebServiceMetho FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService; + +ALTER TABLE WS_WebService_Para ADD CONSTRAINT WSWebServiceType_WSWebServiceP FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +ALTER TABLE WS_WebServiceType ADD CONSTRAINT ADTable_WSWebServiceType FOREIGN KEY (AD_Table_ID) REFERENCES AD_Table; + +ALTER TABLE WS_WebServiceType ADD CONSTRAINT WSWebService_WSWebServiceType FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService; + +ALTER TABLE WS_WebServiceType ADD CONSTRAINT WSWebServiceMethod_WSWebServic FOREIGN KEY (WS_WebServiceMethod_ID) REFERENCES WS_WebServiceMethod; + +ALTER TABLE WS_WebServiceTypeAccess ADD CONSTRAINT ADRole_WSWebServiceTypeAccess FOREIGN KEY (AD_Role_ID) REFERENCES AD_Role; + +ALTER TABLE WS_WebServiceTypeAccess ADD CONSTRAINT WSWebServiceType_WSWebServiceT FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +-- Jan 30, 2009 6:55:49 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53187,53164,53068,TO_TIMESTAMP('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','Y','N','N','Web Service Type','N',10,0,TO_TIMESTAMP('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53187 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56725,56645,0,53187,TO_TIMESTAMP('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56645 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56719,56646,0,53187,TO_TIMESTAMP('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56646 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56724,56647,0,53187,TO_TIMESTAMP('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_TIMESTAMP('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56647 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56723,56648,0,53187,TO_TIMESTAMP('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56648 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56727,56649,0,53187,TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56649 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56720,56650,0,53187,TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56650 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56730,56651,0,53187,TO_TIMESTAMP('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_TIMESTAMP('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56651 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56733,56652,0,53187,TO_TIMESTAMP('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',TO_TIMESTAMP('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56652 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56731,56653,0,53187,TO_TIMESTAMP('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_TIMESTAMP('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56653 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56732,56654,0,53187,TO_TIMESTAMP('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service Method',TO_TIMESTAMP('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56654 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56726,56655,0,53187,TO_TIMESTAMP('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56655 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56646 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56650 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56651 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56649 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56653 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56654 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56652 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56648 +; + +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=56647 +; + +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=56645 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:57:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56650 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56736,0,53188,53165,53068,TO_TIMESTAMP('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Parameters','N',20,1,TO_TIMESTAMP('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53188 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56740,56656,0,53188,TO_TIMESTAMP('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56656 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56734,56657,0,53188,TO_TIMESTAMP('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56657 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56745,56658,0,53188,TO_TIMESTAMP('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100,'Constant value',60,'D','Y','Y','Y','N','N','N','N','N','Constant Value',TO_TIMESTAMP('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56658 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56735,56659,0,53188,TO_TIMESTAMP('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56659 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56743,56660,0,53188,TO_TIMESTAMP('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100,60,'D','Y','Y','Y','N','N','N','N','N','Parameter Name',TO_TIMESTAMP('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56660 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56744,56661,0,53188,TO_TIMESTAMP('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Parameter Type',TO_TIMESTAMP('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56661 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56737,56662,0,53188,TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Parameters',TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56662 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56736,56663,0,53188,TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56663 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56657 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56663 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56660 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56661 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56656 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:58:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:59:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET DisplayLogic='@ParameterType@=''C''',Updated=TO_TIMESTAMP('2009-01-30 18:59:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Column SET ReadOnlyLogic='@ParameterType@!C',Updated=TO_TIMESTAMP('2009-01-30 18:59:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56748,0,53189,53166,53068,TO_TIMESTAMP('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Input','N',30,1,TO_TIMESTAMP('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53189 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56752,56664,0,53189,TO_TIMESTAMP('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56664 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56746,56665,0,53189,TO_TIMESTAMP('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56665 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56755,56666,0,53189,TO_TIMESTAMP('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_TIMESTAMP('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56666 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56747,56667,0,53189,TO_TIMESTAMP('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56667 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56749,56668,0,53189,TO_TIMESTAMP('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Input',TO_TIMESTAMP('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56668 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56748,56669,0,53189,TO_TIMESTAMP('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56669 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56665 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56669 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56666 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56664 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 19:03:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 19:03:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56669 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53190,53167,53068,TO_TIMESTAMP('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Output','N',40,1,TO_TIMESTAMP('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53190 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56761,56670,0,53190,TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56670 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56756,56671,0,53190,TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56671 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56757,56672,0,53190,TO_TIMESTAMP('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_TIMESTAMP('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56672 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56758,56673,0,53190,TO_TIMESTAMP('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56673 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56764,56674,0,53190,TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Output',TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56674 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56765,56675,0,53190,TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56675 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56671 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56675 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56672 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56670 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 19:03:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 19:04:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56675 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56769,0,53191,53168,53068,TO_TIMESTAMP('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Access','N',50,1,TO_TIMESTAMP('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53191 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56772,56676,0,53191,TO_TIMESTAMP('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56676 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56766,56677,0,53191,TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56677 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56767,56678,0,53191,TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56678 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56773,56679,0,53191,TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write',1,'D','The Read Write indicates that this field may be read and updated.','Y','Y','Y','N','N','N','N','N','Read Write',TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56679 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56768,56680,0,53191,TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role',22,'D','The Role determines security and access a user who has this Role will have in the System.','Y','Y','Y','N','N','N','N','N','Role',TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56680 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56769,56681,0,53191,TO_TIMESTAMP('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56681 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=56679 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56677 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56681 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56680 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56676 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 19:05:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 19:05:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56681 +; + +-- Jan 30, 2009 7:07:51 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53264,TO_TIMESTAMP('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53265,TO_TIMESTAMP('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53266,TO_TIMESTAMP('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53268,TO_TIMESTAMP('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53269,TO_TIMESTAMP('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53270,TO_TIMESTAMP('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2009-01-30 20:03:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +-- Feb 1, 2009 7:49:10 PM COT +-- Web Service Definition and Security +UPDATE AD_Tab SET AD_Column_ID=56765,Updated=TO_TIMESTAMP('2009-02-01 19:49:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53190 +; + diff --git a/org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql b/org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql new file mode 100644 index 0000000000..87a7999bd0 --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql @@ -0,0 +1,143 @@ +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.3e.pl/ - intended to enable work of clients like ADClient.exe','WARNING! This is disabled by default as security is not implemented yet','Y','UI Oriented Adempiere Web Services',TO_TIMESTAMP('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'ADService',50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADWindow',TO_TIMESTAMP('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'getADWindow',50000,50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','getWindowTabData',TO_TIMESTAMP('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'getWindowTabData',50000,50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDataRow',TO_TIMESTAMP('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'getDataRow',50000,50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','updateDataRow',TO_TIMESTAMP('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'updateDataRow',50000,50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveDataRow',TO_TIMESTAMP('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'saveDataRow',50000,50004) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','addNewDataRow',TO_TIMESTAMP('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'addNewDataRow',50000,50005) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','deleteDataRow',TO_TIMESTAMP('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'deleteDataRow',50000,50006) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','ignoreDataRow',TO_TIMESTAMP('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'ignoreDataRow',50000,50007) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','refreshDataRow',TO_TIMESTAMP('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'refreshDataRow',50000,50008) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupSearchData',TO_TIMESTAMP('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'getLookupSearchData',50000,50009) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupData',TO_TIMESTAMP('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'getLookupData',50000,50010) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADMenu',TO_TIMESTAMP('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'getADMenu',50000,50011) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','login',TO_TIMESTAMP('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'login',50000,50012) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProcessParams',TO_TIMESTAMP('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'getProcessParams',50000,50013) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','runProcess',TO_TIMESTAMP('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50000,50014) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveLocation',TO_TIMESTAMP('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'saveLocation',50000,50015) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLocation',TO_TIMESTAMP('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'getLocation',50000,50016) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDocAction',TO_TIMESTAMP('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'getDocAction',50000,50017) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','setDocAction',TO_TIMESTAMP('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50000,50018) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','getVersion',TO_TIMESTAMP('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'getVersion',50000,50019) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','isLoggedIn',TO_TIMESTAMP('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'isLoggedIn',50000,50020) +; + +UPDATE WS_WebService SET IsActive='N',Updated=TO_TIMESTAMP('2009-01-30 19:16:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebService_ID=50000 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.globalqss.com - implemented security','This web services are very generic - so it''s necessary to configure the security layer in the web services security window to make them work. You can take a look to GardenWorld samples.','Y','Model Oriented Web Services',TO_TIMESTAMP('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'ModelADService',50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'To invoke corresponding methods of documents when changing document action.','Change DocAction for documents, i.e. Complete a Material Receipt +WARNING! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow. +To complete documents using workflow it''s better to use the runProcess web service','Y','Set Document Action',TO_TIMESTAMP('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50001,50021) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'Run a process or report - if the process is a document workflow a document action can be configured','Y','Run Process',TO_TIMESTAMP('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50001,50022) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Get Reference Lists or Reference Tables',TO_TIMESTAMP('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'getList',50001,50023) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to create data following the persistence model of Adempiere','Web Service to create data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Create Data',TO_TIMESTAMP('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'createData',50001,50024) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to modify data following the persistence model of Adempiere','Web Service to modify data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Update Data',TO_TIMESTAMP('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'updateData',50001,50025) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to delete data following the persistence model of Adempiere','Web Service to delete data following the persistence model of Adempiere, this is calling properly before/afterDelete methods - and configured model validators.','Y','Delete Data',TO_TIMESTAMP('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'deleteData',50001,50026) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'Access a record via its ID and return the corresponding data','Y','Read Data',TO_TIMESTAMP('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'readData',50001,50027) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'Access records via conditions on columns - return data rows','Y','Query Data',TO_TIMESTAMP('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'queryData',50001,50028) +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','External Sales - web service',TO_TIMESTAMP('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'ExternalSales',50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsPlusCatalog',TO_TIMESTAMP('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'getProductsPlusCatalog',50002,50029) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','uploadOrders',TO_TIMESTAMP('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'uploadOrders',50002,50030) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsCatalog',TO_TIMESTAMP('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'getProductsCatalog',50002,50031) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','getOrders',TO_TIMESTAMP('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'getOrders',50002,50032) +; + +UPDATE WS_WebServiceMethod SET IsActive='N',Updated=TO_TIMESTAMP('2009-01-30 19:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebServiceMethod_ID=50032 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','WebService - web service',TO_TIMESTAMP('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'WebService',50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','getCustomers',TO_TIMESTAMP('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'getCustomers',50003,50033) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomer',TO_TIMESTAMP('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'getCustomer',50003,50034) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'N','updateCustomer',TO_TIMESTAMP('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'updateCustomer',50003,50035) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerAddresses',TO_TIMESTAMP('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerAddresses',50003,50036) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerLocation',TO_TIMESTAMP('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerLocation',50003,50037) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'N','updateAddress',TO_TIMESTAMP('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'updateAddress',50003,50038) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerContact',TO_TIMESTAMP('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerContact',50003,50039) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'N','updateContact',TO_TIMESTAMP('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'updateContact',50003,50040) +; + diff --git a/org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql b/org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql new file mode 100644 index 0000000000..2e2fc87229 --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql @@ -0,0 +1,83 @@ +-- Jan 30, 2009 7:44:20 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_Order,Allow_Info_Payment,Allow_Info_Product,Allow_Info_Resource,Allow_Info_Schedule,AmtApproval,C_Currency_ID,ConfirmQueryRecords,Created,CreatedBy,IsAccessAllOrgs,IsActive,IsCanApproveOwnDoc,IsCanExport,IsCanReport,IsChangeLog,IsManual,IsPersonalAccess,IsPersonalLock,IsShowAcct,IsUseUserOrgAccess,MaxQueryRecords,Name,OverwritePriceLimit,PreferenceType,Supervisor_ID,Updated,UpdatedBy,UserDiscount,UserLevel) VALUES (11,0,50004,'N','N','N','N','N','N','N','N','N','N','N',0,100,0,TO_TIMESTAMP('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','N','Y','Y','N','N','N','N',0,'Web Service Execution','N','N',101,TO_TIMESTAMP('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,0.00,' CO') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,11,50004,100,TO_TIMESTAMP('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,11,50004,TO_TIMESTAMP('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,12,50004,TO_TIMESTAMP('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_User (AD_Client_ID,AD_Org_ID,AD_User_ID,Created,CreatedBy,IsActive,IsFullBPAccess,Name,NotificationType,Password,Processing,Updated,UpdatedBy,Value) VALUES (11,0,50001,TO_TIMESTAMP('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','WebService','X','WebService','N',TO_TIMESTAMP('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'webserv') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,0,50004,50001,TO_TIMESTAMP('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Process_Access (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy) VALUES (11,0,111,50004,TO_TIMESTAMP('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of run process web service to process invoices','Y','Process Invoice',TO_TIMESTAMP('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'ProcessInvoice',50001,50022,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'111',TO_TIMESTAMP('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Process_ID','C',TO_TIMESTAMP('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,50000,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'CO',TO_TIMESTAMP('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','DocAction','C',TO_TIMESTAMP('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,50001,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'0',TO_TIMESTAMP('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Menu_ID','C',TO_TIMESTAMP('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,50002,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Record_ID','F',TO_TIMESTAMP('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,50003,50000) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,50000) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,291,TO_TIMESTAMP('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of Create Data web service to create business partners','Y','Create BPartner',TO_TIMESTAMP('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'CreateBPartner',50001,50024,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'C_BPartner',TO_TIMESTAMP('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,'Y','TableName','C',TO_TIMESTAMP('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','RecordID','F',TO_TIMESTAMP('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'Create',TO_TIMESTAMP('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Action','C',TO_TIMESTAMP('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2901,0,TO_TIMESTAMP('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,50000,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2902,0,TO_TIMESTAMP('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,50001,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2909,0,TO_TIMESTAMP('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,50002,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2915,0,TO_TIMESTAMP('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,50003,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2916,0,TO_TIMESTAMP('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,3082,0,TO_TIMESTAMP('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4216,0,TO_TIMESTAMP('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4940,0,TO_TIMESTAMP('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,50007,50001) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,50001) +; + diff --git a/org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql b/org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql new file mode 100644 index 0000000000..623775be2e --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql @@ -0,0 +1 @@ +update AD_Column set SeqNo=2 WHERE AD_Column_ID=56714; diff --git a/org.idempiere.webservices/src/org/idempiere/webservices/Activator.java b/org.idempiere.webservices/src/org/idempiere/webservices/Activator.java new file mode 100644 index 0000000000..8e7700f296 --- /dev/null +++ b/org.idempiere.webservices/src/org/idempiere/webservices/Activator.java @@ -0,0 +1,30 @@ +package org.idempiere.webservices; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml b/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml new file mode 100644 index 0000000000..6d1ccd7ea1 --- /dev/null +++ b/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml @@ -0,0 +1,849 @@ + +/home/carlos/srcAdempiere/branches/3E_WebServices/testScriptshttps://localhost:8443/ADInterface/services/ModelADService?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/ModelADServiceUTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + CreateBPartner + C_BPartner + 0 + Create + + + GlobalQSS + + + Quality Systems & Solutions + + + 830.085.359-4 + + + Y + + + N + + + N + + + QSS Ltda. - http://www.globalqss.com + + + 104 + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + DeleteBPartner + C_BPartner + 114 + Delete + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + GetListSalesRegions + 144 + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + QueryBPartner + C_BPartner + name<'S' + Read + + + 103 + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + ReadBPartner + C_BPartner + 114 + Read + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + ProcessInvoice + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + + + RunStorageDetail + + + 103 + + + 133 + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + ActionCompleteOrder + C_Order + 102 + CO + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + UpdateBPartner + C_BPartner + 114 + Update + + + http://www.treefarm.com + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]> \ No newline at end of file diff --git a/org.idempiere.webservices/testScripts/MsgModelRunProcess b/org.idempiere.webservices/testScripts/MsgModelRunProcess new file mode 100644 index 0000000000..b3b2448ae6 --- /dev/null +++ b/org.idempiere.webservices/testScripts/MsgModelRunProcess @@ -0,0 +1,23 @@ + + + + + + + ProcessInvoice + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + + + + + + diff --git a/org.idempiere.webservices/testScripts/MsgModelSetDocAction b/org.idempiere.webservices/testScripts/MsgModelSetDocAction new file mode 100644 index 0000000000..181c5c1fd5 --- /dev/null +++ b/org.idempiere.webservices/testScripts/MsgModelSetDocAction @@ -0,0 +1,25 @@ + + + + + + + ActionCompleteOrder + C_Order + 102 + CO + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + + + + + + diff --git a/org.idempiere.webservices/testScripts/TestModelMsg.sh b/org.idempiere.webservices/testScripts/TestModelMsg.sh new file mode 100644 index 0000000000..bad61bf6e7 --- /dev/null +++ b/org.idempiere.webservices/testScripts/TestModelMsg.sh @@ -0,0 +1,18 @@ +: +if [ $# -ne 1 ] +then + echo "Usage: $0 Message_File + echo " i.e.: $0 MsgModelSetDocAction + exit 1 +fi +FILENAME=ModelADService.wsdl.$$ +wget \ + --no-check-certificate \ + --post-file=$1 \ + --save-headers \ + https://localhost:8443/ADInterface/services/ModelADService \ + -O $FILENAME +ls -l $FILENAME +cat $FILENAME +echo +rm -f $FILENAME