FR #2988993 Configurable Displaying 1/0 instead of 99,999.00
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3680077
This commit is contained in:
parent
eb7b93c3c1
commit
5966c8e621
|
@ -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;
|
||||
/
|
|
@ -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';
|
|
@ -0,0 +1,4 @@
|
|||
-- Apr 18, 2010 10:38:04 AM COT
|
||||
-- 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,5 @@
|
|||
-- Apr 18, 2010 10:38:04 AM COT
|
||||
-- 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_TIMESTAMP('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_TIMESTAMP('2010-04-18 10:38:03','YYYY-MM-DD HH24:MI:SS'),100,'99999')
|
||||
;
|
||||
|
Loading…
Reference in New Issue