FR [2988993] - Displaying 1.0 instead of 99,999.00 - apply complete patch - fix EOL issue - renumber scripts
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2988993
This commit is contained in:
parent
1aa36c221a
commit
11cbb3eb78
File diff suppressed because it is too large
Load Diff
|
@ -1,45 +1,45 @@
|
|||
/*
|
||||
*This file is part of Adempiere ERP Bazaar
|
||||
*http://www.adempiere.org
|
||||
*Copyright (C) 2006-2008 victor.perez@e-evolution.com, e-Evolution
|
||||
*This program is free software; you can redistribute it and/or
|
||||
*modify it under the terms of the GNU General Public License
|
||||
*as published by the Free Software Foundation; either version 2
|
||||
*of the License, or (at your option) any later version.
|
||||
*
|
||||
*This program is distributed in the hope that it will be useful,
|
||||
*but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
*GNU General Public License for more details.
|
||||
*
|
||||
*You should have received a copy of the GNU General Public License
|
||||
*along with this program; if not, write to the Free Software
|
||||
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
|
||||
*
|
||||
* Author: Carlos Ruiz (globalqss)
|
||||
*/
|
||||
CREATE OR REPLACE FUNCTION get_Sysconfig
|
||||
(
|
||||
sysconfig_name IN ad_sysconfig.name%TYPE,
|
||||
defaultvalue IN ad_sysconfig.value%TYPE,
|
||||
client_id IN ad_sysconfig.ad_client_id%TYPE,
|
||||
org_id IN ad_sysconfig.ad_org_id%TYPE
|
||||
)
|
||||
RETURN ad_sysconfig.value%TYPE
|
||||
AS
|
||||
v_value ad_sysconfig.value%TYPE;
|
||||
BEGIN
|
||||
BEGIN
|
||||
SELECT Value
|
||||
INTO v_value FROM
|
||||
(SELECT Value
|
||||
FROM AD_SysConfig WHERE Name=sysconfig_name AND AD_Client_ID IN (0, client_id) AND AD_Org_ID IN (0, org_id) AND IsActive='Y'
|
||||
ORDER BY AD_Client_ID DESC, AD_Org_ID DESC)
|
||||
WHERE ROWNUM = 1;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND THEN
|
||||
v_value := defaultvalue;
|
||||
END;
|
||||
RETURN v_value;
|
||||
END get_Sysconfig;
|
||||
/
|
||||
/*
|
||||
*This file is part of Adempiere ERP Bazaar
|
||||
*http://www.adempiere.org
|
||||
*Copyright (C) 2006-2008 victor.perez@e-evolution.com, e-Evolution
|
||||
*This program is free software; you can redistribute it and/or
|
||||
*modify it under the terms of the GNU General Public License
|
||||
*as published by the Free Software Foundation; either version 2
|
||||
*of the License, or (at your option) any later version.
|
||||
*
|
||||
*This program is distributed in the hope that it will be useful,
|
||||
*but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
*GNU General Public License for more details.
|
||||
*
|
||||
*You should have received a copy of the GNU General Public License
|
||||
*along with this program; if not, write to the Free Software
|
||||
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
|
||||
*
|
||||
* Author: Carlos Ruiz (globalqss)
|
||||
*/
|
||||
CREATE OR REPLACE FUNCTION get_Sysconfig
|
||||
(
|
||||
sysconfig_name IN ad_sysconfig.name%TYPE,
|
||||
defaultvalue IN ad_sysconfig.value%TYPE,
|
||||
client_id IN ad_sysconfig.ad_client_id%TYPE,
|
||||
org_id IN ad_sysconfig.ad_org_id%TYPE
|
||||
)
|
||||
RETURN ad_sysconfig.value%TYPE
|
||||
AS
|
||||
v_value ad_sysconfig.value%TYPE;
|
||||
BEGIN
|
||||
BEGIN
|
||||
SELECT Value
|
||||
INTO v_value FROM
|
||||
(SELECT Value
|
||||
FROM AD_SysConfig WHERE Name=sysconfig_name AND AD_Client_ID IN (0, client_id) AND AD_Org_ID IN (0, org_id) AND IsActive='Y'
|
||||
ORDER BY AD_Client_ID DESC, AD_Org_ID DESC)
|
||||
WHERE ROWNUM = 1;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND THEN
|
||||
v_value := defaultvalue;
|
||||
END;
|
||||
RETURN v_value;
|
||||
END get_Sysconfig;
|
||||
/
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
*This file is part of Adempiere ERP Bazaar
|
||||
*http://www.adempiere.org
|
||||
*Copyright (C) 2006-2008 victor.perez@e-evolution.com, e-Evolution
|
||||
*This program is free software; you can redistribute it and/or
|
||||
*modify it under the terms of the GNU General Public License
|
||||
*as published by the Free Software Foundation; either version 2
|
||||
*of the License, or (at your option) any later version.
|
||||
*
|
||||
*This program is distributed in the hope that it will be useful,
|
||||
*but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
*GNU General Public License for more details.
|
||||
*
|
||||
*You should have received a copy of the GNU General Public License
|
||||
*along with this program; if not, write to the Free Software
|
||||
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
|
||||
*
|
||||
* Author: Carlos Ruiz (globalqss)
|
||||
*/
|
||||
CREATE OR REPLACE FUNCTION get_Sysconfig
|
||||
(
|
||||
sysconfig_name IN ad_sysconfig.name%TYPE,
|
||||
defaultvalue IN ad_sysconfig.value%TYPE,
|
||||
client_id IN ad_sysconfig.ad_client_id%TYPE,
|
||||
org_id IN ad_sysconfig.ad_org_id%TYPE
|
||||
)
|
||||
RETURN ad_sysconfig.value%TYPE
|
||||
AS
|
||||
v_value ad_sysconfig.value%TYPE;
|
||||
BEGIN
|
||||
BEGIN
|
||||
SELECT Value
|
||||
INTO v_value FROM
|
||||
(SELECT Value
|
||||
FROM AD_SysConfig WHERE Name=sysconfig_name AND AD_Client_ID IN (0, client_id) AND AD_Org_ID IN (0, org_id) AND IsActive='Y'
|
||||
ORDER BY AD_Client_ID DESC, AD_Org_ID DESC)
|
||||
WHERE ROWNUM = 1;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND THEN
|
||||
v_value := defaultvalue;
|
||||
END;
|
||||
RETURN v_value;
|
||||
END get_Sysconfig;
|
||||
/
|
|
@ -2,3 +2,4 @@
|
|||
-- FR2988993_Displaying 1 instead of 99999
|
||||
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50043,'C',TO_DATE('2010-04-18 10:38:03','YYYY-MM-DD HH24:MI:SS'),100,'Quantity to show for services in InfoProduct window','D','Y','QTY_TO_SHOW_FOR_SERVICES',TO_DATE('2010-04-18 10:38:03','YYYY-MM-DD HH24:MI:SS'),100,'99999')
|
||||
;
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
*This file is part of Adempiere ERP Bazaar
|
||||
*http://www.adempiere.org
|
||||
*Copyright (C) 2006-2008 victor.perez@e-evolution.com, e-Evolution
|
||||
*This program is free software; you can redistribute it and/or
|
||||
*modify it under the terms of the GNU General Public License
|
||||
*as published by the Free Software Foundation; either version 2
|
||||
*of the License, or (at your option) any later version.
|
||||
*
|
||||
*This program is distributed in the hope that it will be useful,
|
||||
*but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
*GNU General Public License for more details.
|
||||
*
|
||||
*You should have received a copy of the GNU General Public License
|
||||
*along with this program; if not, write to the Free Software
|
||||
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of
|
||||
*
|
||||
* Author: Carlos Ruiz (globalqss)
|
||||
*/
|
||||
CREATE OR REPLACE FUNCTION get_Sysconfig
|
||||
(
|
||||
sysconfig_name ad_sysconfig.name%TYPE,
|
||||
defaultvalue ad_sysconfig.value%TYPE,
|
||||
client_id ad_sysconfig.ad_client_id%TYPE,
|
||||
org_id ad_sysconfig.ad_org_id%TYPE
|
||||
)
|
||||
RETURNS ad_sysconfig.value%TYPE
|
||||
AS
|
||||
$BODY$
|
||||
DECLARE
|
||||
v_value ad_sysconfig.value%TYPE;
|
||||
BEGIN
|
||||
BEGIN
|
||||
SELECT Value
|
||||
INTO STRICT v_value
|
||||
FROM AD_SysConfig WHERE Name=sysconfig_name AND AD_Client_ID IN (0, client_id) AND AD_Org_ID IN (0, org_id) AND IsActive='Y'
|
||||
ORDER BY AD_Client_ID DESC, AD_Org_ID DESC
|
||||
LIMIT 1;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND THEN
|
||||
v_value := defaultvalue;
|
||||
END;
|
||||
RETURN v_value;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE 'plpgsql';
|
|
@ -28,6 +28,8 @@ import java.util.Calendar;
|
|||
import java.util.Enumeration;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import org.compiere.model.MSysConfig;
|
||||
|
||||
|
||||
/**
|
||||
* SQLJ Adempiere Control and Utility Class
|
||||
|
@ -40,7 +42,7 @@ public class Adempiere implements Serializable
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1680194048326434057L;
|
||||
private static final long serialVersionUID = -2525829222361926922L;
|
||||
|
||||
/**
|
||||
* Get Version
|
||||
|
@ -58,7 +60,7 @@ public class Adempiere implements Serializable
|
|||
public static String getProperties()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
Enumeration en = System.getProperties().keys();
|
||||
Enumeration<?> en = System.getProperties().keys();
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
if (sb.length() != 0)
|
||||
|
@ -567,4 +569,17 @@ public class Adempiere implements Serializable
|
|||
return d.toString();
|
||||
} // getChars
|
||||
|
||||
/**
|
||||
* Get client configuration property of type string
|
||||
* @param Name
|
||||
* @param defaultValue
|
||||
* @param Client ID
|
||||
* @param Organization ID
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String Name, String defaultValue, int AD_Client_ID, int AD_Org_ID)
|
||||
{
|
||||
return MSysConfig.getValue(Name, defaultValue, AD_Client_ID, AD_Org_ID);
|
||||
}
|
||||
|
||||
} // Adempiere
|
||||
|
|
Loading…
Reference in New Issue