diff --git a/migration/i1.0c-release/oracle/201307151037_IDEMPIERE-1173.sql b/migration/i1.0c-release/oracle/201307151037_IDEMPIERE-1173.sql new file mode 100644 index 0000000000..db9cc0f4aa --- /dev/null +++ b/migration/i1.0c-release/oracle/201307151037_IDEMPIERE-1173.sql @@ -0,0 +1,76 @@ +-- Jul 15, 2013 10:36:11 AM COT +-- IDEMPIERE-1173 Fixed landed cost allocation for Average Costing +UPDATE AD_Field SET SeqNo=280, AD_FieldGroup_ID=200013, IsDisplayed='Y', XPosition=4,Updated=TO_DATE('2013-07-15 10:36:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58783 +; + +-- Jul 15, 2013 10:36:11 AM COT +UPDATE AD_Field SET SeqNo=290,Updated=TO_DATE('2013-07-15 10:36:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2662 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=300,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3842 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=310,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3841 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=320,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5132 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=330,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5133 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=340,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3845 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=350,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3844 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=360,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3839 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=370,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3840 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=380,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3836 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=390,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3851 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=400,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2654 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=410,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3835 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=420,Updated=TO_DATE('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3823 +; + +-- Jul 15, 2013 10:36:42 AM COT +UPDATE AD_Field SET SeqNo=190, IsDisplayed='Y', XPosition=4,Updated=TO_DATE('2013-07-15 10:36:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58784 +; + +-- Jul 15, 2013 10:36:42 AM COT +UPDATE AD_Field SET SeqNo=200,Updated=TO_DATE('2013-07-15 10:36:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3945 +; + +-- Jul 15, 2013 10:37:13 AM COT +UPDATE AD_Field SET SeqNo=170, IsDisplayed='Y', XPosition=4,Updated=TO_DATE('2013-07-15 10:37:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58785 +; + +SELECT register_migration_script('201307151037_IDEMPIERE-1173.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/201307151553_IDEMPIERE-1176.sql b/migration/i1.0c-release/oracle/201307151553_IDEMPIERE-1176.sql new file mode 100644 index 0000000000..8b63fbc1bc --- /dev/null +++ b/migration/i1.0c-release/oracle/201307151553_IDEMPIERE-1176.sql @@ -0,0 +1,20 @@ +-- Jul 15, 2013 3:50:50 PM COT +-- IDEMPIERE-1176 Cannot generate UUIDs on migrated database +INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('IsFillUUID',202570,'Fill UUID','Fill UUID','512112d3-bf9b-49a3-a354-90c710d52c6f',TO_DATE('2013-07-15 15:50:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-07-15 15:50:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y',0,'D') +; + +-- Jul 15, 2013 3:50:50 PM 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=202570 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) +; + +-- Jul 15, 2013 3:51:35 PM COT +INSERT INTO AD_Process_Para (IsRange,AD_Element_ID,AD_Process_Para_ID,AD_Process_Para_UU,AD_Process_ID,AD_Reference_ID,IsMandatory,EntityType,Name,ColumnName,FieldLength,IsCentrallyMaintained,SeqNo,DefaultValue,IsActive,UpdatedBy,Updated,CreatedBy,Created,AD_Org_ID,IsEncrypted,AD_Client_ID) VALUES ('N',202570,200068,'ecd91936-ca2c-4262-87c1-4861c8b00663',53252,20,'Y','D','Fill UUID','IsFillUUID',10,'Y',20,'Y','Y',100,TO_DATE('2013-07-15 15:51:34','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-07-15 15:51:34','YYYY-MM-DD HH24:MI:SS'),0,'N',0) +; + +-- Jul 15, 2013 3:51:35 PM COT +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Para_Trl_UU ) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=200068 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + +SELECT register_migration_script('201307151553_IDEMPIERE-1176.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/20130717091459_IDEMPIERE-984.sql b/migration/i1.0c-release/oracle/20130717091459_IDEMPIERE-984.sql new file mode 100644 index 0000000000..b0003e00ae --- /dev/null +++ b/migration/i1.0c-release/oracle/20130717091459_IDEMPIERE-984.sql @@ -0,0 +1,12 @@ +-- Jul 17, 2013 9:14:59 AM COT +-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows +INSERT INTO AD_Message (MsgType,MsgText,MsgTip,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','There are records that haven''t been saved yet. ','Do you still want to proceed?',200207,'D','78553b48-d536-4366-90ee-7fc69e80f35a','ProceedWithTask?','Y',TO_DATE('2013-07-17 09:14:58','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-07-17 09:14:58','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Jul 17, 2013 9:14:59 AM COT +-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200207 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('20130717091459_IDEMPIERE-984.sql') FROM dual +; diff --git a/migration/i1.0c-release/oracle/201307171313_IDEMPIERE-347.sql b/migration/i1.0c-release/oracle/201307171313_IDEMPIERE-347.sql new file mode 100644 index 0000000000..d84027ca70 --- /dev/null +++ b/migration/i1.0c-release/oracle/201307171313_IDEMPIERE-347.sql @@ -0,0 +1,8 @@ +-- Jul 17, 2013 1:10:17 PM COT +-- IDEMPIERE-347 passwords hash +UPDATE AD_Column SET ReadOnlyLogic='@AD_User_ID@=0',Updated=TO_DATE('2013-07-17 13:10:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=417 +; + +SELECT register_migration_script('201307171313_IDEMPIERE-347.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201307151037_IDEMPIERE-1173.sql b/migration/i1.0c-release/postgresql/201307151037_IDEMPIERE-1173.sql new file mode 100644 index 0000000000..22518240eb --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307151037_IDEMPIERE-1173.sql @@ -0,0 +1,76 @@ +-- Jul 15, 2013 10:36:11 AM COT +-- IDEMPIERE-1173 Fixed landed cost allocation for Average Costing +UPDATE AD_Field SET SeqNo=280, AD_FieldGroup_ID=200013, IsDisplayed='Y', XPosition=4,Updated=TO_TIMESTAMP('2013-07-15 10:36:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58783 +; + +-- Jul 15, 2013 10:36:11 AM COT +UPDATE AD_Field SET SeqNo=290,Updated=TO_TIMESTAMP('2013-07-15 10:36:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2662 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=300,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3842 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=310,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3841 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=320,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5132 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=330,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5133 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=340,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3845 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=350,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3844 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=360,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3839 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=370,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3840 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=380,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3836 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=390,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3851 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=400,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2654 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=410,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3835 +; + +-- Jul 15, 2013 10:36:12 AM COT +UPDATE AD_Field SET SeqNo=420,Updated=TO_TIMESTAMP('2013-07-15 10:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3823 +; + +-- Jul 15, 2013 10:36:42 AM COT +UPDATE AD_Field SET SeqNo=190, IsDisplayed='Y', XPosition=4,Updated=TO_TIMESTAMP('2013-07-15 10:36:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58784 +; + +-- Jul 15, 2013 10:36:42 AM COT +UPDATE AD_Field SET SeqNo=200,Updated=TO_TIMESTAMP('2013-07-15 10:36:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3945 +; + +-- Jul 15, 2013 10:37:13 AM COT +UPDATE AD_Field SET SeqNo=170, IsDisplayed='Y', XPosition=4,Updated=TO_TIMESTAMP('2013-07-15 10:37:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58785 +; + +SELECT register_migration_script('201307151037_IDEMPIERE-1173.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201307151553_IDEMPIERE-1176.sql b/migration/i1.0c-release/postgresql/201307151553_IDEMPIERE-1176.sql new file mode 100644 index 0000000000..28cf29a845 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307151553_IDEMPIERE-1176.sql @@ -0,0 +1,20 @@ +-- Jul 15, 2013 3:50:50 PM COT +-- IDEMPIERE-1176 Cannot generate UUIDs on migrated database +INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('IsFillUUID',202570,'Fill UUID','Fill UUID','512112d3-bf9b-49a3-a354-90c710d52c6f',TO_TIMESTAMP('2013-07-15 15:50:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-07-15 15:50:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y',0,'D') +; + +-- Jul 15, 2013 3:50:50 PM 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=202570 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) +; + +-- Jul 15, 2013 3:51:35 PM COT +INSERT INTO AD_Process_Para (IsRange,AD_Element_ID,AD_Process_Para_ID,AD_Process_Para_UU,AD_Process_ID,AD_Reference_ID,IsMandatory,EntityType,Name,ColumnName,FieldLength,IsCentrallyMaintained,SeqNo,DefaultValue,IsActive,UpdatedBy,Updated,CreatedBy,Created,AD_Org_ID,IsEncrypted,AD_Client_ID) VALUES ('N',202570,200068,'ecd91936-ca2c-4262-87c1-4861c8b00663',53252,20,'Y','D','Fill UUID','IsFillUUID',10,'Y',20,'Y','Y',100,TO_TIMESTAMP('2013-07-15 15:51:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-07-15 15:51:34','YYYY-MM-DD HH24:MI:SS'),0,'N',0) +; + +-- Jul 15, 2013 3:51:35 PM COT +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Para_Trl_UU ) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=200068 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + +SELECT register_migration_script('201307151553_IDEMPIERE-1176.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/20130717091459_IDEMPIERE-984.sql b/migration/i1.0c-release/postgresql/20130717091459_IDEMPIERE-984.sql new file mode 100644 index 0000000000..820178942d --- /dev/null +++ b/migration/i1.0c-release/postgresql/20130717091459_IDEMPIERE-984.sql @@ -0,0 +1,12 @@ +-- Jul 17, 2013 9:14:59 AM COT +-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows +INSERT INTO AD_Message (MsgType,MsgText,MsgTip,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','There are records that haven''t been saved yet. ','Do you still want to proceed?',200207,'D','78553b48-d536-4366-90ee-7fc69e80f35a','ProceedWithTask?','Y',TO_TIMESTAMP('2013-07-17 09:14:58','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-07-17 09:14:58','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Jul 17, 2013 9:14:59 AM COT +-- IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200207 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('20130717091459_IDEMPIERE-984.sql') FROM dual +; diff --git a/migration/i1.0c-release/postgresql/201307171313_IDEMPIERE-347.sql b/migration/i1.0c-release/postgresql/201307171313_IDEMPIERE-347.sql new file mode 100644 index 0000000000..7943dcb69d --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307171313_IDEMPIERE-347.sql @@ -0,0 +1,8 @@ +-- Jul 17, 2013 1:10:17 PM COT +-- IDEMPIERE-347 passwords hash +UPDATE AD_Column SET ReadOnlyLogic='@AD_User_ID@=0',Updated=TO_TIMESTAMP('2013-07-17 13:10:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=417 +; + +SELECT register_migration_script('201307171313_IDEMPIERE-347.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java b/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java new file mode 100644 index 0000000000..e58426f72b --- /dev/null +++ b/org.adempiere.base/src/org/adempiere/exceptions/AverageCostingZeroQtyException.java @@ -0,0 +1,36 @@ +/****************************************************************************** + * Product: iDempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2012 Heng Sin Low * + * Copyright (C) 2012 www.iDempiere.org * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package org.adempiere.exceptions; + +/** + * + * @author hengsin + * + */ +public class AverageCostingZeroQtyException extends AdempiereException { + + /** + * generated serial version id + */ + private static final long serialVersionUID = 4165497320719149773L; + + public AverageCostingZeroQtyException() { + super(); + } + + public AverageCostingZeroQtyException(String message) { + super(message); + } +} diff --git a/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java b/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java index a0714f2884..576a3d6217 100644 --- a/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java +++ b/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java @@ -20,7 +20,6 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.UUID; import java.util.logging.Level; @@ -50,6 +49,8 @@ public class UUIDGenerator extends SvrProcess { private String tableName; + private boolean isFillUUID = false; + /** Logger */ private static CLogger log = CLogger.getCLogger(UUIDGenerator.class); @@ -63,6 +64,8 @@ public class UUIDGenerator extends SvrProcess { ; else if (param.getParameterName().equals("TableName")) tableName = param.getParameter().toString(); + else if (param.getParameterName().equals("IsFillUUID")) + isFillUUID = param.getParameterAsBoolean(); else log.log(Level.SEVERE, "Unknown Parameter: " + param.getParameterName()); } @@ -79,7 +82,7 @@ public class UUIDGenerator extends SvrProcess { tableName = tableName.trim(); if (!tableName.endsWith("%")) tableName = tableName + "%"; - String sql = "SELECT AD_Table_ID, TableName FROM AD_Table WHERE TableName LIKE ? AND IsView = 'N' AND IsActive='Y'"; + String sql = "SELECT AD_Table_ID, TableName FROM AD_Table WHERE TableName LIKE ? AND IsView = 'N' AND IsActive='Y' ORDER BY TableName"; PreparedStatement stmt = null; ResultSet rs = null; int count = 0; @@ -122,8 +125,16 @@ public class UUIDGenerator extends SvrProcess { syncColumn(mColumn); //update db - // COMMENT NEXT LINE ON RELEASE WORK - updateUUID(mColumn, null); + if (isFillUUID) { + // COMMENT NEXT LINE ON RELEASE WORK + updateUUID(mColumn, null); + } + } else { + if (isFillUUID) { + MColumn mColumn = MColumn.get(getCtx(), AD_Column_ID); + // COMMENT NEXT LINE ON RELEASE WORK + updateUUID(mColumn, null); + } } /* @@ -148,16 +159,21 @@ public class UUIDGenerator extends SvrProcess { public static void updateUUID(MColumn column, String trxName) { MTable table = (MTable) column.getAD_Table(); - int AD_Column_ID = DB.getSQLValue(null, "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=? AND ColumnName=?", table.getAD_Table_ID(), table.getTableName()+"_ID"); + if (table.getTableName().startsWith("T_")) { + // don't update UUID for temporary tables + return; + } + int AD_Column_ID = 0; StringBuilder sql = new StringBuilder("SELECT "); String keyColumn = null; - List compositeKeys = null; - if (AD_Column_ID > 0) { - keyColumn = table.getTableName()+"_ID"; - } else { - compositeKeys = Arrays.asList(table.getKeyColumns()); + String[] compositeKeys = table.getKeyColumns(); + if (compositeKeys == null || compositeKeys.length == 1) { + keyColumn = compositeKeys[0]; + AD_Column_ID = table.getColumn(keyColumn).getAD_Column_ID(); + compositeKeys = null; } - if ((compositeKeys == null || compositeKeys.size() == 0) && keyColumn == null) { + if ((compositeKeys == null || compositeKeys.length == 0) && keyColumn == null) { + // TODO: Update using rowid for oracle or ctid for postgresql log.warning("Cannot update orphan table " + table.getTableName() + " (not ID neither parents)"); return; } 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 fdb042e4a2..5017708be7 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java @@ -20,12 +20,15 @@ import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Savepoint; import java.util.ArrayList; import java.util.logging.Level; +import org.adempiere.exceptions.AverageCostingZeroQtyException; import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; import org.compiere.model.MClientInfo; +import org.compiere.model.MConversionRate; import org.compiere.model.MCostDetail; import org.compiere.model.MCurrency; import org.compiere.model.MInvoice; @@ -33,8 +36,10 @@ import org.compiere.model.MInvoiceLine; import org.compiere.model.MLandedCostAllocation; import org.compiere.model.MTax; import org.compiere.model.ProductCost; +import org.compiere.model.X_M_Cost; import org.compiere.util.DB; import org.compiere.util.Env; +import org.compiere.util.Trx; /** * Post Invoice Documents. @@ -835,22 +840,8 @@ public class Doc_Invoice extends Doc if (line.getDescription() != null) desc += " - " + line.getDescription(); - // Accounting - ProductCost pc = new ProductCost (Env.getCtx(), - lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), getTrxName()); - BigDecimal drAmt = null; - BigDecimal crAmt = null; - if (dr) - drAmt = lca.getAmt(); - else - crAmt = lca.getAmt(); - FactLine fl = fact.createLine (line, pc.getAccount(ProductCost.ACCTTYPE_P_CostAdjustment, as), - getC_Currency_ID(), drAmt, crAmt); - fl.setDescription(desc); - fl.setM_Product_ID(lca.getM_Product_ID()); - // Cost Detail - Convert to AcctCurrency - /* + BigDecimal allocationAmt = lca.getAmt(); if (getC_Currency_ID() != as.getC_Currency_ID()) allocationAmt = MConversionRate.convert(getCtx(), allocationAmt, @@ -861,15 +852,58 @@ public class Doc_Invoice extends Doc allocationAmt = allocationAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); if (!dr) allocationAmt = allocationAmt.negate(); - // AZ Goodwill - // use createInvoice to create/update non Material Cost Detail - MCostDetail.createInvoice(as, lca.getAD_Org_ID(), - lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), - C_InvoiceLine_ID, lca.getM_CostElement_ID(), - allocationAmt, lca.getQty(), - desc, getTrxName()); - */ - // end AZ + + Trx trx = Trx.get(getTrxName(), false); + Savepoint savepoint = null; + boolean zeroQty = false; + try { + savepoint = trx.setSavepoint(null); + + if (!MCostDetail.createInvoice(as, lca.getAD_Org_ID(), + lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), + C_InvoiceLine_ID, lca.getM_CostElement_ID(), + allocationAmt, lca.getQty(), + desc, getTrxName())) { + throw new RuntimeException("Failed to create cost detail record."); + } + } catch (SQLException e) { + throw new RuntimeException(e.getLocalizedMessage(), e); + } catch (AverageCostingZeroQtyException e) { + zeroQty = true; + try { + trx.rollback(savepoint); + savepoint = null; + } catch (SQLException e1) { + throw new RuntimeException(e1.getLocalizedMessage(), e1); + } + } finally { + if (savepoint != null) { + try { + trx.releaseSavepoint(savepoint); + } catch (SQLException e) {} + } + } + + // Accounting + ProductCost pc = new ProductCost (Env.getCtx(), + lca.getM_Product_ID(), lca.getM_AttributeSetInstance_ID(), getTrxName()); + BigDecimal drAmt = null; + BigDecimal crAmt = null; + if (dr) + drAmt = lca.getAmt(); + else + crAmt = lca.getAmt(); + String costingMethod = pc.getProduct().getCostingMethod(as); + MAccount account = null; + if (X_M_Cost.COSTINGMETHOD_AverageInvoice.equals(costingMethod) || X_M_Cost.COSTINGMETHOD_AveragePO.equals(costingMethod)) { + account = zeroQty ? pc.getAccount(ProductCost.ACCTTYPE_P_AverageCostVariance, as) : pc.getAccount(ProductCost.ACCTTYPE_P_Asset, as); + } else { + account = pc.getAccount(ProductCost.ACCTTYPE_P_CostAdjustment, as); + } + + FactLine fl = fact.createLine (line, account, getC_Currency_ID(), drAmt, crAmt); + fl.setDescription(desc); + fl.setM_Product_ID(lca.getM_Product_ID()); } if (log.isLoggable(Level.CONFIG)) log.config("Created #" + lcas.length); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index daecc82367..f62e68820d 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -126,14 +126,19 @@ public class Doc_MatchPO extends Doc ArrayList facts = new ArrayList(); // if (getM_Product_ID() == 0 // Nothing to do if no Product - || getQty().signum() == 0 - || m_M_InOutLine_ID == 0) // No posting if not matched to Shipment + || getQty().signum() == 0) { if (log.isLoggable(Level.FINE)) log.fine("No Product/Qty - M_Product_ID=" + getM_Product_ID() + ",Qty=" + getQty()); return facts; } + if (m_M_InOutLine_ID == 0) // No posting if not matched to Shipment + { + p_Error = "No posting if not matched to Shipment"; + return null; + } + // create Fact Header Fact fact = new Fact(this, as, Fact.POST_Actual); setC_Currency_ID(as.getC_Currency_ID()); diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index 7d3276ac0f..635aec55e3 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -28,6 +28,7 @@ import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Properties; @@ -1782,6 +1783,7 @@ public class GridField AD_Window_ID, AD_Tab_ID, readOnly, rs); listVO.add(vo); } + Collections.sort(listVO, new GridFieldVO.SeqNoComparator()); } catch (Exception e) { diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index 43716718be..9619af6d7c 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -21,6 +21,7 @@ import java.io.Serializable; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; +import java.util.Comparator; import java.util.Properties; import java.util.logging.Level; @@ -45,7 +46,7 @@ public class GridFieldVO implements Serializable /** * */ - private static final long serialVersionUID = -6098724121324445114L; + private static final long serialVersionUID = -767158053380874050L; /** * Return the SQL statement used for the MFieldVO.create @@ -66,6 +67,7 @@ public class GridFieldVO implements Serializable return sql.toString(); } // getSQL + /** * Create Field Value Object * @param ctx context @@ -112,6 +114,8 @@ public class GridFieldVO implements Serializable vo.IsDisplayed = "Y".equals(rs.getString (i)); else if (columnName.equalsIgnoreCase("IsDisplayedGrid")) vo.IsDisplayedGrid = "Y".equals(rs.getString (i)); + else if (columnName.equalsIgnoreCase("SeqNo")) + vo.SeqNo = rs.getInt (i); else if (columnName.equalsIgnoreCase("SeqNoGrid")) vo.SeqNoGrid = rs.getInt (i); else if (columnName.equalsIgnoreCase("DisplayLogic")) @@ -275,7 +279,11 @@ public class GridFieldVO implements Serializable if (userDef.getNumLines() > 0) vo.NumLines=userDef.getNumLines(); if (userDef.getIsToolbarButton() != null) - vo.IsToolbarButton = "Y".equals(userDef.getIsToolbarButton()); + vo.IsToolbarButton = "Y".equals(userDef.getIsToolbarButton()); + //IDEMPIERE-1120 Implement Field SeqNo customization + if (userDef.getSeqNo() > 0) + vo.SeqNo = userDef.getSeqNo(); + } } // @@ -491,8 +499,10 @@ public class GridFieldVO implements Serializable public boolean IsDisplayed = false; /** Displayed Grid */ public boolean IsDisplayedGrid = false; + /** Position */ + public int SeqNo = 0; /** Grid Display sequence */ - public int SeqNoGrid = 0; + public int SeqNoGrid = 0; /** Dislay Logic */ public String DisplayLogic = ""; /** Default Value */ @@ -684,6 +694,7 @@ public class GridFieldVO implements Serializable clone.IsDisplayed = IsDisplayed; clone.IsDisplayedGrid = IsDisplayedGrid; clone.AD_Field_ID = AD_Field_ID; + clone.SeqNo = SeqNo; clone.SeqNoGrid = SeqNoGrid; clone.DisplayLogic = DisplayLogic; clone.DefaultValue = DefaultValue; @@ -741,4 +752,16 @@ public class GridFieldVO implements Serializable return sb.toString (); } // toString -} // MFieldVO + /** + * + * @author a42niem + * IDEMPIERE-1120 Implement Field SeqNo customization + */ + public static class SeqNoComparator implements Comparator { + @Override + public int compare(GridFieldVO gf1, GridFieldVO gf2) { + return (new Integer(gf1.SeqNo)).compareTo(new Integer(gf2.SeqNo)); + } + } + +} // GridFieldVO diff --git a/org.adempiere.base/src/org/compiere/model/GridTabVO.java b/org.adempiere.base/src/org/compiere/model/GridTabVO.java index 963ffe0f4d..2a2f4851da 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTabVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridTabVO.java @@ -21,6 +21,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Collections; import java.util.Properties; import java.util.logging.Level; @@ -37,6 +38,11 @@ import org.compiere.util.Evaluatee; */ public class GridTabVO implements Evaluatee, Serializable { + /** + * + */ + private static final long serialVersionUID = -5120775523212893253L; + /************************************************************************** * Create MTab VO * @@ -314,6 +320,7 @@ public class GridTabVO implements Evaluatee, Serializable pstmt = null; } + Collections.sort(mTabVO.Fields, new GridFieldVO.SeqNoComparator()); mTabVO.initFields = true; return mTabVO.Fields.size() != 0; @@ -384,8 +391,6 @@ public class GridTabVO implements Evaluatee, Serializable WindowNo = windowNo; } // MTabVO - static final long serialVersionUID = 9160212869277319305L; - /** Context - replicated */ public Properties ctx; /** Window No - replicated */ diff --git a/org.adempiere.base/src/org/compiere/model/MCost.java b/org.adempiere.base/src/org/compiere/model/MCost.java index 33a4633321..b67fcbe2b0 100644 --- a/org.adempiere.base/src/org/compiere/model/MCost.java +++ b/org.adempiere.base/src/org/compiere/model/MCost.java @@ -28,6 +28,7 @@ import java.util.Properties; import java.util.logging.Level; import org.adempiere.exceptions.AverageCostingNegativeQtyException; +import org.adempiere.exceptions.AverageCostingZeroQtyException; import org.adempiere.exceptions.DBException; import org.compiere.Adempiere; import org.compiere.util.CLogger; @@ -1487,6 +1488,13 @@ public class MCost extends X_M_Cost amt = amt.negate(); } + //can't do cost adjustment if there's no stock left + if (qty.signum() == 0 && getCurrentQty().signum() <= 0) + { + throw new AverageCostingZeroQtyException("Product(ID)="+getM_Product_ID()+", Current Qty="+getCurrentQty()+", Trx Qty="+qty + +", CostElement="+getM_CostElement().getName()+", Schema="+getC_AcctSchema().getName()); + } + if (getCurrentQty().add(qty).signum() < 0) { throw new AverageCostingNegativeQtyException("Product(ID)="+getM_Product_ID()+", Current Qty="+getCurrentQty()+", Trx Qty="+qty diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index 735e4d46c4..ec8df41c4b 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -151,11 +151,13 @@ public class MCostDetail extends X_M_CostDetail .append("WHERE Processed='N' AND COALESCE(DeltaAmt,0)=0 AND COALESCE(DeltaQty,0)=0") .append(" AND C_InvoiceLine_ID=").append(C_InvoiceLine_ID) .append(" AND C_AcctSchema_ID =").append(as.getC_AcctSchema_ID()) - .append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID); + .append(" AND M_AttributeSetInstance_ID=").append(M_AttributeSetInstance_ID) + .append(" AND Coalesce(M_CostElement_ID,0)=").append(M_CostElement_ID); + int no = DB.executeUpdate(sql.toString(), trxName); if (no != 0) if (s_log.isLoggable(Level.CONFIG)) s_log.config("Deleted #" + no); - MCostDetail cd = get (as.getCtx(), "C_InvoiceLine_ID=?", + MCostDetail cd = get (as.getCtx(), "C_InvoiceLine_ID=? AND Coalesce(M_CostElement_ID,0)="+M_CostElement_ID, C_InvoiceLine_ID, M_AttributeSetInstance_ID, as.getC_AcctSchema_ID(), trxName); // if (cd == null) // createNew @@ -796,7 +798,20 @@ public class MCostDetail extends X_M_CostDetail else { MCostElement ce = MCostElement.get(getCtx(), getM_CostElement_ID()); - ok = process (as, product, ce, Org_ID, M_ASI_ID); + if (ce.getCostingMethod() == null) + { + MCostElement[] ces = MCostElement.getCostingMethods(this); + for (MCostElement costingElement : ces) + { + ok = process (as, product, costingElement, Org_ID, M_ASI_ID); + if (!ok) + break; + } + } + else + { + ok = process (as, product, ce, Org_ID, M_ASI_ID); + } } // Save it @@ -859,6 +874,14 @@ public class MCostDetail extends X_M_CostDetail amt = getAmt(); } // end MZ + + boolean costAdjustment = false; + //landed cost adjustment + if (this.getM_CostElement_ID() > 0 && this.getM_CostElement_ID() != ce.getM_CostElement_ID() && getC_InvoiceLine_ID() > 0) + { + qty = BigDecimal.ZERO; + costAdjustment = true; + } int precision = as.getCostingPrecision(); BigDecimal price = amt; @@ -942,6 +965,10 @@ public class MCostDetail extends X_M_CostDetail cost.setWeightedAverage(amt, qty); if (log.isLoggable(Level.FINER)) log.finer("Inv - AverageInv - " + cost); } + else if (ce.isAveragePO() && costAdjustment) + { + cost.setWeightedAverage(amt, qty); + } else if (ce.isFifo() || ce.isLifo()) { @@ -958,7 +985,7 @@ public class MCostDetail extends X_M_CostDetail cost.add(amt, qty); if (log.isLoggable(Level.FINER)) log.finer("Inv - FiFo/LiFo - " + cost); } - else if (ce.isLastInvoice()) + else if (ce.isLastInvoice() && !costAdjustment) { if (!isReturnTrx) { @@ -973,7 +1000,7 @@ public class MCostDetail extends X_M_CostDetail cost.add(amt, qty); if (log.isLoggable(Level.FINER)) log.finer("Inv - LastInv - " + cost); } - else if (ce.isStandardCosting()) + else if (ce.isStandardCosting() && !costAdjustment) { // Update cost record only if it is zero if (cost.getCurrentCostPrice().signum() == 0 @@ -996,54 +1023,7 @@ public class MCostDetail extends X_M_CostDetail // Interface cost.add(amt, qty); if (log.isLoggable(Level.FINER)) log.finer("Inv - UserDef - " + cost); - } - /* - else if (!ce.isCostingMethod()) // Cost Adjustments - { - // AZ Goodwill - //get costing method for product - String costingMethod = product.getCostingMethod(as); - if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || - MAcctSchema.COSTINGMETHOD_AverageInvoice.equals(costingMethod)) - { - // Problem with Landed Costs: certain cost element may not occur in every purchases, - // causing the average calculation of that cost element wrongly took the current qty. - // - // Solution: - // Make sure the current qty is reflecting the actual qty in storage - // - StringBuilder sql = new StringBuilder("SELECT COALESCE(SUM(QtyOnHand),0) FROM M_StorageOnHand") - .append(" WHERE AD_Client_ID=").append(cost.getAD_Client_ID()) - .append(" AND M_Product_ID=").append(cost.getM_Product_ID()); - //Costing Level - String CostingLevel = product.getCostingLevel(as); - if (MAcctSchema.COSTINGLEVEL_Organization.equals(CostingLevel)) - sql.append(" AND AD_Org_ID=").append(cost.getAD_Org_ID()); - else if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)) - sql.append(" AND M_AttributeSetInstance_ID=").append(M_ASI_ID); - // - BigDecimal qtyOnhand = DB.getSQLValueBD(get_TrxName(), sql.toString()); - if (qtyOnhand.signum() != 0) - { - BigDecimal oldSum = cost.getCurrentCostPrice().multiply(cost.getCurrentQty()); - BigDecimal sumAmt = oldSum.add(amt); // amt is total already - BigDecimal costs = sumAmt.divide(qtyOnhand, precision, BigDecimal.ROUND_HALF_UP); - cost.setCurrentCostPrice(costs); - } - cost.setCumulatedAmt(cost.getCumulatedAmt().add(amt)); - cost.setCumulatedQty(cost.getCumulatedQty().add(qty)); - cost.setCurrentQty(qtyOnhand); - } - else //original logic from Compiere - { - BigDecimal cCosts = cost.getCurrentCostPrice().add(amt); - cost.setCurrentCostPrice(cCosts); - cost.add(amt, qty); - } - // end AZ - if (log.isLoggable(Level.FINER)) log.finer("Inv - Landed Costs - " + cost); - } - */ + } // else // log.warning("Inv - " + ce + " - " + cost); } @@ -1177,53 +1157,6 @@ public class MCostDetail extends X_M_CostDetail else log.warning("QtyAdjust - " + ce + " - " + cost); - //AZ Goodwill - //Also update Landed Costs to reflect the actual qty in storage - /* - String costingMethod = ce.getCostingMethod(); - if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || - MAcctSchema.COSTINGMETHOD_AverageInvoice.equals(costingMethod)) - { - MCostElement[] lce = MCostElement.getNonCostingMethods(this); - if (lce.length > 0) - { - StringBuilder sql = new StringBuilder("SELECT COALESCE(SUM(QtyOnHand),0) FROM M_StorageOnHand") - .append(" WHERE AD_Client_ID=").append(cost.getAD_Client_ID()) - .append(" AND M_Product_ID=").append(cost.getM_Product_ID()); - //Costing Level - String CostingLevel = product.getCostingLevel(as); - if (MAcctSchema.COSTINGLEVEL_Organization.equals(CostingLevel)) - sql.append(" AND AD_Org_ID=").append(cost.getAD_Org_ID()); - else if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)) - sql.append(" AND M_AttributeSetInstance_ID=").append(M_ASI_ID); - // - BigDecimal qtyOnhand = DB.getSQLValueBD(get_TrxName(), sql.toString()); - for (int i = 0 ; i < lce.length ; i++) - { - MCost lCost = MCost.get(getCtx(), cost.getAD_Client_ID(), cost.getAD_Org_ID(), - cost.getM_Product_ID(), cost.getM_CostType_ID(), cost.getC_AcctSchema_ID(), - lce[i].getM_CostElement_ID(), cost.getM_AttributeSetInstance_ID(), get_TrxName()); - if (lCost != null) - { - if (qtyOnhand.signum() != 0) - { - // new average cost - BigDecimal oldSum = lCost.getCurrentCostPrice().multiply(lCost.getCurrentQty()); - BigDecimal costs = oldSum.divide(qtyOnhand, precision, BigDecimal.ROUND_HALF_UP); - lCost.setCurrentCostPrice(costs); - } - lCost.setCurrentQty(qtyOnhand); - if (!lCost.save()) - { - log.warning("Update Landed Costs (Qty) fail: " + lce + " - " + lCost); - return false; - } - } - } - }//end-if - } - */ - //end AZ } else // unknown or no id { diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 2180842ddb..c68d731039 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1605,16 +1605,12 @@ public class MInOut extends X_M_InOut implements DocAction iLine.saveEx(); // update matched invoice with ASI inv.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); } - boolean isNewMatchInv = false; - if (inv.get_ID() == 0) - isNewMatchInv = true; if (!inv.save(get_TrxName())) { m_processMsg = CLogger.retrieveErrorString("Could not create Inv Matching"); return DocAction.STATUS_Invalid; } - if (isNewMatchInv) - addDocsPostProcess(inv); + addDocsPostProcess(inv); } } @@ -1625,16 +1621,17 @@ public class MInOut extends X_M_InOut implements DocAction // Ship - PO MMatchPO po = MMatchPO.create (null, sLine, getMovementDate(), matchQty); if (po != null) { - boolean isNewMatchPO = false; - if (po.get_ID() == 0) - isNewMatchPO = true; if (!po.save(get_TrxName())) { m_processMsg = "Could not create PO Matching"; return DocAction.STATUS_Invalid; } - if (isNewMatchPO) + if (!po.isPosted()) addDocsPostProcess(po); + MMatchInv matchInvCreated = po.getMatchInvCreated(); + if (matchInvCreated != null) { + addDocsPostProcess(matchInvCreated); + } } // Update PO with ASI if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 @@ -1655,15 +1652,12 @@ public class MInOut extends X_M_InOut implements DocAction MMatchPO po = MMatchPO.create (iLine, sLine, getMovementDate(), matchQty); if (po != null) { - boolean isNewMatchPO = false; - if (po.get_ID() == 0) - isNewMatchPO = true; if (!po.save(get_TrxName())) { m_processMsg = "Could not create PO(Inv) Matching"; return DocAction.STATUS_Invalid; } - if (isNewMatchPO) + if (!po.isPosted()) addDocsPostProcess(po); } diff --git a/org.adempiere.base/src/org/compiere/model/MInOutLine.java b/org.adempiere.base/src/org/compiere/model/MInOutLine.java index 2489de1d82..0479bda181 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOutLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInOutLine.java @@ -651,8 +651,12 @@ public class MInOutLine extends X_M_InOutLine MInvoiceLine m_il = MInvoiceLine.getOfInOutLine(this); if (m_il == null) { - log.severe("No Invoice Line for: " + this.toString()); - return Env.ZERO; + m_il = MInvoiceLine.getOfInOutLineFromMatchInv(this); + if (m_il == null) + { + log.severe("No Invoice Line for: " + this.toString()); + return Env.ZERO; + } } return this.getMovementQty().multiply(m_il.getPriceActual()); // Actual delivery } diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index c762d01750..be7f08cd7a 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -1807,17 +1807,13 @@ public class MInvoice extends X_C_Invoice implements DocAction matchQty = receiptLine.getMovementQty(); MMatchInv inv = new MMatchInv(line, getDateInvoiced(), matchQty); - boolean isNewMatchInv = false; - if (inv.get_ID() == 0) - isNewMatchInv = true; if (!inv.save(get_TrxName())) { m_processMsg = CLogger.retrieveErrorString("Could not create Invoice Matching"); return DocAction.STATUS_Invalid; } matchInv++; - if (isNewMatchInv) - addDocsPostProcess(inv); + addDocsPostProcess(inv); } // Update Order Line @@ -1845,18 +1841,15 @@ public class MInvoice extends X_C_Invoice implements DocAction BigDecimal matchQty = line.getQtyInvoiced(); MMatchPO po = MMatchPO.create (line, null, getDateInvoiced(), matchQty); - boolean isNewMatchPO = false; if (po != null) { - if (po.get_ID() == 0) - isNewMatchPO = true; if (!po.save(get_TrxName())) { m_processMsg = "Could not create PO Matching"; return DocAction.STATUS_Invalid; } matchPO++; - if (isNewMatchPO) + if (!po.isPosted() && po.getM_InOutLine_ID() > 0) // match po don't post if receipt is not assigned, and it doesn't create avg po record addDocsPostProcess(po); } } diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index f55d4f5c05..b087747a1e 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -52,7 +52,7 @@ public class MInvoiceLine extends X_C_InvoiceLine /** * */ - private static final long serialVersionUID = -5113860437274708398L; + private static final long serialVersionUID = 6157080330492848409L; /** * Get Invoice Line referencing InOut Line @@ -78,6 +78,29 @@ public class MInvoiceLine extends X_C_InvoiceLine return retValue; } // getOfInOutLine + /** + * Get Invoice Line referencing InOut Line - from MatchInv + * @param sLine shipment line + * @return (first) invoice line + */ + public static MInvoiceLine getOfInOutLineFromMatchInv(MInOutLine sLine) { + if (sLine == null) + return null; + final String whereClause = "C_InvoiceLine_ID IN (SELECT C_InvoiceLine_ID FROM M_MatchInv WHERE M_InOutLine_ID=?)"; + List list = new Query(sLine.getCtx(),I_C_InvoiceLine.Table_Name,whereClause,sLine.get_TrxName()) + .setParameters(sLine.getM_InOutLine_ID()) + .list(); + + MInvoiceLine retValue = null; + if (list.size() > 0) { + retValue = list.get(0); + if (list.size() > 1) + s_log.warning("More than one C_InvoiceLine of " + sLine); + } + + return retValue; + } + /** Static Logger */ private static CLogger s_log = CLogger.getCLogger (MInvoiceLine.class); @@ -1053,9 +1076,9 @@ public class MInvoiceLine extends X_C_InvoiceLine // end MZ if (base.signum() != 0) { - double result = getLineNetAmt().multiply(base).doubleValue(); - result /= total.doubleValue(); - lca.setAmt(result, getPrecision()); + BigDecimal result = getLineNetAmt().multiply(base); + result = result.divide(total, BigDecimal.ROUND_HALF_UP); + lca.setAmt(result.doubleValue(), getPrecision()); } if (!lca.save()){ msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca); @@ -1079,6 +1102,8 @@ public class MInvoiceLine extends X_C_InvoiceLine lca.setM_Product_ID(iol.getM_Product_ID()); lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID()); BigDecimal base = iol.getBase(lc.getLandedCostDistribution()); + if (base.signum() == 0) + return "Base value is 0 - " + lc.getLandedCostDistribution(); lca.setBase(base); lca.setAmt(getLineNetAmt()); // MZ Goodwill @@ -1174,9 +1199,9 @@ public class MInvoiceLine extends X_C_InvoiceLine // end MZ if (base.signum() != 0) { - double result = getLineNetAmt().multiply(base).doubleValue(); - result /= total.doubleValue(); - lca.setAmt(result, getPrecision()); + BigDecimal result = getLineNetAmt().multiply(base); + result = result.divide(total, BigDecimal.ROUND_HALF_UP); + lca.setAmt(result.doubleValue(), getPrecision()); } if (!lca.save()){ msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca); diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index 41904ec972..8bc2e6e388 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -59,8 +59,7 @@ public class MMatchPO extends X_M_MatchPO /** * */ - private static final long serialVersionUID = 7189366329684552916L; - + private static final long serialVersionUID = -3669451656879485463L; /** * Get PO Match with order/invoice @@ -446,6 +445,7 @@ public class MMatchPO extends X_M_MatchPO s_log.fine(msg); continue; } + mpo.setMatchInvCreated(matchInv); if (savepoint != null) { try { @@ -549,7 +549,28 @@ public class MMatchPO extends X_M_MatchPO return retValue; } // create - + + private MMatchInv m_matchInv; + + /** + * Register the match inv created for immediate accounting purposes + * @param matchInv + */ + private void setMatchInvCreated(MMatchInv matchInv) { + m_matchInv = matchInv; + } + + /** + * Get the match inv created for immediate accounting purposes + * Is cleared after read, so if you read twice second time it returns null + * @param matchInv + */ + public MMatchInv getMatchInvCreated() { + MMatchInv tmp = m_matchInv; + m_matchInv = null; + return tmp; + } + /** Static Logger */ private static CLogger s_log = CLogger.getCLogger (MMatchPO.class); diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLine.java b/org.adempiere.base/src/org/compiere/model/MRfQLine.java index 5a064a4e09..ab39cf0438 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQLine.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQLine.java @@ -85,8 +85,6 @@ public class MRfQLine extends X_C_RfQLine public MRfQLine (Properties ctx, ResultSet rs, String trxName) { super(ctx, rs, trxName); - if (get_ID() > 0) - s_cache.put(new Integer(get_ID()), this); } // MRfQLine /** diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java b/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java index 3cd9688fa3..212c536174 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQLineQty.java @@ -89,8 +89,6 @@ public class MRfQLineQty extends X_C_RfQLineQty public MRfQLineQty (Properties ctx, ResultSet rs, String trxName) { super(ctx, rs, trxName); - if (get_ID() > 0) - s_cache.put (new Integer (get_ID()), this); } // MRfQLineQty /** diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 63f89ccc02..3e77508e0c 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -844,6 +844,8 @@ public final class DB pstmt.setTimestamp(index, (Timestamp)param); else if (param instanceof Boolean) pstmt.setString(index, ((Boolean)param).booleanValue() ? "Y" : "N"); + else if (param instanceof byte[]) + pstmt.setBytes(index, (byte[]) param); else throw new DBException("Unknown parameter type "+index+" - "+param); } diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNode.java b/org.adempiere.base/src/org/compiere/wf/MWFNode.java index 961cd2bc76..e3f8398bc3 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFNode.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFNode.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.Properties; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.DBException; import org.compiere.model.MColumn; import org.compiere.model.Query; @@ -104,9 +105,10 @@ public class MWFNode extends X_AD_WF_Node setXPosition (0); setYPosition (0); } - // Save to Cache - if (get_ID() != 0) - s_cache.put (new Integer(getAD_WF_Node_ID()), this); + if (getAD_WF_Node_ID() > 0) { + loadNext(); + loadTrl(); + } } // MWFNode /** @@ -137,7 +139,14 @@ public class MWFNode extends X_AD_WF_Node loadNext(); loadTrl(); // Save to Cache - s_cache.put (get_ID(), this); + Integer key = null; + try { + key = new Integer (rs.getInt("AD_WF_Node_ID")); + } catch (SQLException e) { + throw new AdempiereException(e); + } + if (key != null && trxName == null && !s_cache.containsKey(key)) + s_cache.put (key, this); } // MWFNode diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java b/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java index 47d8633bc4..c437b2520e 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/ReferenceUtils.java @@ -85,7 +85,8 @@ public class ReferenceUtils { public static String getTableReference(String tableName, String searchColumn, int id, AttributesImpl atts) { String keyColumn = tableName + "_ID"; - if (id > 0 && id <= PackOut.MAX_OFFICIAL_ID) + if ( (id > 0 && id <= PackOut.MAX_OFFICIAL_ID) + || (id == 0 && MTable.isZeroIDTable(tableName))) { //official id atts.addAttribute("", "", "reference", "CDATA", "id"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 2436d63623..b4af00a3d2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -1216,14 +1216,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer }else if(e.isInserting() && gridTab.getRecord_ID() < 0 && gridTab.getTabLevel() > 0 ) { int AD_Tree_ID = Integer.parseInt(gridTab.getParentTab().getValue("AD_Tree_ID").toString()); - MTreeNode root = new MTree (Env.getCtx(), AD_Tree_ID, true, true, null).getRoot(); - SimpleTreeModel treeModel = SimpleTreeModel.createFrom(root); - try { - treePanel.getTree().setItemRenderer(treeModel); - treePanel.getTree().setModel(treeModel); - } catch (Exception treeExc) { - logger.log(Level.SEVERE, "Failed to setup tree"); - } + treePanel.initTree(AD_Tree_ID, windowNo); } } if (listPanel.isVisible()) { 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 47e3d91660..e1ec1dcaad 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 @@ -2931,4 +2931,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements LayoutUtils.openEmbeddedWindow(getComponent().getParent(), findWindow, "overlap"); } } + + public boolean isPendingChanges() { + return boolChanges; + } + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java index 54e7e48380..85e656ffef 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/AbstractDesktop.java @@ -295,4 +295,9 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop win.setPage(page); win.doHighlighted(); } + + protected List getWindows(){ + return windows; + } + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index 253624c85f..62b739ee64 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -18,6 +18,7 @@ package org.adempiere.webui.desktop; import java.io.Serializable; +import java.util.List; import java.util.Map; import java.util.Properties; @@ -26,6 +27,7 @@ import org.adempiere.base.event.IEventManager; import org.adempiere.base.event.IEventTopics; import org.adempiere.model.MBroadcastMessage; import org.adempiere.util.ServerContext; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.apps.BusyDialog; import org.adempiere.webui.apps.ProcessDialog; @@ -593,4 +595,19 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria super.openTask(taskId); updateHelpContext(X_AD_CtxHelp.CTXTYPE_Task, taskId); } + + public boolean isPendingWindow() { + List windows = getWindows(); + if (windows != null) { + for (int idx = 0; idx < windows.size(); idx++) { + Object ad = windows.get(idx); + if (ad != null && ad instanceof ADWindow) { + if ( ((ADWindow)ad).getADWindowContent().isPendingChanges()) { + return true; + } + } + } + } + return false; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java index 7c12de8ca5..4a8b670e75 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java @@ -204,4 +204,6 @@ public interface IDesktop extends UIPart { public void updateHelpContext(String ctxType, int recordId); public void updateHelpTooltip(GridField gridField); + + public boolean isPendingWindow(); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java index 1de491c144..3c2f912b7c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HelpController.java @@ -216,7 +216,7 @@ public class HelpController } else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Process)) { - MProcess process = new MProcess(Env.getCtx(), recordId, null); + MProcess process = MProcess.get(Env.getCtx(), recordId); if (!Env.isBaseLanguage(Env.getCtx(), "AD_Process")) { nameMsg = process.get_Translation("Name"); @@ -322,50 +322,84 @@ public class HelpController } } } - else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Workflow)) - { - MWorkflow workflow = new MWorkflow(Env.getCtx(), recordId, null); - if (workflow != null && workflow.getName() != null && workflow.getName().length() != 0) - { - sb.append("

\n" + workflow.getName() + ""); - - if (workflow.getDescription() != null && workflow.getDescription().length() != 0) - sb.append("

\n" + workflow.getDescription() + ""); - - if (workflow.getHelp() != null && workflow.getHelp().length() != 0) - sb.append("

\n" + workflow.getHelp()); - } - } - else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Task)) - { - MTask task = new MTask(Env.getCtx(), recordId, null); - if (task != null && task.getName() != null && task.getName().length() != 0) - { - sb.append("

\n" + task.getName() + ""); - - if (task.getDescription() != null && task.getDescription().length() != 0) - sb.append("

\n" + task.getDescription() + ""); - - if (task.getHelp() != null && task.getHelp().length() != 0) - sb.append("

\n" + task.getHelp()); - } - } - else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Node)) - { - MWFNode node = new MWFNode(Env.getCtx(), recordId, null); - if (node != null && node.getName() != null && node.getName().length() != 0) - { - sb.append("

\n" + node.getName() + ""); - - if (node.getDescription() != null && node.getDescription().length() != 0) - sb.append("

\n" + node.getDescription() + ""); - - if (node.getHelp() != null && node.getHelp().length() != 0) - sb.append("

\n" + node.getHelp()); - } - } - } + else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Workflow)) { + MWorkflow workflow = MWorkflow.get(Env.getCtx(), recordId); + boolean trl = !Env.getLoginLanguage(Env.getCtx()).isBaseLanguage(); + + nameMsg = workflow.getName(trl); + + if (workflow != null && nameMsg != null + && nameMsg.length() != 0) { + sb.append("

\n" + nameMsg + ""); + + descMsg = workflow.getDescription(trl); + if (descMsg != null && descMsg.length() != 0) + sb.append("

\n" + descMsg + ""); + + helpMsg = workflow.getHelp(trl); + if (helpMsg != null && helpMsg.length() != 0) + sb.append("

\n" + helpMsg); + } + + } else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Task)) { + MTask task = new MTask(Env.getCtx(), recordId, null); + + if (!Env.getLoginLanguage(Env.getCtx()).isBaseLanguage()) { + + nameMsg = task.get_Translation("Name"); + + if (task != null && nameMsg != null + && nameMsg.length() != 0) { + sb.append("

\n" + nameMsg + ""); + + descMsg = task.get_Translation("Description"); + if (descMsg != null && descMsg.length() != 0) + sb.append("

\n" + descMsg + ""); + + helpMsg = task.get_Translation("Help"); + if (helpMsg != null && helpMsg.length() != 0) + sb.append("

\n" + helpMsg); + } + } else { + + if (task != null && task.getName() != null + && task.getName().length() != 0) { + sb.append("

\n" + task.getName() + ""); + + if (task.getDescription() != null + && task.getDescription().length() != 0) + sb.append("

\n" + task.getDescription() + + ""); + + if (task.getHelp() != null + && task.getHelp().length() != 0) + sb.append("

\n" + task.getHelp()); + } + } + } else if (ctxType.equals(X_AD_CtxHelp.CTXTYPE_Node)) { + MWFNode node = MWFNode.get(Env.getCtx(), recordId); + + boolean trl = !Env.getLoginLanguage(Env.getCtx()).isBaseLanguage(); + + nameMsg = node.getName(trl); + + if (node != null && nameMsg != null + && nameMsg.length() != 0) { + sb.append("

\n" + nameMsg + ""); + + descMsg = node.getDescription(trl); + if (descMsg != null && descMsg.length() != 0) + sb.append("

\n" + descMsg + ""); + + helpMsg = node.getHelp(trl); + if (helpMsg != null && helpMsg.length() != 0) + sb.append("

\n" + helpMsg); + } + + } + } + sb.append("\n\n"); htmlContextHelp.setContent(sb.toString()); @@ -519,6 +553,7 @@ public class HelpController finally { DB.close(rs, pstmt); + rs=null; pstmt=null; } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java index 354ef58b69..ca2265442f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java @@ -19,11 +19,13 @@ package org.adempiere.webui.panel; import java.util.Properties; +import org.adempiere.util.Callback; import org.adempiere.webui.component.Label; import org.adempiere.webui.component.Menupopup; import org.adempiere.webui.component.Messagebox; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.FeedbackManager; +import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.WPreference; import org.compiere.model.MClient; import org.compiere.model.MOrg; @@ -63,7 +65,10 @@ public class UserPanel implements EventListener, Composer protected Component component; - public UserPanel() + private static final String ON_DEFER_CHANGE_ROLE = "onDeferChangeRole"; + private static final String ON_DEFER_LOGOUT = "onDeferLogout"; + + public UserPanel() { super(); this.ctx = Env.getCtx(); @@ -103,6 +108,9 @@ public class UserPanel implements EventListener, Composer SessionManager.getSessionApplication().getKeylistener().addEventListener(Events.ON_CTRL_KEY, this); component.addEventListener("onEmailSupport", this); + + component.addEventListener(ON_DEFER_LOGOUT, this); + component.addEventListener(ON_DEFER_CHANGE_ROLE, this); } private String getUserName() @@ -143,7 +151,21 @@ public class UserPanel implements EventListener, Composer if (logout == event.getTarget()) { - SessionManager.logoutSession(); + if (SessionManager.getAppDesktop().isPendingWindow()) { + FDialog.ask(0, component, "ProceedWithTask?", new Callback() { + + @Override + public void onCallback(Boolean result) + { + if (result) + { + Events.echoEvent(ON_DEFER_LOGOUT, component, null); + } + } + }); + } else { + Events.echoEvent(ON_DEFER_LOGOUT, component, null); + } } else if (lblUserNameValue == event.getTarget()) { @@ -153,8 +175,21 @@ public class UserPanel implements EventListener, Composer } else if (changeRole == event.getTarget()) { - MUser user = MUser.get(ctx); - SessionManager.changeRole(user); + if (SessionManager.getAppDesktop().isPendingWindow()) { + FDialog.ask(0, component, "ProceedWithTask?", new Callback() { + + @Override + public void onCallback(Boolean result) + { + if (result) + { + Events.echoEvent(ON_DEFER_CHANGE_ROLE, component, null); + } + } + }); + } else { + Events.echoEvent(ON_DEFER_CHANGE_ROLE, component, null); + } } else if (preference == event.getTarget()) { @@ -202,6 +237,16 @@ public class UserPanel implements EventListener, Composer } } } + else if (ON_DEFER_LOGOUT.equals(event.getName())) + { + SessionManager.logoutSession(); + } + else if (ON_DEFER_CHANGE_ROLE.equals(event.getName())) + { + MUser user = MUser.get(ctx); + SessionManager.changeRole(user); + } + } @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 7398361b74..0ecd852f5f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -31,6 +31,7 @@ import javax.activation.FileDataSource; import javax.servlet.http.HttpServletRequest; import org.adempiere.exceptions.AdempiereException; +import org.adempiere.exceptions.DBException; import org.adempiere.pdf.Document; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.apps.AEnv; @@ -125,7 +126,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab /** * */ - private static final long serialVersionUID = 344552813342946104L; + private static final long serialVersionUID = 6208607687967139151L; /** Window No */ private int m_WindowNo = -1; @@ -296,6 +297,9 @@ public class ZkReportViewer extends Window implements EventListener, ITab bFind.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Find"))); toolBar.appendChild(bFind); bFind.addEventListener(Events.ON_CLICK, this); + if (getAD_Tab_ID(m_reportEngine.getPrintFormat().getAD_Table_ID()) <= 0) { + bFind.setVisible(false); // IDEMPIERE-1185 + } toolBar.appendChild(new Separator("vertical")); @@ -421,6 +425,22 @@ public class ZkReportViewer extends Window implements EventListener, ITab init = true; } + /** + * Get the maintenance tab of the table associated to the report engine + * @return AD_Tab_ID or -1 if not found + */ + private int getAD_Tab_ID(int AD_Table_ID) { + // Get Find Tab Info + final String sql = "SELECT t.AD_Tab_ID " + + "FROM AD_Tab t" + + " INNER JOIN AD_Window w ON (t.AD_Window_ID=w.AD_Window_ID)" + + " INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) " + + "WHERE tt.AD_Table_ID=? " + + "ORDER BY w.IsDefault DESC, t.SeqNo, ABS (tt.AD_Window_ID-t.AD_Window_ID)"; + int AD_Tab_ID = DB.getSQLValueEx(null, sql, AD_Table_ID); + return AD_Tab_ID; + } + private void renderReport() throws Exception { media = null; Listitem selected = previewType.getSelectedItem(); @@ -448,8 +468,10 @@ public class ZkReportViewer extends Window implements EventListener, ITab m_reportEngine.createHTML(file, false, AEnv.getLanguage(Env.getCtx()), new HTMLExtension(Executions.getCurrent().getContextPath(), "rp", this.getUuid())); media = new AMedia(file.getName(), "html", "text/html", file, false); - labelDrill.setVisible(true); - comboDrill.setVisible(true); + if (comboDrill.getItemCount() > 1) { + labelDrill.setVisible(true); + comboDrill.setVisible(true); + } } else if ("XLS".equals(previewType.getSelectedItem().getValue())) { String path = System.getProperty("java.io.tmpdir"); String prefix = makePrefix(m_reportEngine.getName()); @@ -1008,20 +1030,11 @@ public class ZkReportViewer extends Window implements EventListener, ITab */ private void cmd_find() { - int AD_Table_ID = m_reportEngine.getPrintFormat().getAD_Table_ID(); - String title = null; String tableName = null; - // Get Find Tab Info - String sql = "SELECT t.AD_Tab_ID " - // ,w.Name, t.Name, w.IsDefault, t.SeqNo, ABS (tt.AD_Window_ID-t.AD_Window_ID) - + "FROM AD_Tab t" - + " INNER JOIN AD_Window w ON (t.AD_Window_ID=w.AD_Window_ID)" - + " INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) " - + "WHERE tt.AD_Table_ID=? " - + "ORDER BY w.IsDefault DESC, t.SeqNo, ABS (tt.AD_Window_ID-t.AD_Window_ID)"; - int AD_Tab_ID = DB.getSQLValue(null, sql, AD_Table_ID); + int AD_Table_ID = m_reportEngine.getPrintFormat().getAD_Table_ID(); + int AD_Tab_ID = getAD_Tab_ID(AD_Table_ID); // ASP MClient client = MClient.get(Env.getCtx()); String ASPFilter = ""; @@ -1060,10 +1073,13 @@ public class ZkReportViewer extends Window implements EventListener, ITab + " AND ce.AD_Field_ID IS NULL " + " AND ce.ASP_Status = 'H')"; // Hide // - sql = "SELECT Name, TableName FROM AD_Tab_v WHERE AD_Tab_ID=? " + ASPFilter; - if (!Env.isBaseLanguage(Env.getCtx(), "AD_Tab")) + String sql = null; + if (!Env.isBaseLanguage(Env.getCtx(), "AD_Tab")) { sql = "SELECT Name, TableName FROM AD_Tab_vt WHERE AD_Tab_ID=?" - + " AND AD_Language='" + Env.getAD_Language(Env.getCtx()) + "' " + ASPFilter; + + " AND AD_Language='" + Env.getAD_Language(Env.getCtx()) + "' " + ASPFilter; + } else { + sql = "SELECT Name, TableName FROM AD_Tab_v WHERE AD_Tab_ID=? " + ASPFilter; + } PreparedStatement pstmt = null; ResultSet rs = null; try @@ -1080,7 +1096,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab } catch (SQLException e) { - log.log(Level.SEVERE, sql, e); + throw new DBException(e); } finally { diff --git a/org.idempiere.eclipse.platform-feature/update.bat b/org.idempiere.eclipse.platform-feature/update.bat index c118194b91..c94db344cf 100644 --- a/org.idempiere.eclipse.platform-feature/update.bat +++ b/org.idempiere.eclipse.platform-feature/update.bat @@ -4,9 +4,17 @@ cd %~dp0 cp idempiere.ini idempiere.ini.sav +if exist server.xml.sav del /q server.xml.sav +if exist plugins/org.adempiere.tomcat.config_1.0.0/META-INF/tomcat/server.xml ( + copy plugins/org.adempiere.tomcat.config_1.0.0/META-INF/tomcat/server.xml server.xml.sav +) java -Dosgi.noShutdown=false -Dosgi.compatibility.bootdelegation=true -Dosgi.install.area=director -jar plugins/org.eclipse.osgi_3.7.*.jar -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %~dp0 -repository %1 -u org.adempiere.server.product java -Dosgi.noShutdown=false -Dosgi.compatibility.bootdelegation=true -Dosgi.install.area=director -jar plugins/org.eclipse.osgi_3.7.*.jar -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %~dp0 -repository %1 -i org.adempiere.server.product cp idempiere.ini.sav idempiere.ini +if exist server.xml.sav ( + copy server.xml.sav plugins/org.adempiere.tomcat.config_1.0.0/META-INF/tomcat/server.xml + del /q server.xml.sav +) diff --git a/org.idempiere.eclipse.platform-feature/update.sh b/org.idempiere.eclipse.platform-feature/update.sh index 4553aa04f3..32a677d9c0 100644 --- a/org.idempiere.eclipse.platform-feature/update.sh +++ b/org.idempiere.eclipse.platform-feature/update.sh @@ -6,8 +6,23 @@ DESTINATION=$(pwd) cp idempiere.ini idempiere.ini.sav +if [ -f server.xml.sav ]; +then + rm -f server.xml.sav +fi +if [ -f plugins/org.adempiere.tomcat.config_1.0.0/META-INF/tomcat/server.xml ] +then + cp plugins/org.adempiere.tomcat.config_1.0.0/META-INF/tomcat/server.xml server.xml.sav +fi + java -Dosgi.noShutdown=false -Dosgi.compatibility.bootdelegation=true -Dosgi.install.area=director -jar plugins/org.eclipse.osgi_3.7.*.jar -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u org.adempiere.server.product java -Dosgi.noShutdown=false -Dosgi.compatibility.bootdelegation=true -Dosgi.install.area=director -jar plugins/org.eclipse.osgi_3.7.*.jar -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i org.adempiere.server.product cp idempiere.ini.sav idempiere.ini +if [ -f server.xml.sav ] +then + cp server.xml.sav plugins/org.adempiere.tomcat.config_1.0.0/META-INF/tomcat/server.xml + rm -f server.xml.sav +fi + diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java index 15f3f05a52..32b11a47eb 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java @@ -45,6 +45,7 @@ import javax.xml.ws.WebServiceContext; import org.apache.xmlbeans.StringEnumAbstractBase.Table; import org.compiere.model.Lookup; import org.compiere.model.MColumn; +import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; import org.compiere.model.MRefTable; import org.compiere.model.MRole; @@ -57,7 +58,9 @@ import org.compiere.model.X_WS_WebServiceFieldInput; import org.compiere.model.X_WS_WebService_Para; 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.Trx; import org.compiere.util.Util; import org.compiere.util.ValueNamePair; @@ -944,7 +947,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic sqlBuilder.append(" ot.").append(colName).append(" Is Null AND "); } else if (holderPo.get_Value(colName) == null) { return rollbackAndSetError(trx, resp, ret, true, "Web service type " + m_webservicetype.getValue() - + ": Record Identifiier column " + colName + " must be set"); + + ": Record Identifier column " + colName + " must be set"); } else { sqlBuilder.append(" ot.").append(colName).append("=? AND "); sqlParaList.add(holderPo.get_Value(colName)); @@ -1071,11 +1074,38 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic "LookupResolutionFailed")); } - String sql = ADLookup.getDirectAccessSQL(lookup, lookupValue.toUpperCase()); - int id = DB.getSQLValue(localTrxName, sql); - if (id > 0) - value = id; - + int AD_Reference_ID = 0; + if(lookup instanceof MLookup){ + AD_Reference_ID = ((MLookup)lookup).getDisplayType(); + } + + if(AD_Reference_ID==DisplayType.List) + { + if (lookup.getSize() == 0) + lookup.refresh(); + Object[] list = lookup.getData(true, true, true, false,false).toArray(); // IDEMPIERE 90 + + for (Object pair : list) { + if (pair instanceof KeyNamePair) { + KeyNamePair p = (KeyNamePair) pair; + if (p.getName().equalsIgnoreCase(lookupValue)) { + value = p.getID(); + break; + } + } else { + ValueNamePair p = (ValueNamePair) pair; + if (p.getName().equalsIgnoreCase(lookupValue)) { + value = p.getValue(); + break; + } + } + } + }else{ + String sql = ADLookup.getDirectAccessSQL(lookup, lookupValue.toUpperCase()); + int id = DB.getSQLValue(localTrxName, sql); + if (id > 0) + value = id; + } if (value == null) { throw new IdempiereServiceFault(" Invalid Lookup value:" + lookupValue, new QName("LookupResolutionFailed")); } diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java index 8e9a3e98fc..7febafedd9 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java @@ -93,6 +93,9 @@ public class AbstractService { Login login = new Login(m_cs.getCtx()); KeyNamePair[] clients = login.getClients(loginRequest.getUser(), loginRequest.getPass()); + if (clients == null) + return "Error login - User invalid"; + boolean okclient = false; KeyNamePair selectedClient = null; for (KeyNamePair client : clients) { diff --git a/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml b/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml deleted file mode 100644 index 6d1ccd7ea1..0000000000 --- a/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml +++ /dev/null @@ -1,849 +0,0 @@ - -/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/GW_Sample_WebServices.zip b/org.idempiere.webservices/testScripts/GW_Sample_WebServices.zip new file mode 100644 index 0000000000..691eb49dac Binary files /dev/null and b/org.idempiere.webservices/testScripts/GW_Sample_WebServices.zip differ diff --git a/org.idempiere.webservices/testScripts/MsgModelRunProcess b/org.idempiere.webservices/testScripts/MsgModelRunProcess deleted file mode 100644 index b3b2448ae6..0000000000 --- a/org.idempiere.webservices/testScripts/MsgModelRunProcess +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - ProcessInvoice - - - - WebService - WebService - en_US - 11 - 50004 - 11 - 103 - - - - - - diff --git a/org.idempiere.webservices/testScripts/MsgModelSetDocAction b/org.idempiere.webservices/testScripts/MsgModelSetDocAction deleted file mode 100644 index 181c5c1fd5..0000000000 --- a/org.idempiere.webservices/testScripts/MsgModelSetDocAction +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - 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 deleted file mode 100644 index bad61bf6e7..0000000000 --- a/org.idempiere.webservices/testScripts/TestModelMsg.sh +++ /dev/null @@ -1,18 +0,0 @@ -: -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 diff --git a/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml b/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml new file mode 100644 index 0000000000..820f83227c --- /dev/null +++ b/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml @@ -0,0 +1,714 @@ + +https://localhost:8443/ADInterface/services/ModelADService?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/ModelADService<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:createData> + <_0:ModelCRUDRequest> + <_0:ModelCRUD> + <_0:serviceType>CreateBPartner + <_0:TableName>C_BPartner + <_0:RecordID>0 + <_0:Action>Create + <_0:DataRow> + <_0:field column="Value"> + <_0:val>GlobalQSS + + <_0:field column="Name"> + <_0:val>Quality Systems & Solutions + + <_0:field column="TaxID"> + <_0:val>830.085.359-4 + + <_0:field column="IsVendor"> + <_0:val>Y + + <_0:field column="IsCustomer"> + <_0:val>N + + <_0:field column="IsTaxExempt"> + <_0:val>N + + <_0:field column="Name2"> + <_0:val>QSS Ltda. - http://www.globalqss.com + + <_0:field column="C_BP_Group_ID"> + <_0:val>104 + + + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:deleteData> + <_0:ModelCRUDRequest> + <_0:ModelCRUD> + <_0:serviceType>DeleteBPartner + <_0:TableName>C_BPartner + <_0:RecordID>114 + <_0:Action>Delete + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:getList> + <_0:ModelGetListRequest> + <_0:ModelGetList> + <_0:serviceType>GetListSalesRegions + <_0:AD_Reference_ID>144 + <_0:Filter> + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:queryData> + <_0:ModelCRUDRequest> + <_0:ModelCRUD> + <_0:serviceType>QueryBPartner + <_0:TableName>C_BPartner + <_0:Filter>name<'S' + <_0:Action>Read + <_0:DataRow> + <_0:field column="C_BP_Group_ID"> + <_0:val>103 + + + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:readData> + <_0:ModelCRUDRequest> + <_0:ModelCRUD> + <_0:serviceType>ReadBPartner + <_0:TableName>C_BPartner + <_0:RecordID>114 + <_0:Action>Read + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP SettingsExample on how to run report Storage Detail with HQ Warehouse and Patio Chair as parameters You need to define web service security for: Web Service Type: RunStorageDetail Web Service Parameters: AD_Process_ID Constant 236 AD_Menu_ID Constant 0 AD_Record_ID Constant 0 And allow execution to the WebService role on the report. <xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:runProcess> + <_0:ModelRunProcessRequest> + <_0:ModelRunProcess AD_Process_ID="236"> + <_0:serviceType>RunStorageDetail + <_0:ParamValues> + <_0:field column="M_Warehouse_ID"> + <_0:val>103 + + + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:runProcess> + <_0:ModelRunProcessRequest> + <_0:ModelRunProcess AD_Process_ID="111" AD_Menu_ID="0" AD_Record_ID="103" DocAction="CO"> + <_0:serviceType>ProcessInvoice + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:setDocAction> + <_0:ModelSetDocActionRequest> + <_0:ModelSetDocAction> + <_0:serviceType>ActionCompleteOrder + <_0:tableName>C_Order + <_0:recordID>102 + <_0:docAction>CO + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + <_0:updateData> + <_0:ModelCRUDRequest> + <_0:ModelCRUD> + <_0:serviceType>UpdateBPartner + <_0:TableName>C_BPartner + <_0:RecordID>114 + <_0:Action>Update + <_0:DataRow> + <_0:field column="URL"> + <_0:val>http://www.treefarm.com + + + + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>Global HTTP Settings \ No newline at end of file diff --git a/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml b/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml index 4b4353f4a0..7f9d6cdc94 100644 --- a/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml +++ b/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml @@ -1,5 +1,5 @@ -http://localhost:9191/ADInterface/services/compositeInterface?wsdl +https://localhost:8443/ADInterface/services/compositeInterface?wsdl @@ -382,277 +382,270 @@ - + -]]>http://schemas.xmlsoap.org/wsdl/http://localhost:9191/ADInterface/services/compositeInterface<xml-fragment/>UTF-8http://localhost:9191/ADInterface/services/compositeInterface +]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/compositeInterface<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/compositeInterface <_0:compositeOperation> <_0:CompositeRequest> <_0:ADLoginRequest> - <_0:user>WebService - <_0:pass>WebService - <_0:lang>en_US - <_0:ClientID>11 - <_0:RoleID>50004 - <_0:OrgID>11 - <_0:WarehouseID>103 - <_0:stage>9 + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 <_0:serviceType>SyncOrder <_0:operations> - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateBPartner - <_0:TableName>C_BPartner - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="Name"> - <_0:val>Trek Global - - <_0:field column="email"> - <_0:val>dpansheriya@trekglobal.com - - <_0:field column="TaxID"> - <_0:val>830.085.359-4 - - <_0:field column="IsVendor"> - <_0:val>Y - - <_0:field column="IsCustomer"> - <_0:val>N - - <_0:field column="IsTaxExempt"> - <_0:val>N - - <_0:field column="C_BP_Group_ID"> - <_0:val>104 - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateUser - <_0:TableName>AD_User - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="Name"> - <_0:val>Deepak Pansheriya - - <_0:field column="EMail"> - <_0:val>dpansheriya@trekglobal.com - - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="Phone"> - <_0:val>9228785734 - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateLocation1 - <_0:TableName>C_Location - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="C_Country_ID" lval="United States"/> - <_0:field column="Address1"> - <_0:val>1625 Cowboy Chaps Place - - <_0:field column="Address2"> - <_0:val> - - <_0:field column="C_Region_ID" lval="NV"/> - <_0:field column="RegionName"> - <_0:val>NV - - <_0:field column="Postal"> - <_0:val>89002 - - <_0:field column="City"> - <_0:val>Henderson - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateBPLocation - <_0:TableName>C_BPartner_Location - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="C_Location_ID"> - <_0:val>@C_Location.C_Location_ID - - <_0:field column="IsShipTo"> - <_0:val>True - - <_0:field column="IsBillTo"> - <_0:val>True - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateUser - <_0:TableName>AD_User - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="EMail"> - <_0:val>dpansheriya@trekglobal.com - - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="C_BPartner_Location_ID"> - <_0:val>@C_BPartner_Location.C_BPartner_Location_ID - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>createOrderRecord - <_0:TableName>C_Order - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="M_Warehouse_ID"> - <_0:val>50001 - - <_0:field column="DocumentNo"> - <_0:val>DEEPTEST03 - - <_0:field column="AD_User_ID"> - <_0:val>@AD_User.AD_User_ID - - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="C_BPartner_Location_ID"> - <_0:val>@C_BPartner_Location.C_BPartner_Location_ID - - <_0:field column="Bill_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="Bill_Location_ID"> - <_0:val>@C_BPartner_Location.C_BPartner_Location_ID - - <_0:field column="C_DocTypeTarget_ID"> - <_0:val>132 - - - <_0:field column="FreightCostRule" lval="Freight included"/> - <_0:field column="FreightAmt"> - <_0:val>6 - - - - - <_0:operation preCommit="true" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateOrderLine - <_0:TableName>C_OrderLine - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="AD_Org_ID"> - <_0:val>11 - - <_0:field column="AD_Client_ID"> - <_0:val>11 - - - <_0:field column="C_Order_ID"> - <_0:val>@C_Order.C_Order_ID - - <_0:field column="M_Product_ID"> - <_0:val>140 - - <_0:field column="QtyEntered"> - <_0:val>1 - - <_0:field column="QtyOrdered"> - <_0:val>1 - - <_0:field column="Line"> - <_0:val>10 - - <_0:field column="PriceEntered"> - <_0:val>12 - - <_0:field column="PriceActual"> - <_0:val>13 - - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateOrderLine - <_0:TableName>C_OrderLine - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="C_Order_ID"> - <_0:val>@C_Order.C_Order_ID - - <_0:field column="M_Product_ID"> - <_0:val>123 - - <_0:field column="QtyEntered"> - <_0:val>2 - - <_0:field column="QtyOrdered"> - <_0:val>2 - - <_0:field column="Line"> - <_0:val>10 - - <_0:field column="PriceEntered"> - <_0:val>14 - - <_0:field column="PriceActual"> - <_0:val>15 - - - - - - <_0:operation preCommit="true" postCommit="true"> - <_0:TargetPort>setDocAction - <_0:ModelSetDocAction> - <_0:serviceType>CompleteOrder - <_0:tableName>C_Order - <_0:recordID>0 - <_0:recordIDVariable>@C_Order.C_Order_ID - <_0:docAction>CO - - + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateBPartner + <_0:TableName>C_BPartner + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="Name"> + <_0:val>Trek Global + + <_0:field column="TaxID"> + <_0:val>830.085.359-4 + + <_0:field column="IsVendor"> + <_0:val>Y + + <_0:field column="IsCustomer"> + <_0:val>N + + <_0:field column="IsTaxExempt"> + <_0:val>N + + <_0:field column="C_BP_Group_ID"> + <_0:val>104 + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateUser + <_0:TableName>AD_User + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="Name"> + <_0:val>Deepak Pansheriya + + <_0:field column="EMail"> + <_0:val>dpansheriya@trekglobal.com + + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="Phone"> + <_0:val>9228785734 + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateLocation1 + <_0:TableName>C_Location + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="C_Country_ID" lval="United States"/> + <_0:field column="Address1"> + <_0:val>1625 Cowboy Chaps Place + + <_0:field column="Address2"> + <_0:val/> + + <_0:field column="C_Region_ID" lval="NV"/> + <_0:field column="RegionName"> + <_0:val>NV + + <_0:field column="Postal"> + <_0:val>89002 + + <_0:field column="City"> + <_0:val>Henderson + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateBPLocation + <_0:TableName>C_BPartner_Location + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="C_Location_ID"> + <_0:val>@C_Location.C_Location_ID + + <_0:field column="IsShipTo"> + <_0:val>True + + <_0:field column="IsBillTo"> + <_0:val>True + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateUser + <_0:TableName>AD_User + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="EMail"> + <_0:val>dpansheriya@trekglobal.com + + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="C_BPartner_Location_ID"> + <_0:val>@C_BPartner_Location.C_BPartner_Location_ID + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>createOrderRecord + <_0:TableName>C_Order + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="M_Warehouse_ID"> + <_0:val>50001 + + <_0:field column="DocumentNo"> + <_0:val>DEEPTEST03 + + <_0:field column="AD_User_ID"> + <_0:val>@AD_User.AD_User_ID + + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="C_BPartner_Location_ID"> + <_0:val>@C_BPartner_Location.C_BPartner_Location_ID + + <_0:field column="Bill_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="Bill_Location_ID"> + <_0:val>@C_BPartner_Location.C_BPartner_Location_ID + + <_0:field column="C_DocTypeTarget_ID"> + <_0:val>132 + + <_0:field column="FreightCostRule" lval="Freight included"/> + <_0:field column="FreightAmt"> + <_0:val>6 + + + + + <_0:operation preCommit="true" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateOrderLine + <_0:TableName>C_OrderLine + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="AD_Org_ID"> + <_0:val>11 + + <_0:field column="AD_Client_ID"> + <_0:val>11 + + <_0:field column="C_Order_ID"> + <_0:val>@C_Order.C_Order_ID + + <_0:field column="M_Product_ID"> + <_0:val>140 + + <_0:field column="QtyEntered"> + <_0:val>1 + + <_0:field column="QtyOrdered"> + <_0:val>1 + + <_0:field column="Line"> + <_0:val>10 + + <_0:field column="PriceEntered"> + <_0:val>12 + + <_0:field column="PriceActual"> + <_0:val>13 + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateOrderLine + <_0:TableName>C_OrderLine + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="C_Order_ID"> + <_0:val>@C_Order.C_Order_ID + + <_0:field column="M_Product_ID"> + <_0:val>123 + + <_0:field column="QtyEntered"> + <_0:val>2 + + <_0:field column="QtyOrdered"> + <_0:val>2 + + <_0:field column="Line"> + <_0:val>10 + + <_0:field column="PriceEntered"> + <_0:val>14 + + <_0:field column="PriceActual"> + <_0:val>15 + + + + + <_0:operation preCommit="true" postCommit="true"> + <_0:TargetPort>setDocAction + <_0:ModelSetDocAction> + <_0:serviceType>CompleteOrder + <_0:tableName>C_Order + <_0:recordID>0 + <_0:recordIDVariable>@C_Order.C_Order_ID + <_0:docAction>CO + + -]]> \ No newline at end of file +]]>Global HTTP Settings