SET TERM ^ ;

CREATE trigger ttbpdv_forma_pagamento_biud998 for tbpdv_forma_pagamento
active before insert or update or delete position 998
AS
BEGIN
    IF(INSERTING) THEN
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBPDV_FORMA_PAGAMENTO', NEW.ID, 2);
    END ELSE
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBPDV_FORMA_PAGAMENTO', OLD.ID, 2);
    END
END
^

SET TERM ; ^

