Merge 10050:b43fe0084277
This commit is contained in:
commit
578bd12c4e
|
@ -21,7 +21,7 @@ AS
|
||||||
CURSOR CUR_BPLoc IS
|
CURSOR CUR_BPLoc IS
|
||||||
SELECT IsRemitTo, C_Location_ID
|
SELECT IsRemitTo, C_Location_ID
|
||||||
FROM C_BPartner_Location
|
FROM C_BPartner_Location
|
||||||
WHERE C_BPartner_ID=p_C_BPartner_ID
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
ORDER BY IsRemitTo DESC;
|
ORDER BY IsRemitTo DESC;
|
||||||
BEGIN
|
BEGIN
|
||||||
FOR l IN CUR_BPLoc LOOP
|
FOR l IN CUR_BPLoc LOOP
|
||||||
|
@ -31,4 +31,4 @@ BEGIN
|
||||||
END LOOP;
|
END LOOP;
|
||||||
RETURN v_C_Location_ID;
|
RETURN v_C_Location_ID;
|
||||||
END bpartnerRemitLocation;
|
END bpartnerRemitLocation;
|
||||||
/
|
/
|
||||||
|
|
|
@ -9,7 +9,7 @@ BEGIN
|
||||||
FOR l IN
|
FOR l IN
|
||||||
SELECT IsRemitTo, C_Location_ID
|
SELECT IsRemitTo, C_Location_ID
|
||||||
FROM C_BPartner_Location
|
FROM C_BPartner_Location
|
||||||
WHERE C_BPartner_ID=p_C_BPartner_ID
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
ORDER BY IsRemitTo DESC
|
ORDER BY IsRemitTo DESC
|
||||||
LOOP
|
LOOP
|
||||||
IF (v_C_Location_ID IS NULL) THEN
|
IF (v_C_Location_ID IS NULL) THEN
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:57:14 PM CET
|
||||||
|
-- IDEMPIERE-1521
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Element_UU,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,202630,'c7849ef7-da73-46b6-8f8a-448c3ffedccc',0,'DatabaseViewDrop',TO_DATE('2013-11-27 16:57:13','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','Drop view','Drop view',TO_DATE('2013-11-27 16:57:13','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:58:14 PM CET
|
||||||
|
INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Process_UU,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES (0,0,200066,'8d781c31-93a6-435d-a9c3-eb393d1cf2f3','4','org.compiere.process.DatabaseViewDrop','N',TO_DATE('2013-11-27 16:58:14','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','N','N','N','N','Drop view','Y',0,0,TO_DATE('2013-11-27 16:58:14','YYYY-MM-DD HH24:MI:SS'),0,'AD_ViewComponent Drop')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:58:31 PM CET
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FKConstraintType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSecure,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,210892,'2c8da8e6-1c75-4b7b-8e39-7e28c3399979',202630,0,200066,28,100,'DatabaseViewDrop',TO_DATE('2013-11-27 16:58:30','YYYY-MM-DD HH24:MI:SS'),0,'D','N',1,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','N','Y','Drop view',0,0,TO_DATE('2013-11-27 16:58:30','YYYY-MM-DD HH24:MI:SS'),0,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:58:33 PM CET
|
||||||
|
ALTER TABLE AD_Table ADD DatabaseViewDrop CHAR(1) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:59:24 PM CET
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,ColumnSpan,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy,XPosition) VALUES (0,210892,202541,'e6c3fc02-67cc-4dec-b5c1-c3fe0b7fe717',0,100,2,TO_DATE('2013-11-27 16:59:23','YYYY-MM-DD HH24:MI:SS'),0,1,'D','Y','Y','Y','N','N','N','N','N','Drop view',210,TO_DATE('2013-11-27 16:59:23','YYYY-MM-DD HH24:MI:SS'),0,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:59:38 PM CET
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=210, XPosition=5,Updated=TO_DATE('2013-11-27 16:59:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202541
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:59:56 PM CET
|
||||||
|
UPDATE AD_Field SET DisplayLogic='@IsView@=''Y''',Updated=TO_DATE('2013-11-27 16:59:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202541
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311271704_IDEMPIERE-1521.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,78 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:15 AM CET
|
||||||
|
-- IDEMPIERE-1575
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_DATE('2013-11-28 09:18:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14862
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:17 AM CET
|
||||||
|
ALTER TABLE AD_Issue MODIFY LoggerName NVARCHAR2(255) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:33 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_DATE('2013-11-28 09:18:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14860
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:33 AM CET
|
||||||
|
ALTER TABLE AD_Issue MODIFY SourceClassName NVARCHAR2(255) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:19:32 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_DATE('2013-11-28 09:19:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5664
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:19:33 AM CET
|
||||||
|
ALTER TABLE AD_PInstance_Para MODIFY Info NVARCHAR2(255) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:20:44 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_DATE('2013-11-28 09:20:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14922
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:20:45 AM CET
|
||||||
|
ALTER TABLE AD_System MODIFY ProfileInfo NVARCHAR2(255) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:02 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_DATE('2013-11-28 09:21:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2902
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:03 AM CET
|
||||||
|
ALTER TABLE C_BPartner MODIFY Name NVARCHAR2(120)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:17 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_DATE('2013-11-28 09:21:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1135
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:18 AM CET
|
||||||
|
ALTER TABLE C_ElementValue MODIFY Name NVARCHAR2(120)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:26 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_DATE('2013-11-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3163
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:26 AM CET
|
||||||
|
ALTER TABLE C_ElementValue_Trl MODIFY Name NVARCHAR2(120)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:42 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_DATE('2013-11-28 09:21:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5617
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:43 AM CET
|
||||||
|
ALTER TABLE C_PaySelection MODIFY Name NVARCHAR2(120)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 11, 2013 1:49:22 PM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_DATE('2013-12-11 13:49:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5950
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 11, 2013 1:49:22 PM CET
|
||||||
|
ALTER TABLE AD_Note MODIFY Reference NVARCHAR2(255) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311280926_IDEMPIERE-1575.sql') FROM dual
|
||||||
|
;
|
|
@ -14,5 +14,5 @@ AND po.C_BPartner_ID NOT IN (
|
||||||
AND ppo.M_Product_ID = po.M_Product_ID
|
AND ppo.M_Product_ID = po.M_Product_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
SELECT register_migration_script('201312051535_IDEMPIERE-337') FROM dual
|
SELECT register_migration_script('201312051535_IDEMPIERE-337.sql') FROM dual
|
||||||
;
|
;
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
CREATE OR REPLACE FUNCTION bpartnerRemitLocation
|
||||||
|
(
|
||||||
|
p_C_BPartner_ID C_BPartner.C_BPartner_ID%TYPE
|
||||||
|
)
|
||||||
|
RETURN NUMBER
|
||||||
|
/*************************************************************************
|
||||||
|
* The contents of this file are subject to the Compiere License. You may
|
||||||
|
* obtain a copy of the License at http://www.compiere.org/license.html
|
||||||
|
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
||||||
|
* express or implied. See the License for details. Code: Compiere ERP+CRM
|
||||||
|
* Copyright (C) 1999-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
|
||||||
|
*************************************************************************
|
||||||
|
* $Id: C_BPartner_RemitLocation.SQL,v 1.1 2006/04/21 17:51:58 jjanke Exp $
|
||||||
|
***
|
||||||
|
* Title: Return the first RemitTo C_Location_ID of a Business Partner
|
||||||
|
* Description:
|
||||||
|
*
|
||||||
|
************************************************************************/
|
||||||
|
AS
|
||||||
|
v_C_Location_ID NUMBER := NULL;
|
||||||
|
CURSOR CUR_BPLoc IS
|
||||||
|
SELECT IsRemitTo, C_Location_ID
|
||||||
|
FROM C_BPartner_Location
|
||||||
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
|
ORDER BY IsRemitTo DESC;
|
||||||
|
BEGIN
|
||||||
|
FOR l IN CUR_BPLoc LOOP
|
||||||
|
IF (v_C_Location_ID IS NULL) THEN
|
||||||
|
v_C_Location_ID := l.C_Location_ID;
|
||||||
|
END IF;
|
||||||
|
END LOOP;
|
||||||
|
RETURN v_C_Location_ID;
|
||||||
|
END bpartnerRemitLocation;
|
||||||
|
/
|
||||||
|
|
||||||
|
SELECT register_migration_script('201312110939_IDEMPIERE-1625.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,31 @@
|
||||||
|
-- Nov 27, 2013 4:57:14 PM CET
|
||||||
|
-- IDEMPIERE-1521
|
||||||
|
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Element_UU,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,202630,'c7849ef7-da73-46b6-8f8a-448c3ffedccc',0,'DatabaseViewDrop',TO_TIMESTAMP('2013-11-27 16:57:13','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','Drop view','Drop view',TO_TIMESTAMP('2013-11-27 16:57:13','YYYY-MM-DD HH24:MI:SS'),0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:58:14 PM CET
|
||||||
|
INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Process_UU,AccessLevel,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES (0,0,200066,'8d781c31-93a6-435d-a9c3-eb393d1cf2f3','4','org.compiere.process.DatabaseViewDrop','N',TO_TIMESTAMP('2013-11-27 16:58:14','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','N','N','N','N','Drop view','Y',0,0,TO_TIMESTAMP('2013-11-27 16:58:14','YYYY-MM-DD HH24:MI:SS'),0,'AD_ViewComponent Drop')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:58:31 PM CET
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Column_UU,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FKConstraintType,FieldLength,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSecure,IsSelectionColumn,IsSyncDatabase,IsToolbarButton,IsTranslated,IsUpdateable,Name,SeqNo,SeqNoSelection,Updated,UpdatedBy,Version) VALUES (0,210892,'2c8da8e6-1c75-4b7b-8e39-7e28c3399979',202630,0,200066,28,100,'DatabaseViewDrop',TO_TIMESTAMP('2013-11-27 16:58:30','YYYY-MM-DD HH24:MI:SS'),0,'D','N',1,'Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','N','Y','Drop view',0,0,TO_TIMESTAMP('2013-11-27 16:58:30','YYYY-MM-DD HH24:MI:SS'),0,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:58:33 PM CET
|
||||||
|
ALTER TABLE AD_Table ADD COLUMN DatabaseViewDrop CHAR(1) DEFAULT NULL
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:59:24 PM CET
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Field_UU,AD_Org_ID,AD_Tab_ID,ColumnSpan,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy,XPosition) VALUES (0,210892,202541,'e6c3fc02-67cc-4dec-b5c1-c3fe0b7fe717',0,100,2,TO_TIMESTAMP('2013-11-27 16:59:23','YYYY-MM-DD HH24:MI:SS'),0,1,'D','Y','Y','Y','N','N','N','N','N','Drop view',210,TO_TIMESTAMP('2013-11-27 16:59:23','YYYY-MM-DD HH24:MI:SS'),0,2)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:59:38 PM CET
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=210, XPosition=5,Updated=TO_TIMESTAMP('2013-11-27 16:59:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202541
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 27, 2013 4:59:56 PM CET
|
||||||
|
UPDATE AD_Field SET DisplayLogic='@IsView@=''Y''',Updated=TO_TIMESTAMP('2013-11-27 16:59:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202541
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311271704_IDEMPIERE-1521.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,75 @@
|
||||||
|
-- Nov 28, 2013 9:18:15 AM CET
|
||||||
|
-- IDEMPIERE-1575
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_TIMESTAMP('2013-11-28 09:18:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14862
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:17 AM CET
|
||||||
|
INSERT INTO t_alter_column values('ad_issue','LoggerName','VARCHAR(255)',null,'NULL')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:33 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_TIMESTAMP('2013-11-28 09:18:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14860
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:18:33 AM CET
|
||||||
|
INSERT INTO t_alter_column values('ad_issue','SourceClassName','VARCHAR(255)',null,'NULL')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:19:32 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_TIMESTAMP('2013-11-28 09:19:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5664
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:19:33 AM CET
|
||||||
|
INSERT INTO t_alter_column values('ad_pinstance_para','Info','VARCHAR(255)',null,'NULL')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:20:44 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_TIMESTAMP('2013-11-28 09:20:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14922
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:20:45 AM CET
|
||||||
|
INSERT INTO t_alter_column values('ad_system','ProfileInfo','VARCHAR(255)',null,'NULL')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:02 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_TIMESTAMP('2013-11-28 09:21:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=2902
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:03 AM CET
|
||||||
|
INSERT INTO t_alter_column values('c_bpartner','Name','VARCHAR(120)',null,null)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:17 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_TIMESTAMP('2013-11-28 09:21:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1135
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:18 AM CET
|
||||||
|
INSERT INTO t_alter_column values('c_elementvalue','Name','VARCHAR(120)',null,null)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:26 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_TIMESTAMP('2013-11-28 09:21:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3163
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:26 AM CET
|
||||||
|
INSERT INTO t_alter_column values('c_elementvalue_trl','Name','VARCHAR(120)',null,null)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:42 AM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=120,Updated=TO_TIMESTAMP('2013-11-28 09:21:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5617
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Nov 28, 2013 9:21:43 AM CET
|
||||||
|
INSERT INTO t_alter_column values('c_payselection','Name','VARCHAR(120)',null,null)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 11, 2013 1:49:22 PM CET
|
||||||
|
UPDATE AD_Column SET FieldLength=255,Updated=TO_TIMESTAMP('2013-12-11 13:49:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5950
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Dec 11, 2013 1:49:22 PM CET
|
||||||
|
INSERT INTO t_alter_column values('ad_note','Reference','VARCHAR(255)',null,'NULL')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201311280926_IDEMPIERE-1575.sql') FROM dual
|
||||||
|
;
|
|
@ -11,5 +11,5 @@ AND po.C_BPartner_ID NOT IN (
|
||||||
AND ppo.M_Product_ID = po.M_Product_ID
|
AND ppo.M_Product_ID = po.M_Product_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
SELECT register_migration_script('201312051535_IDEMPIERE-337') FROM dual
|
SELECT register_migration_script('201312051535_IDEMPIERE-337.sql') FROM dual
|
||||||
;
|
;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
CREATE OR REPLACE FUNCTION bpartnerRemitLocation(p_C_BPartner_ID C_BPartner.C_BPartner_ID%TYPE)
|
||||||
|
RETURNS numeric AS $body$
|
||||||
|
|
||||||
|
DECLARE
|
||||||
|
v_C_Location_ID NUMERIC := NULL;
|
||||||
|
l RECORD;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
FOR l IN
|
||||||
|
SELECT IsRemitTo, C_Location_ID
|
||||||
|
FROM C_BPartner_Location
|
||||||
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
|
ORDER BY IsRemitTo DESC
|
||||||
|
LOOP
|
||||||
|
IF (v_C_Location_ID IS NULL) THEN
|
||||||
|
v_C_Location_ID := l.C_Location_ID;
|
||||||
|
END IF;
|
||||||
|
END LOOP;
|
||||||
|
RETURN v_C_Location_ID;
|
||||||
|
|
||||||
|
END;
|
||||||
|
|
||||||
|
$body$ LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201312110939_IDEMPIERE-1625.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -81,8 +81,9 @@ public class ExpenseTypesFromAccounts extends SvrProcess {
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
for (int i = 0; i < para.length; i++) {
|
for (int i = 0; i < para.length; i++) {
|
||||||
String name = para[i].getParameterName();
|
String name = para[i].getParameterName();
|
||||||
if (para[i].getParameter() == null);
|
if (para[i].getParameter() == null) {
|
||||||
else if (name.equals("M_Product_Category_ID")) {
|
// nothing
|
||||||
|
} else if (name.equals("M_Product_Category_ID")) {
|
||||||
m_productCategoryId = para[i].getParameterAsInt();
|
m_productCategoryId = para[i].getParameterAsInt();
|
||||||
} else if (name.equals("C_AcctSchema_ID")) {
|
} else if (name.equals("C_AcctSchema_ID")) {
|
||||||
m_acctSchemaId = para[i].getParameterAsInt();
|
m_acctSchemaId = para[i].getParameterAsInt();
|
||||||
|
|
|
@ -54,38 +54,54 @@ public class MDashboardContentAccess extends X_PA_DashboardContent_Access {
|
||||||
parameters.add(AD_Client_ID);
|
parameters.add(AD_Client_ID);
|
||||||
|
|
||||||
StringBuffer sql= new StringBuffer();
|
StringBuffer sql= new StringBuffer();
|
||||||
|
// First part : dashboards not configured in access and flagged to be shown in login (this is intended to show new dashboards, otherwise new dashboards won't be shown unless the user go and configure them)
|
||||||
sql.append("SELECT PA_DashboardContent_ID,ColumnNo ")
|
sql.append("SELECT PA_DashboardContent_ID,ColumnNo ")
|
||||||
.append(" FROM PA_DashboardContent ")
|
.append(" FROM PA_DashboardContent ")
|
||||||
.append(" WHERE PA_DashboardContent_ID NOT IN (")
|
.append(" WHERE PA_DashboardContent_ID NOT IN (")
|
||||||
.append(" SELECT PA_DashboardContent_ID ")
|
.append(" SELECT PA_DashboardContent_ID ")
|
||||||
.append(" FROM PA_DashboardContent_Access" )
|
.append(" FROM PA_DashboardContent_Access" )
|
||||||
.append(" WHERE IsActive='Y' AND AD_Client_ID IN (0, ?))")
|
.append(" WHERE AD_Client_ID IN (0, ?))")
|
||||||
.append(" AND IsShowInLogin='Y'")
|
.append(" AND IsShowInLogin='Y'")
|
||||||
.append(" AND IsActive='Y' AND AD_Client_ID IN (0, ?)")
|
.append(" AND IsActive='Y' AND AD_Client_ID IN (0, ?)")
|
||||||
.append(" UNION ALL")
|
.append(" UNION ALL")
|
||||||
|
// Second part : second part is to process the dashboards configured in content access
|
||||||
.append(" SELECT ct.PA_DashboardContent_ID,ct.ColumnNo")
|
.append(" SELECT ct.PA_DashboardContent_ID,ct.ColumnNo")
|
||||||
.append(" FROM PA_DashboardContent ct")
|
.append(" FROM PA_DashboardContent ct")
|
||||||
.append(" INNER JOIN PA_DashboardContent_Access cta on (ct.PA_DashboardContent_ID = cta.PA_DashboardContent_ID)")
|
.append(" INNER JOIN PA_DashboardContent_Access cta on (ct.PA_DashboardContent_ID = cta.PA_DashboardContent_ID)")
|
||||||
.append(" WHERE cta.IsActive='Y'")
|
.append(" WHERE cta.IsActive='Y'")
|
||||||
.append(" AND ct.IsActive='Y'");
|
.append(" AND ct.IsActive='Y'");
|
||||||
|
|
||||||
if(AD_Role >= 0){
|
if(AD_Role >= 0) {
|
||||||
sql.append(" AND coalesce(cta.AD_Role_ID, ?) = ?");
|
sql.append(" AND COALESCE(cta.AD_Role_ID, ?) = ?");
|
||||||
parameters.add(AD_Role);
|
parameters.add(AD_Role);
|
||||||
parameters.add(AD_Role);
|
parameters.add(AD_Role);
|
||||||
}
|
}
|
||||||
|
if (AD_User >= 0) {
|
||||||
if (AD_User >= 0){
|
sql.append(" AND COALESCE(cta.AD_User_ID, ?) = ?");
|
||||||
sql.append(" AND coalesce(cta.AD_User_ID, ?) = ?");
|
|
||||||
parameters.add(AD_User);
|
parameters.add(AD_User);
|
||||||
parameters.add(AD_User);
|
parameters.add(AD_User);
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.append(" AND cta.AD_Client_ID in (0,?)");
|
sql.append(" AND cta.AD_Client_ID in (0,?)");
|
||||||
parameters.add(AD_Client_ID);
|
parameters.add(AD_Client_ID);
|
||||||
|
|
||||||
|
// New part : remove dashboard if inactive records
|
||||||
|
sql.append(" AND ct.PA_DashboardContent_ID NOT IN (SELECT PA_DashboardContent_ID FROM PA_DashboardContent_Access WHERE IsActive='N' AND ct.AD_Client_ID in (0,?)");
|
||||||
|
parameters.add(AD_Client_ID);
|
||||||
|
if (AD_Role >= 0) {
|
||||||
|
sql.append(" AND COALESCE(ct.AD_Role_ID, ?) = ?");
|
||||||
|
parameters.add(AD_Role);
|
||||||
|
parameters.add(AD_Role);
|
||||||
|
}
|
||||||
|
if (AD_User >= 0) {
|
||||||
|
sql.append(" AND COALESCE(ct.AD_User_ID, ?) = ?");
|
||||||
|
parameters.add(AD_User);
|
||||||
|
parameters.add(AD_User);
|
||||||
|
}
|
||||||
|
sql.append(")");
|
||||||
|
|
||||||
sql.append(" ORDER BY ColumnNo");
|
sql.append(" ORDER BY ColumnNo");
|
||||||
|
|
||||||
PreparedStatement pstmt=null;
|
PreparedStatement pstmt=null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,8 @@ public class MGoal extends X_PA_Goal
|
||||||
DB.close(rs, pstmt);
|
DB.close(rs, pstmt);
|
||||||
rs = null; pstmt = null;
|
rs = null; pstmt = null;
|
||||||
}
|
}
|
||||||
|
if (list.size() == 0)
|
||||||
|
s_log.log (Level.WARNING, Msg.getMsg(ctx, "FindZeroRecords"));
|
||||||
MGoal[] retValue = new MGoal[list.size ()];
|
MGoal[] retValue = new MGoal[list.size ()];
|
||||||
list.toArray (retValue);
|
list.toArray (retValue);
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -862,7 +862,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
||||||
setPrice();
|
setPrice();
|
||||||
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
||||||
// Check PriceLimit
|
// Check PriceLimit
|
||||||
boolean enforce = m_IsSOTrx && m_parent.getM_PriceList().isEnforcePriceLimit();
|
boolean enforce = m_IsSOTrx && getParent().getM_PriceList().isEnforcePriceLimit();
|
||||||
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
||||||
enforce = false;
|
enforce = false;
|
||||||
// Check Price Limit?
|
// Check Price Limit?
|
||||||
|
|
|
@ -109,6 +109,8 @@ public class MMeasure extends X_PA_Measure
|
||||||
String sql = mc.getSqlBarChart(goal.getRestrictions(false),
|
String sql = mc.getSqlBarChart(goal.getRestrictions(false),
|
||||||
goal.getMeasureDisplay(), goal.getDateFrom(),
|
goal.getMeasureDisplay(), goal.getDateFrom(),
|
||||||
MRole.getDefault()); // logged in role
|
MRole.getDefault()); // logged in role
|
||||||
|
if (sql.indexOf("@") >= 0)
|
||||||
|
sql = Env.parseContext(getCtx(), 0, sql, false, false);
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
|
|
|
@ -235,6 +235,8 @@ public class MMeasureCalc extends X_PA_MeasureCalc
|
||||||
.append("')=TRUNC(").append(DB.TO_DATE(date)).append(",'").append(trunc).append("')");
|
.append("')=TRUNC(").append(DB.TO_DATE(date)).append(",'").append(trunc).append("')");
|
||||||
}
|
}
|
||||||
String finalSQL = addRestrictions(sql.toString(), restrictions, role);
|
String finalSQL = addRestrictions(sql.toString(), restrictions, role);
|
||||||
|
if (finalSQL.indexOf("@") >= 0)
|
||||||
|
finalSQL = Env.parseContext(getCtx(), 0, finalSQL, false, false);
|
||||||
// Execute
|
// Execute
|
||||||
StringBuilder where = new StringBuilder();
|
StringBuilder where = new StringBuilder();
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
|
|
@ -872,7 +872,7 @@ public class MOrderLine extends X_C_OrderLine
|
||||||
getProductPricing(m_M_PriceList_ID);
|
getProductPricing(m_M_PriceList_ID);
|
||||||
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
||||||
// Check PriceLimit
|
// Check PriceLimit
|
||||||
boolean enforce = m_IsSOTrx && m_parent.getM_PriceList().isEnforcePriceLimit();
|
boolean enforce = m_IsSOTrx && getParent().getM_PriceList().isEnforcePriceLimit();
|
||||||
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
||||||
enforce = false;
|
enforce = false;
|
||||||
// Check Price Limit?
|
// Check Price Limit?
|
||||||
|
|
|
@ -19,9 +19,10 @@ package org.compiere.model;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.DBException;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product PO Model
|
* Product PO Model
|
||||||
|
@ -105,11 +106,12 @@ public class MProductPO extends X_M_Product_PO
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (isActive() && isCurrentVendor())
|
int cnt = DB.getSQLValue(get_TrxName(),
|
||||||
{
|
"SELECT COUNT(*) FROM M_Product_PO WHERE IsActive='Y' AND IsCurrentVendor='Y' AND C_BPartner_ID!=? AND M_Product_ID=?",
|
||||||
String sql = "UPDATE M_Product_PO SET IsCurrentVendor='N' WHERE IsActive='Y' AND IsCurrentVendor='Y' AND C_BPartner_ID!=? AND M_Product_ID=?";
|
getC_BPartner_ID(), getM_Product_ID());
|
||||||
int no = DB.executeUpdate(sql, new Object[] {getC_BPartner_ID(), getM_Product_ID()}, false, get_TrxName());
|
if (cnt > 0) {
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest("Updated M_Product_PO.IsCurrentVendor #" + no);
|
log.saveError("SaveError", Msg.getMsg(getCtx(), DBException.SAVE_ERROR_NOT_UNIQUE_MSG, true) + Msg.getElement(getCtx(), COLUMNNAME_IsCurrentVendor));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||||
|
* 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.compiere.process;
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
|
import org.compiere.model.MTable;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
|
public class DatabaseViewDrop extends SvrProcess {
|
||||||
|
|
||||||
|
private int p_AD_Table_ID = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void prepare()
|
||||||
|
{
|
||||||
|
p_AD_Table_ID = getRecord_ID();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String doIt() throws Exception
|
||||||
|
{
|
||||||
|
MTable table = new MTable(getCtx(), p_AD_Table_ID, get_TrxName());
|
||||||
|
log.info(table.toString());
|
||||||
|
if (!table.isView() || !table.isActive())
|
||||||
|
throw new AdempiereException(Msg.getMsg(getCtx(), "NotActiveDatabaseView"));
|
||||||
|
|
||||||
|
String sql = "DROP VIEW " + table.getTableName();
|
||||||
|
int rvalue = DB.executeUpdateEx(sql, get_TrxName());
|
||||||
|
|
||||||
|
return rvalue + " - " + sql;
|
||||||
|
}
|
||||||
|
} // DatabaseViewDrop
|
|
@ -608,7 +608,7 @@ public final class DisplayType
|
||||||
if (fieldLength == 1)
|
if (fieldLength == 1)
|
||||||
return "CHAR(" + fieldLength + ")";
|
return "CHAR(" + fieldLength + ")";
|
||||||
else
|
else
|
||||||
return "NVARCHAR2(" + fieldLength + ")";
|
return "VARCHAR2(" + fieldLength + ")";
|
||||||
}
|
}
|
||||||
if (displayType == DisplayType.Color) // this condition is never reached - filtered above in isID
|
if (displayType == DisplayType.Color) // this condition is never reached - filtered above in isID
|
||||||
{
|
{
|
||||||
|
@ -635,7 +635,7 @@ public final class DisplayType
|
||||||
if (!DisplayType.isText(displayType))
|
if (!DisplayType.isText(displayType))
|
||||||
s_log.severe("Unhandled Data Type = " + displayType);
|
s_log.severe("Unhandled Data Type = " + displayType);
|
||||||
|
|
||||||
return "NVARCHAR2(" + fieldLength + ")";
|
return "VARCHAR2(" + fieldLength + ")";
|
||||||
} // getSQLDataType
|
} // getSQLDataType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -547,7 +547,7 @@ public final class EMail implements Serializable
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_from = new InternetAddress (newFrom, true);
|
m_from = new InternetAddress (newFrom, true);
|
||||||
if (MSysConfig.getBooleanValue(MSysConfig.MAIL_SEND_BCC_TO_FROM, false, Env.getAD_Client_ID(Env.getCtx())));
|
if (MSysConfig.getBooleanValue(MSysConfig.MAIL_SEND_BCC_TO_FROM, false, Env.getAD_Client_ID(Env.getCtx())))
|
||||||
addBcc(newFrom);
|
addBcc(newFrom);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -64,6 +64,11 @@ public final class Attachment extends CDialog
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 2497487523050526742L;
|
private static final long serialVersionUID = 2497487523050526742L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the last path selected
|
||||||
|
*/
|
||||||
|
private static String lastPath = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* loads Attachment, if ID <> 0
|
* loads Attachment, if ID <> 0
|
||||||
|
@ -424,7 +429,8 @@ public final class Attachment extends CDialog
|
||||||
private void loadFile()
|
private void loadFile()
|
||||||
{
|
{
|
||||||
log.info("");
|
log.info("");
|
||||||
JFileChooser chooser = new JFileChooser();
|
JFileChooser chooser = new JFileChooser(lastPath);
|
||||||
|
|
||||||
chooser.setDialogType(JFileChooser.OPEN_DIALOG);
|
chooser.setDialogType(JFileChooser.OPEN_DIALOG);
|
||||||
chooser.setDialogTitle(Msg.getMsg(Env.getCtx(), "AttachmentNew"));
|
chooser.setDialogTitle(Msg.getMsg(Env.getCtx(), "AttachmentNew"));
|
||||||
chooser.setMultiSelectionEnabled(true);
|
chooser.setMultiSelectionEnabled(true);
|
||||||
|
@ -463,6 +469,10 @@ public final class Attachment extends CDialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Save path of file
|
||||||
|
if (files.length>0) {
|
||||||
|
lastPath = files[0].getParentFile().getAbsolutePath();
|
||||||
|
}
|
||||||
} // getFileName
|
} // getFileName
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -282,7 +282,8 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
Row row = new Row();
|
Row row = new Row();
|
||||||
|
|
||||||
// The Editor
|
// The Editor
|
||||||
WEditor editor = WebEditorFactory.getEditor(mField, false);
|
WEditor editor = WebEditorFactory.getEditor(mField, false);
|
||||||
|
editor.setProcessParameter(true);
|
||||||
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
|
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
|
||||||
editor.getComponent().addEventListener(Events.ON_BLUR, this);
|
editor.getComponent().addEventListener(Events.ON_BLUR, this);
|
||||||
editor.addValueChangeListener(this);
|
editor.addValueChangeListener(this);
|
||||||
|
@ -337,6 +338,7 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
m_mFields2.add(mField2);
|
m_mFields2.add(mField2);
|
||||||
// The Editor
|
// The Editor
|
||||||
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
|
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
|
||||||
|
editor2.setProcessParameter(true);
|
||||||
//override attribute
|
//override attribute
|
||||||
editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
|
editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
|
||||||
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
|
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
|
||||||
|
|
|
@ -14,6 +14,7 @@ public class WViewPI extends ADForm {
|
||||||
this.setSclass("window-view-pi");
|
this.setSclass("window-view-pi");
|
||||||
WPerformanceIndicator.Options options = new WPerformanceIndicator.Options();
|
WPerformanceIndicator.Options options = new WPerformanceIndicator.Options();
|
||||||
WPAPanel paPanel = WPAPanel.get(options);
|
WPAPanel paPanel = WPAPanel.get(options);
|
||||||
appendChild(paPanel);
|
if (paPanel != null)
|
||||||
|
appendChild(paPanel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,8 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
protected WEditorPopupMenu popupMenu;
|
protected WEditorPopupMenu popupMenu;
|
||||||
|
|
||||||
private boolean tableEditor;
|
private boolean tableEditor;
|
||||||
|
|
||||||
|
private boolean isProcessParameter;
|
||||||
|
|
||||||
public WEditor(Component comp, GridField gridField) {
|
public WEditor(Component comp, GridField gridField) {
|
||||||
this(comp, gridField, -1);
|
this(comp, gridField, -1);
|
||||||
|
@ -208,7 +210,8 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
label = new Label("");
|
label = new Label("");
|
||||||
label.setValue(strLabel);
|
label.setValue(strLabel);
|
||||||
label.setTooltiptext(description);
|
label.setTooltiptext(description);
|
||||||
|
label.setMandatory(mandatory);
|
||||||
|
|
||||||
this.setMandatory (mandatory);
|
this.setMandatory (mandatory);
|
||||||
|
|
||||||
if (readOnly || !updateable)
|
if (readOnly || !updateable)
|
||||||
|
@ -546,7 +549,7 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMandatoryStyle() {
|
public boolean isMandatoryStyle() {
|
||||||
return mandatory && !readOnly && getGridField().isEditable(true) && isNullOrEmpty();
|
return mandatory && !readOnly && (isProcessParameter || getGridField().isEditable(true)) && isNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNullOrEmpty() {
|
public boolean isNullOrEmpty() {
|
||||||
|
@ -632,6 +635,14 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isProcessParameter() {
|
||||||
|
return isProcessParameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessParameter(boolean isProcessParameter) {
|
||||||
|
this.isProcessParameter = isProcessParameter;
|
||||||
|
}
|
||||||
|
|
||||||
private static final String STYLE_ZOOMABLE_LABEL = "cursor: pointer; text-decoration: underline;";
|
private static final String STYLE_ZOOMABLE_LABEL = "cursor: pointer; text-decoration: underline;";
|
||||||
private static final String STYLE_NORMAL_LABEL = "color: #333;";
|
private static final String STYLE_NORMAL_LABEL = "color: #333;";
|
||||||
|
|
|
@ -230,51 +230,57 @@ public class WGadgets extends Window implements EventListener<Event>{
|
||||||
{
|
{
|
||||||
Properties ctx = Env.getCtx();
|
Properties ctx = Env.getCtx();
|
||||||
|
|
||||||
int AD_CLient_ID =Env.getAD_Client_ID(ctx);
|
int AD_Client_ID =Env.getAD_Client_ID(ctx);
|
||||||
int AD_Role_ID = Env.getAD_Role_ID(ctx);
|
int AD_Role_ID = Env.getAD_Role_ID(ctx);
|
||||||
int AD_User_ID = Env.getAD_User_ID(ctx);
|
int AD_User_ID = Env.getAD_User_ID(ctx);
|
||||||
|
|
||||||
noItems.removeAll(noItems);
|
noItems.removeAll(noItems);
|
||||||
yesItems.removeAll(yesItems);
|
yesItems.removeAll(yesItems);
|
||||||
String query = " SELECT ct.PA_DashboardContent_ID, ct.Name "
|
String query = ""
|
||||||
+" FROM PA_DashboardContent ct"
|
+ "SELECT ct.PA_DashboardContent_ID, "
|
||||||
+" WHERE ct.AD_Client_ID IN (0,?)"
|
+ " ct.Name "
|
||||||
+" AND ct.IsActive='Y'"
|
+ "FROM PA_DashboardContent ct "
|
||||||
+" AND ct.PA_DashboardContent_ID NOT IN ("
|
+ "WHERE ct.AD_Client_ID IN ( 0, ? ) "
|
||||||
+" SELECT pre.PA_DashboardContent_ID"
|
+ " AND ct.IsActive = 'Y' "
|
||||||
+" FROM PA_DashboardPreference pre"
|
+ " AND ct.PA_DashboardContent_ID NOT IN (SELECT pre.PA_DashboardContent_ID "
|
||||||
+" WHERE pre.AD_Client_ID IN (0,?)"
|
+ " FROM PA_DashboardPreference pre "
|
||||||
+" AND pre.AD_Role_ID = ?"
|
+ " WHERE pre.AD_Client_ID IN ( 0, ? ) "
|
||||||
+" AND pre.AD_User_ID = ?"
|
+ " AND pre.AD_Role_ID = ? "
|
||||||
+" AND pre.AD_Org_ID=0 "
|
+ " AND pre.AD_User_ID = ? "
|
||||||
+" AND pre.IsActive='Y') "
|
+ " AND pre.AD_Org_ID = 0 "
|
||||||
+" AND ("
|
+ " AND pre.IsActive = 'Y') "
|
||||||
+" ct.PA_DashboardContent_ID NOT IN ( SELECT PA_DashboardContent_ID "
|
+ " AND ( ct.PA_DashboardContent_ID NOT IN (SELECT cta.PA_DashboardContent_ID "
|
||||||
+" FROM PA_DashboardContent_Access"
|
+ " FROM PA_DashboardContent_Access cta "
|
||||||
+" WHERE IsActive='Y' AND AD_Client_ID IN (0, ?))"
|
+ " WHERE cta.IsActive = 'N' "
|
||||||
+" OR ct.PA_DashboardContent_ID IN ( SELECT cta.PA_DashboardContent_ID "
|
+ " AND COALESCE(cta.AD_Role_ID, ?) = ? "
|
||||||
+" FROM PA_DashboardContent_Access cta "
|
+ " AND COALESCE(cta.AD_User_ID, ?) = ? "
|
||||||
+" WHERE cta.IsActive='Y'"
|
+ " AND cta.AD_Client_ID IN ( 0, ? )) "
|
||||||
+" AND coalesce(cta.AD_Role_ID, ?) = ?"
|
+ " OR ct.PA_DashboardContent_ID IN (SELECT cta.PA_DashboardContent_ID "
|
||||||
+" AND coalesce(cta.AD_User_ID, ?) = ?"
|
+ " FROM PA_DashboardContent_Access cta "
|
||||||
+" AND cta.AD_Client_ID in (0,?) ) "
|
+ " WHERE cta.IsActive = 'Y' "
|
||||||
+" )";
|
+ " AND COALESCE(cta.AD_Role_ID, ?) = ? "
|
||||||
|
+ " AND COALESCE(cta.AD_User_ID, ?) = ? "
|
||||||
|
+ " AND cta.AD_Client_ID IN ( 0, ? )) ) ";
|
||||||
|
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pstmt = DB.prepareStatement(query, null);
|
pstmt = DB.prepareStatement(query, null);
|
||||||
pstmt.setInt(1, AD_CLient_ID);
|
pstmt.setInt(1, AD_Client_ID);
|
||||||
pstmt.setInt(2, AD_CLient_ID);
|
pstmt.setInt(2, AD_Client_ID);
|
||||||
pstmt.setInt(3, AD_Role_ID);
|
pstmt.setInt(3, AD_Role_ID);
|
||||||
pstmt.setInt(4, AD_User_ID);
|
pstmt.setInt(4, AD_User_ID);
|
||||||
pstmt.setInt(5, AD_CLient_ID);
|
pstmt.setInt(5, AD_Role_ID);
|
||||||
pstmt.setInt(6, AD_Role_ID);
|
pstmt.setInt(6, AD_Role_ID);
|
||||||
pstmt.setInt(7, AD_Role_ID);
|
pstmt.setInt(7, AD_User_ID);
|
||||||
pstmt.setInt(8, AD_User_ID);
|
pstmt.setInt(8, AD_User_ID);
|
||||||
pstmt.setInt(9, AD_User_ID);
|
pstmt.setInt(9, AD_Client_ID);
|
||||||
pstmt.setInt(10, AD_CLient_ID);
|
pstmt.setInt(10, AD_Role_ID);
|
||||||
|
pstmt.setInt(11, AD_Role_ID);
|
||||||
|
pstmt.setInt(12, AD_User_ID);
|
||||||
|
pstmt.setInt(13, AD_User_ID);
|
||||||
|
pstmt.setInt(14, AD_Client_ID);
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
|
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
@ -298,7 +304,7 @@ public class WGadgets extends Window implements EventListener<Event>{
|
||||||
+" AND IsActive='Y'";
|
+" AND IsActive='Y'";
|
||||||
|
|
||||||
Query query1 =new Query(ctx,MDashboardPreference.Table_Name, where, null);
|
Query query1 =new Query(ctx,MDashboardPreference.Table_Name, where, null);
|
||||||
query1.setParameters(new Object[]{AD_User_ID,AD_Role_ID ,AD_CLient_ID});
|
query1.setParameters(new Object[]{AD_User_ID,AD_Role_ID ,AD_Client_ID});
|
||||||
List<MDashboardPreference> preference=query1.list();
|
List<MDashboardPreference> preference=query1.list();
|
||||||
|
|
||||||
if(preference.size() > 0){
|
if(preference.size() > 0){
|
||||||
|
|
Loading…
Reference in New Issue