/*ALIAS>prop_db*/

/*sqlstart>1520*/
ALTER TRIGGER SET_IMOT_ID
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  if((new.im_id is null) or (new.im_id=0))then
  begin
    NEW.IM_ID=GEN_ID(IMOT_ID_GEN,1);
  end
END
/*sqlstop>1520*/

/*sqlstart>1521*/
ALTER TRIGGER SET_DOC_ID
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  if ((new.doc_id is null) or (new.doc_id = 0)) then
  begin
      NEW.Doc_ID=GEN_ID(Doc_ID_GEN,1);
  end
END
/*sqlstop>1521*/
