bug : forget the trigger on jrn for update
This commit is contained in:
parent
627a4501c4
commit
bef67ed1ba
1 changed files with 9 additions and 1 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue