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;