From bfda48e10e1d4a9d54d1cf550b8f54eda194f172 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 20 Apr 2010 22:32:46 +0000 Subject: [PATCH] Correct upgrade72.sql, a function has been forgotten --- html/admin/sql/patch/upgrade72.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/html/admin/sql/patch/upgrade72.sql b/html/admin/sql/patch/upgrade72.sql index 974b47574..25fe2cf17 100644 --- a/html/admin/sql/patch/upgrade72.sql +++ b/html/admin/sql/patch/upgrade72.sql @@ -731,6 +731,22 @@ begin end loop; return 'CON'; end; +$BODY$ + LANGUAGE 'plpgsql' VOLATILE; +DROP FUNCTION comptaproc.fiche_account_parent(integer); + +CREATE OR REPLACE FUNCTION comptaproc.fiche_account_parent(p_f_id integer) + RETURNS account_type AS +$BODY$ +declare +ret tmp_pcmn.pcm_val%TYPE; +begin + select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; + if not FOUND then + raise exception '% N''existe pas',p_f_id; + end if; + return ret; +end; $BODY$ LANGUAGE 'plpgsql' VOLATILE; update version set val=73;