--
-- journal_entry__delete/1
--
create or replace function journal_entry__delete(
  integer
) returns int4 as $$

declare
  delete__journal_id             alias for $1;  
begin
	delete from journal_entries where journal_id = delete__journal_id;
	PERFORM acs_object__delete(delete__journal_id);

        return 0; 
end;$$ language plpgsql;