SET TERM ^ ;

CREATE trigger ttbean_b987iud for tbean
active before insert or update or delete position 987
AS
begin
    if(inserting)then execute procedure spi_integracao_mobile('TBEAN',new.codigo,'I');
    if(updating )then execute procedure spi_integracao_mobile('TBEAN',new.codigo,'A');
    if(deleting )then execute procedure spi_integracao_mobile('TBEAN',old.codigo,'D');
end
^

SET TERM ; ^

update TBEAN e set e.cnp = e.cnp;

SET TERM ^ ;

CREATE trigger ttbperfil_ped_conf_user_b987iud for tbperfil_pedido_conf_user
active before insert or update or delete position 987
AS
begin
    if(inserting)then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_CONF_USER',new.id,'I');
    if(updating )then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_CONF_USER',new.id,'A');
    if(deleting )then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_CONF_USER',old.id,'D');
end
^

SET TERM ; ^

update tbperfil_pedido_conf_user f set f.tipo = f.tipo;


CREATE trigger ttbperfil_ped_conf_user_b987iud for tbperfil_pedido_conf_user
active before insert or update or delete position 987
AS
begin
    if(inserting)then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_CONF_USER',new.id,'I');
    if(updating )then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_CONF_USER',new.id,'A');
    if(deleting )then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_CONF_USER',old.id,'D');
end
^

SET TERM ; ^

update tbperfil_pedido_conf_user f set f.tipo = f.tipo;

SET TERM ^ ;

CREATE trigger ttbperfil_ped_usuarios_b987iud for tbperfil_pedido_usuarios
active before insert or update or delete position 987
AS
begin
    if(inserting)then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_USUARIOS',new.id,'I');
    if(updating )then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_USUARIOS',new.id,'A');
    if(deleting )then execute procedure spi_integracao_mobile('TBPERFIL_PEDIDO_USUARIOS',old.id,'D');
end
^

SET TERM ; ^

update TBPERFIL_PEDIDO_USUARIOS f set f.alocar = f.alocar;

SET TERM ^ ;

CREATE trigger ttbmoeda_estrangeira_b987iud for tbmoeda_estrangeira
active before insert or update or delete position 987
AS
begin
    if(inserting)then execute procedure spi_integracao_mobile('TBMOEDA_ESTRANGEIRA',new.id,'I');
    if(updating )then execute procedure spi_integracao_mobile('TBMOEDA_ESTRANGEIRA',new.id,'A');
    if(deleting )then execute procedure spi_integracao_mobile('TBMOEDA_ESTRANGEIRA',old.id,'D');
end
^

SET TERM ; ^

update TBMOEDA_ESTRANGEIRA f set f.codigo = f.codigo;

