hg merge release-5.1 (merge release5.1 into default)

This commit is contained in:
Carlos Ruiz 2018-07-14 18:03:36 +02:00
commit 40bcba3ce2
42 changed files with 791 additions and 223 deletions

View File

@ -0,0 +1,12 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3651 Report Column Set=>Report Column=>User Element List1 not displaying User1_ID values
-- Jun 6, 2018 1:29:52 PM CEST
UPDATE AD_Val_Rule SET Code='C_ElementValue.C_Element_ID IN
(SELECT C_Element_ID FROM C_AcctSchema_Element WHERE AD_Client_ID=@#AD_Client_ID@ AND (ElementType=''@ElementType@'' OR (''@ElementType@''=''CO'' AND ElementType=''AC'')))',Updated=TO_DATE('2018-06-06 13:29:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=258
;
SELECT register_migration_script('201806061330_IDEMPIERE-3651.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3651 Report Column Set=>Report Column=>User Element List1 not displaying User1_ID values
-- Jun 13, 2018 2:32:06 PM CEST
UPDATE AD_Val_Rule SET Code='C_ElementValue.C_Element_ID IN
(SELECT C_Element_ID FROM C_AcctSchema_Element WHERE IsActive=''Y'' AND AD_Client_ID=@#AD_Client_ID@ AND (ElementType=''@ElementType@'' OR (''@ElementType@''=''CO'' AND ElementType=''AC'')))',Updated=TO_DATE('2018-06-13 14:32:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=258
;
SELECT register_migration_script('201806131433_IDEMPIERE-3651.sql') FROM dual
;

View File

@ -0,0 +1,135 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3738 Reference Color broken
-- Jul 4, 2018 4:02:49 PM CEST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (203229,0,0,'Y',TO_DATE('2018-07-04 16:02:37','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-07-04 16:02:37','YYYY-MM-DD HH24:MI:SS'),100,'Color','Color',NULL,NULL,'Color','D','c43cfcc2-2c92-4e91-88b8-88947297184d')
;
-- Jul 4, 2018 4:03:02 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (213570,0,'Color',135,'Color',7,'N','N','N','N','N',0,'N',27,0,0,'Y',TO_DATE('2018-07-04 16:03:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-07-04 16:03:02','YYYY-MM-DD HH24:MI:SS'),100,203229,'Y','N','D','N','N','N','Y','46472ac6-1648-48d8-b0bd-aef0d61a447f','Y',0,'N','N')
;
-- Jul 4, 2018 4:03:03 PM CEST
ALTER TABLE Test ADD Color VARCHAR2(7) DEFAULT NULL
;
-- Jul 4, 2018 4:03:17 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (205590,'Color',152,213570,'Y',7,260,'N','N','N','N',0,0,'Y',TO_DATE('2018-07-04 16:03:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-07-04 16:03:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','dc447e1a-b62a-4a90-92db-17203eb7d6ac','Y',260,2)
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=10, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=415
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2024
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=417
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=418
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=419
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=420
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=423
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=424
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=90, AD_FieldGroup_ID=103, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=421
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_FieldGroup_ID=103, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=422
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3059
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3062
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=130, AD_FieldGroup_ID=50003, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=425
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=140, AD_FieldGroup_ID=50003, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=426
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=150, AD_FieldGroup_ID=200016, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3209
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3902
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3210
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4251
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3057
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3056
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=210, AD_FieldGroup_ID=123, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205590
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=416
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205058
;
-- Jul 4, 2018 4:08:25 PM CEST
UPDATE Test SET Color='#bfca3f',Updated=TO_DATE('2018-07-04 16:08:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE Test_ID=103
;
-- Jul 4, 2018 4:09:13 PM CEST
UPDATE AD_Menu SET IsActive='N',Updated=TO_DATE('2018-07-04 16:09:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=294
;
-- Jul 4, 2018 4:09:21 PM CEST
UPDATE AD_Window SET IsActive='N',Updated=TO_DATE('2018-07-04 16:09:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=225
;
-- Jul 4, 2018 4:13:03 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:13:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202518
;
-- Jul 4, 2018 4:13:12 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-04 16:13:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202519
;
SELECT register_migration_script('201807041616_IDEMPIERE-3738.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-1421 Tax Group field is enabled in the window Customer
-- Jul 11, 2018 4:25:37 PM CEST
UPDATE AD_Field SET IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-07-11 16:25:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62773
;
SELECT register_migration_script('201807111626_IDEMPIERE-1421.sql') FROM dual
;

View File

@ -0,0 +1,9 @@
-- IDEMPIERE-3651 Report Column Set=>Report Column=>User Element List1 not displaying User1_ID values
-- Jun 6, 2018 1:29:52 PM CEST
UPDATE AD_Val_Rule SET Code='C_ElementValue.C_Element_ID IN
(SELECT C_Element_ID FROM C_AcctSchema_Element WHERE AD_Client_ID=@#AD_Client_ID@ AND (ElementType=''@ElementType@'' OR (''@ElementType@''=''CO'' AND ElementType=''AC'')))',Updated=TO_TIMESTAMP('2018-06-06 13:29:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=258
;
SELECT register_migration_script('201806061330_IDEMPIERE-3651.sql') FROM dual
;

View File

@ -0,0 +1,9 @@
-- IDEMPIERE-3651 Report Column Set=>Report Column=>User Element List1 not displaying User1_ID values
-- Jun 13, 2018 2:32:06 PM CEST
UPDATE AD_Val_Rule SET Code='C_ElementValue.C_Element_ID IN
(SELECT C_Element_ID FROM C_AcctSchema_Element WHERE IsActive=''Y'' AND AD_Client_ID=@#AD_Client_ID@ AND (ElementType=''@ElementType@'' OR (''@ElementType@''=''CO'' AND ElementType=''AC'')))',Updated=TO_TIMESTAMP('2018-06-13 14:32:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=258
;
SELECT register_migration_script('201806131433_IDEMPIERE-3651.sql') FROM dual
;

View File

@ -0,0 +1,132 @@
-- IDEMPIERE-3738 Reference Color broken
-- Jul 4, 2018 4:02:49 PM CEST
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (203229,0,0,'Y',TO_TIMESTAMP('2018-07-04 16:02:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-07-04 16:02:37','YYYY-MM-DD HH24:MI:SS'),100,'Color','Color',NULL,NULL,'Color','D','c43cfcc2-2c92-4e91-88b8-88947297184d')
;
-- Jul 4, 2018 4:03:02 PM CEST
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (213570,0,'Color',135,'Color',7,'N','N','N','N','N',0,'N',27,0,0,'Y',TO_TIMESTAMP('2018-07-04 16:03:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-07-04 16:03:02','YYYY-MM-DD HH24:MI:SS'),100,203229,'Y','N','D','N','N','N','Y','46472ac6-1648-48d8-b0bd-aef0d61a447f','Y',0,'N','N')
;
-- Jul 4, 2018 4:03:03 PM CEST
ALTER TABLE Test ADD COLUMN Color VARCHAR(7) DEFAULT NULL
;
-- Jul 4, 2018 4:03:17 PM CEST
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (205590,'Color',152,213570,'Y',7,260,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-07-04 16:03:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-07-04 16:03:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','dc447e1a-b62a-4a90-92db-17203eb7d6ac','Y',260,2)
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=10, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=415
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=20, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2024
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=417
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=418
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=419
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=420
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=423
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=424
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=90, AD_FieldGroup_ID=103, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=421
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_FieldGroup_ID=103, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=422
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3059
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3062
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=130, AD_FieldGroup_ID=50003, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=425
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=140, AD_FieldGroup_ID=50003, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=426
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=150, AD_FieldGroup_ID=200016, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3209
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3902
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3210
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4251
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3057
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3056
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=210, AD_FieldGroup_ID=123, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205590
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=416
;
-- Jul 4, 2018 4:07:48 PM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:07:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205058
;
-- Jul 4, 2018 4:08:25 PM CEST
UPDATE Test SET Color='#bfca3f',Updated=TO_TIMESTAMP('2018-07-04 16:08:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE Test_ID=103
;
-- Jul 4, 2018 4:09:13 PM CEST
UPDATE AD_Menu SET IsActive='N',Updated=TO_TIMESTAMP('2018-07-04 16:09:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=294
;
-- Jul 4, 2018 4:09:21 PM CEST
UPDATE AD_Window SET IsActive='N',Updated=TO_TIMESTAMP('2018-07-04 16:09:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=225
;
-- Jul 4, 2018 4:13:03 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:13:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202518
;
-- Jul 4, 2018 4:13:12 PM CEST
UPDATE AD_Field SET DisplayLogic='@AD_Reference_ID@=19 | @AD_Reference_ID@=30 | @AD_Reference_ID@=18 | @AD_Reference_ID@=21 | @AD_Reference_ID@=25 | @AD_Reference_ID@=31 | @AD_Reference_ID@=35 | @AD_Reference_ID@=33 | @AD_Reference_ID@=32 | @AD_Reference_ID@=53370', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-04 16:13:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202519
;
SELECT register_migration_script('201807041616_IDEMPIERE-3738.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- IDEMPIERE-1421 Tax Group field is enabled in the window Customer
-- Jul 11, 2018 4:25:37 PM CEST
UPDATE AD_Field SET IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-07-11 16:25:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62773
;
SELECT register_migration_script('201807111626_IDEMPIERE-1421.sql') FROM dual
;

View File

@ -651,58 +651,31 @@ public class CalloutOrder extends CalloutEngine
Integer M_PriceList_ID = (Integer) mTab.getValue("M_PriceList_ID");
if (M_PriceList_ID == null || M_PriceList_ID.intValue()== 0)
return "";
if (steps) log.warning("init");
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "SELECT pl.IsTaxIncluded,pl.EnforcePriceLimit,pl.C_Currency_ID,c.StdPrecision,"
+ "plv.M_PriceList_Version_ID,plv.ValidFrom "
+ "FROM M_PriceList pl,C_Currency c,M_PriceList_Version plv "
+ "WHERE pl.C_Currency_ID=c.C_Currency_ID"
+ " AND pl.M_PriceList_ID=plv.M_PriceList_ID"
+ " AND pl.M_PriceList_ID=? " // 1
+ " AND plv.ValidFrom <= ? "
+ "ORDER BY plv.ValidFrom DESC";
// Use newest price list - may not be future
try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, M_PriceList_ID.intValue());
Timestamp date = new Timestamp(System.currentTimeMillis());
MPriceList pl = MPriceList.get(ctx, M_PriceList_ID, null);
if (pl != null && pl.getM_PriceList_ID() == M_PriceList_ID) {
if (!readonly) {
// Tax Included
mTab.setValue("IsTaxIncluded", pl.isTaxIncluded());
// Currency
mTab.setValue("C_Currency_ID", pl.getC_Currency_ID());
}
// Price Limit Enforce
Env.setContext(ctx, WindowNo, "EnforcePriceLimit", pl.isEnforcePriceLimit());
// PriceList Version
Timestamp date = null;
if (mTab.getAD_Table_ID() == I_C_Order.Table_ID)
date = Env.getContextAsDate(ctx, WindowNo, "DateOrdered");
else if (mTab.getAD_Table_ID() == I_C_Invoice.Table_ID)
date = Env.getContextAsDate(ctx, WindowNo, "DateInvoiced");
pstmt.setTimestamp(2, date);
rs = pstmt.executeQuery();
if (rs.next())
{
// Tax Included
if (!readonly) {
mTab.setValue("IsTaxIncluded", new Boolean("Y".equals(rs.getString(1))));
}
// Price Limit Enforce
Env.setContext(ctx, WindowNo, "EnforcePriceLimit", rs.getString(2));
// Currency
if (!readonly) {
Integer ii = new Integer(rs.getInt(3));
mTab.setValue("C_Currency_ID", ii);
}
// PriceList Version
Env.setContext(ctx, WindowNo, "M_PriceList_Version_ID", rs.getInt(5));
MPriceListVersion plv = pl.getPriceListVersion(date);
if (plv != null && plv.getM_PriceList_Version_ID() > 0) {
Env.setContext(ctx, WindowNo, "M_PriceList_Version_ID", plv.getM_PriceList_Version_ID());
} else {
Env.setContext(ctx, WindowNo, "M_PriceList_Version_ID", (String) null);
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);
return e.getLocalizedMessage();
}
finally
{
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
if (steps) log.warning("fini");
return "";
} // priceListFill

View File

@ -1485,6 +1485,7 @@ public class GridTabCSVImporter implements IGridTabImporter
StringBuilder postSelect = new StringBuilder(" FROM ")
.append(foreignTable).append(" WHERE ")
.append(foreignColumn).append("=? AND IsActive='Y' AND AD_Client_ID=?");
if (field != null ) {
if (!Util.isEmpty(field.getVO().ValidationCode)) {
String dynamicValid = Env.parseContext(Env.getCtx(), field.getWindowNo(), field.getGridTab().getTabNo(), field.getVO().ValidationCode, false);
if (Util.isEmpty(dynamicValid)) {
@ -1509,6 +1510,7 @@ public class GridTabCSVImporter implements IGridTabImporter
}
}
}
}
StringBuilder selectCount = new StringBuilder("SELECT COUNT(*)").append(postSelect);
StringBuilder selectId = new StringBuilder("SELECT ").append(foreignTable).append("_ID").append(postSelect);
int count = DB.getSQLValueEx(trxName, selectCount.toString(), value, thisClientId);

View File

@ -116,16 +116,14 @@ public class Doc_Payment extends Doc
return facts;
}
FactLine dr = null;
FactLine cr = null;
int AD_Org_ID = getBank_Org_ID(); // Bank Account Org
if (getDocumentType().equals(DOCTYPE_ARReceipt))
{
// Asset
dr = fact.createLine(null, getAccount(Doc.ACCTTYPE_BankInTransit, as),
FactLine fl = fact.createLine(null, getAccount(Doc.ACCTTYPE_BankInTransit, as),
getC_Currency_ID(), getAmount(), null);
if (dr != null && AD_Org_ID != 0)
dr.setAD_Org_ID(AD_Org_ID);
if (fl != null && AD_Org_ID != 0)
fl.setAD_Org_ID(AD_Org_ID);
//
MAccount acct = null;
if (getC_Charge_ID() != 0)
@ -134,11 +132,11 @@ public class Doc_Payment extends Doc
acct = getAccount(Doc.ACCTTYPE_C_Prepayment, as);
else
acct = getAccount(Doc.ACCTTYPE_UnallocatedCash, as);
cr = fact.createLine(null, acct,
fl = fact.createLine(null, acct,
getC_Currency_ID(), null, getAmount());
if (cr != null && AD_Org_ID != 0
if (fl != null && AD_Org_ID != 0
&& getC_Charge_ID() == 0) // don't overwrite charge
cr.setAD_Org_ID(AD_Org_ID);
fl.setAD_Org_ID(AD_Org_ID);
}
// APP
else if (getDocumentType().equals(DOCTYPE_APPayment))
@ -150,17 +148,17 @@ public class Doc_Payment extends Doc
acct = getAccount(Doc.ACCTTYPE_V_Prepayment, as);
else
acct = getAccount(Doc.ACCTTYPE_PaymentSelect, as);
dr = fact.createLine(null, acct,
FactLine fl = fact.createLine(null, acct,
getC_Currency_ID(), getAmount(), null);
if (dr != null && AD_Org_ID != 0
if (fl != null && AD_Org_ID != 0
&& getC_Charge_ID() == 0) // don't overwrite charge
dr.setAD_Org_ID(AD_Org_ID);
fl.setAD_Org_ID(AD_Org_ID);
// Asset
cr = fact.createLine(null, getAccount(Doc.ACCTTYPE_BankInTransit, as),
fl = fact.createLine(null, getAccount(Doc.ACCTTYPE_BankInTransit, as),
getC_Currency_ID(), null, getAmount());
if (cr != null && AD_Org_ID != 0)
cr.setAD_Org_ID(AD_Org_ID);
if (fl != null && AD_Org_ID != 0)
fl.setAD_Org_ID(AD_Org_ID);
}
else
{
@ -168,27 +166,6 @@ public class Doc_Payment extends Doc
log.log(Level.SEVERE, p_Error);
fact = null;
}
// Avoid usage of clearing accounts
// If both accounts and orgs are the same then remove the posting
if (dr != null && cr != null) {
MAccount acct_dr = dr.getAccount();
MAccount acct_cr = cr.getAccount();
int org_dr = dr.getAD_Org_ID();
int org_cr = cr.getAD_Org_ID();
if (!as.isPostIfClearingEqual() && acct_dr!=null && acct_dr.equals(acct_cr) && org_dr == org_cr) {
BigDecimal debit = dr.getAmtSourceDr();
BigDecimal credit = cr.getAmtSourceCr();
if (debit.compareTo(credit) == 0) {
fact.remove(dr);
fact.remove(cr);
}
}
}
// End Avoid usage of clearing accounts
//
ArrayList<Fact> facts = new ArrayList<Fact>();
facts.add(fact);

View File

@ -23,7 +23,11 @@ import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.StringTokenizer;
import java.util.TimeZone;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
@ -198,6 +202,10 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
m_errorMessage = new StringBuffer("ErrorInitializingParser");
m_errorDescription = new StringBuffer("Unable to initialize SAX parser: ").append(e.getMessage());
}
if (!result)
closeBufferedReader();
return result;
} // init
@ -216,7 +224,7 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
try
{
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
reader.mark(HEADER_SIZE + 100);
reader.mark(HEADER_SIZE + 20000);
StringBuilder header = new StringBuilder();
for (int i = 0; i < HEADER_SIZE; i++)
{
@ -252,6 +260,7 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
{
m_errorMessage = new StringBuffer("ErrorReadingData");
m_errorDescription = new StringBuffer(e.getMessage());
closeBufferedReader();
return result;
}
@ -318,11 +327,22 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
{
m_errorMessage = new StringBuffer("ErrorReadingData");
m_errorDescription = new StringBuffer(e.getMessage());
} finally {
closeBufferedReader();
}
return result;
} // loadLines
private void closeBufferedReader() {
if (m_reader != null)
try {
m_reader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* Method getDateLastRun
* @return Timestamp
@ -748,6 +768,87 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
} // endElement
/*
* Copyright 2008 Web Cohesion
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* source: https://github.com/stoicflame/ofx4j/blob/a604e4f6ffefea61403434cf853bbd1b20740386/src/main/java/com/webcohesion/ofx4j/io/DefaultStringConversion.java
*
*/
/**
* Parse the timezone offset of the form [HOURS_OFF_GMT:TZ_ID]
*
* @param tzoffset The offset pattern.
* @return The timezone.
*/
protected TimeZone parseTimeZone(String tzoffset) {
StringTokenizer tokenizer = new StringTokenizer(tzoffset, "[]:");
TimeZone tz = GMT_TIME_ZONE;
if (tokenizer.hasMoreTokens()) {
String hoursOff = tokenizer.nextToken();
tz = TimeZone.getTimeZone("GMT" + hoursOff);
}
return tz;
}
public static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone("GMT");
public static final int DATE_FORMAT_LENGTH = "yyyyMMddHHmmss.SSS".length();
public static final int TIME_FORMAT_LENGTH = "HHmmss.SSS".length();
/**
* Parses a date according to OFX.
*
* @param value The value of the date.
* @return The date value.
*/
protected Date parseDate(String value) {
char[] parseableDate = new char[DATE_FORMAT_LENGTH];
Arrays.fill(parseableDate, '0');
parseableDate[parseableDate.length - 4] = '.';
char[] valueChars = value.toCharArray();
int index = 0;
while (index < valueChars.length && valueChars[index] != '[') {
if (index < DATE_FORMAT_LENGTH) {
parseableDate[index] = valueChars[index];
}
index++;
}
int year = Integer.parseInt(new String(parseableDate, 0, 4));
int month = Integer.parseInt(new String(parseableDate, 4, 2)) - 1; //java month numberss are zero-based
int day = Integer.parseInt(new String(parseableDate, 6, 2));
int hour = Integer.parseInt(new String(parseableDate, 8, 2));
int minute = Integer.parseInt(new String(parseableDate, 10, 2));
int second = Integer.parseInt(new String(parseableDate, 12, 2));
int milli = Integer.parseInt(new String(parseableDate, 15, 3));
//set up a new calendar at zero, then set all the fields.
GregorianCalendar calendar = new GregorianCalendar(year, month, day, hour, minute, second);
if (index < valueChars.length && valueChars[index] == '[') {
String tzoffset = value.substring(index);
calendar.setTimeZone(parseTimeZone(tzoffset));
}
else {
calendar.setTimeZone(GMT_TIME_ZONE);
}
calendar.add(GregorianCalendar.MILLISECOND, milli);
return calendar.getTime();
}
/**
* Method parseOfxDate
* @param value String
@ -758,9 +859,7 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
{
try
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
sdf.setLenient(false);
return new Timestamp (sdf.parse(value).getTime());
return new Timestamp (parseDate(value).getTime());
}
catch(Exception e)
{

View File

@ -17,7 +17,6 @@
package org.compiere.impexp;
import java.io.FileInputStream;
import java.io.IOException;
import org.compiere.model.MBankStatementLoader;
import org.xml.sax.SAXException;
@ -38,6 +37,9 @@ public final class OFXFileBankStatementLoader extends OFXBankStatementHandler im
* @return boolean
* @see org.compiere.impexp.BankStatementLoaderInterface#init(MBankStatementLoader)
*/
//m_stream is not closed because the BufferedReader in the parent class is closed and according to the Java docs:
//Calling close() on the BufferedReader closes the underlying stream by default implementation
@SuppressWarnings("resource")
public boolean init(MBankStatementLoader controller)
{
boolean result = false;
@ -72,13 +74,6 @@ public final class OFXFileBankStatementLoader extends OFXBankStatementHandler im
{
m_errorMessage = new StringBuffer("ErrorReadingData");
m_errorDescription = new StringBuffer();
}finally{
if (m_stream != null)
try {
m_stream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return result;

View File

@ -104,11 +104,12 @@ public class GridTable extends AbstractTableModel
/**
*
*/
private static final long serialVersionUID = -4651516342985623070L;
private static final long serialVersionUID = -2741647620577906242L;
public static final String DATA_REFRESH_MESSAGE = "Refreshed";
public static final String DATA_UPDATE_COPIED_MESSAGE = "UpdateCopied";
public static final String DATA_INSERTED_MESSAGE = "Inserted";
public static final String DATA_IGNORED_MESSAGE = "Ignored";
/**
* JDBC Based Buffered Table
@ -549,7 +550,7 @@ public class GridTable extends AbstractTableModel
* @param index index
* @return GridField
*/
protected GridField getField (int index)
public GridField getField (int index)
{
if (index < 0 || index >= m_fields.size())
return null;
@ -2858,7 +2859,7 @@ public class GridTable extends AbstractTableModel
// fireTableRowsUpdated(m_rowChanged, m_rowChanged); >> messes up display?? (clearSelection)
}
m_newRow = -1;
fireDataStatusIEvent("Ignored", "");
fireDataStatusIEvent(DATA_IGNORED_MESSAGE, "");
} // dataIgnore

View File

@ -743,8 +743,6 @@ public class MColumn extends X_AD_Column
foreignTable = "S_ResourceAssignment";
} else if (DisplayType.Image == refid) {
foreignTable = "AD_Image";
} else if (DisplayType.Color == refid) {
foreignTable = "AD_Color";
} else if (DisplayType.Chart == refid) {
foreignTable = "AD_Chart";
}

View File

@ -248,7 +248,7 @@ public class MPriceList extends X_M_PriceList
.setOrderBy("ValidFrom DESC")
.first();
if (m_plv == null)
log.warning("None found M_PriceList_ID=" + getM_PriceList_ID() + " - " + valid);
if (log.isLoggable(Level.INFO)) log.info("None found M_PriceList_ID=" + getM_PriceList_ID() + " - " + valid);
else
if (log.isLoggable(Level.FINE)) log.fine(m_plv.toString());
return m_plv;

View File

@ -45,6 +45,11 @@ import org.compiere.util.ValueNamePair;
*/
public class MQuery implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 481623650333512326L;
/**
* Get Query from Parameter
* @param ctx context (to determine language)
@ -357,9 +362,6 @@ public class MQuery implements Serializable
m_TableName = MTable.getTableName (Env.getCtx(), AD_Table_ID);
} // MQuery
/** Serialization Info **/
private static final long serialVersionUID = 4883859385509199306L;
/** Table Name */
private String m_TableName = "";
/** PInstance */
@ -448,6 +450,11 @@ public class MQuery implements Serializable
new ValueNamePair (NULL, " NULL "),
new ValueNamePair (NOT_NULL, " !NULL ")
};
/** Operators for encrypted fields */
public static final ValueNamePair[] OPERATORS_ENCRYPTED = new ValueNamePair[] {
new ValueNamePair (NULL, " NULL "),
new ValueNamePair (NOT_NULL, " !NULL ")
};
/** Operators for Numbers, Dates, Integers */
public static final ValueNamePair[] OPERATORS_NUMBERS = new ValueNamePair[] {

View File

@ -16,11 +16,13 @@ package org.compiere.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.base.Service;
import org.adempiere.base.event.EventManager;
@ -42,18 +44,20 @@ import org.osgi.service.event.Event;
public class MRecentItem extends X_AD_RecentItem
{
/**
*
*
*/
private static final long serialVersionUID = 6899554875745832L;
private static final long serialVersionUID = -311416268128338337L;
public static final String ON_RECENT_ITEM_CHANGED_TOPIC = "onRecentItemChanged";
/** Recent Item Cache */
private static CCache<Integer,MRecentItem> s_cache = new CCache<Integer,MRecentItem>(Table_Name, 10);
private static CCache<String,MRecentItem> s_cache = new CCache<String,MRecentItem>(Table_Name, 10);
/** Logger */
@SuppressWarnings("unused")
private static CLogger s_log = CLogger.getCLogger(MRecentItem.class);
/* Recent Item cached Label */
private String m_label;
/**************************************************************************
* Standard Constructor
* @param ctx context
@ -65,13 +69,17 @@ public class MRecentItem extends X_AD_RecentItem
super (ctx, AD_RecentItem_ID, trxName);
if (AD_RecentItem_ID > 0) {
synchronized (MRecentItem.class) {
Integer key = new Integer (AD_RecentItem_ID);
String key = getCacheKey(AD_RecentItem_ID, ctx);
if (!s_cache.containsKey(key))
s_cache.put (key, this);
}
}
} // MRecentItem
private static String getCacheKey(int AD_RecentItem_ID, Properties ctx) {
return AD_RecentItem_ID + "|" + Env.getAD_Language(ctx);
}
/**
* Load Constructor
* @param ctx ctx
@ -81,9 +89,9 @@ public class MRecentItem extends X_AD_RecentItem
public MRecentItem (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
Integer key = null;
String key = null;
try {
key = new Integer (rs.getInt("AD_RecentItem_ID"));
key = getCacheKey(rs.getInt("AD_RecentItem_ID"), ctx);
} catch (SQLException e) {
throw new AdempiereException(e);
}
@ -101,7 +109,7 @@ public class MRecentItem extends X_AD_RecentItem
*/
public static synchronized MRecentItem get (Properties ctx, int AD_RecentItem_ID)
{
Integer ii = new Integer (AD_RecentItem_ID);
String ii = getCacheKey(AD_RecentItem_ID, ctx);
MRecentItem ri = (MRecentItem)s_cache.get(ii);
if (ri == null)
ri = new MRecentItem (ctx, AD_RecentItem_ID, null);
@ -123,7 +131,8 @@ public class MRecentItem extends X_AD_RecentItem
MRecentItem retValue = it.next();
if (retValue.getAD_Table_ID() == AD_Table_ID
&& retValue.getRecord_ID() == Record_ID
&& retValue.getCtx() == ctx
&& retValue.getAD_User_ID() == AD_User_ID
&& Env.getAD_Language(ctx).equals(Env.getAD_Language(retValue.getCtx()))
)
{
return retValue;
@ -155,7 +164,7 @@ public class MRecentItem extends X_AD_RecentItem
if (retValue != null)
{
Integer key = new Integer (retValue.getAD_RecentItem_ID());
String key = getCacheKey(retValue.getAD_RecentItem_ID(), ctx);
s_cache.put (key, retValue);
}
return retValue;
@ -265,7 +274,7 @@ public class MRecentItem extends X_AD_RecentItem
@Override
public boolean delete(boolean force) {
Integer ii = new Integer (getAD_RecentItem_ID());
String ii = getCacheKey(getAD_RecentItem_ID(), getCtx());
synchronized (MRecentItem.class) {
s_cache.remove(ii);
}
@ -273,16 +282,23 @@ public class MRecentItem extends X_AD_RecentItem
}
public static List<MRecentItem> getFromUser(Properties ctx, int AD_User_ID) {
List<MRecentItem> ris = new Query(ctx, MRecentItem.Table_Name, "NVL(AD_User_ID,0)=?", null)
int[] ids = new Query(ctx, MRecentItem.Table_Name, "NVL(AD_User_ID,0)=?", null)
.setOnlyActiveRecords(true)
.setClient_ID()
.setParameters(AD_User_ID)
.setOrderBy("Updated DESC")
.list();
.getIDs();
List<MRecentItem> ris = new ArrayList<MRecentItem>();
for (int id : ids) {
ris.add(MRecentItem.get(ctx, id));
}
return ris;
}
public String getLabel() {
if (m_label != null) {
return m_label;
}
String windowName;
MWindow win = MWindow.get(getCtx(), getAD_Window_ID());
MUserDefWin userDef = MUserDefWin.getBestMatch(getCtx(), getAD_Window_ID());
@ -322,7 +338,29 @@ public class MRecentItem extends X_AD_RecentItem
if (recordIdentifier.length() == 0)
recordIdentifier.append(" [no identifier]");
}
return windowName + ": " + recordIdentifier.substring(1);
m_label = windowName + ": " + recordIdentifier.substring(1);
if (s_log.isLoggable(Level.INFO)) s_log.info(m_label);
return m_label;
}
public static synchronized void clearLabel(int AD_Table_ID, int Record_ID) {
Iterator<MRecentItem> it = s_cache.values().iterator();
while (it.hasNext()) {
MRecentItem retValue = it.next();
if (retValue.getAD_Table_ID() == AD_Table_ID && retValue.getRecord_ID() == Record_ID) {
retValue.clearLabel();
}
}
}
private void clearLabel() {
m_label = null;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("MRecentItem[").append(get_ID()).append("]=").append(getLabel());
return sb.toString();
}
} // MRecentItem

View File

@ -63,8 +63,7 @@ public class MReportCube extends X_PA_ReportCube {
"INNER JOIN Fact_Acct fact ON (fact.dateacct between p.startdate and p.enddate " +
" and fact.ad_client_id = c.ad_client_id) " +
"WHERE c.PA_ReportCube_ID = ? " +
"AND fact.updated > c.LastRecalculated " +
"AND p.periodtype='S' ";
"AND fact.updated > c.LastRecalculated";
log.log (Level.FINE, sql);
@ -130,10 +129,9 @@ public class MReportCube extends X_PA_ReportCube {
"p.c_period_id, p.StartDate, COALESCE(SUM(AmtAcctDr),0), COALESCE(SUM(AmtAcctCr),0), " +
"COALESCE(SUM(Qty),0)");
String from = " FROM fact_acct f " +
" INNER JOIN C_Period p ON ( f.DateAcct BETWEEN p.StartDate AND p.EndDate ) " +
" INNER JOIN C_Period p ON ( f.C_Period_ID = p.C_Period_ID ) " +
" INNER JOIN C_Year y ON ( p.C_Year_ID = y.C_Year_ID ) " +
" WHERE p.PeriodType = 'S' " +
" AND y.C_Calendar_ID = ? ";
" WHERE y.C_Calendar_ID = ? AND f.AD_Client_ID = ? ";
if ( getLastRecalculated() != null && !reset )
from += "AND p.C_Period_ID IN " + periods;
@ -190,7 +188,7 @@ public class MReportCube extends X_PA_ReportCube {
String sql = insert.append(select.toString()).append(from).append(groups.toString()).toString();
if (log.isLoggable(Level.FINE))log.log(Level.FINE, sql);
Object[] params = new Object[] { getPA_ReportCube_ID(), getC_Calendar_ID() };
Object[] params = new Object[] { getPA_ReportCube_ID(), getC_Calendar_ID(), getAD_Client_ID() };
start = System.currentTimeMillis();
int rows = DB.executeUpdateEx(sql, params, get_TrxName());

View File

@ -2069,7 +2069,10 @@ public abstract class PO
l_trxname.setLength(23);
m_trxName = Trx.createTrxName(l_trxname.toString());
localTrx = Trx.get(m_trxName, true);
localTrx.setDisplayName(getClass().getName()+"_save");
if (newRecord)
localTrx.setDisplayName(getClass().getName() + "_insert");
else
localTrx.setDisplayName(getClass().getName() + "_update_ID" + get_ID());
localTrx.getConnection();
}
else
@ -2341,9 +2344,10 @@ public abstract class PO
m_newValues = new Object[size];
m_createNew = false;
}
if (!newRecord)
if (!newRecord) {
CacheMgt.get().reset(p_info.getTableName());
else if (get_ID() > 0 && success)
MRecentItem.clearLabel(p_info.getAD_Table_ID(), get_ID());
} else if (get_ID() > 0 && success)
CacheMgt.get().newRecord(p_info.getTableName(), get_ID());
return success;
@ -3215,7 +3219,7 @@ public abstract class PO
{
localTrxName = Trx.createTrxName("POdel");
localTrx = Trx.get(localTrxName, true);
localTrx.setDisplayName(getClass().getName()+"_delete");
localTrx.setDisplayName(getClass().getName()+ "_delete_ID" + get_ID());
localTrx.getConnection();
m_trxName = localTrxName;
}

View File

@ -199,7 +199,7 @@ public final class DisplayType
if (displayType == ID || displayType == Table || displayType == TableDir
|| displayType == Search || displayType == Location || displayType == Locator
|| displayType == Account || displayType == Assignment || displayType == PAttribute
|| displayType == Image || displayType == Chart || displayType == Color)
|| displayType == Image || displayType == Chart)
return true;
List<IDisplayTypeFactory> factoryList = Service.locator().list(IDisplayTypeFactory.class).getServices();
@ -622,13 +622,8 @@ public final class DisplayType
else
return "VARCHAR2(" + fieldLength + ")";
}
if (displayType == DisplayType.Color) // this condition is never reached - filtered above in isID
{
if (columnName.endsWith("_ID"))
return "NUMBER(10)";
else
return "CHAR(" + fieldLength + ")";
}
if (displayType == DisplayType.Color)
return "VARCHAR2(" + fieldLength + ")";
if (displayType == DisplayType.Button)
{
if (columnName.endsWith("_ID"))

View File

@ -72,7 +72,7 @@ public final class EMail implements Serializable
/**
*
*/
private static final long serialVersionUID = -2489441683920482601L;
private static final long serialVersionUID = 5355436165040508855L;
//use in server bean
public final static String HTML_MAIL_MARKER = "ContentType=text/html;";
@ -602,7 +602,7 @@ public final class EMail implements Serializable
}
try
{
m_from = new InternetAddress (newFrom, true);
m_from = createInternetAddress(newFrom);
if (MSysConfig.getBooleanValue(MSysConfig.MAIL_SEND_BCC_TO_FROM, false, Env.getAD_Client_ID(Env.getCtx())))
addBcc(newFrom);
}
@ -628,7 +628,7 @@ public final class EMail implements Serializable
InternetAddress ia = null;
try
{
ia = new InternetAddress (newTo, true);
ia = createInternetAddress(newTo);
}
catch (Exception e)
{
@ -679,7 +679,7 @@ public final class EMail implements Serializable
InternetAddress ia = null;
try
{
ia = new InternetAddress (newCc, true);
ia = createInternetAddress(newCc);
}
catch (Exception e)
{
@ -719,7 +719,7 @@ public final class EMail implements Serializable
InternetAddress ia = null;
try
{
ia = new InternetAddress (bccAddress, true);
ia = createInternetAddress(bccAddress);
}
catch (Exception e)
{
@ -758,7 +758,7 @@ public final class EMail implements Serializable
InternetAddress ia = null;
try
{
ia = new InternetAddress (newTo, true);
ia = createInternetAddress(newTo);
}
catch (Exception e)
{
@ -1221,4 +1221,21 @@ public final class EMail implements Serializable
additionalHeaders.add(new ValueNamePair(value, name));
}
/**
* Create an internet address with personal if the email address is formatted as "Personal <email>"
* @param email
* @return internet address with personal if defined
* @throws Exception
*/
public static InternetAddress createInternetAddress(String email) throws Exception {
InternetAddress ia = new InternetAddress (email, true);
if (email.contains("<") && email.contains(">")) {
int idx = email.lastIndexOf("<");
String personal = email.substring(0, idx).trim();
if (! personal.isEmpty())
ia.setPersonal(personal);
}
return ia;
}
} // EMail

View File

@ -1324,6 +1324,7 @@ public class Login
user.setIsLocked(false);
user.setDateAccountLocked(null);
user.setFailedLoginCount(0);
Env.setContext(Env.getCtx(), "#AD_Client_ID", user.getAD_Client_ID());
if (!user.save())
log.severe("Failed to unlock user account");
}
@ -1337,6 +1338,7 @@ public class Login
{
user.setIsLocked(true);
user.setDateAccountLocked(new Timestamp(now));
Env.setContext(Env.getCtx(), "#AD_Client_ID", user.getAD_Client_ID());
if (!user.save())
log.severe("Failed to lock user account");
}
@ -1441,6 +1443,7 @@ public class Login
{
user.setFailedLoginCount(0);
user.setDateLastLogin(new Timestamp(now));
Env.setContext(Env.getCtx(), "#AD_Client_ID", user.getAD_Client_ID());
if (!user.save())
log.severe("Failed to update user record with date last login (" + user.getName() + " / clientID = " + user.getAD_Client_ID() + ")");
}
@ -1490,6 +1493,7 @@ public class Login
user.setFailedLoginCount(count);
user.setIsLocked(reachMaxAttempt);
user.setDateAccountLocked(user.isLocked() ? new Timestamp(now) : null);
Env.setContext(Env.getCtx(), "#AD_Client_ID", user.getAD_Client_ID());
if (!user.save())
log.severe("Failed to update user record with increase failed login count");
}

View File

@ -39,7 +39,7 @@ esac
# adjust these variables to your environment
IDEMPIERE_USER=idempiere
IDEMPIERE_HOME=/opt/idempiere-server
JAVA_HOME=`ls -r /usr/lib/jvm/java-[678]-openjdk*/bin/javac /usr/lib/jvm/java-[8]-oracle*/bin/javac | head -1`
JAVA_HOME=`ls -r /usr/lib/jvm/java-[6789]-openjdk*/bin/javac /usr/lib/jvm/java-[89]-oracle*/bin/javac | head -1`
JAVA_HOME=`dirname $JAVA_HOME`
JAVA_HOME=`dirname $JAVA_HOME`
SU=su
@ -533,8 +533,8 @@ Enter postgres password:"
}
getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep ${IDEMPIERE_HOME})
echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME}
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application
IDEMPIERESTATUS=$?
}
@ -626,14 +626,14 @@ stop () {
log_success_msg "Service stopped with OSGi shutdown"
else
log_warning_msg "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15"
else
log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -664,7 +664,7 @@ dostatus () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo
echo "iDempiere is running:"
ps ax | grep -v grep | grep ${IDEMPIERE_HOME} | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "iDempiere is stopped"

View File

@ -32,8 +32,8 @@ IDEMPIERESTATUS=
MAXITERATIONS=60
getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep $IDEMPIERE_HOME)
echo $IDEMPIERESTATUSSTRING | grep -q $IDEMPIERE_HOME
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application
IDEMPIERESTATUS=$?
}
@ -96,14 +96,14 @@ stop () {
log_success_msg "Service stopped with OSGi shutdown"
else
log_warning_msg "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15"
else
log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -118,7 +118,7 @@ stop () {
restart () {
stop
sleep 1
sleep 2
start
}
@ -134,7 +134,7 @@ status () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo
echo "iDempiere is running:"
ps ax | grep -v grep | grep $IDEMPIERE_HOME | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "iDempiere is stopped"

View File

@ -25,11 +25,11 @@ IDEMPIEREUSER=idempiere
RETVAL=0
IDEMPIERESTATUS=
MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes)
MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes
getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep $IDEMPIERE_HOME)
echo $IDEMPIERESTATUSSTRING | grep -q $IDEMPIERE_HOME
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application
IDEMPIERESTATUS=$?
}
@ -78,7 +78,7 @@ start () {
stop () {
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo "idempiere is already stopped"
echo "iDempiere is already stopped"
return 1
fi
echo -n "Stopping iDempiere ERP: "
@ -92,14 +92,14 @@ stop () {
echo_success
else
echo "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo_success
else
echo "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -130,11 +130,11 @@ status () {
getidempierestatus
if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo
echo "idempiere is running:"
ps ax | grep -v grep | grep $IDEMPIERE_HOME | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo "iDempiere is running:"
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "idempiere is stopped"
echo "iDempiere is stopped"
fi
}

View File

@ -57,8 +57,8 @@ IDEMPIERESTATUS=
MAXITERATIONS=60
getidempierestatus() {
IDEMPIERESTATUSSTRING=$(ps ax | grep -v grep | grep $IDEMPIERE_HOME)
echo $IDEMPIERESTATUSSTRING | grep -q $IDEMPIERE_HOME
IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep)
echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application
IDEMPIERESTATUS=$?
}
@ -123,14 +123,14 @@ stop () {
echo "Service stopped with OSGi shutdown"
else
echo "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo "Service stopped with kill -15"
else
echo "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
@ -146,7 +146,7 @@ stop () {
restart () {
stop
sleep 1
sleep 2
start
rc_status
}
@ -166,7 +166,7 @@ status () {
if [ $IDEMPIERESTATUS -eq 0 ] ; then
echo
echo "iDempiere is running:"
ps ax | grep -v grep | grep $IDEMPIERE_HOME | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/'
echo
else
echo "iDempiere is stopped"
@ -182,9 +182,6 @@ case "$1" in
stop)
stop
;;
reload)
restart
;;
restart)
restart
;;
@ -195,7 +192,7 @@ case "$1" in
status
;;
*)
echo $"Usage: $0 {start|stop|reload|restart|condrestart|status}"
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

View File

@ -807,7 +807,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
@Override
public void onCallback(Boolean result) {
if (result) {
adTabbox.getSelectedGridTab().navigate(0);
adTabbox.getSelectedGridTab().navigate(-1); // not zero because of IDEMPIERE-3736
focusToActivePanel();
}
}
@ -1398,11 +1398,12 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|| GridTab.DEFAULT_STATUS_MESSAGE.equals(adInfo)
|| GridTable.DATA_REFRESH_MESSAGE.equals(adInfo)
|| GridTable.DATA_INSERTED_MESSAGE.equals(adInfo)
|| GridTable.DATA_IGNORED_MESSAGE.equals(adInfo)
|| GridTable.DATA_UPDATE_COPIED_MESSAGE.equals(adInfo)
) {
String prefix = null;
if (dbInfo.contains("*"))
if (dbInfo.contains("*") || dbInfo.contains("?")) // ? used when not-autosave
prefix = "*";
String titleLogic = null;

View File

@ -114,10 +114,10 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
throw new RuntimeException(Msg.getMsg(Env.getCtx(), "AccessTableNoUpdate"));
}
Label lblRequestType = new Label("Request Type");
Label lblPriority = new Label("Priority");
Label lblSummary = new Label("Summary");
Label lblSalesRep = new Label("Sales Representative");
Label lblRequestType = new Label(Msg.getElement(Env.getCtx(), "R_RequestType_ID"));
Label lblPriority = new Label(Msg.getElement(Env.getCtx(), "Priority"));
Label lblSummary = new Label(Msg.getElement(Env.getCtx(), "Summary"));
Label lblSalesRep = new Label(Msg.getElement(Env.getCtx(), "SalesRep_ID"));
int columnID = MColumn.getColumn_ID(MRequest.Table_Name, MRequest.COLUMNNAME_R_RequestType_ID);
MLookup lookup = MLookupFactory.get(Env.getCtx(), 0, 0, columnID, DisplayType.TableDir);

View File

@ -294,8 +294,14 @@ public class WListItemRenderer implements ListitemRenderer<Object>, EventListene
}
else if (field instanceof Timestamp)
{
int refId = 0;
if (m_tableColumns != null && columnIndex < m_tableColumns.size()) {
refId = m_tableColumns.get(columnIndex).getAD_Reference_ID();
}
SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date, AEnv.getLanguage(Env.getCtx()));
if (refId == 0)
refId = DisplayType.Date;
SimpleDateFormat dateFormat = DisplayType.getDateFormat(refId, AEnv.getLanguage(Env.getCtx()));
listcell.setValue(dateFormat.format((Timestamp)field));
if (isCellEditable)
{
@ -396,7 +402,10 @@ public class WListItemRenderer implements ListitemRenderer<Object>, EventListene
{
addColumn(header, null);
}
public void addColumn(String header, String description)
{
addColumn(header, description, 0);
}
/**
* Add Table Column.
* after adding a column, you need to set the column classes again
@ -405,13 +414,14 @@ public class WListItemRenderer implements ListitemRenderer<Object>, EventListene
* @param header The header text for the column
* @param description
*/
public void addColumn(String header, String description)
public void addColumn(String header, String description, int AD_Reference_ID)
{
WTableColumn tableColumn;
tableColumn = new WTableColumn();
tableColumn.setHeaderValue(Util.cleanAmp(header));
tableColumn.setTooltipText(description);
tableColumn.setAD_Reference_ID(AD_Reference_ID);
m_tableColumns.add(tableColumn);
return;

View File

@ -59,7 +59,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
/**
*
*/
private static final long serialVersionUID = -706774424788688953L;
private static final long serialVersionUID = -5501893389366975849L;
/** Logger. */
private static CLogger logger = CLogger.getCLogger(WListbox.class);
@ -371,7 +371,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
}
// add to model
addColumn(layout[columnIndex].getColHeader(), layout[columnIndex].getColDescription());
addColumn(layout[columnIndex].getColHeader(), layout[columnIndex].getColDescription(), layout[columnIndex].getAD_Reference_ID());
// set the colour column
if (layout[columnIndex].isColorColumn())
@ -438,16 +438,20 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
addColumn(header, null);
}
public void addColumn (String header, String description)
{
addColumn(header, description, 0);
}
/**
* Add Table Column and specify the column header.
*
* @param header name of column header
* @param description
*/
public void addColumn (String header, String description)
public void addColumn (String header, String description, int AD_Reference_ID)
{
WListItemRenderer renderer = (WListItemRenderer)getItemRenderer();
renderer.addColumn(Util.cleanAmp(header), description);
renderer.addColumn(Util.cleanAmp(header), description, AD_Reference_ID);
getModel().addColumn();
return;

View File

@ -45,6 +45,8 @@ public class WTableColumn
protected String tooltipText;
private int AD_Reference_ID;
/**
* Cover method, using a default width of 75
* @see #WTableColumn(int)
@ -288,4 +290,12 @@ public class WTableColumn
public void setTooltipText(String tooltipText) {
this.tooltipText = tooltipText;
}
public int getAD_Reference_ID() {
return AD_Reference_ID;
}
public void setAD_Reference_ID(int AD_Reference_ID) {
this.AD_Reference_ID=AD_Reference_ID;
}
}

View File

@ -179,6 +179,7 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
{
if (log.isLoggable(Level.CONFIG)) log.config( "actionPerformed - " + m_value);
final WLocationDialog ld = new WLocationDialog(Msg.getMsg(Env.getCtx(), "Location"), m_value, gridField);
final int oldValue = m_value == null ? 0 : m_value.getC_Location_ID();
ld.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
@Override
@ -194,10 +195,8 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
if (m_value != null)
C_Location_ID = m_value.getC_Location_ID();
Integer ii = new Integer(C_Location_ID);
// force Change - user does not realize that embedded object is already saved.
ValueChangeEvent valuechange = new ValueChangeEvent(WLocationEditor.this,getColumnName(),null,null);
fireValueChange(valuechange); // resets m_mLocation
if (C_Location_ID != 0)
if (C_Location_ID != 0 && oldValue == 0)
{
ValueChangeEvent vc = new ValueChangeEvent(WLocationEditor.this,getColumnName(),null,ii);
fireValueChange(vc);

View File

@ -728,6 +728,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
columnInfo = new ColumnInfo(infoColumn.get_Translation("Name"), colSQL, DisplayType.getClass(infoColumn.getAD_Reference_ID(), true));
}
columnInfo.setColDescription(infoColumn.get_Translation("Description"));
columnInfo.setAD_Reference_ID(infoColumn.getAD_Reference_ID());
columnInfo.setGridField(gridFields.get(i));
list.add(columnInfo);

View File

@ -71,6 +71,7 @@ import org.adempiere.webui.event.DialogEvents;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.panel.StatusBarPanel;
import org.adempiere.webui.part.MultiTabPart;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
@ -93,7 +94,6 @@ import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.SecureEngine;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
import org.zkoss.zk.au.out.AuFocus;
@ -232,8 +232,14 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
private Properties m_simpleCtx;
private Properties m_advanceCtx;
private int rowCount;
private static final String ON_POST_VISIBLE_ATTR = "onPostVisible.Event.Posted";
/** START DEVCOFFEE **/
private StatusBarPanel statusBar = new StatusBarPanel();
/** END DEVCOFFEE **/
/**
* FindPanel Constructor
* @param targetWindowNo targetWindowNo
@ -344,6 +350,10 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
btnNew.setId("btnNew");
btnNew.addEventListener(Events.ON_CLICK,this);
Button btnClear = ButtonFactory.createNamedButton(ConfirmPanel.A_RESET);
btnClear.setId("btnReset");
btnClear.addEventListener(Events.ON_CLICK,this);
Button btnOk = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
btnOk.setName("btnOkSimple");
btnOk.setId("btnOk");
@ -354,6 +364,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
btnCancel.addEventListener(Events.ON_CLICK,this);
Panel pnlButtonRight = new Panel();
pnlButtonRight.appendChild(btnClear);
pnlButtonRight.appendChild(btnOk);
pnlButtonRight.appendChild(btnCancel);
pnlButtonRight.setStyle("text-align:right");
@ -631,6 +642,9 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
winMain.addTab(tabPanel, Msg.getMsg(Env.getCtx(), "Advanced").replaceAll("&", ""), false, false);
initSimple();
initAdvanced();
/** START DEVCOFFEE **/
layout.appendChild(statusBar);
/** START DEVCOFFEE **/
} // initPanel
@ -672,7 +686,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
mField.getVO().FieldLength = 32767; // a conservative max literal string - like oracle extended
mField.getVO().DisplayLength = mField.getVO().FieldLength;
}
if (mField.getVO().displayType == DisplayType.YesNo) {
if (mField.getVO().displayType == DisplayType.YesNo || mField.isEncrypted() || mField.isEncryptedColumn()) {
// Make Yes-No searchable as list
GridFieldVO vo = mField.getVO();
GridFieldVO ynvo = vo.clone(m_simpleCtx, vo.WindowNo, vo.TabNo, vo.AD_Window_ID, vo.AD_Tab_ID, vo.tabReadOnly);
@ -810,6 +824,11 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
gridFieldList = null;
m_total = getNoOfRecords(null, false);
/** START DEVCOFFEE **/
// Get Total
setStatusDB (m_total);
statusBar.setStatusLine("");
/** END DEVCOFFEE **/
} // initFind
/**
@ -842,7 +861,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if (null!=fields && fields.length>=1 && fields[0].contains(HISTORY_SEPARATOR))
return;
ListItem listItem = new ListItem();
listItem.setId("Row"+advancedPanel.getItemCount());
listItem.setId("Row"+ rowCount++);
Listbox listColumn = new Listbox();
listColumn.setId("listColumn"+listItem.getId());
@ -1132,7 +1151,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
editor.addValueChangeListener(this);
Label label = editor.getLabel();
Component fieldEditor = editor.getComponent();
//Fix miss lable of checkbox
label.setValue(mField.getHeader());
//
if (displayLength > 0) // set it back
mField.setDisplayLength(displayLength);
@ -1355,6 +1375,21 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
m_isCancel = false;
dispose();
}
else if ("btnReset".equals(btn.getName())){
for (WEditor clearField : m_sEditors){
clearField.setValue(null);
}
for (WEditor clearField : m_sEditorsTo){
if (clearField != null){
clearField.setValue(null);
clearField.setVisible(false);
ToolBarButton moreButtor = m_sEditorsFlag.get(m_sEditorsTo.indexOf(clearField));
moreButtor.setChecked(false);
}
}
}
}
}
else if (Events.ON_OK.equals(event.getName()))
@ -1785,13 +1820,22 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
// globalqss - Carlos Ruiz - 20060711
// fix a bug with virtualColumn + isSelectionColumn not yielding results
GridField field = getTargetMField(ColumnName);
// add encryption here if the field is encrypted.
if (field.isEncryptedColumn()) {
value = SecureEngine.encrypt(value, Env.getAD_Client_ID(Env.getCtx()));
}
boolean isProductCategoryField = isProductCategoryField(field.getColumnName());
StringBuilder ColumnSQL = new StringBuilder(field.getColumnSQL(false));
// add encryption here if the field is encrypted.
if (field.isEncrypted()) {
String Operator = MQuery.NULL;
if ("Y".equals(value)){
Operator = MQuery.NOT_NULL;
}
m_query.addRestriction(ColumnSQL.toString(), Operator, null,
ColumnName, wed.getDisplay());
appendCode(code, ColumnName, Operator, "", "", "AND", "", "");
continue;
}
//
// Be more permissive for String columns
if (isSearchLike(field))
@ -1932,12 +1976,19 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
{
String columnName = column.getValue().toString();
int referenceType = -1;
boolean isEncrypted = false;
if (columnName != null) {
MTable table = MTable.get(Env.getCtx(), m_tableName);
MColumn col = table.getColumn(columnName);
referenceType = col.getAD_Reference_ID();
GridField field = getTargetMField(columnName);
isEncrypted = (col.isEncrypted() || field.isEncrypted());
}
if (DisplayType.isLookup(referenceType)
if (isEncrypted)
{
addOperators(MQuery.OPERATORS_ENCRYPTED, listOperator);
}
else if (DisplayType.isLookup(referenceType)
|| DisplayType.YesNo == referenceType
|| DisplayType.Button == referenceType)
{
@ -2577,6 +2628,18 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
public boolean isValid()
{
return isvalid;
}
}
/** START DEVCOFFEE **/
/**
* Display current count
* @param currentCount String representation of current/total
*/
private void setStatusDB (int currentCount)
{
StringBuilder text = new StringBuilder(" ").append(currentCount).append(" / ").append(m_total).append(" ");
statusBar.setStatusDB(text.toString());
} // setDtatusDB
/** END DEVCOFFEE **/
} // FindPanel

View File

@ -530,7 +530,7 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
return;
}
StringTokenizer st = new StringTokenizer(getTo(), " ,;", false);
StringTokenizer st = new StringTokenizer(getTo(), ",;", false);
String to = st.nextToken();
EMail email = m_client.createEMail(getFrom(), to, getSubject(), replaceBASE64Img(getMessage()), true);
String status = "Check Setup";
@ -539,7 +539,7 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
while (st.hasMoreTokens())
email.addTo(st.nextToken());
// cc
StringTokenizer stcc = new StringTokenizer(getCc(), " ,;", false);
StringTokenizer stcc = new StringTokenizer(getCc(), ",;", false);
while (stcc.hasMoreTokens())
{
String cc = stcc.nextToken();

View File

@ -35,6 +35,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.GridTable;
import org.compiere.model.MChangeLog;
@ -248,21 +249,51 @@ public class WRecordInfo extends Window implements EventListener<Event>
//get uuid
GridTable gridTable = null;
String tabName = null;
if (dse.getSource() instanceof GridTab)
{
GridTab gridTab = (GridTab) dse.getSource();
gridTable = gridTab.getTableModel();
tabName = gridTab.getName();
}
else if (dse.getSource() instanceof GridTable)
{
gridTable = (GridTable) dse.getSource();
gridTable = (GridTable) dse.getSource();
GridField firstField = gridTable.getField(0);
if (firstField != null && firstField.getGridTab() != null)
tabName = firstField.getGridTab().getName();
}
int Record_ID = -1;
if (dse.Record_ID instanceof Integer)
Record_ID = ((Integer)dse.Record_ID).intValue();
else
log.info("dynInit - Invalid Record_ID=" + dse.Record_ID);
MTable dbtable = null;
if (dse.AD_Table_ID != 0)
dbtable = MTable.get(Env.getCtx(), dse.AD_Table_ID);
if (gridTable != null && dse.getCurrentRow() >= 0 && dse.getCurrentRow() < gridTable.getRowCount())
{
PO po = gridTable.getPO(dse.getCurrentRow());
if (po != null) {
String uuidcol = po.getUUIDColumnName();
String uuid = po.get_ValueAsString(uuidcol);
String uuid = null;
if (po.is_new()) {
if (Record_ID == 0 && MTable.isZeroIDTable(dbtable.getTableName())) {
StringBuilder sql = new StringBuilder("SELECT ")
.append(uuidcol)
.append(" FROM ")
.append(dbtable.getTableName())
.append(" WHERE ")
.append(dbtable.getTableName())
.append("_ID=0");
uuid = DB.getSQLValueString(null, sql.toString());
}
} else {
uuid = po.get_ValueAsString(uuidcol);
}
if (!Util.isEmpty(uuid))
m_info.append("\n ").append(uuidcol).append("=").append(uuid);
m_permalink.setHref(AEnv.getZoomUrlTableID(po));
@ -271,22 +302,17 @@ public class WRecordInfo extends Window implements EventListener<Event>
}
// Title
if (dse.AD_Table_ID != 0)
if (tabName == null && dse.AD_Table_ID != 0)
{
MTable table1 = MTable.get (Env.getCtx(), dse.AD_Table_ID);
setTitle(title + " - " + table1.getName());
tabName = dbtable.getName();
}
setTitle(title + " - " + tabName);
// Only Client Preference can view Change Log
if (!MRole.PREFERENCETYPE_Client.equals(MRole.getDefault().getPreferenceType()))
return false;
int Record_ID = 0;
if (dse.Record_ID instanceof Integer)
Record_ID = ((Integer)dse.Record_ID).intValue();
else
log.info("dynInit - Invalid Record_ID=" + dse.Record_ID);
if (Record_ID == 0)
if (Record_ID <= 0)
return false;
// Data

View File

@ -99,14 +99,19 @@ public abstract class CreateFrom implements ICreateFrom
.append(DB.TO_CHAR("o.GrandTotal", DisplayType.Amount, Env.getAD_Language(Env.getCtx())));
//
String column = "ol.QtyDelivered";
String colBP = "o.C_BPartner_ID";
if (forInvoice)
{
column = "ol.QtyInvoiced";
StringBuffer sql = new StringBuffer("SELECT o.C_Order_ID,").append(display)
.append(" FROM C_Order o "
+ "WHERE o.C_BPartner_ID=? AND o.IsSOTrx=? AND o.DocStatus IN ('CL','CO')"
+ " AND o.C_Order_ID IN "
+ "(SELECT ol.C_Order_ID FROM C_OrderLine ol"
+ " WHERE ol.QtyOrdered - ").append(column).append(" != 0) ");
colBP = "o.Bill_BPartner_ID";
}
StringBuffer sql = new StringBuffer("SELECT o.C_Order_ID,")
.append(display)
.append(" FROM C_Order o WHERE ")
.append(colBP)
.append("=? AND o.IsSOTrx=? AND o.DocStatus IN ('CL','CO') AND o.C_Order_ID IN (SELECT ol.C_Order_ID FROM C_OrderLine ol WHERE ol.QtyOrdered-")
.append(column)
.append("!=0) ");
if(sameWarehouseOnly)
{
sql = sql.append(" AND o.M_Warehouse_ID=? ");

View File

@ -82,6 +82,7 @@ public class ColumnInfo
private GridField m_gridField;
private String colDescription;
private int AD_Reference_ID;
/**
* Get Col Class
@ -214,4 +215,12 @@ public class ColumnInfo
public void setColDescription(String colDescription) {
this.colDescription = colDescription;
}
public int getAD_Reference_ID() {
return AD_Reference_ID;
}
public void setAD_Reference_ID(int AD_Reference_ID) {
this.AD_Reference_ID = AD_Reference_ID;
}
} // infoColumn

View File

@ -925,7 +925,6 @@ public class DB_Oracle implements AdempiereDatabase
// IDs
case DisplayType.Account:
case DisplayType.Assignment:
case DisplayType.Color:
case DisplayType.ID:
case DisplayType.Location:
case DisplayType.Locator:
@ -979,6 +978,7 @@ public class DB_Oracle implements AdempiereDatabase
break;
// NVARCHAR
case DisplayType.Color:
case DisplayType.Memo:
case DisplayType.String:
case DisplayType.Text:

View File

@ -159,6 +159,7 @@ public class CompiereService {
Properties savedCache = new Properties();
savedCache.putAll(Env.getCtx());
ctxMap.put(key.toString(), savedCache);
if (log.isLoggable(Level.INFO)) log.info("Saving " + this + " in cache");
}
}
}
@ -201,15 +202,16 @@ public class CompiereService {
String loginInfo = null;
// Verify existence of User/Client/Org/Role and User's acces to Client & Org
String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name AS Text "
+ "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur "
+ "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur, AD_Role r "
+ "WHERE u.AD_User_ID=?" // #1
+ " AND c.AD_Client_ID=?" // #2
+ " AND o.AD_Org_ID=?" // #3
+ " AND ur.AD_Role_ID=?" // #4
+ " AND ur.AD_User_ID=u.AD_User_ID"
+ " AND ur.AD_Role_ID=r.AD_Role_ID"
+ " AND (o.AD_Client_ID = 0 OR o.AD_Client_ID=c.AD_Client_ID)"
+ " AND c.AD_Client_ID IN (SELECT AD_Client_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)"
+ " AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)";
+ " AND (r.IsAccessAllOrgs='Y' OR (c.AD_Client_ID IN (SELECT AD_Client_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)"
+ " AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)))";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
@ -406,10 +408,13 @@ public class CompiereService {
l_cs = csMap.get(key);
if (l_cs != null) {
if (l_cs.isExpired()) {
csMap.remove(key);
ctxMap.remove(key);
l_cs = null;
} else {
Properties cachedCtx = ctxMap.get(key);
Env.getCtx().putAll(cachedCtx);
if (log.isLoggable(Level.INFO)) log.info("Reusing " + l_cs);
}
}
}
@ -445,6 +450,7 @@ public class CompiereService {
);
if (m_connected && expired)
{
if (log.isLoggable(Level.INFO)) log.info("Closing expired/invalid " + this);
Env.logout();
ServerContext.dispose();
m_loggedin = false;

View File

@ -35,6 +35,7 @@ public class CompiereUtil {
try
{
if (log.isLoggable(Level.INFO)) log.info("Starting webservices iDempiere session");
s_initOK = Adempiere.startup(false);
}
catch (Exception ex)