From 559c45aeb4156784bacea95d7be986d2603786f9 Mon Sep 17 00:00:00 2001 From: kontro Date: Mon, 29 Jan 2007 09:53:59 +0000 Subject: [PATCH] Feature request: [ 1614574 ] Port sqlj functions to pl/pgsql - Converts integers in BOM_PriceStd -function to NUMERIC. (See. R1269) - Adds some comments line --- db/ddlutils/postgresql/functions/BOM_PriceStd.sql | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/db/ddlutils/postgresql/functions/BOM_PriceStd.sql b/db/ddlutils/postgresql/functions/BOM_PriceStd.sql index 127b0d1b75..8550903560 100644 --- a/db/ddlutils/postgresql/functions/BOM_PriceStd.sql +++ b/db/ddlutils/postgresql/functions/BOM_PriceStd.sql @@ -2,7 +2,7 @@ *This file is part of Adempiere ERP Bazaar *http://www.adempiere.org * - *Copyright (C) 2006 Timo Kontro + *Copyright (C) 2006-2007 Timo Kontro *Copyright (C) 1999-2006 ComPiere, inc * *This program is free software; you can redistribute it and/or @@ -20,15 +20,16 @@ *Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.of */ -SET search_path = adempiere, pg_catalog; - +/* + * Loops recursively through BOM and returns sum of the bricestd fields. + */ CREATE OR REPLACE FUNCTION bompricestd( - IN INTEGER, -- $1 product id - IN INTEGER -- $2 pricelist version id + IN NUMERIC, -- $1 product id + IN NUMERIC -- $2 pricelist version id ) RETURNS NUMERIC AS $$ DECLARE - price NUMERIC; + price NUMERIC; --used to store total sum productprice NUMERIC; boms RECORD; BEGIN