CREATE OR ALTER trigger ttbpagamento_condicao_b03d for tbpagamento_condicao
active before delete position 1
AS
BEGIN
   IF(OLD.CODIGO > 0) THEN
   BEGIN
      DELETE FROM TBPAGAMENTO_CONDICAO_PRAZO WHERE CONDICAOPAGAMENTO_CODIGO = OLD.CODIGO;
   END
END;
