bug : forget the trigger on jrn for update

This commit is contained in:
Dany De Bontridder 2010-11-14 20:23:03 +00:00
parent 627a4501c4
commit bef67ed1ba

View file

@ -66,6 +66,7 @@ end if;
select p_closed into bClosed from parm_periode
where p_id=ljr_tech_per;
raise notice 'bClosed = %',bClosed;
if bClosed = true then
raise exception 'Periode fermee';
end if;
@ -86,7 +87,6 @@ CREATE OR REPLACE FUNCTION comptaproc.find_periode(p_date text)
$BODY$
declare n_p_id int4;
begin
select p_id into n_p_id
@ -106,3 +106,11 @@ end;$BODY$
LANGUAGE 'plpgsql';
DROP TRIGGER t_check_jrn ON jrn;
CREATE TRIGGER t_check_jrn
BEFORE INSERT OR DELETE OR update
ON jrn
FOR EACH ROW
EXECUTE PROCEDURE comptaproc.jrn_check_periode();