SET TERM ^ ;

create or alter procedure LEE_CONFIGURACION_REPORT (
    MODULO varchar(50),
    CATEGORIA varchar(50),
    PROPIEDAD varchar(255))
returns (
    VALOR varchar(255))
as
BEGIN
SELECT VALOR_REPORT FROM REPORT_CONFIGURACION WHERE MODULO_REPORT = :MODULO AND OPCION_REPORT = :CATEGORIA AND
    NOMBRE_REPORT = :PROPIEDAD INTO :VALOR;
if (VALOR IS NULL) then
    exception configuracion_no_encontrada 'configuracion ' || :modulo || '-' || :categoria || '-' || :propiedad;
SUSPEND;
END^

SET TERM ; ^

/* Following GRANT statetements are generated automatically */

GRANT SELECT ON REPORT_CONFIGURACION TO PROCEDURE LEE_CONFIGURACION_REPORT;

/* Existing privileges on this procedure */

GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION_REPORT TO "PUBLIC";
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION_REPORT TO SYSDBA;

INSERT INTO REPORT_DOCUMENTOS (REPDOC_ID, REPDOC_NOMC, REPDOC_NOML) VALUES (1, 'AGENDA', 'AGENDA COMPANIA');
INSERT INTO REPORT_DOCUMENTOS (REPDOC_ID, REPDOC_NOMC, REPDOC_NOML) VALUES (2, 'PROVAGD', 'AGENDA PROVEEDORES');

SET SQL DIALECT 3;

CREATE GENERATOR GEN_REPORT_CONEXION_ID;

CREATE TABLE REPORT_CONEXION (
    ID_CONEXION       INTEGER NOT NULL,
    USUARIO_CONEXION  VARCHAR(10),
    IP_CONEXION       VARCHAR(15)
);

ALTER TABLE REPORT_CONEXION ADD CONSTRAINT PK_REPORT_CONEXION PRIMARY KEY (ID_CONEXION);


SET TERM ^ ;
/* Trigger: REPORT_CONEXION_BI */
CREATE OR ALTER TRIGGER REPORT_CONEXION_BI FOR REPORT_CONEXION
ACTIVE BEFORE INSERT POSITION 0
as
begin
  if (new.id_conexion is null) then
    new.id_conexion = gen_id(gen_report_conexion_id,1);
end
^


SET TERM ; ^

SET TERM ^ ;

CREATE OR ALTER trigger auditoria_bi for auditoria
active before insert position 0
as
begin
NEW.audi_id = gen_id(id_auditoria, 1);
new.audi_fecha = cast('now' as DATE);
new.audi_hora = cast('now' as TIME);
if (new.audi_usuario is null) then
    new.audi_usuario = USER;
new.audi_envio = 'N';
NEW.audi_ipcliente = rdb$get_context('SYSTEM', 'CLIENT_ADDRESS');
end^

SET TERM ; ^

ALTER TABLE report_conexion DROP IP_CONEXION;
ALTER TABLE
   REPORT_CONEXION
ADD IP_CONEXION varchar(15);


INSERT INTO REPORT_CONFIGURACION (MODULO_REPORT, OPCION_REPORT, NOMBRE_REPORT, VALOR_REPORT, POSIBLE_REPORT, DESCRIPCION_REPORT) VALUES ('AJUSTES', 'GENERAL', 'USAR CARPETA DEL EQUIPO LOCAL O RED', 'LOCAL', 'LOCAL,RED', 'LOCAL: La carpeta Pulicidad debe estar en la ruta de instalacion  RED:Buscar una carpeta en red.');
INSERT INTO REPORT_CONFIGURACION (MODULO_REPORT, OPCION_REPORT, NOMBRE_REPORT, VALOR_REPORT, POSIBLE_REPORT, DESCRIPCION_REPORT) VALUES ('AJUSTES', 'GENERAL', 'RUTA DE CARPETA EN RED PARA MANEJO DE PUBLICIDAD', '192.168.0.14:C:\SYSplus2020', NULL, 'Digite la ruta en red donde estara la carpeta para buscar la publicidad.');

/* Crea tabla tipo documentos */

CREATE TABLE REPORT_DOCUMENTOS (
    REPDOC_ID    INTEGER NOT NULL,
    REPDOC_NOMC  VARCHAR(10),
    REPDOC_NOML  VARCHAR(40)
);

ALTER TABLE REPORT_DOCUMENTOS ADD CONSTRAINT PK_REPORT_DOCUMENTOS PRIMARY KEY (REPDOC_ID);

COMMENT ON TABLE REPORT_DOCUMENTOS IS 
'Permitira identificar los tipos de documentos que se crean en el report';

/* Privileges of users */
GRANT ALL ON REPORT_DOCUMENTOS TO PUBLIC;

/******************************************************************************/
/***          Generated by IBExpert 2012.02.21 2021/09/22 6:13:35           ***/
/******************************************************************************/

/******************************************************************************/
/***      Following SET SQL DIALECT is just for the Database Comparer       ***/
/******************************************************************************/
SET SQL DIALECT 3;



/******************************************************************************/
/***                               Generators                               ***/
/******************************************************************************/

CREATE GENERATOR GEN_REPORTE_ERRORES_ID;
SET GENERATOR GEN_REPORTE_ERRORES_ID TO 0;

CREATE GENERATOR GEN_REPORT_BANDEJA_ID;
SET GENERATOR GEN_REPORT_BANDEJA_ID TO 1204;

CREATE GENERATOR GEN_REPORT_CAMBIOS_ID;
SET GENERATOR GEN_REPORT_CAMBIOS_ID TO 0;

CREATE GENERATOR GEN_REPORT_CHAT;
SET GENERATOR GEN_REPORT_CHAT TO 0;

CREATE GENERATOR GEN_REPORT_CONEXION_ID;
SET GENERATOR GEN_REPORT_CONEXION_ID TO 0;

CREATE GENERATOR GEN_REPORT_FIRMA_ID;
SET GENERATOR GEN_REPORT_FIRMA_ID TO 20;

CREATE GENERATOR GEN_REPORT_NOTAS_ID;
SET GENERATOR GEN_REPORT_NOTAS_ID TO 17;

CREATE GENERATOR GEN_REPORT_TICKETS_ID;
SET GENERATOR GEN_REPORT_TICKETS_ID TO 26;

CREATE GENERATOR GEN_REPORT_TITULOS_ID;
SET GENERATOR GEN_REPORT_TITULOS_ID TO 0;



SET TERM ^ ; 



/******************************************************************************/
/***                           Stored Procedures                            ***/
/******************************************************************************/

CREATE PROCEDURE REPORT_ARTICULOS_CREADOS (
    INICIO DATE,
    FIN DATE,
    TODOS CHAR(1))
RETURNS (
    CODIGO VARCHAR(15),
    DESCRIPCION VARCHAR(60),
    UNIDAD VARCHAR(8),
    USUARIO VARCHAR(10),
    FECHA DATE,
    HORA VARCHAR(20))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_BUSCADOC (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE)
RETURNS (
    T_ID INTEGER,
    T_PREF VARCHAR(4),
    T_NUMERO VARCHAR(8),
    T_NIT VARCHAR(20),
    T_PRIORIDAD CHAR(5),
    T_FECHA DATE,
    T_NOMBRE VARCHAR(60),
    T_SUCURSAL VARCHAR(10),
    T_CONTACTO VARCHAR(60),
    T_TELEFONO VARCHAR(40),
    T_EMAIL VARCHAR(100),
    T_SUCESO VARCHAR(15),
    T_AREA VARCHAR(60),
    T_TEMA VARCHAR(60),
    T_OBSERVACION VARCHAR(60),
    T_DESCRIPCION BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    T_RESPUESTA VARCHAR(60),
    T_ASIGNAR VARCHAR(60),
    T_ESTADO CHAR(1),
    T_USUARIO VARCHAR(10),
    T_ANULADO CHAR(1))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_BUSCAFAC (
    FACTURA VARCHAR(12))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE,
    NIT VARCHAR(20),
    PUNTO INTEGER)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_BUSQUEDA_ARTICULOS (
    INACTIVOS CHAR(1),
    FECHA DATE,
    PARAMETRO CHAR(1),
    BUSQUEDA VARCHAR(100))
RETURNS (
    CODIGO VARCHAR(15),
    GRUPO VARCHAR(2),
    SUBGRUPO VARCHAR(3),
    MARCA VARCHAR(3),
    DESCRIPCION VARCHAR(60),
    UNIDAD VARCHAR(8),
    ACTIVO CHAR(1),
    IVA INTEGER,
    INVIMA VARCHAR(20),
    EXISTENCIAT NUMERIC(18,2),
    COSTO NUMERIC(18,2),
    PROMEDIO NUMERIC(18,2))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_CATALOGO_ARTICULOS (
    INACTIVOS CHAR(1),
    FECHA DATE)
RETURNS (
    CODIGO VARCHAR(15),
    GRUPO VARCHAR(2),
    SUBGRUPO VARCHAR(3),
    MARCA VARCHAR(3),
    DESCRIPCION VARCHAR(60),
    UNIDAD VARCHAR(8),
    ACTIVO CHAR(1),
    IVA INTEGER,
    INVIMA VARCHAR(20),
    EXISTENCIAT NUMERIC(18,2),
    COSTO NUMERIC(18,2),
    PROMEDIO NUMERIC(18,2))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_CLIENTES_TIEMPO (
    INICIO DATE,
    FIN DATE,
    TODOS CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    FECHA DATE,
    HORA TIME)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_CRONOLOGICO (
    FECINI DATE,
    FECFIN DATE,
    PDESDE VARCHAR(4),
    PHASTA VARCHAR(4),
    NITINI VARCHAR(20),
    NITFIN VARCHAR(20))
RETURNS (
    ID INTEGER,
    PRE VARCHAR(4),
    NUMERO VARCHAR(8),
    NIT VARCHAR(20),
    PRIORIDAD CHAR(5),
    FECHA DATE,
    NOMBRE VARCHAR(60),
    SUCURSAL VARCHAR(10),
    CONTACTO VARCHAR(60),
    TELEFONO VARCHAR(40),
    EMAIL VARCHAR(100),
    SUCESO VARCHAR(15),
    AREA VARCHAR(60),
    TEMA VARCHAR(60),
    OBSERVACION VARCHAR(60),
    DESCRIPCION BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    RESPUESTA VARCHAR(60),
    ASIGNAR VARCHAR(60),
    ESTADO CHAR(1),
    USUARIO VARCHAR(10),
    ANULADO CHAR(1),
    LOGO BLOB SUB_TYPE 0 SEGMENT SIZE 80)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_DATOS_CLIENTES (
    INICIO DATE,
    FIN DATE,
    ESTADO CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOM VARCHAR(60),
    SUC VARCHAR(10),
    NOMSUC VARCHAR(60),
    DIR VARCHAR(60),
    CIU VARCHAR(40),
    TEL VARCHAR(40),
    OBS VARCHAR(255),
    VEND INTEGER,
    COBR INTEGER,
    ZONA VARCHAR(2),
    EMAIL VARCHAR(100),
    SEMAIL VARCHAR(100),
    EFEMAIL VARCHAR(100),
    ULTVENTA DATE,
    SUCOBS VARCHAR(255),
    PEDIDO VARCHAR(255))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_ENVIOSF_CORREO (
    IDPED INTEGER)
RETURNS (
    ARTI VARCHAR(20),
    DES VARCHAR(60),
    CANT NUMERIC(18,4),
    UNIDAD VARCHAR(8),
    BOD VARCHAR(2),
    PRUNIT NUMERIC(18,2),
    DTO NUMERIC(9,2),
    TOTAL NUMERIC(18,2),
    TERCERO VARCHAR(20),
    MARCA VARCHAR(30),
    FACTOR NUMERIC(18,4))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_FACTURAS_DETALLE (
    FECINI DATE,
    FECFIN DATE,
    PREF VARCHAR(4),
    NUM VARCHAR(8))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE,
    ARTICULO VARCHAR(20),
    DESCRIPCION VARCHAR(60),
    LOTE VARCHAR(15),
    VENCE DATE,
    INVIMA VARCHAR(20))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_FACTURAS_USUARIO (
    INICIO DATE,
    FIN DATE,
    USUARIO VARCHAR(10),
    VACIO CHAR(1),
    VACIO1 CHAR(1),
    VACIO2 CHAR(1),
    VACIO3 CHAR(1))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE,
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_FALTANTES
RETURNS (
    DATO INTEGER,
    TOTAL NUMERIC(18,4))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_FALTANTESPED (
    INICIO DATE,
    FIN DATE,
    PARAMETRO CHAR(1),
    VACIO1 CHAR(1),
    VACIO2 CHAR(1),
    VACIO3 CHAR(1),
    VACIO4 CHAR(1))
RETURNS (
    ARTICULO VARCHAR(20),
    DESCRIPCION VARCHAR(80),
    UNIDAD VARCHAR(8),
    CANT NUMERIC(18,2),
    FACTURADO NUMERIC(18,2),
    FALTANTE NUMERIC(18,2),
    BOD1 NUMERIC(18,2),
    BOD2 NUMERIC(18,2),
    BOD3 NUMERIC(18,2),
    BOD4 NUMERIC(18,2),
    BOD5 NUMERIC(18,2),
    BOD6 NUMERIC(18,2),
    BOD7 NUMERIC(18,2),
    BOD8 NUMERIC(18,2),
    BOD9 NUMERIC(18,2),
    BOD10 NUMERIC(18,2),
    BOD11 NUMERIC(18,2),
    BOD12 NUMERIC(18,2),
    BOD13 NUMERIC(18,2),
    BOD14 NUMERIC(18,2),
    BOD15 NUMERIC(18,2),
    BOD16 NUMERIC(18,2),
    BOD17 NUMERIC(18,2),
    BOD18 NUMERIC(18,2),
    BOD19 NUMERIC(18,2),
    BOD20 NUMERIC(18,2),
    BOD21 NUMERIC(18,2),
    BOD22 NUMERIC(18,2),
    EXISTENCIA NUMERIC(18,2),
    COMPRA NUMERIC(18,2),
    MARCA VARCHAR(30),
    PROVEEDOR VARCHAR(60))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_HISTORIAL_CHAT (
    USUARIO VARCHAR(10),
    USUARIOD VARCHAR(10))
RETURNS (
    ID INTEGER,
    MENSAJE VARCHAR(255),
    FECHA DATE,
    HORA TIME,
    RECIBO CHAR(1),
    ENVIADO CHAR(1))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_HISTORIAL_RECIBOS (
    INICIAL DATE,
    FINAL DATE,
    PREF CHAR(4))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(6),
    FECHA DATE,
    TERCERO VARCHAR(60),
    CONCEPTO VARCHAR(60),
    RETENCIONES NUMERIC(18,2),
    MONTO NUMERIC(18,2),
    ANULADO CHAR(1))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_MENSAJES_USUARIOS
RETURNS (
    USUARIO VARCHAR(10),
    CONECTADO CHAR(1))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_NOTAS_IMPR (
    ID INTEGER)
RETURNS (
    FECHA DATE,
    RESPUESTA BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    USUARIO VARCHAR(10),
    NIT VARCHAR(20),
    SUCURSAL VARCHAR(10),
    NOMBRE VARCHAR(60),
    LOGO BLOB SUB_TYPE 0 SEGMENT SIZE 80)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_PEDIDOS_DCG (
    INICIO DATE,
    FIN DATE,
    VARIABLE1 CHAR(1))
RETURNS (
    TERC_NIT VARCHAR(20),
    PEDI_NOMTERC VARCHAR(60),
    PEDI_FECHA DATE,
    PREF_PRE VARCHAR(4),
    PEDI_NUMERO VARCHAR(6),
    VEND_COD INTEGER,
    PEDI_VALIDEZ INTEGER,
    PEDI_TOTAL NUMERIC(18,2),
    NODO_USER VARCHAR(10),
    NODO_TEXTO VARCHAR(255),
    NODO_RESUMEN T_CONCEPTO)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_PEDIDOS_DES (
    INICIO DATE,
    FIN DATE,
    VARIABLE1 CHAR(1))
RETURNS (
    TERC_NIT VARCHAR(20),
    PEDI_NOMTERC VARCHAR(60),
    PEDI_FECHA DATE,
    PREF_PRE VARCHAR(4),
    PEDI_NUMERO VARCHAR(6),
    VEND_COD INTEGER,
    PEDI_VALIDEZ INTEGER,
    PEDI_TOTAL NUMERIC(18,2),
    NODO_USER VARCHAR(10),
    NODO_TEXTO BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    NODO_RESUMEN T_CONCEPTO)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_PENDIENTES (
    IDPED INTEGER,
    DOC CHAR(1))
RETURNS (
    CANT NUMERIC(18,4))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_PRO_CONTACTOS (
    INICIO DATE,
    FIN DATE,
    DATO CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(80),
    EMAIL VARCHAR(100))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_PROVEEDORES
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    CIUDAD VARCHAR(40),
    TELEFONOS VARCHAR(40),
    CONTACTO VARCHAR(255),
    CODIGO VARCHAR(20),
    SIMPLIFICA CHAR(1),
    ACTIVO CHAR(1))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_PROVEEDORES_CONSULTA (
    IDENTIFICACION VARCHAR(20))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    CIUDAD VARCHAR(40),
    TELEFONOS VARCHAR(40),
    CONTACTO VARCHAR(255),
    CODIGO VARCHAR(20),
    SIMPLIFICA CHAR(1),
    ACTIVO CHAR(1))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_RESULTADCORREO (
    IDDOC INTEGER)
RETURNS (
    TOTAL INTEGER)
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_TERCEROS_CREADOS (
    FECINI DATE,
    FECFIN DATE,
    DESDE VARCHAR(20),
    HASTA VARCHAR(20),
    NULO CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    FECHA DATE,
    CTAPROV VARCHAR(20),
    CTACLIE VARCHAR(20))
AS
BEGIN
  SUSPEND;
END^





CREATE PROCEDURE REPORT_TICKET_IMPR (
    ID INTEGER)
RETURNS (
    PREF VARCHAR(4),
    NUMERO VARCHAR(8),
    NIT VARCHAR(20),
    PRIORIDAD CHAR(5),
    FECHA DATE,
    NOMBRE VARCHAR(60),
    SUCURSAL VARCHAR(10),
    CONTACTO VARCHAR(60),
    TELEFONO VARCHAR(40),
    EMAIL VARCHAR(100),
    SUCESO VARCHAR(15),
    AREA VARCHAR(60),
    TEMA VARCHAR(60),
    OBSERVACION VARCHAR(60),
    DESCRIPCION BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    RESPUESTA VARCHAR(60),
    ASIGNAR VARCHAR(60),
    ESTADO CHAR(1),
    USUARIO VARCHAR(10),
    ANULADO CHAR(1),
    LOGO BLOB SUB_TYPE 0 SEGMENT SIZE 80)
AS
BEGIN
  SUSPEND;
END^






SET TERM ; ^



/******************************************************************************/
/***                                 Tables                                 ***/
/******************************************************************************/



CREATE TABLE REPORT_ACTUALIZACION (
    FECHA_ACTUALIZA  DATE
);

CREATE TABLE REPORT_AREA (
    CODIGO_AREA  VARCHAR(3) NOT NULL,
    NOMBRE_AREA  T_CONCEPTO NOT NULL
);

CREATE TABLE REPORT_BANDEJA (
    ID_BANDEJA           INTEGER NOT NULL,
    DE_BANDEJA           VARCHAR(255),
    ASUNTO_BANDEJA       VARCHAR(255),
    DESCRIPCION_BANDEJA  BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    HORA_BANDEJA         TIME,
    FECHA_BANDEJA        DATE,
    TIPO_BANDEJA         BOOLEANO,
    USUARIO_BANDEJA      VARCHAR(10),
    PARA_BANDEJA         BLOB SUB_TYPE 1 SEGMENT SIZE 80
);

CREATE TABLE REPORT_CAMBIOS (
    ID_CAMBIO        INTEGER NOT NULL,
    PREF_PREFIJO     VARCHAR(4),
    NUMERO_CAMBIO    VARCHAR(8) NOT NULL,
    BODE_COD         VARCHAR(2),
    TERC_NIT         VARCHAR(20) NOT NULL,
    TIDO_COD         INTEGER,
    FECHA_CAMBIO     DATE,
    FACTPRO_CAMBIO   VARCHAR(20),
    CONCEPTO_CAMBIO  VARCHAR(80),
    ANULADO_CAMBIO   BOOLEANO,
    USUARIO_CAMBIO   VARCHAR(10),
    TOTAL_CAMBIO     NUMERIC(18,2)
);

CREATE TABLE REPORT_CAMBIOS_DETALLE (
    ID_CAMBIO             INTEGER NOT NULL,
    ITEM_CMDETALLE        INTEGER NOT NULL,
    ARTI_COD              VARCHAR(20),
    BODE_COD              VARCHAR(2),
    CANT_CMDETALLE        T_CANTIDAD,
    UNIDAD_CMDETALLE      T_UNIDAD,
    TOTAL_CMDETALLE       T_MONTO,
    DEVOLUCION_CMDETALLE  CHAR(1)
);

CREATE TABLE REPORT_CHAT (
    ID_CHAT        INTEGER NOT NULL,
    ORIGEN_CHAT    VARCHAR(10),
    DESTINO_CHAT   VARCHAR(10),
    MENSAJE_CHAT   VARCHAR(255),
    FECHA_CHAT     DATE,
    HORA_CHAT      TIME,
    RECIBIDO_CHAT  T_BOOLEANO,
    FECHAL_CHAT    DATE,
    HORAL_CHAT     TIME
);

CREATE TABLE REPORT_CONEXION (
    ID_CONEXION       INTEGER NOT NULL,
    USUARIO_CONEXION  VARCHAR(10),
    IP_CONEXION       VARCHAR(15)
);

CREATE TABLE REPORT_CONFIGURACION (
    MODULO_REPORT       VARCHAR(20) NOT NULL,
    OPCION_REPORT       VARCHAR(20) NOT NULL,
    NOMBRE_REPORT       VARCHAR(100) NOT NULL,
    VALOR_REPORT        VARCHAR(100),
    POSIBLE_REPORT      VARCHAR(250),
    DESCRIPCION_REPORT  VARCHAR(250)
);

CREATE TABLE REPORT_DOCUMENTOS (
    REPDOC_ID    INTEGER NOT NULL,
    REPDOC_NOMC  VARCHAR(10),
    REPDOC_NOML  VARCHAR(40)
);

CREATE TABLE REPORT_ENVIOS_DOMICILIO (
    ID_ENVIO         INTEGER NOT NULL,
    DOCUMENTO_ENVIO  INTEGER,
    PREF_PRE         VARCHAR(4),
    NUMERO_ENVIO     VARCHAR(8),
    TERC_NIT         VARCHAR(20),
    PTVT_ID          INTEGER,
    DOMICILIO_ENVIO  T_BOOLEANO,
    FECHA_ENVIO      FECHA,
    USUARIO_ENVIO    T_USUARIO
);

CREATE TABLE REPORT_ENVIOS_FALTANTES (
    ITEM_ENVIORP       INTEGER NOT NULL,
    IDDOC_ENVIORP      INTEGER,
    PREF_PRE           VARCHAR(4),
    NUMERO_ENVIORP     VARCHAR(6),
    TERC_NIT           NIT,
    CLIENTE_ENVIORP    NOMBRE,
    ESTADO_ENVIORP     T_BOOLEANO,
    TIPODOC_ENVIORP    VARCHAR(10),
    IDCRUCE_ENVIORP    INTEGER,
    USUARIO_ENVIORP    VARCHAR(10),
    NUMERODOC_ENVIORP  VARCHAR(12),
    FECHA_ENVIORP      DATE
);

CREATE TABLE REPORT_FIRMA (
    ID_FIRMA         INTEGER NOT NULL,
    AREA_FIRMA       VARCHAR(60),
    CARGO_FIRMA      VARCHAR(60),
    DIRECCION_FIRMA  VARCHAR(60),
    TELEFONO_FIRMA   VARCHAR(60),
    FAX_FIRMA        VARCHAR(60),
    CIUDAD_FIRMA     VARCHAR(60),
    PAGINA_FIRMA     VARCHAR(80),
    LOGO_FIRMA       BLOB SUB_TYPE 0 SEGMENT SIZE 80,
    USUARIO_FIRMA    VARCHAR(10)
);

CREATE TABLE REPORT_LOGO (
    LOGO_ID      INTEGER NOT NULL,
    LOGO_IMAGEN  BLOB SUB_TYPE 0 SEGMENT SIZE 80
);

CREATE TABLE REPORT_NOTAS (
    NOTAS_ID         INTEGER NOT NULL,
    TIDO_COD         INTEGER NOT NULL,
    NOTAS_IDDOC      INTEGER NOT NULL,
    NOTAS_FECHA      DATE,
    NOTAS_RESPUESTA  BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    NOTAS_ARCHIVO    BLOB SUB_TYPE 0 SEGMENT SIZE 80,
    NOTAS_USUARIO    VARCHAR(10),
    TERC_NIT         T_NIT,
    CLSU_COD         VARCHAR(10),
    NOTAS_TITULO     VARCHAR(100)
);

CREATE TABLE REPORT_OBSERVACIONES (
    CODIGO_AREA         VARCHAR(3) NOT NULL,
    CODIGO_TEMA         VARCHAR(3) NOT NULL,
    CODIGO_OBSERVACION  VARCHAR(3) NOT NULL,
    NOMBRE_OBSERVACION  T_CONCEPTO
);

CREATE TABLE REPORT_PERMISOS (
    USUARIO_PERMISOS  VARCHAR(8) NOT NULL,
    MODULO_PERMISOS   VARCHAR(20) NOT NULL,
    OPCION_PERMISOS   INTEGER NOT NULL,
    ACCESO_PERMISOS   T_BOOLEANO
);

CREATE TABLE REPORT_PREFIJOS (
    TIDO_COD         INTEGER NOT NULL,
    PREF_PREFIJO     VARCHAR(4) NOT NULL,
    NUMERO_PREFIJO   T_NUMDOC,
    CALCULO_PREFIJO  T_BOOLEANO,
    ACTIVO_PREFIJO   T_BOOLEANO
);

CREATE TABLE REPORT_TEMAS (
    CODIGO_AREA  VARCHAR(3) NOT NULL,
    CODIGO_TEMA  ID NOT NULL,
    NOMBRE_TEMA  T_CONCEPTO
);

CREATE TABLE REPORT_TICKETS (
    TICKET_ID           T_ID NOT NULL,
    PREF_PRE            VARCHAR(4),
    TICKET_NUMERO       T_NUMDOC,
    TERC_NIT            T_NIT NOT NULL,
    TICKET_PRIORIDAD    CHAR(5) NOT NULL,
    TICKET_FECHA        DATE NOT NULL,
    TICKET_NOMBRE       VARCHAR(60),
    TICKET_SUCURSAL     VARCHAR(10),
    TICKET_CONTACTO     T_CONCEPTO,
    TICKET_TELEFONO     T_TELEFONO,
    TICKET_EMAIL        VARCHAR(100),
    TICKET_SUCESO       VARCHAR(15),
    TICKET_AREA         T_CONCEPTO,
    TICKET_TEMA         T_CONCEPTO,
    TICKET_OBSERVACION  T_CONCEPTO,
    TICKET_DESCRIPCION  BLOB SUB_TYPE 1 SEGMENT SIZE 80 NOT NULL,
    TICKET_RESPUESTA    T_CONCEPTO,
    TICKET_ASIGNAR      VARCHAR(60),
    TICKET_ESTADO       T_BOOLEANO DEFAULT 'N',
    TICKET_USUARIO      VARCHAR(10),
    TICKET_ANULADO      BOOLEANO DEFAULT 'N',
    TICKETS_USUARIO     VARCHAR(10)
);

CREATE TABLE REPORT_TITULOS (
    ID_TITULO      INTEGER NOT NULL,
    NOMBRE_TITULO  VARCHAR(100)
);



/******************************************************************************/
/***                                 Views                                  ***/
/******************************************************************************/


/* View: REPORT_FALTANTES_TEMP */
CREATE VIEW REPORT_FALTANTES_TEMP(
    IDENTIFICACION,
    DOCUMENTO)
AS
select IDDOC_ENVIORP, TIPODOC_ENVIORP from REPORT_ENVIOS_FALTANTES
where ESTADO_ENVIORP='N'
;




/* Check constraints definition */

ALTER TABLE REPORT_CAMBIOS_DETALLE ADD CHECK (DEVOLUCION_CMDETALLE = 'D' OR DEVOLUCION_CMDETALLE = 'M');
ALTER TABLE REPORT_CAMBIOS_DETALLE ADD CHECK (DEVOLUCION_CMDETALLE = 'D' OR DEVOLUCION_CMDETALLE = 'M');


/******************************************************************************/
/***                              Primary Keys                              ***/
/******************************************************************************/

ALTER TABLE REPORT_AREA ADD CONSTRAINT PK_REPORT_AREA PRIMARY KEY (CODIGO_AREA);
ALTER TABLE REPORT_BANDEJA ADD CONSTRAINT PK_REPORT_BANDEJA PRIMARY KEY (ID_BANDEJA);
ALTER TABLE REPORT_CAMBIOS ADD CONSTRAINT PK_REPORT_CAMBIOS PRIMARY KEY (ID_CAMBIO);
ALTER TABLE REPORT_CAMBIOS_DETALLE ADD CONSTRAINT PK_REPORT_CAMBIOS_DETALLE PRIMARY KEY (ID_CAMBIO, ITEM_CMDETALLE);
ALTER TABLE REPORT_CHAT ADD CONSTRAINT PK_REPORT_CHAT PRIMARY KEY (ID_CHAT);
ALTER TABLE REPORT_CONEXION ADD CONSTRAINT PK_REPORT_CONEXION PRIMARY KEY (ID_CONEXION);
ALTER TABLE REPORT_CONFIGURACION ADD CONSTRAINT PK_REPORT_CONFIGURACION PRIMARY KEY (MODULO_REPORT, OPCION_REPORT, NOMBRE_REPORT);
ALTER TABLE REPORT_DOCUMENTOS ADD CONSTRAINT PK_REPORT_DOCUMENTOS PRIMARY KEY (REPDOC_ID);
ALTER TABLE REPORT_ENVIOS_DOMICILIO ADD CONSTRAINT PK_REPORT_ENVIOS_DOMICILIO PRIMARY KEY (ID_ENVIO);
ALTER TABLE REPORT_ENVIOS_FALTANTES ADD CONSTRAINT PK_REPORT_ENVIOS_FALTANTES PRIMARY KEY (ITEM_ENVIORP);
ALTER TABLE REPORT_FIRMA ADD CONSTRAINT PK_REPORT_FIRMA PRIMARY KEY (ID_FIRMA);
ALTER TABLE REPORT_NOTAS ADD CONSTRAINT PK_REPORT_NOTAS PRIMARY KEY (NOTAS_ID);
ALTER TABLE REPORT_OBSERVACIONES ADD CONSTRAINT PK_REPORT_OBSERVACIONES PRIMARY KEY (CODIGO_AREA, CODIGO_TEMA, CODIGO_OBSERVACION);
ALTER TABLE REPORT_PREFIJOS ADD CONSTRAINT PK_REPORT_PREFIJOS PRIMARY KEY (TIDO_COD, PREF_PREFIJO);
ALTER TABLE REPORT_TEMAS ADD CONSTRAINT PK_REPORT_TEMA PRIMARY KEY (CODIGO_AREA, CODIGO_TEMA);
ALTER TABLE REPORT_TICKETS ADD CONSTRAINT PK_REPORT_TICKETS PRIMARY KEY (TICKET_ID);
ALTER TABLE REPORT_TITULOS ADD CONSTRAINT PK_REPORT_TITULOS PRIMARY KEY (ID_TITULO);


/******************************************************************************/
/***                              Foreign Keys                              ***/
/******************************************************************************/

ALTER TABLE REPORT_CAMBIOS ADD CONSTRAINT FK_BODEGA_CAMBIOS FOREIGN KEY (BODE_COD) REFERENCES BODEGA (BODE_COD);
ALTER TABLE REPORT_CAMBIOS ADD CONSTRAINT FK_PREFIJOS_CAMBIOS FOREIGN KEY (TIDO_COD, PREF_PREFIJO) REFERENCES REPORT_PREFIJOS (TIDO_COD, PREF_PREFIJO);
ALTER TABLE REPORT_CAMBIOS ADD CONSTRAINT FK_PROVEEDOR_CAMBIOS FOREIGN KEY (TERC_NIT) REFERENCES PROVEEDORES (TERC_NIT);
ALTER TABLE REPORT_CAMBIOS_DETALLE ADD CONSTRAINT FK_REPORT_CAMBIOS_ARTICULO FOREIGN KEY (ARTI_COD) REFERENCES ARTICULO (ARTI_COD);
ALTER TABLE REPORT_CAMBIOS_DETALLE ADD CONSTRAINT FK_REPORT_CAMBIOS_BODEGA FOREIGN KEY (BODE_COD) REFERENCES BODEGA (BODE_COD);
ALTER TABLE REPORT_CAMBIOS_DETALLE ADD CONSTRAINT FK_REPORT_CAMBIOS_ID FOREIGN KEY (ID_CAMBIO) REFERENCES REPORT_CAMBIOS (ID_CAMBIO);
ALTER TABLE REPORT_ENVIOS_FALTANTES ADD CONSTRAINT FK_REPORT_ENVIOS_FALTANTES FOREIGN KEY (TERC_NIT) REFERENCES CLIENTES (TERC_NIT);
ALTER TABLE REPORT_PREFIJOS ADD CONSTRAINT FK_REPORT_PREFIJOS_TIPDOC FOREIGN KEY (TIDO_COD) REFERENCES TIPO_DOCUMENTO (TIDO_COD);
ALTER TABLE REPORT_TEMAS ADD CONSTRAINT FK_REPORT_TEMA FOREIGN KEY (CODIGO_AREA) REFERENCES REPORT_AREA (CODIGO_AREA);


/******************************************************************************/
/***                                Triggers                                ***/
/******************************************************************************/


SET TERM ^ ;



/******************************************************************************/
/***                          Triggers for tables                           ***/
/******************************************************************************/



/* Trigger: REPORT_BANDEJA_BI0 */
CREATE TRIGGER REPORT_BANDEJA_BI0 FOR REPORT_BANDEJA
ACTIVE BEFORE INSERT POSITION 0
AS
begin
  /*GENERADOR SI EL CAMPO ID IS NULL*/
  IF (NEW.id_bandeja IS NULL) THEN
  NEW.id_bandeja = GEN_ID(gen_report_bandeja_id,1);
  NEW.fecha_bandeja = CAST ('NOW' AS DATE);
  NEW.hora_bandeja = CAST ('NOW' AS TIME);
  NEW.usuario_bandeja = USER;
end
^

/* Trigger: REPORT_CAMBIOS_B2 */
CREATE TRIGGER REPORT_CAMBIOS_B2 FOR REPORT_CAMBIOS
ACTIVE BEFORE INSERT POSITION 0
AS
DECLARE VARIABLE REGISTRO INTEGER;
begin
  IF (NEW.BODE_COD IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   BODEGA
       WHERE  BODEGA.BODE_COD = NEW.BODE_COD
       INTO   :REGISTRO;
       IF (REGISTRO = 0) THEN
       BEGIN
          EXCEPTION BODEGA_NO_EXISTE;
       END
    END

    IF (NEW.TERC_NIT IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   PROVEEDORES
       WHERE  PROVEEDORES.TERC_NIT = NEW.TERC_NIT
       INTO   :REGISTRO;
       IF (REGISTRO = 0) THEN
       BEGIN
          EXCEPTION PROVEEDOR_NO_EXISTE;
       END
    END

    IF (NEW.TIDO_COD IS NOT NULL AND
        NEW.PREF_PREFIJO IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   REPORT_PREFIJOS
       WHERE  REPORT_PREFIJOS.TIDO_COD = NEW.TIDO_COD
        AND   REPORT_PREFIJOS.PREF_PREFIJO = NEW.PREF_PREFIJO
       INTO   :REGISTRO;
       IF (REGISTRO = 0) THEN
       BEGIN
          EXCEPTION PREFIJO_NO_EXISTE;
       END
    END
end
^

/* Trigger: REPORT_CAMBIOS_BI */
CREATE TRIGGER REPORT_CAMBIOS_BI FOR REPORT_CAMBIOS
ACTIVE BEFORE INSERT POSITION 0
as
DECLARE VARIABLE NUMERO VARCHAR(8);
DECLARE VARIABLE AUTOM CHAR(1);
DECLARE VARIABLE EXISTE CHAR(1);
DECLARE VARIABLE ESTADO CHAR(1);
begin
  if (new.id_cambio is null) then
    new.id_cambio = gen_id(gen_report_cambios_id,1);

  EXISTE = 'N';
  SELECT 'S'
  FROM REPORT_CAMBIOS
  WHERE PREF_PREFIJO = NEW.PREF_PREFIJO AND
        NUMERO_CAMBIO = NEW.NUMERO_CAMBIO
  INTO :EXISTE;
  IF (EXISTE = 'S') THEN
    EXCEPTION DOCUMENTO_REGISTRADO 'Ya existe un cambio con el número ' || NEW.PREF_PREFIJO || NEW.NUMERO_CAMBIO;

   SELECT NUMERO_PREFIJO, CALCULO_PREFIJO
    FROM REPORT_PREFIJOS
    WHERE TIDO_COD = 1001 AND
          PREF_PREFIJO = NEW.PREF_PREFIJO
    INTO :NUMERO, :AUTOM;
    /* ACTUALICE EL NUMERO EN ENCABEZADO  */
    IF (AUTOM = 'S') THEN
    BEGIN
      NEW.NUMERO_CAMBIO = NUMERO;
      NUMERO = CAST((CAST(NUMERO AS INTEGER) + 1) AS CHAR(8));
      UPDATE REPORT_PREFIJOS
      SET NUMERO_PREFIJO = :NUMERO
      WHERE TIDO_COD = 1001 AND
            PREF_PREFIJO = NEW.PREF_PREFIJO;
    END
    ELSE
    BEGIN
      IF (CAST(NUMERO AS INTEGER) = CAST(NEW.NUMERO_CAMBIO AS INTEGER)) THEN
        UPDATE REPORT_PREFIJOS
        SET NUMERO_PREFIJO = CAST((CAST(NUMERO_PREFIJO AS INTEGER) + 1) AS CHAR(8))
        WHERE TIDO_COD =1001 AND
              PREF_PREFIJO = NEW.PREF_PREFIJO;
    END
    EXECUTE PROCEDURE COMPLETA_CEROS8(NEW.NUMERO_CAMBIO)
        RETURNING_VALUES (NEW.NUMERO_CAMBIO);
  END
^

/* Trigger: REPORT_CAMBIOS_DETALLE_VI */
CREATE TRIGGER REPORT_CAMBIOS_DETALLE_VI FOR REPORT_CAMBIOS_DETALLE
ACTIVE BEFORE INSERT POSITION 0
AS
DECLARE VARIABLE CANT INTEGER;
BEGIN
    /*  PARENT 'FACTURAS_COMPRA' MUST EXIST WHEN INSERTING A CHILD IN 'FACTURAS_COMPRAS_DETALLE'  */
    IF (NEW.ID_CAMBIO IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   REPORT_CAMBIOS
       WHERE  REPORT_CAMBIOS.ID_CAMBIO = NEW.ID_CAMBIO
       INTO   :CANT;
       IF (CANT = 0) THEN
       BEGIN
          EXCEPTION DOCUMENTO_NO_EXISTE;
       END
    END
    /*  PARENT 'ARTICULO' MUST EXIST WHEN INSERTING A CHILD IN 'FACTURAS_COMPRAS_DETALLE'  */
    IF (NEW.ARTI_COD IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   ARTICULO
       WHERE  ARTICULO.ARTI_COD = NEW.ARTI_COD
       INTO   :cant;
       IF (cant = 0) THEN
       BEGIN
          EXCEPTION ARTICULO_NO_EXISTE;
       END
    END
    /*  PARENT 'BODEGA' MUST EXIST WHEN INSERTING A CHILD IN 'FACTURAS_COMPRAS_DETALLE'  */
    IF (NEW.BODE_COD IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   BODEGA
       WHERE  BODEGA.BODE_COD = NEW.BODE_COD
       INTO   :CANT;
       IF (CANT = 0) THEN
       BEGIN
          EXCEPTION BODEGA_NO_EXISTE;
       END
    END
END
^

/* Trigger: REPORT_CHAT_BI */
CREATE TRIGGER REPORT_CHAT_BI FOR REPORT_CHAT
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.ID_CHAT IS NULL) THEN
   NEW.ID_CHAT = GEN_ID(GEN_REPORT_CHAT, 1);
   IF (NEW.FECHA_CHAT IS NULL) THEN
   NEW.FECHA_CHAT = CAST ('NOW' AS DATE);
   IF (NEW.HORA_CHAT IS NULL) THEN
   NEW.HORA_CHAT = CAST('NOW' AS TIME);
END
^

/* Trigger: REPORT_CHAT_BU0 */
CREATE TRIGGER REPORT_CHAT_BU0 FOR REPORT_CHAT
ACTIVE BEFORE UPDATE POSITION 0
AS
begin
  IF (OLD.FECHAL_CHAT IS NULL) THEN
   NEW.FECHAL_CHAT = CAST ('NOW' AS DATE);
   IF (OLD.HORAL_CHAT IS NULL) THEN
   NEW.HORAL_CHAT = CAST('NOW' AS TIME);
end
^

/* Trigger: REPORT_CONEXION_BI */
CREATE TRIGGER REPORT_CONEXION_BI FOR REPORT_CONEXION
ACTIVE BEFORE INSERT POSITION 0
as
begin
  if (new.id_conexion is null) then
    new.id_conexion = gen_id(gen_report_conexion_id,1);
end
^

/* Trigger: REPORT_ENVIOS_DOMICILIO_BI */
CREATE TRIGGER REPORT_ENVIOS_DOMICILIO_BI FOR REPORT_ENVIOS_DOMICILIO
ACTIVE BEFORE INSERT POSITION 0
as
begin
  if (new.id_envio is null) then
    new.id_envio = gen_id(id_domicilio_senvio,1);
  IF (new.DOMICILIO_ENVIO IS NULL) THEN
  NEW.DOMICILIO_ENVIO = 'N';
  IF (new.USUARIO_ENVIO IS NULL) THEN
  NEW.USUARIO_ENVIO = USER;
end
^

/* Trigger: REPORT_ENVIOS_FALTANTES_BI0 */
CREATE TRIGGER REPORT_ENVIOS_FALTANTES_BI0 FOR REPORT_ENVIOS_FALTANTES
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.ITEM_ENVIORP IS NULL) THEN
    NEW.ITEM_ENVIORP = GEN_ID(GEN_ENVIOS_FO,1);
  if (NEW.FECHA_ENVIORP IS NULL) then
    NEW.fecha_enviorp = cast('now' as DATE);
END
^

/* Trigger: REPORT_FIRMA_BI */
CREATE TRIGGER REPORT_FIRMA_BI FOR REPORT_FIRMA
ACTIVE BEFORE INSERT POSITION 0
as
begin
  if (new.id_firma is null) then
    new.id_firma = gen_id(gen_report_firma_id,1);

    if (new.usuario_firma is null) then
    new.usuario_firma = USER;
end
^

/* Trigger: REPORT_NOTAS_BI */
CREATE TRIGGER REPORT_NOTAS_BI FOR REPORT_NOTAS
ACTIVE BEFORE INSERT POSITION 0
as
begin
  if (new.notas_id is null) then
    new.notas_id = gen_id(gen_report_notas_id,1);
  if (NEW.notas_usuario IS NULL) then
  NEW.notas_usuario = USER;
  if (NEW.NOTAS_FECHA  IS NULL) then
  NEW.NOTAS_FECHA =  cast('now' as DATE);
end
^

/* Trigger: REPORT_OBSERVACIONES_BI */
CREATE TRIGGER REPORT_OBSERVACIONES_BI FOR REPORT_OBSERVACIONES
ACTIVE BEFORE INSERT POSITION 0
as
begin
IF ((NEW.CODIGO_AREA IS NOT NULL) and (new.CODIGO_TEMA is not null)) THEN
    BEGIN
    if (not exists (select CODIGO_AREA from REPORT_AREA where CODIGO_AREA = new.CODIGO_AREA)) then
          EXCEPTION DATO_OBLIGATORIO 'No existe el area del ticket especificada.';
    if (not exists (select CODIGO_TEMA from REPORT_TEMAS where CODIGO_AREA = new.CODIGO_AREA and CODIGO_TEMA = new.CODIGO_TEMA)) then
          EXCEPTION DATO_OBLIGATORIO 'No existe la tema del ticket de especificado.';
    END
end
^

/* Trigger: REPORT_PREFIJOS_BI */
CREATE TRIGGER REPORT_PREFIJOS_BI FOR REPORT_PREFIJOS
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
    IF (NEW.TIDO_COD = 999 ) THEN
    EXECUTE PROCEDURE COMPLETA_CEROS8 (NEW.PREF_PREFIJO) RETURNING_VALUES (NEW.PREF_PREFIJO);
END
^

/* Trigger: REPORT_PREFIJOS_BI0 */
CREATE TRIGGER REPORT_PREFIJOS_BI0 FOR REPORT_PREFIJOS
ACTIVE BEFORE INSERT POSITION 0
AS
DECLARE VARIABLE CANT INTEGER;
begin
BEGIN
    IF (NEW.TIDO_COD IS NOT NULL) THEN
    BEGIN
       SELECT COUNT(*)
       FROM   TIPO_DOCUMENTO
       WHERE  TIPO_DOCUMENTO.TIDO_COD = NEW.TIDO_COD
       INTO   :CANT;
       IF (CANT = 0) THEN
       BEGIN
          EXCEPTION TIPODOC_NO_EXISTE;
       END
    END
END
end
^

/* Trigger: REPORT_PREFIJOS_BIP */
CREATE TRIGGER REPORT_PREFIJOS_BIP FOR REPORT_PREFIJOS
ACTIVE BEFORE INSERT POSITION 0
AS
begin
 if (NEW.tido_cod = 999 or NEW.tido_cod = 1001 ) then
    EXECUTE PROCEDURE completa_ceros8 (NEW.numero_prefijo) returning_values (NEW.numero_prefijo);
end
^

/* Trigger: REPORT_PREFIJOS_BU */
CREATE TRIGGER REPORT_PREFIJOS_BU FOR REPORT_PREFIJOS
ACTIVE BEFORE UPDATE POSITION 0
AS
begin
if (NEW.tido_cod = 999 or NEW.tido_cod = 1001 ) then
    EXECUTE PROCEDURE completa_ceros8 (NEW.NUMERO_PREFIJO) returning_values (NEW.NUMERO_PREFIJO);
end
^

/* Trigger: REPORT_TICKETS_BI */
CREATE TRIGGER REPORT_TICKETS_BI FOR REPORT_TICKETS
ACTIVE BEFORE INSERT POSITION 0
AS
DECLARE VARIABLE NUMERO VARCHAR(8);
DECLARE VARIABLE AUTOM CHAR(1);
DECLARE VARIABLE EXISTE CHAR(1);
DECLARE VARIABLE ESTADO CHAR(1);
BEGIN
  /*GENERADOR SI EL CAMPO ID IS NULL*/
  IF (NEW.TICKET_ID IS NULL) THEN
    NEW.TICKET_ID = GEN_ID(GEN_REPORT_TICKETS_ID,1);

  /*VACIO USUARIO*/
  IF (NEW.TICKET_USUARIO IS NULL) THEN
     NEW.TICKET_USUARIO = USER;
  /* VALIDE EL ESTADO DEL CLIENTE */
  BEGIN
    SELECT C.CLIE_ESTADO
    FROM CLIENTES C
    WHERE TERC_NIT = NEW.TERC_NIT
    INTO :ESTADO;
    IF (ESTADO <> 'A') THEN
      EXCEPTION CLIENTE_INACTIVO 'El cliente ' || NEW.TERC_NIT || ' esta inactivo o en No vender.';
  END
  /* Verifique que el numero no existe previamente */
  EXISTE = 'N';
  SELECT 'S'
  FROM REPORT_TICKETS
  WHERE PREF_PRE = NEW.PREF_PRE AND
        TICKET_NUMERO = NEW.TICKET_NUMERO
  INTO :EXISTE;
  IF (EXISTE = 'S') THEN
    EXCEPTION DOCUMENTO_REGISTRADO 'Ya existe un ticket con el número ' || NEW.PREF_PRE || NEW.TICKET_NUMERO;

  BEGIN
    /* Actualice el contador del prefijo */
    SELECT PREF_ACTUAL, PREF_AUTO
    FROM PREFIJOS
    WHERE TIDO_COD = 1000 AND
          PREF_PRE = NEW.PREF_PRE
    INTO :NUMERO, :AUTOM;
    /* ACTUALICE EL NUMERO EN ENCABEZADO  */
    IF (AUTOM = 'S') THEN
    BEGIN
      NEW.TICKET_NUMERO = NUMERO;
      NUMERO = CAST((CAST(NUMERO AS INTEGER) + 1) AS CHAR(8));
      UPDATE PREFIJOS
      SET PREF_ACTUAL = :NUMERO
      WHERE TIDO_COD = 1000 AND
            PREF_PRE = NEW.PREF_PRE;
    END
    ELSE
    BEGIN
      IF (CAST(NUMERO AS INTEGER) = CAST(NEW.TICKET_NUMERO AS INTEGER)) THEN
        UPDATE PREFIJOS
        SET PREF_ACTUAL = CAST((CAST(PREF_ACTUAL AS INTEGER) + 1) AS CHAR(8))
        WHERE TIDO_COD = 1000 AND
              PREF_PRE = NEW.PREF_PRE;
    END
    EXECUTE PROCEDURE COMPLETA_CEROS8(NEW.TICKET_NUMERO)
        RETURNING_VALUES (NEW.TICKET_NUMERO);
  END
END
^

/* Trigger: REPORT_TICKETS_PI */
CREATE TRIGGER REPORT_TICKETS_PI FOR REPORT_TICKETS
ACTIVE BEFORE INSERT POSITION 0
AS
declare variable OK CHAR(1);
begin
    OK = 'N';
    SELECT 'S' FROM PREFIJOS WHERE TIDO_COD = 1000 AND PREF_PRE = NEW.PREF_PRE INTO OK;
    IF (OK = 'N') THEN
    exception PREFIJO_NO_EXISTE 'El prefijo ' || new.PREF_PRE || ' no esta registrado.';
end
^

/* Trigger: REPORT_TITULOS_BI0 */
CREATE TRIGGER REPORT_TITULOS_BI0 FOR REPORT_TITULOS
ACTIVE BEFORE INSERT POSITION 0
AS
begin
   if (new.id_titulo is null) then
    new.id_titulo = gen_id(gen_report_titulos_id,1);
end
^

SET TERM ; ^



/******************************************************************************/
/***                           Stored Procedures                            ***/
/******************************************************************************/


SET TERM ^ ;

ALTER PROCEDURE REPORT_ARTICULOS_CREADOS (
    INICIO DATE,
    FIN DATE,
    TODOS CHAR(1))
RETURNS (
    CODIGO VARCHAR(15),
    DESCRIPCION VARCHAR(60),
    UNIDAD VARCHAR(8),
    USUARIO VARCHAR(10),
    FECHA DATE,
    HORA VARCHAR(20))
AS
begin
  FOR SELECT A.arti_cod, A.arti_des, A.arti_unidad, A.arti_usuario, B.audi_fecha, B.audi_hora  FROM ARTICULO A, AUDITORIA B WHERE A.arti_cod = B.audi_cod AND B.tido_cod = 101 AND B.audi_fecha >= :INICIO AND B.audi_fecha <= :FIN AND B.audi_oper = 'I' order BY A.arti_des
  INTO :CODIGO, :DESCRIPCION, :UNIDAD, :USUARIO, :FECHA, :HORA
  DO
  BEGIN
  suspend;
  END
end^


ALTER PROCEDURE REPORT_BUSCADOC (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE)
RETURNS (
    T_ID INTEGER,
    T_PREF VARCHAR(4),
    T_NUMERO VARCHAR(8),
    T_NIT VARCHAR(20),
    T_PRIORIDAD CHAR(5),
    T_FECHA DATE,
    T_NOMBRE VARCHAR(60),
    T_SUCURSAL VARCHAR(10),
    T_CONTACTO VARCHAR(60),
    T_TELEFONO VARCHAR(40),
    T_EMAIL VARCHAR(100),
    T_SUCESO VARCHAR(15),
    T_AREA VARCHAR(60),
    T_TEMA VARCHAR(60),
    T_OBSERVACION VARCHAR(60),
    T_DESCRIPCION BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    T_RESPUESTA VARCHAR(60),
    T_ASIGNAR VARCHAR(60),
    T_ESTADO CHAR(1),
    T_USUARIO VARCHAR(10),
    T_ANULADO CHAR(1))
AS
BEGIN
FOR SELECT TICKET_ID, PREF_PRE, TICKET_NUMERO, TERC_NIT, TICKET_PRIORIDAD, TICKET_FECHA, TICKET_NOMBRE, TICKET_SUCURSAL,
       TICKET_CONTACTO, TICKET_TELEFONO, TICKET_EMAIL, TICKET_SUCESO, TICKET_AREA, TICKET_TEMA, TICKET_OBSERVACION,
       TICKET_DESCRIPCION, TICKET_RESPUESTA, TICKET_ASIGNAR, TICKET_ESTADO, TICKET_USUARIO, TICKET_ANULADO
FROM REPORT_TICKETS WHERE PREF_PRE = :PREFIJO AND TICKET_NUMERO = :NUMERO AND TICKET_FECHA = :FECHA
INTO :T_ID, T_PREF, :T_NUMERO, :T_NIT, :T_PRIORIDAD, :T_FECHA, :T_NOMBRE, :T_SUCURSAL, :T_CONTACTO, :T_TELEFONO, :T_EMAIL,
:T_SUCESO, :T_AREA, :T_TEMA, :T_OBSERVACION, :T_DESCRIPCION,:T_RESPUESTA,:T_ASIGNAR, :T_ESTADO, :T_USUARIO, :T_ANULADO
DO
BEGIN
SUSPEND;
END
END^


ALTER PROCEDURE REPORT_BUSCAFAC (
    FACTURA VARCHAR(12))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE,
    NIT VARCHAR(20),
    PUNTO INTEGER)
AS
DECLARE VARIABLE TOTAL INTEGER;
DECLARE VARIABLE PRE VARCHAR(4);
DECLARE VARIABLE NUM VARCHAR(8);
begin
  SELECT CHAR_LENGTH(:factura) FROM RDB$DATABASE INTO :TOTAL;
  if (TOTAL = 9) then
  PRE = substring(:factura FROM 1 FOR 1);
  NUM = substring(:factura FROM 2 FOR 8);
  FOR SELECT PREF_PRE, NUMERO_ENVIO, TERC_NIT, PTVT_ID, FECHA_ENVIO FROM REPORT_ENVIOS_DOMICILIO
  WHERE PREF_PRE = :pre AND NUMERO_ENVIO =:num AND DOMICILIO_ENVIO ='N'
  INTO :prefijo, :numero, :NIT, :PUNTO , :fecha
  DO
  BEGIN
  suspend;
  END

  if (TOTAL = 10) then
  PRE = substring(:factura FROM 1 FOR 2);
  NUM = substring(:factura FROM 3 FOR 8);
  FOR SELECT PREF_PRE, NUMERO_ENVIO, TERC_NIT, PTVT_ID, FECHA_ENVIO FROM REPORT_ENVIOS_DOMICILIO
  WHERE PREF_PRE = :pre AND NUMERO_ENVIO =:num AND DOMICILIO_ENVIO ='N'
  INTO :prefijo, :numero, :NIT, :PUNTO , :fecha
  DO
  BEGIN
  suspend;
  END

  if (TOTAL = 11) then
  PRE = substring(:factura FROM 1 FOR 3);
  NUM = substring(:factura FROM 4 FOR 8);
  FOR SELECT PREF_PRE, NUMERO_ENVIO, TERC_NIT, PTVT_ID, FECHA_ENVIO FROM REPORT_ENVIOS_DOMICILIO
  WHERE PREF_PRE = :pre AND NUMERO_ENVIO =:num AND DOMICILIO_ENVIO ='N'
  INTO :prefijo, :numero, :NIT, :PUNTO , :fecha
  DO
  BEGIN
  suspend;
  END

  if (TOTAL = 12) then
  PRE = substring(:factura FROM 1 FOR 4);
  NUM = substring(:factura FROM 5 FOR 8);
  FOR SELECT PREF_PRE, NUMERO_ENVIO, TERC_NIT, PTVT_ID, FECHA_ENVIO FROM REPORT_ENVIOS_DOMICILIO
  WHERE PREF_PRE = :pre AND NUMERO_ENVIO =:num AND DOMICILIO_ENVIO ='N'
  INTO :prefijo, :numero, :NIT, :PUNTO , :fecha
  DO
  BEGIN
  suspend;
  END
end^


ALTER PROCEDURE REPORT_BUSQUEDA_ARTICULOS (
    INACTIVOS CHAR(1),
    FECHA DATE,
    PARAMETRO CHAR(1),
    BUSQUEDA VARCHAR(100))
RETURNS (
    CODIGO VARCHAR(15),
    GRUPO VARCHAR(2),
    SUBGRUPO VARCHAR(3),
    MARCA VARCHAR(3),
    DESCRIPCION VARCHAR(60),
    UNIDAD VARCHAR(8),
    ACTIVO CHAR(1),
    IVA INTEGER,
    INVIMA VARCHAR(20),
    EXISTENCIAT NUMERIC(18,2),
    COSTO NUMERIC(18,2),
    PROMEDIO NUMERIC(18,2))
AS
begin
IF (PARAMETRO='C')THEN /*Codigo articulo*/
IF (INACTIVOS = 'N') THEN
FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.arti_cod containing :BUSQUEDA AND A.ESAR_COD <> 'I'
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
           EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END

  ELSE
  FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.arti_cod containing :BUSQUEDA
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END /*Codigo articulo*/

IF (PARAMETRO='N')THEN/*Nombre articulo*/
IF (INACTIVOS = 'N') THEN
FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND A.ARTI_DES containing :BUSQUEDA AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t'  AND A.ESAR_COD <> 'I'
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
           EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END

  ELSE
  FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.arti_des LIKE :BUSQUEDA
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END /*Nombre articulo*/

  IF (PARAMETRO='G')THEN /*Grupo articulo*/
IF (INACTIVOS = 'N') THEN
FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.grup_cod LIKE :BUSQUEDA AND A.ESAR_COD <> 'I'
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
           EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END

  ELSE
  FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.grup_cod LIKE :BUSQUEDA
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END

  IF (PARAMETRO='U')THEN /*Unidad articulo*/
IF (INACTIVOS = 'N') THEN
FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.arti_unidad LIKE :BUSQUEDA AND A.ESAR_COD <> 'I'
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
           EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END

  ELSE
  FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.arti_unidad LIKE :BUSQUEDA
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END
end^


ALTER PROCEDURE REPORT_CATALOGO_ARTICULOS (
    INACTIVOS CHAR(1),
    FECHA DATE)
RETURNS (
    CODIGO VARCHAR(15),
    GRUPO VARCHAR(2),
    SUBGRUPO VARCHAR(3),
    MARCA VARCHAR(3),
    DESCRIPCION VARCHAR(60),
    UNIDAD VARCHAR(8),
    ACTIVO CHAR(1),
    IVA INTEGER,
    INVIMA VARCHAR(20),
    EXISTENCIAT NUMERIC(18,2),
    COSTO NUMERIC(18,2),
    PROMEDIO NUMERIC(18,2))
AS
begin
IF (INACTIVOS = 'N') THEN
FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t' AND A.ESAR_COD <> 'I'
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
           EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END
  ELSE

  FOR SELECT ARTI_COD, GRUP_COD, SUBG_COD, MARC_COD, ARTI_DES, ARTI_UNIDAD, ESAR_COD, T.TAIV_PORC,ARTI_INVIMA
      FROM ARTICULO A , TARIFA_IVA T WHERE A.taiv_cod = T.taiv_cod AND SUBSTRING(A.ARTI_COD FROM 1 FOR 2) <> '.t'
      INTO :CODIGO, :GRUPO, :SUBGRUPO, :MARCA, :DESCRIPCION, :UNIDAD, :ACTIVO, :IVA, :INVIMA
           DO
           BEGIN
           SELECT first 1 (EXIS_SALDO + EXIS_ENTR - EXIS_SAL) FROM EXISTENCIA
    WHERE (ARTI_COD = :CODIGO) AND (EXIS_FECHA <= :FECHA)
    ORDER BY ARTI_COD  INTO :existenciat;
EXECUTE PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD (:CODIGO,:FECHA,:UNIDAD) returning_values (:COSTO, :PROMEDIO);
  suspend;
  END

end^


ALTER PROCEDURE REPORT_CLIENTES_TIEMPO (
    INICIO DATE,
    FIN DATE,
    TODOS CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    FECHA DATE,
    HORA TIME)
AS
begin
  FOR SELECT  T.terc_nit,T.terc_nom, A.audi_fecha, A.audi_hora  FROM CLIENTES C , TERCEROS T, AUDITORIA A WHERE C.terc_nit = T.terc_nit AND C.terc_nit = A.audi_cod AND A.tido_cod = 103 AND A.audi_fecha >= :INICIO AND A.audi_fecha <= :FIN AND A.audi_oper = 'I' order BY T.terc_nom
  INTO :nit,:NOMBRE , :FECHA, :HORA
  DO
  BEGIN
  suspend;
  END
end^


ALTER PROCEDURE REPORT_CRONOLOGICO (
    FECINI DATE,
    FECFIN DATE,
    PDESDE VARCHAR(4),
    PHASTA VARCHAR(4),
    NITINI VARCHAR(20),
    NITFIN VARCHAR(20))
RETURNS (
    ID INTEGER,
    PRE VARCHAR(4),
    NUMERO VARCHAR(8),
    NIT VARCHAR(20),
    PRIORIDAD CHAR(5),
    FECHA DATE,
    NOMBRE VARCHAR(60),
    SUCURSAL VARCHAR(10),
    CONTACTO VARCHAR(60),
    TELEFONO VARCHAR(40),
    EMAIL VARCHAR(100),
    SUCESO VARCHAR(15),
    AREA VARCHAR(60),
    TEMA VARCHAR(60),
    OBSERVACION VARCHAR(60),
    DESCRIPCION BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    RESPUESTA VARCHAR(60),
    ASIGNAR VARCHAR(60),
    ESTADO CHAR(1),
    USUARIO VARCHAR(10),
    ANULADO CHAR(1),
    LOGO BLOB SUB_TYPE 0 SEGMENT SIZE 80)
AS
begin
SELECT LOGO_IMAGEN FROM REPORT_LOGO INTO :LOGO;
FOR SELECT TICKET_ID, PREF_PRE, TICKET_NUMERO, TERC_NIT, TICKET_PRIORIDAD, TICKET_FECHA, TICKET_NOMBRE,
             TICKET_SUCURSAL, TICKET_CONTACTO, TICKET_TELEFONO, TICKET_EMAIL, TICKET_SUCESO, TICKET_AREA, TICKET_TEMA,
             TICKET_OBSERVACION, TICKET_DESCRIPCION, TICKET_RESPUESTA, TICKET_ASIGNAR, TICKET_ESTADO, TICKET_USUARIO,
             TICKET_ANULADO
      FROM REPORT_TICKETS
      WHERE TICKET_FECHA >= :FECINI AND TICKET_FECHA <= :FECFIN AND PREF_PRE >=:PDESDE AND PREF_PRE <=:PHASTA AND TERC_NIT>=:NITINI AND TERC_NIT<=:NITFIN
      INTO :ID, :PRE, :NUMERO, :NIT, :PRIORIDAD, :FECHA, :NOMBRE,:SUCURSAL, :CONTACTO, :TELEFONO, :EMAIL, :SUCESO, :AREA,
           :TEMA, :OBSERVACION, :DESCRIPCION, :RESPUESTA, :ASIGNAR, :ESTADO,:USUARIO, :ANULADO
      DO
      BEGIN
        SUSPEND;
      END
END^


ALTER PROCEDURE REPORT_DATOS_CLIENTES (
    INICIO DATE,
    FIN DATE,
    ESTADO CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOM VARCHAR(60),
    SUC VARCHAR(10),
    NOMSUC VARCHAR(60),
    DIR VARCHAR(60),
    CIU VARCHAR(40),
    TEL VARCHAR(40),
    OBS VARCHAR(255),
    VEND INTEGER,
    COBR INTEGER,
    ZONA VARCHAR(2),
    EMAIL VARCHAR(100),
    SEMAIL VARCHAR(100),
    EFEMAIL VARCHAR(100),
    ULTVENTA DATE,
    SUCOBS VARCHAR(255),
    PEDIDO VARCHAR(255))
AS
declare variable CANT integer;
begin
  FOR SELECT T.terc_nit,  T.terc_nom, T.terc_email, T.terc_emailfe, C.CLIE_INSTRUCCIONES, C.CLIE_PEDIDOS FROM TERCEROS T, CLIENTES C WHERE T.TERC_NIT = C.TERC_NIT AND C.CLIE_ESTADO = :ESTADO
  INTO :NIT , :NOM, :EMAIL, :EFEMAIL, :OBS , :PEDIDO
  DO
  BEGIN
  FOR SELECT COUNT(*) FROM CLIENTE_SUCURSALES S WHERE S.terc_nit = :NIT INTO :CANT
  DO
  BEGIN
  IF(CANT>0) THEN
  FOR SELECT CLCU_COD, CLSU_NOMBRE, CLSU_DIR, CLSU_CIUDAD, CLSU_TEL, SUBSTRING(CLSU_OBS FROM 1 FOR 255), VEND_COD, COBR_COD, ZONA_COD, CLSU_EMAIL
  FROM cliente_sucursales WHERE TERC_NIT = :NIT ORDER BY CLCU_COD
  INTO :SUC, :nomsuc, :dir, :ciu, :tel, :SUCobs, :vend, :cobr, :zona, :SEMAIL
  DO
  BEGIN
  ULTVENTA = NULL;
  SELECT MAX(FACT_FECHA) FROM FACTURAS WHERE TERC_NIT = :NIT AND FACT_SUCURSAL = :SUC AND FACT_FECHA >= :INICIO AND FACT_FECHA <= :FIN
  INTO :ultventa;
  suspend;
  END
  END

  END
end^


ALTER PROCEDURE REPORT_ENVIOSF_CORREO (
    IDPED INTEGER)
RETURNS (
    ARTI VARCHAR(20),
    DES VARCHAR(60),
    CANT NUMERIC(18,4),
    UNIDAD VARCHAR(8),
    BOD VARCHAR(2),
    PRUNIT NUMERIC(18,2),
    DTO NUMERIC(9,2),
    TOTAL NUMERIC(18,2),
    TERCERO VARCHAR(20),
    MARCA VARCHAR(30),
    FACTOR NUMERIC(18,4))
AS
DECLARE VARIABLE IDP INTEGER;
DECLARE VARIABLE ITEM INTEGER;
DECLARE VARIABLE DOC CHAR(1);
begin
  FOR SELECT IDDOC_ENVIORP, TERC_NIT, TIPODOC_ENVIORP FROM REPORT_ENVIOS_FALTANTES WHERE IDDOC_ENVIORP = :IDPED  AND ESTADO_ENVIORP = 'N' INTO :IDP, :TERCERO, DOC
  DO
  begin
for select PEDE_ITEM, PEDE_CODBAR, PEDE_DESC, BODE_COD, PEDE_PRUNIT, PEDE_DTOPORC, PEDE_TOTAL from PEDIDOS_DETALLE
where PEDI_ID = :IDP order by PEDE_ITEM into :ITEM, :ARTI, :DES, :BOD, :PRUNIT, :DTO, :TOTAL do
begin
if (DOC='R') then
execute procedure faltante(34, 32, :IDP, :ITEM) returning_values (:CANT, :UNIDAD, :FACTOR);
SELECT M.marc_nom FROM ARTICULO A , MARCAS M  WHERE A.arti_cod = :ARTI AND A.marc_cod = M.marc_cod INTO :MARCA;

if (DOC='F') then
execute procedure faltante(34, 31, :IDP, :ITEM) returning_values (:CANT, :UNIDAD, :FACTOR);
SELECT M.marc_nom FROM ARTICULO A , MARCAS M  WHERE A.arti_cod = :ARTI AND A.marc_cod = M.marc_cod INTO :MARCA;

if (CANT <>0) then
suspend;
end
end
end^


ALTER PROCEDURE REPORT_FACTURAS_DETALLE (
    FECINI DATE,
    FECFIN DATE,
    PREF VARCHAR(4),
    NUM VARCHAR(8))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE,
    ARTICULO VARCHAR(20),
    DESCRIPCION VARCHAR(60),
    LOTE VARCHAR(15),
    VENCE DATE,
    INVIMA VARCHAR(20))
AS
declare variable ID integer;
begin
  FOR SELECT  F.FACT_ID, PREF_PRE, FACT_NUMERO, FACT_FECHA, D.arti_cod, D.fade_desc, D.fade_lote,A.arti_invima   FROM FACTURAS F , FACTURAS_DETALLE D, ARTICULO A WHERE F.FACT_ID = D.FACT_ID AND D.ARTI_COD=A.ARTI_COD  AND F.FACT_ANULADO = 'N' AND FACT_FECHA >=:FECINI AND FACT_FECHA <=:FECFIN AND F.pref_pre = :PREF AND F.fact_numero = :NUM
  INTO :ID,:PREFIJO, :NUMERO, :FECHA, :ARTICULO, :DESCRIPCION, :LOTE ,:invima
  DO
  BEGIN
  SELECT MAX(L.lote_vence) FROM LOTES L WHERE L.arti_cod = :ARTICULO AND L.lote_nro = :LOTE INTO :vence;
  suspend;
  END
end^


ALTER PROCEDURE REPORT_FACTURAS_USUARIO (
    INICIO DATE,
    FIN DATE,
    USUARIO VARCHAR(10),
    VACIO CHAR(1),
    VACIO1 CHAR(1),
    VACIO2 CHAR(1),
    VACIO3 CHAR(1))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(8),
    FECHA DATE,
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60))
AS
begin
  FOR SELECT F.PREF_PRE, F.FACT_NUMERO, F.fact_fecha,  F.terc_nit FROM FACTURAS F WHERE F.FACT_FECHA >=:INICIO AND F.FACT_FECHA <=:FIN AND F.FACT_USUARIO = :USUARIO AND F.FACT_ANULADO ='N'
  INTO :PREFIJO , :NUMERO, :FECHA , :NIT
  DO
  BEGIN
    SELECT T.TERC_NOM FROM TERCEROS T WHERE T.TERC_NIT = :NIT INTO :NOMBRE;
    suspend;
  END
end^


ALTER PROCEDURE REPORT_FALTANTES
RETURNS (
    DATO INTEGER,
    TOTAL NUMERIC(18,4))
AS
DECLARE VARIABLE ID INTEGER;
DECLARE VARIABLE ITEM INTEGER;
DECLARE VARIABLE DOC CHAR(1);
BEGIN
  FOR SELECT IDENTIFICACION , DOCUMENTO FROM REPORT_FALTANTES_TEMP GROUP BY IDENTIFICACION , DOCUMENTO
  INTO :ID , :DOC
  DO
  BEGIN
   SELECT SUM(CANT) FROM REPORT_PENDIENTES(:ID,:DOC) INTO :TOTAL;
  IF (TOTAL =0) THEN
  UPDATE REPORT_ENVIOS_FALTANTES E SET ESTADO_ENVIORP = 'S' WHERE E.IDDOC_ENVIORP = :ID  AND E.TIPODOC_ENVIORP = :DOC;
  END
END^


ALTER PROCEDURE REPORT_FALTANTESPED (
    INICIO DATE,
    FIN DATE,
    PARAMETRO CHAR(1),
    VACIO1 CHAR(1),
    VACIO2 CHAR(1),
    VACIO3 CHAR(1),
    VACIO4 CHAR(1))
RETURNS (
    ARTICULO VARCHAR(20),
    DESCRIPCION VARCHAR(80),
    UNIDAD VARCHAR(8),
    CANT NUMERIC(18,2),
    FACTURADO NUMERIC(18,2),
    FALTANTE NUMERIC(18,2),
    BOD1 NUMERIC(18,2),
    BOD2 NUMERIC(18,2),
    BOD3 NUMERIC(18,2),
    BOD4 NUMERIC(18,2),
    BOD5 NUMERIC(18,2),
    BOD6 NUMERIC(18,2),
    BOD7 NUMERIC(18,2),
    BOD8 NUMERIC(18,2),
    BOD9 NUMERIC(18,2),
    BOD10 NUMERIC(18,2),
    BOD11 NUMERIC(18,2),
    BOD12 NUMERIC(18,2),
    BOD13 NUMERIC(18,2),
    BOD14 NUMERIC(18,2),
    BOD15 NUMERIC(18,2),
    BOD16 NUMERIC(18,2),
    BOD17 NUMERIC(18,2),
    BOD18 NUMERIC(18,2),
    BOD19 NUMERIC(18,2),
    BOD20 NUMERIC(18,2),
    BOD21 NUMERIC(18,2),
    BOD22 NUMERIC(18,2),
    EXISTENCIA NUMERIC(18,2),
    COMPRA NUMERIC(18,2),
    MARCA VARCHAR(30),
    PROVEEDOR VARCHAR(60))
AS
declare variable NIT varchar(20);
declare variable MARC varchar(3);
declare variable CANTIDADES numeric(18,2);
declare variable TOTALCANT numeric(18,2);
begin
  BOD1 =0;
  BOD2 =0;
  BOD3 =0;
  BOD4 =0;
  BOD5 =0;
  BOD6 =0;
  BOD7 =0;
  BOD8 =0;
  BOD9 =0;
  BOD10 =0;
  BOD11 =0;
  BOD12 =0;
  BOD13 =0;
  BOD14 =0;
  BOD15 =0;
  BOD16 =0;
  BOD17 =0;
  BOD18 =0;
  BOD19 =0;
  BOD20 =0;
  BOD21 =0;
  BOD22 =0;
  EXISTENCIA=0;
  COMPRA=0;
  FACTURADO = 0;
  FOR SELECT MAX(D.ARTI_COD), MAX(D.pede_desc), MAX(d.pede_unidad) ,SUM (D.pede_cant) FROM PEDIDOS P, PEDIDOS_DETALLE D WHERE P.PEDI_ID = D.PEDI_ID AND P.PEDI_FECHA >=:INICIO AND P.PEDI_FECHA <=:FIN AND P.PEDI_ANULADO = 'N' GROUP BY D.ARTI_COD
  INTO :ARTICULO , :descripcion, :unidad, :CANT
  DO
  BEGIN
  BEGIN
  FOR SELECT A.marc_cod FROM ARTICULO A WHERE A.arti_cod = :ARTICULO
  INTO :MARC
  DO
  BEGIN
  SELECT M.marc_nom FROM MARCAS M WHERE M.marc_cod = :MARC  INTO :MARCA;
  END
  END

  BEGIN
  FOR SELECT TERC_NIT FROM proveedor_ARTICULO PA WHERE PA.arti_cod = :ARTICULO AND PA.pvar_fecha = (select max(pvar_fechA)from PROVEEDOR_ARTICULO WHERE ARTI_COD = :ARTICULO)
  INTO :NIT
  DO
  BEGIN
  SELECT TERC_NOM FROM TERCEROS  WHERE TERC_NIT = :NIT  INTO :PROVEEDOR;
  END
  END


  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '01',CURRENT_DATE) returning_values (:BOD1);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '02',CURRENT_DATE) returning_values (:BOD2);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '03',CURRENT_DATE) returning_values (:BOD3);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '04',CURRENT_DATE) returning_values (:BOD4);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '05',CURRENT_DATE) returning_values (:BOD5);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '06',CURRENT_DATE) returning_values (:BOD6);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '07',CURRENT_DATE) returning_values (:BOD7);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '08',CURRENT_DATE) returning_values (:BOD8);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '09',CURRENT_DATE) returning_values (:BOD9);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '10',CURRENT_DATE) returning_values (:BOD10);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '11',CURRENT_DATE) returning_values (:BOD11);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '12',CURRENT_DATE) returning_values (:BOD12);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '13',CURRENT_DATE) returning_values (:BOD13);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '14',CURRENT_DATE) returning_values (:BOD14);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '15',CURRENT_DATE) returning_values (:BOD15);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '16',CURRENT_DATE) returning_values (:BOD16);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '17',CURRENT_DATE) returning_values (:BOD17);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '18',CURRENT_DATE) returning_values (:BOD18);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '19',CURRENT_DATE) returning_values (:BOD19);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '20',CURRENT_DATE) returning_values (:BOD20);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '21',CURRENT_DATE) returning_values (:BOD21);
  EXECUTE PROCEDURE SALDO_INVENTARIO (:ARTICULO, '22',CURRENT_DATE) returning_values (:BOD22);
  SELECT SUM(EXISTENCIA) FROM EXISTENCIAS (:ARTICULO, CURRENT_DATE) INTO :EXISTENCIA;
  SELECT SUM(FD.fade_cant) FROM FACTURAS F, FACTURAS_DETALLE FD WHERE F.fact_id = FD.fact_id AND F.fact_fecha >=:INICIO AND F.fact_fecha <=:FIN AND F.fact_anulado = 'N' AND FD.arti_cod = :ARTICULO INTO :FACTURADO;
  if (facturado IS NULL) then
  FACTURADO = 0;
  FALTANTE = :cant - :FACTURADO;
/*  if (FALTANTE<0) then
  FALTANTE = (-1)*FALTANTE;*/
    TOTALCANT = :EXISTENCIA - :FALTANTE;
      if (totalcant > 0) then
    COMPRA = 0;
    ELSE
  COMPRA = :EXISTENCIA - :FALTANTE;
   suspend;
  END
end^


ALTER PROCEDURE REPORT_HISTORIAL_CHAT (
    USUARIO VARCHAR(10),
    USUARIOD VARCHAR(10))
RETURNS (
    ID INTEGER,
    MENSAJE VARCHAR(255),
    FECHA DATE,
    HORA TIME,
    RECIBO CHAR(1),
    ENVIADO CHAR(1))
AS
DECLARE VARIABLE CANT INTEGER;
DECLARE VARIABLE CANTS INTEGER;
BEGIN
  SELECT COUNT(ID_CHAT) FROM REPORT_CHAT WHERE ORIGEN_CHAT = :USUARIO AND DESTINO_CHAT = :USUARIOD INTO :CANT;
  SELECT COUNT(ID_CHAT) FROM REPORT_CHAT WHERE ORIGEN_CHAT = :USUARIOD AND DESTINO_CHAT = :USUARIO INTO :CANTS;
  IF (CANT > 0) THEN
  FOR SELECT ID_CHAT,MENSAJE_CHAT, FECHA_CHAT, HORA_CHAT, RECIBIDO_CHAT, 'S' FROM REPORT_CHAT WHERE ORIGEN_CHAT =:USUARIO AND  DESTINO_CHAT = :USUARIOD ORDER BY FECHA_CHAT descending
  into :id,  :MENSAJE, :FECHA,  :HORA,  RECIBO , :ENVIADO
  DO
  BEGIN
  SUSPEND;
  END

  IF (CANTS > 0) THEN
  FOR SELECT ID_CHAT, MENSAJE_CHAT, FECHA_CHAT, HORA_CHAT, RECIBIDO_CHAT, 'N' FROM REPORT_CHAT WHERE ORIGEN_CHAT =:USUARIOD AND  DESTINO_CHAT = :USUARIO ORDER BY FECHA_CHAT descending
  INTO :ID,:MENSAJE, :FECHA,  :HORA,  RECIBO, :ENVIADO
  DO
  BEGIN
    SUSPEND;
  END
END^


ALTER PROCEDURE REPORT_HISTORIAL_RECIBOS (
    INICIAL DATE,
    FINAL DATE,
    PREF CHAR(4))
RETURNS (
    PREFIJO VARCHAR(4),
    NUMERO VARCHAR(6),
    FECHA DATE,
    TERCERO VARCHAR(60),
    CONCEPTO VARCHAR(60),
    RETENCIONES NUMERIC(18,2),
    MONTO NUMERIC(18,2),
    ANULADO CHAR(1))
AS
begin
  if (PREF = 'T') then
  BEGIN
  FOR SELECT PREF_PRE, RECA_NUMERO, RECA_FECHA, RECA_NOMTERC,RECA_CONC, (RECA_RTFTEMONTO+RECA_RTIVAMONTO+RECA_RTICAMONTO), RECA_MONTO, RECA_ANULADO  FROM RECIBOS_CAJA WHERE RECA_FECHA >=:INICIAL AND RECA_FECHA <=:FINAL
  ORDER BY RECA_FECHA DESC
  INTO :PREFIJO, :NUMERO, :FECHA, :TERCERO, :CONCEPTO, :RETENCIONES, :MONTO, ANULADO
  DO
  BEGIN
  suspend;
  END
  end
  ELSE
  BEGIN
  FOR SELECT PREF_PRE, RECA_NUMERO, RECA_FECHA, RECA_NOMTERC,RECA_CONC, (RECA_RTFTEMONTO+RECA_RTIVAMONTO+RECA_RTICAMONTO), RECA_MONTO, RECA_ANULADO  FROM RECIBOS_CAJA WHERE RECA_FECHA >=:INICIAL AND RECA_FECHA <=:FINAL AND PREF_PRE =:PREF
  ORDER BY RECA_FECHA DESC
  INTO :PREFIJO, :NUMERO, :FECHA, :TERCERO, :CONCEPTO, :RETENCIONES, :MONTO, ANULADO
  DO
  BEGIN
  suspend;
  END
end
END^


ALTER PROCEDURE REPORT_MENSAJES_USUARIOS
RETURNS (
    USUARIO VARCHAR(10),
    CONECTADO CHAR(1))
AS
begin
  FOR SELECT USER_COD FROM USUARIO INTO :USUARIO
  DO
  BEGIN
  if (:USUARIO  IN (SELECT MAX(MON$USER) FROM MON$ATTACHMENTS A WHERE MON$USER = :USUARIO AND A.MON$ATTACHMENT_ID <> CURRENT_CONNECTION group BY MON$USER)) then
  conectado = 'S';
  else
  CONECTADO = 'N';
  suspend;
  END
end^


ALTER PROCEDURE REPORT_NOTAS_IMPR (
    ID INTEGER)
RETURNS (
    FECHA DATE,
    RESPUESTA BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    USUARIO VARCHAR(10),
    NIT VARCHAR(20),
    SUCURSAL VARCHAR(10),
    NOMBRE VARCHAR(60),
    LOGO BLOB SUB_TYPE 0 SEGMENT SIZE 80)
AS
begin
  FOR SELECT NOTAS_FECHA, NOTAS_RESPUESTA, NOTAS_USUARIO, TERC_NIT, CLSU_COD
      FROM REPORT_NOTAS  WHERE NOTAS_IDDOC = :ID
      INTO :FECHA, :RESPUESTA, :USUARIO, :NIT, :SUCURSAL
      DO
      BEGIN
      SELECT TERC_NOM FROM TERCEROS T WHERE TERC_NIT = :NIT INTO :NOMBRE;
      SELECT LOGO_IMAGEN FROM REPORT_LOGO INTO :LOGO;
  suspend;
  END
end^


ALTER PROCEDURE REPORT_PEDIDOS_DCG (
    INICIO DATE,
    FIN DATE,
    VARIABLE1 CHAR(1))
RETURNS (
    TERC_NIT VARCHAR(20),
    PEDI_NOMTERC VARCHAR(60),
    PEDI_FECHA DATE,
    PREF_PRE VARCHAR(4),
    PEDI_NUMERO VARCHAR(6),
    VEND_COD INTEGER,
    PEDI_VALIDEZ INTEGER,
    PEDI_TOTAL NUMERIC(18,2),
    NODO_USER VARCHAR(10),
    NODO_TEXTO VARCHAR(255),
    NODO_RESUMEN T_CONCEPTO)
AS
declare variable PEDI_ID integer;
declare variable NUSER varchar(10);
declare variable NTEXTO varchar(255);
declare variable NRESUMEN varchar(60);
declare variable ITEMS integer;
begin

  for select PEDI_ID, TERC_NIT, VEND_COD ,PREF_PRE, PEDI_NUMERO, PEDI_FECHA, PEDI_VALIDEZ,
             PEDI_NOMTERC
      from PEDIDOS WHERE PEDI_FECHA >=:INICIO AND PEDI_FECHA <=:FIN AND PEDI_ANULADO = 'N' AND PEDI_VALIDEZ <0
      into :PEDI_ID, :TERC_NIT, :VEND_COD, :PREF_PRE, :PEDI_NUMERO, :PEDI_FECHA, :PEDI_VALIDEZ,
           :PEDI_NOMTERC
           DO
           BEGIN

           select NODO_USER, NODO_TEXTO, NODO_RESUMEN from NOTAS_DOCUMENTO WHERE TIDO_COD = 34 AND NODO_IDDOC = :PEDI_ID AND NODO_TEXTO IS NOT NULL
           order BY NODO_ID DESC ROWS 1 INTO :NUSER, :NTEXTO, :NRESUMEN;
           SELECT SUM(TOTAL) FROM FALTANTE_DOCUMENTO(34, 31, :PEDI_ID) INTO :PEDI_TOTAL;
           if (PEDI_TOTAL IS NULL) then
           PEDI_TOTAL = 0;
           if (NTEXTO IS NOT NULL) then
           NODO_USER = :NUSER;
           NODO_TEXTO =:NTEXTO;
           NODO_RESUMEN =:NRESUMEN;
    suspend;
  END
end^


ALTER PROCEDURE REPORT_PEDIDOS_DES (
    INICIO DATE,
    FIN DATE,
    VARIABLE1 CHAR(1))
RETURNS (
    TERC_NIT VARCHAR(20),
    PEDI_NOMTERC VARCHAR(60),
    PEDI_FECHA DATE,
    PREF_PRE VARCHAR(4),
    PEDI_NUMERO VARCHAR(6),
    VEND_COD INTEGER,
    PEDI_VALIDEZ INTEGER,
    PEDI_TOTAL NUMERIC(18,2),
    NODO_USER VARCHAR(10),
    NODO_TEXTO BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    NODO_RESUMEN T_CONCEPTO)
AS
declare variable PEDI_ID integer;
begin
  for select PEDI_ID, TERC_NIT, VEND_COD ,PREF_PRE, PEDI_NUMERO, PEDI_FECHA, PEDI_VALIDEZ,
             PEDI_NOMTERC,PEDI_TOTAL
      from PEDIDOS WHERE PEDI_FECHA >=:INICIO AND PEDI_FECHA >=:FIN AND PEDI_ANULADO = 'N' AND PEDI_VALIDEZ <0
      into :PEDI_ID, :TERC_NIT, :VEND_COD, :PREF_PRE, :PEDI_NUMERO, :PEDI_FECHA, :PEDI_VALIDEZ,
           :PEDI_NOMTERC, :PEDI_TOTAL
           DO
           BEGIN
           select NODO_USER, NODO_TEXTO, NODO_RESUMEN from NOTAS_DOCUMENTO WHERE TIDO_COD = 34 AND NODO_IDDOC = :PEDI_ID AND NODO_TEXTO IS NOT NULL
           order BY NODO_ID DESC ROWS 1 INTO :NODO_USER, :NODO_TEXTO, :NODO_RESUMEN;

  suspend;
  END
end^


ALTER PROCEDURE REPORT_PENDIENTES (
    IDPED INTEGER,
    DOC CHAR(1))
RETURNS (
    CANT NUMERIC(18,4))
AS
DECLARE VARIABLE IDP INTEGER;
DECLARE VARIABLE ITEM INTEGER;
DECLARE VARIABLE UNIDAD VARCHAR(8);
DECLARE VARIABLE FACTOR NUMERIC(9,4);
DECLARE VARIABLE RESPUESTA CHAR(2);
begin
    for select PEDE_ITEM
        from PEDIDOS_DETALLE
        where PEDI_ID = :IDPED
        ORDER by PEDE_ITEM
        into :ITEM
    do
    begin
      if (DOC = 'R') then
        execute procedure FALTANTE(34, 32, :IDPED, :ITEM)
            returning_values (:CANT, :UNIDAD, :FACTOR);

      if (DOC = 'F') then
        execute procedure FALTANTE(34, 31, :IDPED, :ITEM)
            returning_values (:CANT, :UNIDAD, :FACTOR);
      if (CANT =0) then
      RESPUESTA='OK';
      suspend;
    end
end^


ALTER PROCEDURE REPORT_PRO_CONTACTOS (
    INICIO DATE,
    FIN DATE,
    DATO CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(80),
    EMAIL VARCHAR(100))
AS
begin
  FOR SELECT C.terc_nit, T.terc_nom, C.tecc_email FROM TERCEROS_cONTACTOS C , TERCEROS T WHERE C.terc_nit = T.terc_nit AND T.terc_prov = 'S' AND C.tecc_email IS NOT NULL
  INTO :NIT, :NOMBRE, :EMAIL
  DO
  BEGIN
  suspend;
  END
end^


ALTER PROCEDURE REPORT_PROVEEDORES
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    CIUDAD VARCHAR(40),
    TELEFONOS VARCHAR(40),
    CONTACTO VARCHAR(255),
    CODIGO VARCHAR(20),
    SIMPLIFICA CHAR(1),
    ACTIVO CHAR(1))
AS
BEGIN
  FOR SELECT P.TERC_NIT, T.TERC_NOM, t.terc_ciu , T.terc_tel, T.terc_contacto, P.prov_cod , P.prov_simplificado, T.terc_estado
      FROM PROVEEDORES P, TERCEROS T WHERE P.TERC_NIT = T.TERC_NIT
      INTO :NIT, :NOMBRE, :CIUDAD, :TELEFONOS, :CONTACTO, :CODIGO, :SIMPLIFICA , :ACTIVO
      DO
      BEGIN
  SUSPEND;
  END
END^


ALTER PROCEDURE REPORT_PROVEEDORES_CONSULTA (
    IDENTIFICACION VARCHAR(20))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    CIUDAD VARCHAR(40),
    TELEFONOS VARCHAR(40),
    CONTACTO VARCHAR(255),
    CODIGO VARCHAR(20),
    SIMPLIFICA CHAR(1),
    ACTIVO CHAR(1))
AS
BEGIN
  FOR SELECT P.TERC_NIT, T.TERC_NOM, T.TERC_CIU , T.TERC_TEL, T.TERC_CONTACTO, P.PROV_COD , P.PROV_SIMPLIFICADO, T.TERC_ESTADO
      FROM PROVEEDORES P, TERCEROS T WHERE P.TERC_NIT = T.TERC_NIT AND P.TERC_NIT = :IDENTIFICACION AND T.TERC_ESTADO = 'S'
      INTO :NIT, :NOMBRE, :CIUDAD, :TELEFONOS, :CONTACTO, :CODIGO, :SIMPLIFICA , :ACTIVO
      DO
      BEGIN
  SUSPEND;
  END
END^


ALTER PROCEDURE REPORT_RESULTADCORREO (
    IDDOC INTEGER)
RETURNS (
    TOTAL INTEGER)
AS
begin
  SELECT SUM(CANT) FROM REPORT_ENVIOSF_CORREO(:IDDOC) INTO TOTAL;
  if(TOTAL IS NULL) THEN
  TOTAL = 0;
  ELSE
  TOTAL = :TOTAL;
  suspend;
end^


ALTER PROCEDURE REPORT_TERCEROS_CREADOS (
    FECINI DATE,
    FECFIN DATE,
    DESDE VARCHAR(20),
    HASTA VARCHAR(20),
    NULO CHAR(1))
RETURNS (
    NIT VARCHAR(20),
    NOMBRE VARCHAR(60),
    FECHA DATE,
    CTAPROV VARCHAR(20),
    CTACLIE VARCHAR(20))
AS
begin
FOR SELECT TERC_NIT, TERC_NOM, AUDI_FECHA, TERC_CTAPROV, TERC_CTACLIENTE FROM TERCEROS T, AUDITORIA A
    WHERE A.tido_cod = 104 AND A.audi_oper = 'I' AND A.audi_cod = T.terc_nit AND T.terc_nit >= :DESDE AND T.terc_nit <= :hasta
    AND A.audi_fecha >= :fecini AND A.audi_fecha <= :fecfin
    INTO :NIT, :NOMBRE, :FECHA, :CTAPROV, :CTACLIE
    DO
    BEGIN
    SELECT PROV_CTAPAGAR FROM proveedores WHERE TERC_NIT = :NIT INTO :ctaprov;
    suspend;
    END
end^


ALTER PROCEDURE REPORT_TICKET_IMPR (
    ID INTEGER)
RETURNS (
    PREF VARCHAR(4),
    NUMERO VARCHAR(8),
    NIT VARCHAR(20),
    PRIORIDAD CHAR(5),
    FECHA DATE,
    NOMBRE VARCHAR(60),
    SUCURSAL VARCHAR(10),
    CONTACTO VARCHAR(60),
    TELEFONO VARCHAR(40),
    EMAIL VARCHAR(100),
    SUCESO VARCHAR(15),
    AREA VARCHAR(60),
    TEMA VARCHAR(60),
    OBSERVACION VARCHAR(60),
    DESCRIPCION BLOB SUB_TYPE 1 SEGMENT SIZE 80,
    RESPUESTA VARCHAR(60),
    ASIGNAR VARCHAR(60),
    ESTADO CHAR(1),
    USUARIO VARCHAR(10),
    ANULADO CHAR(1),
    LOGO BLOB SUB_TYPE 0 SEGMENT SIZE 80)
AS
begin
  FOR SELECT PREF_PRE, TICKET_NUMERO, TERC_NIT, TICKET_PRIORIDAD, TICKET_FECHA, TICKET_NOMBRE,
             TICKET_SUCURSAL, TICKET_CONTACTO, TICKET_TELEFONO, TICKET_EMAIL, TICKET_SUCESO, TICKET_AREA, TICKET_TEMA,
             TICKET_OBSERVACION, TICKET_DESCRIPCION, TICKET_RESPUESTA, TICKET_ASIGNAR, TICKET_ESTADO, TICKET_USUARIO,
             TICKET_ANULADO
      FROM REPORT_TICKETS WHERE TICKET_ID = :ID
      INTO :PREF, :NUMERO, :NIT, :PRIORIDAD, :FECHA, :NOMBRE,
           :SUCURSAL, :CONTACTO, :TELEFONO, :EMAIL, :SUCESO, :AREA,
           :TEMA, :OBSERVACION, :DESCRIPCION, :RESPUESTA, :ASIGNAR, :ESTADO,
           :USUARIO, :ANULADO
      DO
      BEGIN
      SELECT LOGO_IMAGEN FROM REPORT_LOGO INTO :LOGO;
  suspend;
  END
end^



SET TERM ; ^


/******************************************************************************/
/***                              Descriptions                              ***/
/******************************************************************************/

DESCRIBE TABLE REPORT_DOCUMENTOS
'Permitira identificar los tipos de documentos que se crean en el report';

DESCRIBE TABLE REPORT_TITULOS
'Esta tabla permite guardar las titulos que se podran poner a cada documento que pida un concepto.';



/******************************************************************************/
/***                               Privileges                               ***/
/******************************************************************************/


/* Privileges of users */
GRANT SELECT ON PLAN_PRODUCCION TO FER;
GRANT SELECT ON PLAN_PRODUCCION TO FERNANDO;
GRANT SELECT ON PLAN_PRODUCCION TO OTRO;
GRANT ALL ON ACCESO_USUARIO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ACTIVACION TO PUBLIC;
GRANT ALL ON ACTIVOS_CENTROS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ACTIVOS_DOCUMENTOS TO PUBLIC;
GRANT ALL ON ACTIVOS_FIJOS TO PUBLIC;
GRANT ALL ON ACTIVOS_FIJOS_VALOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ACTIVOS_GRUPOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ACTIVOS_SUBGRUPO TO PUBLIC;
GRANT ALL ON ADMINISTRADORA TO PUBLIC;
GRANT ALL ON AFP_ESPECIAL TO PUBLIC;
GRANT ALL ON AJUSTES TO PUBLIC;
GRANT ALL ON AJUSTES_DETALLE TO PUBLIC;
GRANT ALL ON AJUSTES_INFLACION TO PUBLIC;
GRANT ALL ON AJUSTE_CIERRE TO PUBLIC;
GRANT SELECT ON AJUSTE_TOTAL TO PUBLIC;
GRANT ALL ON ANALISIS_ABCINVEN TO PUBLIC;
GRANT ALL ON ANTICIPOS_CLIENTE TO PUBLIC;
GRANT ALL ON ANTICIPOS_NOMINA TO PUBLIC;
GRANT ALL ON ANTICIPOS_PROVEEDOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON APERTURA_NIIF TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON APERTURA_NIIF_DET TO PUBLIC;
GRANT ALL ON APLICACION_CLIENTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON APLICACION_CLIENTE_CRUCE TO PUBLIC;
GRANT ALL ON APLICACION_CLIENTE_DETALLE TO PUBLIC;
GRANT ALL ON APLICACION_PROVEDOR TO PUBLIC;
GRANT ALL ON APLICACION_PROVEEDOR_DETALLE TO PUBLIC;
GRANT ALL ON AREA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARQUEO_CAJA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARQUEO_CAJA_DET TO PUBLIC;
GRANT ALL ON ARTICULO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARTICULOS_ACTIVOFIJO_PROD TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARTICULOS_PERFIL_PROD TO PUBLIC;
GRANT ALL ON ARTICULOS_PRODUCTO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARTICULOS_REPORTE TO PUBLIC;
GRANT ALL ON ARTICULO_ALERTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARTICULO_BODEGA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARTICULO_DOCUMENTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ARTICULO_EQUIVALENCIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ASEGURADORA TO PUBLIC;
GRANT SELECT ON ASESORES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON AUDITORIA TO PUBLIC;
GRANT ALL ON AUTORIZACIONES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON AUTORIZACIONES_CARTERA TO PUBLIC;
GRANT ALL ON BANCOS TO PUBLIC;
GRANT ALL ON BARRAS_ARTICULO TO PUBLIC;
GRANT ALL ON BODEGA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON BODEGA_GRUPOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON BONOS_PAGO TO PUBLIC;
GRANT ALL ON CAJAS TO PUBLIC;
GRANT ALL ON CAJEROS TO PUBLIC;
GRANT ALL ON CAMBIA_COSTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CAMBIA_PRECIOS TO PUBLIC;
GRANT ALL ON CAMBIODOC_ENTRADAS TO PUBLIC;
GRANT ALL ON CAMBIODOC_SALIDAS TO PUBLIC;
GRANT ALL ON CAMBIO_ARTICULOS TO PUBLIC;
GRANT ALL ON CAMBIO_COSTO TO PUBLIC;
GRANT ALL ON CAMBIO_DOCUMENTOS TO PUBLIC;
GRANT ALL ON CAMBIO_SITUACION TO PUBLIC;
GRANT ALL ON CAMBIO_SITUACION_NIIF TO PUBLIC;
GRANT ALL ON CANAL TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CARGA_PRODUCTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CARGA_REMESA TO PUBLIC;
GRANT ALL ON CENTROS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CERTIFICADOS_RECIBIDOS TO PUBLIC;
GRANT ALL ON CESANTIAS TO PUBLIC;
GRANT ALL ON CESANTIAS_RETIROS TO PUBLIC;
GRANT ALL ON CESANTIA_DETALLE TO PUBLIC;
GRANT ALL ON CHEQUERA TO PUBLIC;
GRANT ALL ON CHEQUES TO PUBLIC;
GRANT ALL ON CIERRE_ANUAL TO PUBLIC;
GRANT ALL ON CIERRE_TERCEROS TO PUBLIC;
GRANT ALL ON CIUDADES TO PUBLIC;
GRANT ALL ON CLASE_EGRESO TO PUBLIC;
GRANT ALL ON CLIENTES TO PUBLIC;
GRANT ALL ON CLIENTES_ALERTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CLIENTES_FACTURACION_MASIVA TO PUBLIC;
GRANT ALL ON CLIENTE_SUCURSALES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COBERTURA_SALUD TO PUBLIC;
GRANT ALL ON COBRADORES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COCINA_COLA_FUNCION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COCINA_FUNCIONES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COCINA_OPERARIOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COLORES TO PUBLIC;
GRANT ALL ON COMISIONES TO PUBLIC;
GRANT ALL ON COMISIONES_PUNTOS TO PUBLIC;
GRANT ALL ON COMISION_COBRO TO PUBLIC;
GRANT ALL ON COMPRAS_INTERNACIONALES TO PUBLIC;
GRANT ALL ON COMPRAS_INTERNACIONALES_DETALLE TO PUBLIC;
GRANT ALL ON COMPROBANTE_DETALLE TO PUBLIC;
GRANT ALL ON COMPROBANTE_DETALLE_NIIF TO PUBLIC;
GRANT ALL ON COMPROBANTE_ENCABEZADO TO PUBLIC;
GRANT ALL ON CONCEPTOS TO PUBLIC;
GRANT ALL ON CONCEPTOS_CUENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCEPTOS_CXPAGAR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCEPTOS_FRECUENTES TO PUBLIC;
GRANT ALL ON CONCEPTOS_NOMINA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCEPTOS_NOMINA_REPORTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCEPTOS_PLANILLA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCEPTOS_TRANSPORTE TO PUBLIC;
GRANT ALL ON CONCEPTO_CONTABLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCILIACION_BANCARIA TO PUBLIC;
GRANT ALL ON CONCILIACION_DETALLE TO PUBLIC;
GRANT ALL ON CONCILIACION_ENCABEZADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCILIACION_OPERACIONES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCILIACION_PAT TO PUBLIC;
GRANT ALL ON CONCILIACION_PAT_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONCILIA_BANCO_CONTA_AUX TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONDUCTOR TO PUBLIC;
GRANT SELECT, UPDATE ON CONFIGURACION TO PUBLIC;
GRANT ALL ON CONFIGURACION_HORAS_EMPLEADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONFIGURA_CERTRETE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONFIGURA_CERTRETEL TO PUBLIC;
GRANT ALL ON CONFIGURA_CERTRETEL_CONC TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONFIGURA_CERTRETE_NIIF TO PUBLIC;
GRANT ALL ON CONFIGURA_LINKFTP TO PUBLIC;
GRANT ALL ON CONFIGURA_MEDIOSMAG TO PUBLIC;
GRANT SELECT, UPDATE ON CONFIGURA_POS TO PUBLIC;
GRANT ALL ON CONFIRMACION_DEPOSITO TO PUBLIC;
GRANT ALL ON CONSIGNA TO PUBLIC;
GRANT ALL ON CONSIGNA_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONSIGNA_RECIBOS TO PUBLIC;
GRANT ALL ON CONSIGNA_TARJETAS TO PUBLIC;
GRANT ALL ON CONSIGNA_TARJETAS_DET TO PUBLIC;
GRANT SELECT ON CONSIGNA_TOTAL TO PUBLIC;
GRANT ALL ON CONSOLIDADO_FALTANTES TO PUBLIC;
GRANT ALL ON CONSOLIDADO_NOMINA TO PUBLIC;
GRANT ALL ON CONSOLIDADO_NOMINA_PROV TO PUBLIC;
GRANT ALL ON CONSOLIDE_DOCS TO PUBLIC;
GRANT ALL ON CONSOLIDE_FALTANTES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONSOLIDE_FORMASP TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONSOLIDE_NOMINAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONSULTA_BALANCE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONSULTA_WEB TO PUBLIC;
GRANT ALL ON CONSUMOS TO PUBLIC;
GRANT ALL ON CONSUMO_DETALLE TO PUBLIC;
GRANT ALL ON CONTABILIZACION TO PUBLIC;
GRANT ALL ON CONTABILIZACION_DET TO PUBLIC;
GRANT ALL ON CONTABIL_ARTICULO TO PUBLIC;
GRANT ALL ON CONTABIL_ARTICULO_NIIF TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CONTRATOS_COLEGIOS TO PUBLIC;
GRANT ALL ON COSTOS TO PUBLIC;
GRANT ALL ON COSTOS_NIIF TO PUBLIC;
GRANT ALL ON COSTO_VENTAS TO PUBLIC;
GRANT ALL ON COSTO_VENTAS_NIIF TO PUBLIC;
GRANT ALL ON COTIZACIONES TO PUBLIC;
GRANT ALL ON COTIZACIONES_DETALLE TO PUBLIC;
GRANT ALL ON COTIZACIONES_PROVEEDOR_DET TO PUBLIC;
GRANT ALL ON COTIZACION_PROVEEDOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COTIZACION_WEB TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON COTIZACION_WEB_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_AGRUPACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_ASESOR TO PUBLIC;
GRANT ALL ON CRM_CAMPANA TO PUBLIC;
GRANT ALL ON CRM_CAMPANA_DETALLE TO PUBLIC;
GRANT ALL ON CRM_CAMPANA_MOTIVOS TO PUBLIC;
GRANT ALL ON CRM_CAMPANA_PLANILLA TO PUBLIC;
GRANT ALL ON CRM_CAMPANA_RESPUESTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_CARGOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_CLASE TO PUBLIC;
GRANT ALL ON CRM_CLIENTES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_COMPROMISOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_CONTACTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_ESTADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_EVENTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_EVENTOS_NOTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_EVENTO_MOTIVO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_EVENTO_RESPUESTA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_PRODUCTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_SUBPRODUCTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_TIPOCONTACTO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_TIPOEVENTO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_TIPORELACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CRM_TIPO_ACTIVIDAD TO PUBLIC;
GRANT ALL ON CUENTAS TO PUBLIC;
GRANT ALL ON CUENTAS_BANCO TO PUBLIC;
GRANT SELECT ON CUENTAS_BANCOS TO PUBLIC;
GRANT ALL ON CUENTAS_EXPORTACION TO PUBLIC;
GRANT ALL ON CUENTAS_NIIF TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON CUENTAS_NIIF_NORMA TO PUBLIC;
GRANT ALL ON CUENTAS_REPORTE_CERTDET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DENOMINACIONES TO PUBLIC;
GRANT ALL ON DEPARTAMENTO TO PUBLIC;
GRANT ALL ON DEPOSITOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DEPRECIACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DEPRECIACION_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DEPRECIACION_UNIDADES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DESCUENTOS_PRECIOS TO PUBLIC;
GRANT ALL ON DESCUENTOS_PRECIOS_CLI TO PUBLIC;
GRANT ALL ON DESCUENTOS_PRECIOS_DET TO PUBLIC;
GRANT ALL ON DESENSAMBLES TO PUBLIC;
GRANT ALL ON DESENSAMBLES_DETALLE TO PUBLIC;
GRANT SELECT ON DESENSAMBLE_TOTAL TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DETERIORO_CARTERA_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DETERIORO_CARTERA_ENC TO PUBLIC;
GRANT ALL ON DEVOLUCIONES_COMPRAS TO PUBLIC;
GRANT ALL ON DEVOLUCIONES_COMPRAS_DET TO PUBLIC;
GRANT ALL ON DEVOLUCIONES_VENTAS TO PUBLIC;
GRANT ALL ON DEVOLUCIONES_VENTAS_DETALLE TO PUBLIC;
GRANT ALL ON DEVOLUCIONES_VENTAS_DOCRELA TO PUBLIC;
GRANT ALL ON DEVOLUCION_CHEQUES TO PUBLIC;
GRANT ALL ON DEVOLUCION_COMPRAS_DOCRELA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DIASINV_SUGERIDO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DIAS_FESTIVOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON DIAS_IVA TO PUBLIC;
GRANT ALL ON DOCUMENTOS_CONTA TO PUBLIC;
GRANT ALL ON DOCUMENTOS_IMPORT_EMPLEADO TO PUBLIC;
GRANT SELECT ON DOCUMENTOS_PAGO_CAJA TO PUBLIC;
GRANT ALL ON EDUCACION_FORMAL_EMPLEADO TO PUBLIC;
GRANT ALL ON EGRESOS TO PUBLIC;
GRANT ALL ON EGRESOS_BANCO TO PUBLIC;
GRANT ALL ON EGRESOS_CAJA TO PUBLIC;
GRANT ALL ON EGRESOS_CONTABILIDAD TO PUBLIC;
GRANT ALL ON EGRESOS_CRUCEC TO PUBLIC;
GRANT ALL ON EGRESOS_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON EMBARGOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON EMPAQUES TO PUBLIC;
GRANT ALL ON EMPLEADOS TO PUBLIC;
GRANT ALL ON EMPLEADO_BENEFICIARIOS TO PUBLIC;
GRANT ALL ON EMPLEADO_CONCEPTOS TO PUBLIC;
GRANT ALL ON EMPLEADO_FORMACION TO PUBLIC;
GRANT ALL ON EMPLEADO_LLAMADOS TO PUBLIC;
GRANT ALL ON ENSAMBLES TO PUBLIC;
GRANT ALL ON ENSAMBLES_DETALLE TO PUBLIC;
GRANT ALL ON ENSAMBLE_MAQUINA TO PUBLIC;
GRANT ALL ON ENSAMBLE_OPERARIO TO PUBLIC;
GRANT SELECT ON ENSAMBLE_TOTAL TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ENSAMBLE_TURNO TO PUBLIC;
GRANT ALL ON ENTRADAS TO PUBLIC;
GRANT ALL ON ENTRADAS_DETALLE TO PUBLIC;
GRANT SELECT ON ENTRADA_TOTAL TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ENTREGADORES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ENTREGA_DOCUMENTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ENVIO_RESUMDIA TO PUBLIC;
GRANT SELECT, INSERT ON ERRORES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ERRORES_ENVIO_CORREO TO PUBLIC;
GRANT ALL ON ESTADO_ARTICULO TO PUBLIC;
GRANT ALL ON ESTRUCTURA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON EVENTOS_VENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON EVENTO_EXISTENCIAS TO PUBLIC;
GRANT ALL ON EXISTENCIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON EXISTENCIAS_ARTICULO_WEB TO PUBLIC;
GRANT ALL ON EXISTENCIA_LOTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON EXISTENCIA_TERCERO TO PUBLIC;
GRANT ALL ON EXPERIENCIA_LABORAL_EMPLEADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FABRICANTES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTOR_COSTO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTOR_INVENTARIO TO PUBLIC;
GRANT ALL ON FACTURAS TO PUBLIC;
GRANT ALL ON FACTURAS_ALISTAMIENTO TO PUBLIC;
GRANT ALL ON FACTURAS_COMPRA TO PUBLIC;
GRANT ALL ON FACTURAS_COMPRAS_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURAS_CONTADO_PAGO TO PUBLIC;
GRANT ALL ON FACTURAS_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURAS_ENSAMBLE TO PUBLIC;
GRANT ALL ON FACTURAS_MES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_ALQUILER TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_CONCEPTO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_CONCEPTO_ITEMS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_EMBALAJE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_EMBALAJE_DET TO PUBLIC;
GRANT ALL ON FACTURA_PROFORMA TO PUBLIC;
GRANT ALL ON FACTURA_PROFORMA_DET TO PUBLIC;
GRANT ALL ON FACTURA_PROFORMA_GASTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_PROFV TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_PROFV_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_WEB TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FACTURA_WEB_DETALLE TO PUBLIC;
GRANT ALL ON FLUJO_EFECTIVO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FODO_SOL_PENSIONAL TO PUBLIC;
GRANT ALL ON FORMAS_PAGO TO PUBLIC;
GRANT ALL ON FORMATOCONTABLE_DETALLE TO PUBLIC;
GRANT ALL ON FORMATOCONTABLE_TEXTOS TO PUBLIC;
GRANT ALL ON FORMATOS TO PUBLIC;
GRANT ALL ON FORMATOS_CONTABLES TO PUBLIC;
GRANT ALL ON FORMATO_DATOS TO PUBLIC;
GRANT ALL ON FORMATO_LINEAS TO PUBLIC;
GRANT ALL ON FORMA_PAGOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON FORMA_PAGO_REMESA TO PUBLIC;
GRANT ALL ON FOTOS_ARTICULO TO PUBLIC;
GRANT ALL ON GASTOS_IMPORTACION TO PUBLIC;
GRANT ALL ON GRUPO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON GRUPOS_CIF TO PUBLIC;
GRANT ALL ON GRUPOS_PROVEEDORES TO PUBLIC;
GRANT ALL ON GRUPO_CARTERA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON GRUPO_VENDEDOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON HEMOLIFE_CLIENTES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON HEMOLIFE_DEVOLUCIONES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON HEMOLIFE_ENSAMBLES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON HEMOLIFE_EQUIVALENCIAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON HEMOLIFE_REMISIONES TO PUBLIC;
GRANT ALL ON HISTORICO_VENTAS TO PUBLIC;
GRANT ALL ON HORARIO_EMPLEADO TO PUBLIC;
GRANT ALL ON HORARIO_EMPLEADO_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON IMPORTACION TO PUBLIC;
GRANT ALL ON IMPORTACION_INVENTARIO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON IMPORTACION_LIQUIDACION TO PUBLIC;
GRANT ALL ON INCAPACIDADES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON INGRESOS_EMPLEADO TO PUBLIC;
GRANT ALL ON INTERFAZ_BANCOS TO PUBLIC;
GRANT ALL ON INTERFAZ_BANCOS_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_BANCOS_NIIF TO PUBLIC;
GRANT ALL ON INTERFAZ_CAJA TO PUBLIC;
GRANT ALL ON INTERFAZ_CAJA_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_CAJA_NIIF TO PUBLIC;
GRANT ALL ON INTERFAZ_CARTERA TO PUBLIC;
GRANT ALL ON INTERFAZ_CARTERA_CTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON INTERFAZ_CARTERA_NIIF TO PUBLIC;
GRANT ALL ON INTERFAZ_COMPRAS TO PUBLIC;
GRANT ALL ON INTERFAZ_COMPRAS_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_COMPRAS_NIIF TO PUBLIC;
GRANT ALL ON INTERFAZ_CXPAGAR TO PUBLIC;
GRANT ALL ON INTERFAZ_CXPAGAR_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_CXPAGAR_NIIF TO PUBLIC;
GRANT ALL ON INTERFAZ_INVENTARIO TO PUBLIC;
GRANT ALL ON INTERFAZ_INVENTARIO_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_INVENTARIO_NIIF TO PUBLIC;
GRANT ALL ON INTERFAZ_NOMINA TO PUBLIC;
GRANT ALL ON INTERFAZ_PRODUCCION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON INTERFAZ_PRODUCCION_NIIF TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON INTERFAZ_TRANSPORTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON INTERFAZ_TRANSPORTE_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_VENTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_VENTAS_CTAS TO PUBLIC;
GRANT ALL ON INTERFAZ_VENTAS_NIIF TO PUBLIC;
GRANT ALL ON LIQUIDACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LIQUIDACION_RUTA_COLEGIO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LIQUIDACION_RUTA_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LIQUIDACION_RUTA_EFE TO PUBLIC;
GRANT ALL ON LISTAPREC_VENDEDOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LISTAPRE_CONFIGURA TO PUBLIC;
GRANT ALL ON LISTAPRE_USUARIOS TO PUBLIC;
GRANT ALL ON LISTAS_VENDEDOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LISTA_ARTICULOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LISTA_ARTICULOS_DET TO PUBLIC;
GRANT ALL ON LISTA_PRECIOS TO PUBLIC;
GRANT ALL ON LLAMADOS_ATENCION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LOG_CLIENTES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LOG_EXISTENCIAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LOG_EXISTENCIAS_Q TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LOG_PRESENTACIONES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON LOG_PRESENTACIONES_Q TO PUBLIC;
GRANT ALL ON LOTES TO PUBLIC;
GRANT ALL ON LUGAR_INSPECCION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MANIFIESTOS_CARGA_CONC TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MANIFIESTO_CARGA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MANIFIESTO_CARGA_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MAQUINA_PRODUCCION TO PUBLIC;
GRANT ALL ON MARCAS TO PUBLIC;
GRANT ALL ON MEDIOSMAG_ARCHIVOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MEDIOSMAG_ARCHIVOS2014 TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MEDIOSMAG_CUENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MEDIOSMAG_DISTRITALES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MEDIOSMAG_DISTR_CUENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MEDIOSMAG_DISTR_DATOS TO PUBLIC;
GRANT ALL ON MEDIOS_MAGNETICOS_DATOS TO PUBLIC;
GRANT ALL ON MEDIOS_TRANSPORTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MENSAJERIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MODALIDAD_CONTRATO_SALUD TO PUBLIC;
GRANT ALL ON MODO_TRANSPORTE TO PUBLIC;
GRANT SELECT ON MODULOS TO PUBLIC;
GRANT SELECT ON MON$ATTACHMENTS TO PUBLIC;
GRANT SELECT ON MON$CALL_STACK TO PUBLIC;
GRANT SELECT ON MON$CONTEXT_VARIABLES TO PUBLIC;
GRANT SELECT ON MON$DATABASE TO PUBLIC;
GRANT SELECT ON MON$IO_STATS TO PUBLIC;
GRANT SELECT ON MON$MEMORY_USAGE TO PUBLIC;
GRANT SELECT ON MON$RECORD_STATS TO PUBLIC;
GRANT SELECT ON MON$STATEMENTS TO PUBLIC;
GRANT SELECT ON MON$TABLE_STATS TO PUBLIC;
GRANT SELECT ON MON$TRANSACTIONS TO PUBLIC;
GRANT ALL ON MOTIVO_DEVOLUCION TO PUBLIC;
GRANT ALL ON MOTIVO_NO_ENTREGA TO PUBLIC;
GRANT ALL ON MOVIMIENTO_ARTICULO TO PUBLIC;
GRANT ALL ON MOVIMIENTO_BANCO TO PUBLIC;
GRANT ALL ON MOVIMIENTO_CAJA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_CARGO_EMPLEADO TO PUBLIC;
GRANT ALL ON MOVIMIENTO_CLIENTES TO PUBLIC;
GRANT ALL ON MOVIMIENTO_PROVEEDOR TO PUBLIC;
GRANT ALL ON MOVIMIENTO_SALARIO_EMPLEADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_VINCUL_EMPLEADO TO PUBLIC;
GRANT ALL ON NIVEL_FORMACION TO PUBLIC;
GRANT SELECT ON NOMBRES_CAMPOS TO PUBLIC;
GRANT ALL ON NOMBRES_COPIAS TO PUBLIC;
GRANT ALL ON NOMINA TO PUBLIC;
GRANT ALL ON NOMINA_CARTERA TO PUBLIC;
GRANT ALL ON NOMINA_CARTERA_DETALLE TO PUBLIC;
GRANT ALL ON NOMINA_COMISIONES TO PUBLIC;
GRANT ALL ON NOMINA_COMISIONES_PROV TO PUBLIC;
GRANT ALL ON NOMINA_CONCEPTOS TO PUBLIC;
GRANT ALL ON NOMINA_CONCEPTOS_PROV TO PUBLIC;
GRANT ALL ON NOMINA_DEPARTAMENTO TO PUBLIC;
GRANT ALL ON NOMINA_DETALLE TO PUBLIC;
GRANT ALL ON NOMINA_DETALLE_PROV TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOMINA_ELECTRONICA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOMINA_EMBARGOS TO PUBLIC;
GRANT ALL ON NOMINA_HORASEXT TO PUBLIC;
GRANT ALL ON NOMINA_NOVEDADES TO PUBLIC;
GRANT ALL ON NOMINA_NOVEDADES_DETALLE TO PUBLIC;
GRANT ALL ON NOMINA_PROV TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOMINA_SALDINI TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOMINA_UGPP_MESES TO PUBLIC;
GRANT ALL ON NOMINA_VALOR_PREDET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NORMAS_NIIF TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NORMAS_NIIF_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOTAS_CARTERA_APP TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOTAS_CARTERA_TIPOS TO PUBLIC;
GRANT ALL ON NOTAS_CLIENTES TO PUBLIC;
GRANT ALL ON NOTAS_CREDITO TO PUBLIC;
GRANT ALL ON NOTAS_CREDITO_CLIENTES TO PUBLIC;
GRANT ALL ON NOTAS_CREDITO_PROVEEDOR TO PUBLIC;
GRANT ALL ON NOTAS_DEBITO TO PUBLIC;
GRANT ALL ON NOTAS_DEBITO_CLIENTES TO PUBLIC;
GRANT ALL ON NOTAS_DEBITO_PROVEEDOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOTAS_DOCUMENTO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOTAS_ESTADOS_FINANCIEROS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOTA_CREDITO_PROV_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON NOTA_DEBITO_PROV_DET TO PUBLIC;
GRANT ALL ON NUMERO_COPIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON OBSERVACIONES_FEL TO PUBLIC;
GRANT ALL ON OPCIONES TO PUBLIC;
GRANT ALL ON OPCIONES_INTERFAZ TO PUBLIC;
GRANT ALL ON ORDENES_COMPRA TO PUBLIC;
GRANT ALL ON ORDENES_COMPRA_DETALLE TO PUBLIC;
GRANT ALL ON ORDENES_COMPRA_DOCRELA TO PUBLIC;
GRANT ALL ON ORDENES_INVENTARIO TO PUBLIC;
GRANT ALL ON ORDENINVENTARIO_DETALLE TO PUBLIC;
GRANT SELECT ON ORDENINV_TOTAL TO PUBLIC;
GRANT ALL ON ORDEN_EMBARQUE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON ORDEN_SERVICIO TO PUBLIC;
GRANT ALL ON PAGO_APORTES TO PUBLIC;
GRANT ALL ON PAGO_APORTES_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PAGO_APORTES_EMPLEADOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PAGO_APORTES_NOM TO PUBLIC;
GRANT ALL ON PAGO_NOMINA TO PUBLIC;
GRANT ALL ON PAGO_NOMINA_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PAGO_NOMINA_EGRESOS TO PUBLIC;
GRANT ALL ON PAISES TO PUBLIC;
GRANT ALL ON PARAMETROS_ANO TO PUBLIC;
GRANT ALL ON PARAMETROS_CONTABLES TO PUBLIC;
GRANT ALL ON PARENTESCO TO PUBLIC;
GRANT ALL ON PARQUEADERO TO PUBLIC;
GRANT ALL ON PEDIDOS TO PUBLIC;
GRANT ALL ON PEDIDOS_DETALLE TO PUBLIC;
GRANT ALL ON PEDIDOS_DOCRELA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PEDIDO_WEB TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PEDIDO_WEB_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PENDIENTE_VENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PENDIENTE_VENTAS_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PERFIL_EMPLEADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PERFIL_EMPLEADO_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PERFIL_PRODUCCION TO PUBLIC;
GRANT ALL ON PERIODO_PAGO TO PUBLIC;
GRANT ALL ON PERIODO_PAGO_NOMBRE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLANILLA_DIGITACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLANILLA_DIGITACION_CUENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLANILLA_PASAJEROS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLANILLA_PASAJEROS_CON TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLANILLA_PASAJEROS_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLANILLA_PASAJEROS_REM TO PUBLIC;
GRANT ALL ON PLANTILLA_DETALLE TO PUBLIC;
GRANT ALL ON PLANTILLA_DETALLE_NIIF TO PUBLIC;
GRANT ALL ON PLANTILLA_ENCABEZADO TO PUBLIC;
GRANT ALL ON PLAN_PRODUCCION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLAN_PRODUCCION_CONS_PROD TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLAN_PRODUCCION_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PLAN_PRODUCCION_PRODUCTOS TO PUBLIC;
GRANT ALL ON PRECIOS_ARTICULO TO PUBLIC;
GRANT ALL ON PREFIJOS TO PUBLIC;
GRANT ALL ON PREFIJOS_BANCOS TO PUBLIC;
GRANT ALL ON PREFIJOS_CONTA TO PUBLIC;
GRANT ALL ON PREFIJOS_EXPORTACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PREFIJO_PRODUCCION_ORDENAR TO PUBLIC;
GRANT ALL ON PRESTAMO_CUOTAS TO PUBLIC;
GRANT ALL ON PRESTAMO_NOMINA TO PUBLIC;
GRANT ALL ON PRESUPUESTO TO PUBLIC;
GRANT ALL ON PRESUPUESTO_VENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRESUPUESTO_VENTAS_GRUPO TO PUBLIC;
GRANT ALL ON PRESUPUESTO_VENTAS_MESES TO PUBLIC;
GRANT ALL ON PROCEDIMIENTOS_USUARIO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_CALIDAD_ITEMS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_DEVOLUCION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_DEVOLUCION_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ENTRADA_CALIDAD TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ENTRADA_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ENTRADA_ENC TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_MONTAJE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ORDEN TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ORDEN_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ORDEN_MAQUINA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_ORDEN_OPERARIOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_SALIDA_CALIDAD TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_SALIDA_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCCION_SALIDA_ENC TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PRODUCTO_MONTAJE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PROGRAMACION_PAGOS TO PUBLIC;
GRANT SELECT ON PROGRAMAS TO PUBLIC;
GRANT ALL ON PROGRAM_VACACIONES TO PUBLIC;
GRANT ALL ON PROMEDIO_SALIDAS TO PUBLIC;
GRANT ALL ON PROVEEDORES TO PUBLIC;
GRANT ALL ON PROVEEDOR_ARTICULO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PROVISION_CARTERA TO PUBLIC;
GRANT ALL ON PROYECTOS TO PUBLIC;
GRANT ALL ON PUC TO PUBLIC;
GRANT ALL ON PUESTOS TO PUBLIC;
GRANT ALL ON PUNTOS_ARTICULOS TO PUBLIC;
GRANT ALL ON PUNTOS_CLIENTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON PUNTOS_CLIENTE_ACUMULADO TO PUBLIC;
GRANT ALL ON PUNTOS_DIASESPECIAL TO PUBLIC;
GRANT ALL ON PUNTOS_PREMIOS TO PUBLIC;
GRANT ALL ON PUNTOS_REDENCION TO PUBLIC;
GRANT ALL ON PUNTOS_VENDEDOR TO PUBLIC;
GRANT ALL ON PUNTOS_VEND_REDENCION TO PUBLIC;
GRANT ALL ON PUNTO_EQUILIBRIO TO PUBLIC;
GRANT ALL ON PUNTO_VENTA TO PUBLIC;
GRANT SELECT ON RDB$AUTH_MAPPING TO PUBLIC;
GRANT SELECT ON RDB$BACKUP_HISTORY TO PUBLIC;
GRANT SELECT ON RDB$CHARACTER_SETS TO PUBLIC;
GRANT SELECT ON RDB$CHECK_CONSTRAINTS TO PUBLIC;
GRANT SELECT ON RDB$COLLATIONS TO PUBLIC;
GRANT SELECT ON RDB$DATABASE TO PUBLIC;
GRANT SELECT ON RDB$DB_CREATORS TO PUBLIC;
GRANT SELECT ON RDB$DEPENDENCIES TO PUBLIC;
GRANT SELECT ON RDB$EXCEPTIONS TO PUBLIC;
GRANT SELECT ON RDB$FIELDS TO PUBLIC;
GRANT SELECT ON RDB$FIELD_DIMENSIONS TO PUBLIC;
GRANT SELECT ON RDB$FILES TO PUBLIC;
GRANT SELECT ON RDB$FILTERS TO PUBLIC;
GRANT SELECT ON RDB$FORMATS TO PUBLIC;
GRANT SELECT ON RDB$FUNCTIONS TO PUBLIC;
GRANT SELECT ON RDB$FUNCTION_ARGUMENTS TO PUBLIC;
GRANT SELECT ON RDB$GENERATORS TO PUBLIC;
GRANT SELECT ON RDB$INDEX_SEGMENTS TO PUBLIC;
GRANT SELECT ON RDB$INDICES TO PUBLIC;
GRANT SELECT ON RDB$LOG_FILES TO PUBLIC;
GRANT SELECT ON RDB$PACKAGES TO PUBLIC;
GRANT SELECT ON RDB$PAGES TO PUBLIC;
GRANT SELECT ON RDB$PROCEDURES TO PUBLIC;
GRANT SELECT ON RDB$PROCEDURE_PARAMETERS TO PUBLIC;
GRANT SELECT ON RDB$REF_CONSTRAINTS TO PUBLIC;
GRANT SELECT ON RDB$RELATIONS TO PUBLIC;
GRANT SELECT ON RDB$RELATION_CONSTRAINTS TO PUBLIC;
GRANT SELECT ON RDB$RELATION_FIELDS TO PUBLIC;
GRANT SELECT ON RDB$ROLES TO PUBLIC;
GRANT SELECT ON RDB$SECURITY_CLASSES TO PUBLIC;
GRANT SELECT ON RDB$TRANSACTIONS TO PUBLIC;
GRANT SELECT ON RDB$TRIGGERS TO PUBLIC;
GRANT SELECT ON RDB$TRIGGER_MESSAGES TO PUBLIC;
GRANT SELECT ON RDB$TYPES TO PUBLIC;
GRANT SELECT ON RDB$USER_PRIVILEGES TO PUBLIC;
GRANT SELECT ON RDB$VIEW_RELATIONS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON RDE_EXEDENTE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON RECAUDO TO PUBLIC;
GRANT ALL ON RECIBOS_CAJA TO PUBLIC;
GRANT ALL ON RECIBOS_CAJA_CRUCEC TO PUBLIC;
GRANT ALL ON RECIBOS_CAJA_DETALLE TO PUBLIC;
GRANT ALL ON RECIBOS_CAJA_PAGO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON RECIBOS_PRESTAMOS TO PUBLIC;
GRANT ALL ON RECIBO_PROVISIONAL TO PUBLIC;
GRANT ALL ON RECIBO_PROVISIONAL_DETALLE TO PUBLIC;
GRANT ALL ON RECIBO_PROVISIONAL_PAGO TO PUBLIC;
GRANT ALL ON REGISTRO_AUTOMATICO TO PUBLIC;
GRANT ALL ON REGISTRO_CONCEPTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON RELEVOS_COLEGIOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REMESAS_DESTINATARIO TO PUBLIC;
GRANT ALL ON REMISIONES_VENTA TO PUBLIC;
GRANT ALL ON REMISIONES_VENTA_DETALLE TO PUBLIC;
GRANT ALL ON REMISIONES_VENTA_DOCRELA TO PUBLIC;
GRANT ALL ON REMISION_PROVEEDOR TO PUBLIC;
GRANT ALL ON REMISION_PROVEEDOR_DET TO PUBLIC;
GRANT ALL ON REMISION_PROVEEDOR_DOCRELA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPLICACION_CONFIGURA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPLICA_ARTICULO_ESTADO TO PUBLIC;
GRANT ALL ON REPLICA_COMPANIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPLICA_COMPRAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPLICA_CONTA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPLICA_CONTA_DETALLE TO PUBLIC;
GRANT ALL ON REPLICA_EVENTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPLICA_VENTAS TO PUBLIC;
GRANT ALL ON REPORTES_AUX TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REPORTES_MENSAJE TO PUBLIC;
GRANT ALL ON REPORTE_ERRORES TO PUBLIC;
GRANT ALL ON REPORT_ACTUALIZACION TO PUBLIC;
GRANT ALL ON REPORT_AREA TO PUBLIC;
GRANT ALL ON REPORT_BANDEJA TO PUBLIC;
GRANT ALL ON REPORT_CAMBIOS TO PUBLIC;
GRANT ALL ON REPORT_CAMBIOS_DETALLE TO PUBLIC;
GRANT ALL ON REPORT_CHAT TO PUBLIC;
GRANT ALL ON REPORT_CONFIGURACION TO PUBLIC;
GRANT ALL ON REPORT_DOCUMENTOS TO PUBLIC;
GRANT ALL ON REPORT_ENVIOS_DOMICILIO TO PUBLIC;
GRANT ALL ON REPORT_ENVIOS_FALTANTES TO PUBLIC;
GRANT ALL ON REPORT_FALTANTES_TEMP TO PUBLIC;
GRANT ALL ON REPORT_FIRMA TO PUBLIC;
GRANT ALL ON REPORT_LOGO TO PUBLIC;
GRANT ALL ON REPORT_NOTAS TO PUBLIC;
GRANT ALL ON REPORT_OBSERVACIONES TO PUBLIC;
GRANT ALL ON REPORT_PERMISOS TO PUBLIC;
GRANT ALL ON REPORT_PREFIJOS TO PUBLIC;
GRANT ALL ON REPORT_TEMAS TO PUBLIC;
GRANT ALL ON REPORT_TICKETS TO PUBLIC;
GRANT ALL ON REPORT_TITULOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REP_UTILIDAD TO PUBLIC;
GRANT ALL ON RESERVAS TO PUBLIC;
GRANT ALL ON RESERVAS_DETALLE TO PUBLIC;
GRANT SELECT ON RESERVA_TOTAL TO PUBLIC;
GRANT ALL ON RESPUESTA_TIPOCUENTA TO PUBLIC;
GRANT ALL ON RETENCIONES TO PUBLIC;
GRANT ALL ON RETENCION_MINIMA TO PUBLIC;
GRANT ALL ON RETIROS TO PUBLIC;
GRANT ALL ON REVISION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REVISION_PRECIOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON REVPRECIOS_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON RUTAS_COLEGIOS TO PUBLIC;
GRANT ALL ON RUTAS_ENTREGA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON RUTA_PASAJEROS TO PUBLIC;
GRANT ALL ON RUTERO TO PUBLIC;
GRANT ALL ON RUTERO_DETALLE TO PUBLIC;
GRANT ALL ON RUTERO_FAC TO PUBLIC;
GRANT ALL ON SALDOS_ACTIVO TO PUBLIC;
GRANT ALL ON SALDOS_ACTIVO_NIIF TO PUBLIC;
GRANT ALL ON SALDOS_ARTICULO TO PUBLIC;
GRANT ALL ON SALDOS_ARTICULO_NIIF TO PUBLIC;
GRANT ALL ON SALDOS_CENTROS TO PUBLIC;
GRANT ALL ON SALDOS_CENTROS_NIIF TO PUBLIC;
GRANT ALL ON SALDOS_CENTROS_TERCERO TO PUBLIC;
GRANT ALL ON SALDOS_CENTROS_TERCERO_NIIF TO PUBLIC;
GRANT ALL ON SALDOS_CUENTAS TO PUBLIC;
GRANT ALL ON SALDOS_CUENTAS_NIIF TO PUBLIC;
GRANT SELECT ON SALDOS_DOCCONTA TO PUBLIC;
GRANT ALL ON SALDOS_DOC_CARTERA TO PUBLIC;
GRANT SELECT ON SALDOS_DOC_CXPAGAR TO PUBLIC;
GRANT ALL ON SALDOS_INICIALES TO PUBLIC;
GRANT ALL ON SALDOS_INICIALES_NIIF TO PUBLIC;
GRANT SELECT ON SALDOS_INVENTARIO TO PUBLIC;
GRANT ALL ON SALDOS_TERCEROS TO PUBLIC;
GRANT ALL ON SALDOS_TERCEROS_NIIF TO PUBLIC;
GRANT ALL ON SALDO_BANCOS TO PUBLIC;
GRANT ALL ON SALDO_BANCOS_CONF TO PUBLIC;
GRANT SELECT ON SALDO_CAJA TO PUBLIC;
GRANT SELECT ON SALDO_EFECTIVO TO PUBLIC;
GRANT ALL ON SALIDAS TO PUBLIC;
GRANT ALL ON SALIDAS_DETALLE TO PUBLIC;
GRANT SELECT ON SALIDA_TOTAL TO PUBLIC;
GRANT SELECT ON SEC$DB_CREATORS TO PUBLIC;
GRANT SELECT ON SEC$GLOBAL_AUTH_MAPPING TO PUBLIC;
GRANT SELECT ON SEC$USERS TO PUBLIC;
GRANT SELECT ON SEC$USER_ATTRIBUTES TO PUBLIC;
GRANT ALL ON SECCION TO PUBLIC;
GRANT ALL ON SEGMENTOS TO PUBLIC;
GRANT ALL ON SERIALES_ARTICULO TO PUBLIC;
GRANT ALL ON SERIALES_DOCUMENTO TO PUBLIC;
GRANT ALL ON SOLICITUD_IMPORTACION TO PUBLIC;
GRANT ALL ON SOLICITUD_IMPORTACION_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON SORTEOS_CONFIGURACION TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON SORTEO_FACTURA TO PUBLIC;
GRANT ALL ON STANDS TO PUBLIC;
GRANT ALL ON SUBGRUPO TO PUBLIC;
GRANT ALL ON SUBTIPO_COTIZANTE TO PUBLIC;
GRANT ALL ON SUCURSALES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON SUPERVISOR TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TARIFAS_ARL TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TARIFAS_RETENCION TO PUBLIC;
GRANT ALL ON TARIFA_IVA TO PUBLIC;
GRANT ALL ON TARJETAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TASA_CAMBIO_MONEDA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TAXONOMIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TAXONOMIA_CUENTAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TAXONOMIA_DETALLE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TAXONOMIA_ENCABEZA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TAXONOMIA_ENCABEZADO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TAXONOMIA_INSTANCIA TO PUBLIC;
GRANT ALL ON TERCEROS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TERCEROS_CONTACTOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TERCERO_DOCUMENTOS TO PUBLIC;
GRANT ALL ON TERMINALES_NOMBRES TO PUBLIC;
GRANT ALL ON TERMINOS_COMERCIO_INT TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TERMINOS_ENTREGA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TERMINOS_PAGO TO PUBLIC;
GRANT ALL ON TIPOS_EMBARQUE TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TIPOS_MONEDA TO PUBLIC;
GRANT ALL ON TIPOS_NOVEDAD TO PUBLIC;
GRANT ALL ON TIPO_CARGA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TIPO_CERTIFICADO TO PUBLIC;
GRANT ALL ON TIPO_COMPROBANTE TO PUBLIC;
GRANT ALL ON TIPO_COTIZANTE TO PUBLIC;
GRANT ALL ON TIPO_CUENTAS TO PUBLIC;
GRANT SELECT ON TIPO_DOCUMENTO TO PUBLIC;
GRANT ALL ON TIPO_EMBALAJE TO PUBLIC;
GRANT ALL ON TIPO_GASTOS_IMPORTACION TO PUBLIC;
GRANT SELECT ON TIPO_ID TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TIPO_NOTADOC TO PUBLIC;
GRANT ALL ON TIPO_NOTA_CLIENTE TO PUBLIC;
GRANT SELECT ON TIPO_PUC TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TIPO_USUARIO_SALUD TO PUBLIC;
GRANT ALL ON TIPO_VEHICULO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TIPO_VINCULO_UGPP TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON TIQUETE_PASAJERO TO PUBLIC;
GRANT ALL ON TRANSPORTADORES_INTERNAC TO PUBLIC;
GRANT ALL ON TRASFERENCIAS TO PUBLIC;
GRANT ALL ON TRASFERENCIAS_DETALLE TO PUBLIC;
GRANT ALL ON TRASLADOS TO PUBLIC;
GRANT ALL ON TRASLADOS_CAJA TO PUBLIC;
GRANT ALL ON TRASLADOS_CAJA_DET TO PUBLIC;
GRANT SELECT ON TRASLADO_TOTAL TO PUBLIC;
GRANT ALL ON TRASPORTADORES TO PUBLIC;
GRANT ALL ON UNIDADES_CARGA TO PUBLIC;
GRANT ALL ON UNIDAD_ARTICULO TO PUBLIC;
GRANT ALL ON USUARIO TO PUBLIC;
GRANT ALL ON VACACIONES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VACACIONES_COLECTIVAS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VACACIONES_COLECTIVAS_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VACACIONES_DETALLE TO PUBLIC;
GRANT ALL ON VACACIONES_DISFRUT TO PUBLIC;
GRANT ALL ON VACACIONES_DISFRUT_DET TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VALORES_NOMINA TO PUBLIC;
GRANT ALL ON VEHICULOS TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VEHICULOS_HISTORIA TO PUBLIC;
GRANT ALL ON VEHICULO_CARROCERIA TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VEHICULO_COLOR TO PUBLIC;
GRANT ALL ON VEHICULO_LINEA TO PUBLIC;
GRANT ALL ON VEHICULO_MARCA TO PUBLIC;
GRANT ALL ON VENDEDORES TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VENDEDORES_GRUPO TO PUBLIC;
GRANT SELECT, INSERT, UPDATE, DELETE ON VENDEDOR_META TO PUBLIC;
GRANT ALL ON VENTAS_MES TO PUBLIC;
GRANT ALL ON ZONAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ABONOS_DOCUMENTO_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ABONOS_DOCUMENTO_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACCESO_USUARIO_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTIVAR_ACTUALIZACION_BALNIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTIVO_VALOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTIVO_VALOR_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_COSTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_COSTOS_COMPRA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_COSTO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ACTIVO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ARTICULO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENT_TERC_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CUENTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_TERCERO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACTUALIZA_PUNTOS_ACUMULADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ACUMULA_PUNTOS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AGREGA_ENTIDAD_CONCEPTOEMPL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AGREGA_FACTURA_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AHORRO_TOTAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AJUSTES_APERTURA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AJUSTES_SIN_CONTABILDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AKTIVIA_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AKTIVIA_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AKTIVIA_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AKTIVIA_PRODUCTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AKTIVIA_VENDEDORES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ALERTAS_CONTRATO_EMPL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_COMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANALISIS_VENTAS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ANTICIPOS_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ARCHIVO_BANCO_CXP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ARREGLA_MOV_CAJA_RC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ARTICULOS_API TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ARTICULOS_MILISTAPP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ARTICULOS_OK TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ASIGNAR_TRANSPORTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ASIGNA_RUTERO_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ASIGNE_BOLETAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ASIGNE_FACTURA_ENTREGA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CENTRO_INI_FIN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CENTRO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CUENTA_INI_FIN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_CUENTA_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_DESDE_HASTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_TERCERO_INI_FIN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE AUXILIAR_TERCERO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_ANUAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_ANUAL_CENTROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_ANUAL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CENTRO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CENTRO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CENTRO_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CENTRO_TERCERO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_COMPARATIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_COMPARATIVO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CON_CENTROS_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CON_CENTROS_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CON_TERCEROS_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_CON_TERCEROS_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_FINAL_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_INICIAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_INICIAL_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_INICIAL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_PRUEBA_ACUMULADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_PRUEBA_ACUMULADO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_TERCERO_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BALANCE_TERCERO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BASE_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BASE_CUENTA_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BODEGAS_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BODEGA_FACTURACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BODEGA_FACTURACION_ALTERNA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BONOS_DISPONIBLES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BORRAR_FACTURAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BORRAR_FACTURA_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BORRE_APERTURA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BORRE_CONTABIL_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCAR_ARTICULOS_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCAR_CHEQUES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCAR_CLIENTES_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCAR_COMPROMISOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCAR_DEVOLCHEQ TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCA_DOCS_ALISTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCA_ID_DOC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCA_ID_DOC_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCA_ID_DOC_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSCA_ID_DOC_CXPAGAR_P TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_ANTICIPOS_CLI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_ANTICIPOS_PRV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_CAMPANAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_COMPROMISOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_COMPROMISOS_CLI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_DOCS_PRODUCCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_EGRESOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_EVENTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_EVENTOS_CLI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_FACTURAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_IMPORTACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_NOTASDOC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_NOTAS_EVENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_PEDIDOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_PENDIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_PRODUCCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_PROSPECTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_REMESAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE BUSQUEDA_REMISIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CADENA_FACTELECTRONICA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CADENA_FACTELECTRONICA21 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CADENA_FACTELECTRONICA22 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CADENA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CADENA_NUMERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_CESANTIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_CONCEPTO_MM2276 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_CONCEPTO_MM2276N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_INDEMNIZACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_PRIMA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULA_VACACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULE_CESANTIA_LIQ TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CALCULE_DV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIA_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIA_CTAS_ARTI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIA_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_FECHA_COMPROBANTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_IDNOTADOC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_IDREEMFAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_AJUSTEINV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_AJUSTESINF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ANTICLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ANTIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_APLICLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_APLIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ARQUEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_AUTOCART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CAMBART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CAMBCOSTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CAMBDOCU TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CAMPANA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CHEQUE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CIERANUAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CIERTERC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COMPROBA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONCILIAB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONSIGNA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONSIGNATAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONSNOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONSOLFP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CONSUMO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COTICOMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COTIZACI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_CUENTA_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DEPRECIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DESENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DETCART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DEVOLCLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DEVOLPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DEV_CHEQUES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_DISFVACAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_EGRESO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ENTRADA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ENVIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_FACTPER TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_GASTOIMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_HORARIOEMPL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_IMPORTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERBANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERCAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERCARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERCMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERCOMPRA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERCXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTERVTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_INTINVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_LIQRUTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_LIQUIDACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOMINACOMISIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOMINA_PROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTACRCLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTACRPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTADBCLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTADBPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTA_CR_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTA_DB_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOVEDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ORDEMBARQUE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ORDENCOMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ORDENMCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ORDENPROD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_ORDENSER TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PAGO_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PEDWEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PENDIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PLANTILLA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PRESTAMOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PRODDEV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PRODENT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_PRODSAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_RECICAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_RECIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_REMICLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_REMIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_RESERVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_RETIRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_REVPRECIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_SALIDA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_SOLIMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_TRANSFER TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_TRASLACAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_TRASLADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_VACACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_VACACOL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIOS_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIOS_PATRIMONIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIOS_SITUACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAMBIO_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CANCELE_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CANTIDAD_POR_FACTOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CARTERA_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CARTERA_CLIENTES_OFFLINE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CARTERA_CLIENTE_REM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CARTERA_PUNTO_DIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CARTERA_TOTAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAUSA_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAUSA_NOMINA1 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAUSA_NOMINA2 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAUSA_NOMINA_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAUSA_NOMINA_VACACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CAUSA_RETENCION_LABORAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CEROS_AJUSTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CEROS_ANCHO_FIJO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CERTIFICADOS_RETENCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CERTIFICADOS_RETENCION_LABORAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CERTIFICADOS_RETENCION_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CERTIFICA_LABORAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEA_VENCIMIENTOS_CARGOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_COSTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_COSTOS_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_INVENTARIO_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_SALDOS_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_SALDOS_CAJAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_SALDOS_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_SALDOS_CONTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_SALDOS_DOC_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUEO_SALDOS_DOC_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CHEQUES_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CIERRE_ABONOS_EFECTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CIERRE_FACTURACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CIERRE_FORMAPAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CIUDAD_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLASIFICA_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLIENTES_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLIENTES_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLIENTES_DESCUENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLIENTES_OK TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLIENTES_SIN_REGISTRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLIENTES_SUCURSAL_MED TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CLISUCURSALES_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COBRADOR_NOTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CODIGOS_BARRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CODIGO_BARRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMISIONES_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMISIONES_CALLCENTER TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMISIONES_COBRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMISIONES_DOCUMENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPARA_CENTROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPARA_CENTROS_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPARA_ITEM_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPARA_MOVIMIENTO_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS8 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPONE_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPONE_FECHA_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_ARTICULO_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_GRUPO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_PROVEEDOR_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPRAS_PROVEEDOR_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPROBANTES_ACTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPROBANTES_DIARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPROBANTES_NEGATIVOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COMPROBANTES_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIACION_PATRIMONIAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_BANCO_ACT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_BANCO_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_CARTERA_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_COMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_COSTOVENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_DEVCOMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_DEVVENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_INVENTARIO_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_PAT_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONCILIA_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONFIRMACION_ENTREGA_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONFIRMA_RUTERO_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSECUTIVOS_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSIGNA_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSOLIDADO_PROVISIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSOLIDA_CONC_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSOLIDA_CONC_NOMINA_PROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSOLIDE_AJUSTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSOLIDE_PENDIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_ARTICULOS_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_ARTICULOS_MOVILC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_ARTICULOS_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_ARTICULOS_VTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_ARTICULOS_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_BALANCE_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_BALANCE_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_CLIENTES_RR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_EXISTENCIAS_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_PREFIJO_RR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_PRESUPUESTO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_PUNTOS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_PUNTOS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSULTA_USUARIO_CORREO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSUMO_HISTORICO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONSUMO_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONS_SALDOSINI_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILICE_COMP_SIMPLIFICADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILICE_COSTO_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILICE_EQUIVALENCIA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILIZA_FACTURA_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILIZA_PENDIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILIZA_PENDIENTE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABILIZA_RECIBO_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_AJUSTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_AJUSTE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_APLICACL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_APLICACL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_APLICAPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_APLICAPR_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CAMBCOSTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CAMBCOSTO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CHEQUE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CONSIGNA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CONSIGNATAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CONSIGNATAR_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_CONSIGNA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DESENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DESENSAMBLE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DETERIORO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCHEQ TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCHEQ_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCLI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCLI_CTAART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCLI_CTAART_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCLI_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCLI_TIVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCLI_TIVA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCOMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DEVOLCOMP_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_EGRESO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_EGRESO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_ENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_ENSAMBLE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_ENTRADA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_ENTRADA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_EQUIVALENCIA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTCOMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTCOMP_INTN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTCOMP_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTPROFV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURAS_CONTADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURAS_CONTADO_CTART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURAS_CONTADO_NIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURAS_CONTADO_TIVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA_CTAART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA_CTAART_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA_FACTOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA_TIVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_FACTURA_TIVA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTACRBC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTACRBC_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTACRCL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTACRCL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTACRPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTACRPR_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTADBBC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTADBBC_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTADBCL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTADBCL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTADBPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_NOTADBPR_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PAGONOMI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PLANILLA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODDEV_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODENT_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODSAL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODUCCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODUCCION_DEV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODUCCION_ENT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODUCCION_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_PRODUCCION_SAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RECICAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RECICAJA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RECIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RECIPROV_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_REMICLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_REMICLIE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_REMIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_REMIPROV_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RETIRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_RUTERO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_SALIDA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_SALIDA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_TRASCUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_TRASCUENTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_TRASLACAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_TRASLACAJA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_TRASLAMERCANCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_TRASMERC_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTACTOS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTADOS_SIN_RECIBO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTADO_MVERDE2 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTADO_MVERDE_NIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COPIA_CUENTAS_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COPIA_INTERFAZ_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COPIA_LISTA_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CORREOS_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTOS_PRODUCCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTOS_PRODUCCION_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_EN_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_EN_VENTAS_CONTADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_EN_VENTAS_CONTADO_NIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_EN_VENTAS_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_NIIF_PROM_Y_ULT_UNIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO_UNIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO_UNIDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO_Y_ULTIMO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO_Y_ULTIMO_UNIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_FECHAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_ITEM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_PUNTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE COSTO_VENTAS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CREAR_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CREE_CUENTA_PUC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CRONOLOGICO_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CRUCES_DOCUMENTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CRUCES_DOCUMENTOS_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CRUCES_DOCUMENTO_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_CAJA_ABONOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_CAJA_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_CAJA_EGRESOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_CAJA_FPAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_UNA_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_UNA_CAJA_ABONOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_UNA_CAJA_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_UNA_CAJA_EGRESOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUADRE_UNA_CAJA_FPAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUENTAS_ARTICULOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUENTA_AFECTABLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUENTA_AFECTABLE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUENTA_INTERFAZ TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUENTA_INTERFAZ_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUENTA_MAL_AFECTABLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CUPO_DISPONIBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CXPAGAR_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DATOS_COMPANIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DESCUENTOS_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DESENSAMBLES_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DESENSAMBLES_SIN_CONTABIL_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_COMPRAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_COMPRAS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_DEVOLUCIONES_POS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_VENTAS_ARTICULO_VEND TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_VENTAS_CIUDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_VENTAS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETALLE_VENTAS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DETERIORO_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVCOMPRA_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVOLCLI_SIN_CONTABILIDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVOLCOMP_SIN_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVOLUCIONES_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVOLUCIONES_SIN_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVOLUCION_FACTURA_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DEVOLVER_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_CAMBSAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_ENTRE_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_LABORADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_LABORADOS_LIQ TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_LABORADOS_SINV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_LIQUIDACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_LNR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIAS_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIA_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIFERENCIAS_CONTEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIF_MOVBANCO_CONCILIACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIGITOS_NIVEL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIGITO_CHEQUEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DINERO_DISPONIBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DISPONIBILIDAD_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DISPONIBILIDAD_TOTAL_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCCOMPRA_X_IMPORT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCCOMPRA_X_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCS_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCTRANSP_X_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCUMENTOS_IMPORTACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCUMENTOS_INTERFAZ_SIN_CUENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCUMENTOS_SERIAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCUMENTOS_SIN_CONTABILIZAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DOCVENTAS_X_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EDITA_CLIENTE_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EGRESOS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EMBALAJES_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EMPLEADO_ACTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENSAMBLES_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENSAMBLES_SIN_CONTABILIDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENTRADAS_GRUPO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENTRADAS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENTRADAS_SIN_CONTABILIDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENTREGA_FIN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENTREGA_ITEM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ENTREGA_SIGUIENTE_ITEM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ERROR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ERRORINT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ERRORINT_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ESTADISTICA_VENTAS_VENDEDOR_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ESTADISTICA_VENTAS_VENDEDOR_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ESTADO_FLUJO_EFECTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ES_AFECTABLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ES_AFECTABLE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_BAJO_MINIMO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_COMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_MENOS_RESERVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_MINIMO_PROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_MINYMAX TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_OK TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_QUQO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_Q_OK TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_SOBRE_MAXIMO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_TERCEROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_UNIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_UNIDAD_BOD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIAS_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTENCIA_BODEGA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTE_CENTRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTE_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTE_CUENTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXISTE_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXPORTAR_CLIENTES_MEDICOXRAVEN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXPORTA_FACTURAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXPORTA_FACTURAS_ASOB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE EXPORTA_FACTURAS_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTCOMP_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTCOMP_SIN_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT_EXCEP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_PRE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAR_CONCEPTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAR_EVENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_MAL_TOTAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_MES_NIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_POR_ALISTAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_POR_EMPACAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_POR_ENTREGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_SIN_CONTABILIDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_SIN_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_SIN_MOV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURAS_TRANSMIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FACTURA_ALQUILER_Y_TRANSPORTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FALTANTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FALTANTES_COMPRAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FALTANTES_COMPRAS_ARTICULOI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FALTANTES_VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FALTANTE_CORTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FALTANTE_DOCUMENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHAS_ANTERIORES_LOTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHA_A_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHA_DESDE_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHA_FINAL_PERIODO_PAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHA_INICIAL_PERIODO_PAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHA_PERIODO_PAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FECHA_Y_NUMERO_CONTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FINALIZAR_EMBALAJE_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FIN_DE_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FORMULA_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE FORM_INTEGRADO_ELECTRONICO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GENERE_ORDEN_INV_PLAN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_CARTERA_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_COMPRAS_GRUPO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_COMPRAS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_DISMINUCION_VENTAS_CLI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_DISMINUCION_VENTAS_PROD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_INVENTARIO_AGOTADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_INVENTARIO_BAJAROT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_INVENTARIO_GRUPO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_INVENTARIO_MARCA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_INVENTARIO_PROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_MOVIMIENTO_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_MOVIMIENTO_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_RESUMEN_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_RESUMEN_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_RESUMEN_SALDOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_VENTAS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_VENTAS_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_VENTAS_GRUPO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_VENTAS_PUNTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GER_VENTAS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_COTIZA_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_DOC_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_FACTURA_POSMOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_PEDIDO_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_RECIBO_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_SUCURSAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE GRABE_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE HISTORIA_MENSAJES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE HISTORICO_CARTERA_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE HISTORICO_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IBC_APORTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IBC_APORTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IBC_APORTE_NOV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IBC_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IBC_MES_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_AJUSTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ANTICLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ANTIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_APLICLIE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_APLIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_APORTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ARQUEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CAMBCOSTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CAMBDOCU TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CERTICA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CERTRETE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_COMPROBANTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CONCILIACIONB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CONSIGNA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CONSIGNATAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CONTABILIZACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_COTIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_COTIZACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_CRUCES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_DESENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_DEVOLPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_DEVOLUCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_DIFERENCIAS_CONTEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_EGRESO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ENTRADA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_FACTCOMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_FACTPRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_FACTPROFV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_FORMAPAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_LIQRUTAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_LIQRUTAC_CONC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_LIQRUTAC_EFE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_LIQUIDACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_MANIFIESTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_NOTACRCL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_NOTACRPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_NOTADBCL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_NOTADBPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ORDENCMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ORDENINT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ORDENINV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_ORDENSERV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PARQUEADERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PENDIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PLANILLA_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PLANILLA_NOMINA_PROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PLANPROD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PLANPROD_CONS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PLANREMESA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PRODUCCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PRODUCCION_ENT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PRODUCCION_ENTRADA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_PRODUCCION_MONTAJE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_RECICAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_RECICJPAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_RECIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_REMIPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_REMISION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_RESERVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_REVPRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_SALIDA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_SORTEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_TAXONOMIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_TRASFERENCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_TRASLACAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_TRASLADOBCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPR_VACACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPUESTOS_COMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE IMPUESTOS_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INACTIVAR_ACTUALIZACION_BALNIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INACTIVAR_ARTICULOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INACTIVAR_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INCAPACIDAD_TOTAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INCREMENTE_NROCOPIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INFORME_DIARIO_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INFORME_DIARIO_VENTAS_FP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INFORME_DIARIO_VENTAS_TERM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INF_CERTIFICADOS_RETENCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INICIA_DESCARGA_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INICIA_DESCARGA_EXISTENCIAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INICIA_DESCARGA_PRESENTACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INSERTA_DOCUMENTO_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INSERTE_RUTERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INSERTE_SALDO_INICIAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE INVENTARIO_Y_BALANCE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE KARDEX_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE KARDEX_ARTICULO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE KARDEX_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE KARDEX_DESDE_HASTA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE KARDEX_INVENTARIO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE KARDEX_INVENTARIO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION_REPORT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIBRO_DIARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIBRO_DIARIO_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIBRO_DIARIO_CUENTA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIQUIDACION_APORTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIQUIDACION_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIQUIDACION_IMPORTACION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIQUIDA_VACACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LIQ_PARQUEADERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LISTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LISTAS_ARTICULO_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LISTA_LOTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LISTA_PRECIOS_CON_ESCALA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LISTA_PRECIOS_OFFLINE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MANIFIESTOS_CONDUCTOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MANIFIESTOS_VEHICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MAXIMO_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MAX_NIVEL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MAYOR_SALDO_LOTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MAYOR_Y_BALANCE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MEDIOS_MAGNETICOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MEDIOS_MAGNETICOS2 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MERCANCIA_EN_TRANSITO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MES_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MINIMO_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM16472 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_2 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_22 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_23 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_24 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_26 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_31 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_310 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_32 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_33 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_34 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_36 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_4 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MMDIST_6 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1001 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1001_10 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1001_8 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1001_9 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1002 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1003 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_10047 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1005 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_10057 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1006 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_10067 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_10068 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1007 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_10078 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_10079 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1008 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1009 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1011 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_1012 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_22761 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_22762 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MM_22762_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVARTI_CANTIDADES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVBANCO_NO_CONCILIADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVER_FORMATO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_ARTICULOC_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CENTRO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CENTRO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CENTRO_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CUENTA_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CUENTA_DE_HASTA_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CUENTA_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_TERCERO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_ACUM_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_ARTICULOC_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_ARTICULO_ANULADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_ARTICULO_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_BANCO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CAJA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CARTERA_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CARTERA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CENTRO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CENTRO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CXPAGAR_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CXPAGAR_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_INVENTARIO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_NETO_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_NETO_CUENTA_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_TERCERO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_TOTAL_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVLOTES_DESDE_HASTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOVTOS_CENTRO_TERCERO_MES_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOV_DETALLE_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE MOV_DETALLE_CAJAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOMBRES_GRUPOS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOMBRES_GRUPOS_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOMBRE_ALFANUMERICO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOMBRE_ASCII TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOMBRE_COMPANIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOMINA_SALARIOS_UGPP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOTACRCL_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOTACRPR_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOTADBCL_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOTADBPR_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOTASCRBC_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOTASDBBC_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NOVEDADESXPERIODO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NROBANCO_REF_EGRESOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NRO_COPIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NUMERO_DOCUMENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NUMERO_FORMATEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE NUM_ENT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDENES_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDENES_ARTICULO_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDENES_COMPRA_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDENE_TARIFAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDEN_SUGERIDA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDEN_SUGERIDA_BOD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDEN_SUGERIDA_TOTAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ORDEN_SUGERIDA_TOTALI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PADRE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PAGO_NOMINA_XEMPL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PAGO_NOMINA_XEMPL_DETA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PARTE_CADENA_COMAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PEDIDOSVSFACTURAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PEDIDOS_POR_ENTREGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PEDIDOS_WEB_POR_CONFIRMAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PEDIDOS_X_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PEDIDOS_X_ORDENAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PENDIENTES_X_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PERFILES_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PERIODO_NOM_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PERIODO_NOM_FECHAF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PLANILLA_NOMINA_HORAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PLANILLA_NOMINA_NOVEDADES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PORCENTAJE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE POS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRECIOS_UNIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRECIOS_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRECIOS_Y_EXISTENCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRECIO_CANTIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRECIO_UNIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESENTACIONES_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESENTACIONES_OK TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESENTACIONES_QUQO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESENTACIONES_Q_OK TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESTAMOS_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESTAMOS_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESTAMOS_PENDIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRESUPUESTO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRODUCCION_PENDIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PRODUCCION_SUGERIDA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PROMEDIO_PRODUCCION_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PROMEDIO_SALIDAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PROMEDIO_SALIDAS_ARTICULOI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PROMEDIO_TOTAL_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE PROVEEDORES_SIN_REGISTRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RANGO_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RDE_DAYPARKING TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RDE_DAYPARKING2 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RDE_DAYPARKING3 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECALCULA_APERTURA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECALCULO_COMISIONES_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECIBOS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECIBO_RECAUDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECONTABILICE_COSTOS_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECONTABILICE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECUPERACION_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECUPERA_FACTURAS_VEND TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECUPERA_NUMERO_CHEQUE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RECUPERA_PEDIDOS_VEND TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REDONDEE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REDONDEE_AP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REDONDEE_NOTAS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRA_PROVISION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_COINCIDENCIAS_CONTEO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_COMPROBANTE_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_ITEM_COMPROBANTE_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_ITEM_COTIZACION_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_ITEM_FACTURA_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_ITEM_FACTURA_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_ITEM_RECIBO_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_NOTA_CARTERA_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_RECIBO_APP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REGISTRE_REGIAUTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REMISIONES_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RENGLON_NOVEDAD_APORTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPARTE_SALIDA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORTE_IMPORTACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_ARTICULOS_CREADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_BUSCADOC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_BUSCAFAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_BUSQUEDA_ARTICULOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_CATALOGO_ARTICULOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_CLIENTES_TIEMPO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_CRONOLOGICO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_DATOS_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_ENVIOSF_CORREO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_FACTURAS_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_FACTURAS_USUARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_FALTANTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_FALTANTESPED TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_HISTORIAL_CHAT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_HISTORIAL_RECIBOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_MENSAJES_USUARIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_NOTAS_IMPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_PEDIDOS_DCG TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_PEDIDOS_DES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_PENDIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_PROVEEDORES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_PROVEEDORES_CONSULTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_PRO_CONTACTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_RESULTADCORREO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_TERCEROS_CREADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REPORT_TICKET_IMPR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ABC_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ACTIVOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_AJUSTES_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ANALISIS_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ANALISIS_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_APLICACLI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_APLICAPROV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_APORTES_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ARTICULOS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ARTICULOS_CONTABIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ARTICULOS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ARTICULOS_PROVEEDORI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ARTICULOS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ARTICULO_BARRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_AUDITORIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_AUSENTISMO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_BIT_CLIENTES_V3 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_BIT_SKU_V3 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_BIT_TIPONEGOCIO_V3 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CARTERA_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CARTERA_CONSOLIDADA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CARTERA_NOTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CLIENTES_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CLIENTES_CRM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CLIENTES_ULTVENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_ARTICULOI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_PROVEEDORI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_PROVEEDOR_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_RIMAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPRAS_SISMED TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_CAJA_ART TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_CAJA_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_CMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_INV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_COMPROBANTES_PROD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONCEPTOS_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONCEP_XPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONDUCTORES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_CMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_IMP TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSECUTIVOS_INV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CONSIGNACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CRM_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CRM_EVENTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CRUCES_DOCUMENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CXPAGAR_CONSOLIDADAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_CXPAGAR_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DECRETO1818 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DETALLE_CERTIFICADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DETALLE_RETENCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DETERIORO_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DISPONIBILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DOCUMENTOS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DOCUMENTOS_ENCAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_DOCUMENTOS_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_EGRESOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_EMPLEADOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ENSAMBLES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ENTREGA_FACTURAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_ESTADO_CUENTA_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_EXISTENCIAS_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_FALTANTES_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_FALTANTES_COMPRA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_FALTANTES_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_FALTANTES_PROVEEDORI TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_FALTANTES_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_FALTANTES_VENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_GRUPOS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_HISTOEMPL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_IMPORTACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_KARDEX_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_LISTA_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_METAS_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_MOVCAJA_DOCUMENTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_MOVIMIENTO_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_MOVIMIENTO_DIARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_MOVIMIENTO_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_MOVIMIENTO_X_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_MUNICIPIOS_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_NOMINA_HORASEXTRA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_NOMINA_NOVEDADES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PEDIDOS_ENTREGA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PLANILLA_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PRECIOS_RIMAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PRECIOS_SISMED TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PRESTAMOS_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PRESUPUESTO_GRUPOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PRODUCCION TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PRODUCTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_PROVEEDOR_X_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_REMISIONES_ENTREGA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_RETENCION_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_RETENCION_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_REVALID_CLIENTES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_REVALID_PRODUCTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_REVALID_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_RUTAS_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_RUTEROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_SKU_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_SUGERIDO_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_TERCEROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_TIPONEGOCIO_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_UTILIDAD_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_UTILIDAD_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_UTILIDAD_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_UTILIDAD_VENTAS_EX TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_UTILIDAD_VENTAS_SUBG TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VACACIONES_NOMINA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VEHICULOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENDEDORES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENDEDORES_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTASDET_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_ARTICULO_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_BIT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_CANAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_CLIENTE_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_DECRETO551 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_DECRETO551JL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_DIASINIVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_EVENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_VENDEDOR_GRUPO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REP_VENTAS_VENDEDOR_RIMAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESERVAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESERVAS_ARTICULO_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESTE_EXISTENCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_BANCO_CONF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESULTADO_ANUAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESUMEN_GERENCIAL_RIMAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESUMEN_RUTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESUMEN_SALDOS_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESUMEN_SALDOS_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESUMEN_VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RESUMEN_VENTAS_NOTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RETENCIONES_QUE_NOS_PRACTICARON TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RETIROS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REVERSA_TRASLADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REVISA_PRECIOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REVISA_PRECIOS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE REVISA_PRECIOS_ARTICULO_COMPRAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RUTERO_CONSOLIDADO_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RUTERO_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALARIO_BASE_EMPLEADO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALARIO_PROMEDIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALARIO_PROMEDIO_DETALLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALARIO_PROMEDIO_LIQ TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALARIO_PROMEDIO_SIN_AUX TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALARIO_PROMEDIO_VACACIONES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDOS_ARTICULO_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDOS_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_ACTIVO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_ACTIVO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_ARTICULO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_ARTICULO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_TERCERO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CLIENTE_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CLIENTE_SUCURSAL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTAF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_BANCO_CONF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_EN_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_EN_EFECTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_FINAL_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_FINAL_CUENTA_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_FORMA_PAGO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_INICIAL_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_INICIAL_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_INICIAL_TOTAL_INV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_LOTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_LOTES_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_LOTE_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_MILISTAPP_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_PRESTAMO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TERCEROS_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_FECHA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_MES_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_BANCOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_INVENTARIOC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALIDAS_ANO_ANTERIOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALIDAS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SALIDAS_SIN_CONTABILIDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SELECCIONE_LOTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SERIALES_ITEM_DOCUMENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUGERIDO_PROVEEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUGIERE_METAS_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUGIERE_PRECIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUMA_APERTURA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUMA_DESCUENTOS_FINANCIEROS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUME_EXISTENCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_BANCO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_BANCO_CONF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_CAJA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TARIFAS_ENSAMBLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TOTAL_DOC_COMPRA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TOTAL_DOC_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TOTAL_INVENTARIO_FACTURABLE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TOTAL_INVENTARIO_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TOTAL_PAGOS_TERCERO_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TOTAL_PEDIDO_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_ARTICULOS_MOVIL_OFFLINE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_ARTICULOS_POSMOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_ARTICULO_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_ARTICULO_MOVILV2 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CIUDADES_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CLIENTES_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CLIENTES_MOVIL_OFFLINE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CLIENTES_POSMOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CLIENTE_MOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CLIENTE_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_CORDENADAS_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_DETALLE_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_DETALLE_FACTURA_ALISTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_DETALLE_FACTURA_EMPAQUE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_DETFACTURA_POSMIVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_EMBALAJE_FACT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_FACTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_FACTURAS_VEND TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_FACTURAS_VEND_POSMOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_ITEM_FACTURA_ALISTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_PEDIDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_PEDIDOS_VEND TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_PEND_ALISTA_FACT TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_RECAUDO_RUTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_RUTEROS_CONDUCTOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_RUTERO_DET TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_SUBGRUPOS_POSMOVIL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_SUCURSALES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_UN_RECAUDO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRAE_VENDEDORES_WEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRASCUENTAS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRASLACAJAS_SIN_CONTABILIDAD TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRASLADOS_SIN_CONTABILDAD_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE TRUNCAR_TELEFONO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ULTIMA_DEPRECIACION_UNIDADES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ULTIMO_COMPROMISO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE ULTIMO_EVENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE UNIDADES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE UNIDADES_OFFLINE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE USUARIOS_MENSAJE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE UTILIDAD_VENTAS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDA_ACCESO_USUARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_ARTICULO_FAC TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_BONO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA_C TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA_NIIF_C TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_DESCUENTO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_EXISTENCIA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_ITEM_DIAIVA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_NIVEL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_PADRE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALIDE_PADRE_NIIF TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALOR_INICIAL_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALOR_INICIAL_INVENTARIO_N TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VALOR_INVENTARIO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VARIACION_COSTOS TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENCIDO_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ANUALES_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ANUALES_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ANUALES_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ARTICULO_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ARTICULO_ANO1 TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ARTICULO_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ARTICULO_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_ARTICULO_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_CIUDAD_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_CLIENTE TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_CLIENTE_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_CLIENTE_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_CLIENTE_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_MARCA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_POR_HORA TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_POR_HORA_ARTICULO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_VENDEDOR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_VENDEDOR_ANO TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VENTAS_VENDEDOR_MES TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VER_ARTICULOS_FACTWEB TO PUBLIC;
GRANT EXECUTE ON PROCEDURE VER_ARTICULOS_PEDWEB TO PUBLIC;
GRANT ON ABONO_CERO TO PUBLIC;
GRANT ON ABONO_PRESTAMO_MAYOR TO PUBLIC;
GRANT ON ACTIVO_SIN_CUENTA TO PUBLIC;
GRANT ON ACTIVO_SIN_MESES_DEPRECIACION TO PUBLIC;
GRANT ON AHORRO_MENOR TO PUBLIC;
GRANT ON AJUSTE_NO_EXISTE TO PUBLIC;
GRANT ON ANO_INICIO_INCORRECTO TO PUBLIC;
GRANT ON ANTICPO_SIN_ORIGEN TO PUBLIC;
GRANT ON APLICACIONCL_NO_EXISTE TO PUBLIC;
GRANT ON APLICACIONPR_NO_EXISTE TO PUBLIC;
GRANT ON ARTICULO_CON_EXISTENCIA TO PUBLIC;
GRANT ON ARTICULO_CON_MOVIMIENTOS TO PUBLIC;
GRANT ON ARTICULO_INACTIVO TO PUBLIC;
GRANT ON ARTICULO_NO_EXISTE TO PUBLIC;
GRANT ON ARTICULO_REGISTRADO TO PUBLIC;
GRANT ON ARTICULO_SIN_PESO TO PUBLIC;
GRANT ON AUTORIZACION_NO_EXISTE TO PUBLIC;
GRANT ON AUTORIZACION_YA_EXISTE TO PUBLIC;
GRANT ON BANCO_NO_EXISTE TO PUBLIC;
GRANT ON BODEGA_NO_EXISTE TO PUBLIC;
GRANT ON BONO_USADO TO PUBLIC;
GRANT ON CAJA_NO_EXISTE TO PUBLIC;
GRANT ON CAMBIODOC_NO_EXISTE TO PUBLIC;
GRANT ON CAMBIO_CARGO_EXISTE TO PUBLIC;
GRANT ON CAMBIO_CODIGO_CUENTA TO PUBLIC;
GRANT ON CAMBIO_FECHA TO PUBLIC;
GRANT ON CAMBIO_SALARIO_EXISTE TO PUBLIC;
GRANT ON CAMBIO_VINCUL_EXISTE TO PUBLIC;
GRANT ON CANTIDAD_CRUCE_MAYOR TO PUBLIC;
GRANT ON CANTIDAD_MAYOR_DESCUENTO TO PUBLIC;
GRANT ON CENTRO_CON_MOVIMIENTO TO PUBLIC;
GRANT ON CENTRO_NO_EXISTE TO PUBLIC;
GRANT ON CIUDAD_NO_EXISTE TO PUBLIC;
GRANT ON CLIENTE_CON_MOV TO PUBLIC;
GRANT ON CLIENTE_CON_MOVIMIENTO TO PUBLIC;
GRANT ON CLIENTE_INACTIVO TO PUBLIC;
GRANT ON CLIENTE_NO_EXISTE TO PUBLIC;
GRANT ON COBRADOR_MOVIMIENTO TO PUBLIC;
GRANT ON COBRADOR_NOREG TO PUBLIC;
GRANT ON COBRADOR_NO_EXISTE TO PUBLIC;
GRANT ON CODIGO_EAN_INCORRECTO TO PUBLIC;
GRANT ON COMISIONES_CALCULADAS TO PUBLIC;
GRANT ON COMISIONES_REGISTRADAS TO PUBLIC;
GRANT ON COMPROBAENCABEZA_NO_EXISTE TO PUBLIC;
GRANT ON COMPROBANTE_DESCUADRADO TO PUBLIC;
GRANT ON COMPROBANTE_REGISTRADO TO PUBLIC;
GRANT ON CONCEPTO_ASIGNADO_EMPLEADO TO PUBLIC;
GRANT ON CONCEPTO_CONTABLE_USADO TO PUBLIC;
GRANT ON CONCEPTO_CON_MOVIMIENTO TO PUBLIC;
GRANT ON CONFIGURACION_NO_ENCONTRADA TO PUBLIC;
GRANT ON CONSIGNATAR_NO_EXISTE TO PUBLIC;
GRANT ON CONSIGNA_NO_EXISTA TO PUBLIC;
GRANT ON CONSUMO_NO_EXISTE TO PUBLIC;
GRANT ON CONTABILIDAD_BLOQUEADA TO PUBLIC;
GRANT ON COTIZACION_NO_EXISTE TO PUBLIC;
GRANT ON CUENTABANCO_NO_EXISTE TO PUBLIC;
GRANT ON CUENTA_CON_HIJAS TO PUBLIC;
GRANT ON CUENTA_CON_MOVIMIENTOS TO PUBLIC;
GRANT ON CUENTA_CON_SALDO TO PUBLIC;
GRANT ON CUENTA_NO_ES_NORMAL TO PUBLIC;
GRANT ON CUENTA_NO_EXISTE TO PUBLIC;
GRANT ON CUENTA_PADRE_NO_EXISTE TO PUBLIC;
GRANT ON CUENTA_SIN_DATOS TO PUBLIC;
GRANT ON CUPO_INSUFICIENTE TO PUBLIC;
GRANT ON DATO_OBLIGATORIO TO PUBLIC;
GRANT ON DESCUENTO_MAYOR_AL_TOTAL TO PUBLIC;
GRANT ON DESENSAMBLE_NO_EXISTE TO PUBLIC;
GRANT ON DEVOLUCIONPROD_NO_EXISTE TO PUBLIC;
GRANT ON DEVOLUCION_MAYOR TO PUBLIC;
GRANT ON DEVOLUCION_NO_EXISTE TO PUBLIC;
GRANT ON DOCUMENTO_ABONO_MAYOR TO PUBLIC;
GRANT ON DOCUMENTO_CONCILIADO TO PUBLIC;
GRANT ON DOCUMENTO_CON_ABONOS TO PUBLIC;
GRANT ON DOCUMENTO_CRUZADO TO PUBLIC;
GRANT ON DOCUMENTO_DEVUELTO TO PUBLIC;
GRANT ON DOCUMENTO_DE_OTRO_TERCERO TO PUBLIC;
GRANT ON DOCUMENTO_FECHA_ABONO_ANTERIOR TO PUBLIC;
GRANT ON DOCUMENTO_NO_EXISTE TO PUBLIC;
GRANT ON DOCUMENTO_PAGO_SALIDO TO PUBLIC;
GRANT ON DOCUMENTO_REFERENCIADO TO PUBLIC;
GRANT ON DOCUMENTO_REGISTRADO TO PUBLIC;
GRANT ON DOCUMENTO_TOTALMENTE_CANCELADO TO PUBLIC;
GRANT ON EFECTIVO_INSUFICIENTE TO PUBLIC;
GRANT ON EGRESO_NO_EXISTE TO PUBLIC;
GRANT ON ENSAMBLE_NO_EXISTE TO PUBLIC;
GRANT ON ENTRADAPROD_NO_EXISTE TO PUBLIC;
GRANT ON ENTRADA_NO_EXISTE TO PUBLIC;
GRANT ON ESTRUCTURA_INCORRECTA TO PUBLIC;
GRANT ON EXISTENCIA_INSUFICIENTE TO PUBLIC;
GRANT ON EXISTENCIA_SOBRE_MAXIMO TO PUBLIC;
GRANT ON FACTOR_NO_ENCONTRADO TO PUBLIC;
GRANT ON FACTOR_PRECIO_MENOR TO PUBLIC;
GRANT ON FACTURA_NO_EXISTE TO PUBLIC;
GRANT ON FALTA_ACTIVO TO PUBLIC;
GRANT ON FALTA_ARTICULO TO PUBLIC;
GRANT ON FALTA_BASE TO PUBLIC;
GRANT ON FECHA_ANTERIOR_DOCUMENTO TO PUBLIC;
GRANT ON FECHA_ANTERIOR_INICIO TO PUBLIC;
GRANT ON FECHA_NO_VALIDA TO PUBLIC;
GRANT ON FORMAPAGO_NO_EXISTE TO PUBLIC;
GRANT ON GRUPO_NO_EXISTE TO PUBLIC;
GRANT ON HORA_EXTRA_YA_UTILIZADA TO PUBLIC;
GRANT ON INTERFAZ_NO_ENCONTRADA TO PUBLIC;
GRANT ON LISTA_IGUAL_BASE TO PUBLIC;
GRANT ON LISTA_NO_EXISTE TO PUBLIC;
GRANT ON LOTE_CON_MOVIMIENTOS TO PUBLIC;
GRANT ON LOTE_NEGATIVO TO PUBLIC;
GRANT ON LOTE_NO_EXISTE TO PUBLIC;
GRANT ON LOTE_OBLIGATORIO TO PUBLIC;
GRANT ON LOTE_PREVIO TO PUBLIC;
GRANT ON MARCA_NO_EXISTE TO PUBLIC;
GRANT ON MES_YA_FACTURADO TO PUBLIC;
GRANT ON MOVIMIENTO_CUENTA_PADRE TO PUBLIC;
GRANT ON MOVIMIENTO_NO_CARTERA TO PUBLIC;
GRANT ON MOVIMIENTO_NO_INVENTARIO TO PUBLIC;
GRANT ON NIVEL_NO_AFECTABLE TO PUBLIC;
GRANT ON NOMINA_CON_APORTES TO PUBLIC;
GRANT ON NOMINA_CON_PAGO TO PUBLIC;
GRANT ON NOMINA_OTRO_PERIODO TO PUBLIC;
GRANT ON NOMINA_REGISTRADA TO PUBLIC;
GRANT ON NOTA_YA_EXISTE TO PUBLIC;
GRANT ON NO_HAY_BONO_DE_PAGO TO PUBLIC;
GRANT ON ORDEN_NO_EXISTE TO PUBLIC;
GRANT ON PAGO_NO_EXISTE TO PUBLIC;
GRANT ON PEDIDO_NO_EXISTE TO PUBLIC;
GRANT ON PERIODO_PAGADO TO PUBLIC;
GRANT ON PLANTILLA_NO_EXISTE TO PUBLIC;
GRANT ON PRECIO_MAYOR_TOPE TO PUBLIC;
GRANT ON PREFIJOBANCO_NO_EXISTE TO PUBLIC;
GRANT ON PREFIJO_CONTA_NOEXISTE TO PUBLIC;
GRANT ON PREFIJO_DEVCHEQUE TO PUBLIC;
GRANT ON PREFIJO_NO_EXISTE TO PUBLIC;
GRANT ON PRODUCCION_NO_EXISTE TO PUBLIC;
GRANT ON PROVEEDOR_CON_MOV TO PUBLIC;
GRANT ON PROVEEDOR_CON_MOVIMIENTO TO PUBLIC;
GRANT ON PROVEEDOR_NO_EXISTE TO PUBLIC;
GRANT ON PROYECTO_NO_EXISTE TO PUBLIC;
GRANT ON PUNTOVTA_NO_EXISTE TO PUBLIC;
GRANT ON RANGO_DIAS_INCONSISTENTE TO PUBLIC;
GRANT ON RECIBO_NO_EXISTE TO PUBLIC;
GRANT ON REMISION_NO_EXISTE TO PUBLIC;
GRANT ON RUTA_NO_EXISTE TO PUBLIC;
GRANT ON SALDOCTA_NO_EXISTE TO PUBLIC;
GRANT ON SALDO_INSUFICIENTE TO PUBLIC;
GRANT ON SALDO_SIN_CUENTA TO PUBLIC;
GRANT ON SALDO_SIN_TERCERO TO PUBLIC;
GRANT ON SALIDAPROD_NO_EXISTE TO PUBLIC;
GRANT ON SALIDA_NO_EXISTE TO PUBLIC;
GRANT ON SDP_ICPE TO PUBLIC;
GRANT ON SDP_UCC TO PUBLIC;
GRANT ON SDP_UCCP TO PUBLIC;
GRANT ON SDP_UCPE TO PUBLIC;
GRANT ON SDP_UPR TO PUBLIC;
GRANT ON SERIAL_YA_USADO TO PUBLIC;
GRANT ON SORTEO_YA_EXISTE TO PUBLIC;
GRANT ON SUBGRUPO_NO_EXISTE TO PUBLIC;
GRANT ON SUCURSAL_CON_MOVIMIENTOS TO PUBLIC;
GRANT ON TARJETA_NO_EXISTE TO PUBLIC;
GRANT ON TASA_CAMBIO_REGISTRADA TO PUBLIC;
GRANT ON TERCERO_CON_MOV TO PUBLIC;
GRANT ON TERCERO_CON_SALDO TO PUBLIC;
GRANT ON TERCERO_NO_EXISTE TO PUBLIC;
GRANT ON TIPOCOMP_NO_EXISTE TO PUBLIC;
GRANT ON TIPODOC_NO_EXISTE TO PUBLIC;
GRANT ON TIQUETE_USADO TO PUBLIC;
GRANT ON TRASFERENCIA_NO_EXISTE TO PUBLIC;
GRANT ON UNIDAD_CON_MOV TO PUBLIC;
GRANT ON UNIDAD_NO_REGISTRADA TO PUBLIC;
GRANT ON VEHICULO_NO_EXISTE TO PUBLIC;
GRANT ON VENCIMIENTO_INCORRECTO TO PUBLIC;
GRANT ON VENDEDOR_MOVIMIENTO TO PUBLIC;
GRANT ON VENDEDOR_NOREG TO PUBLIC;
GRANT ON YA_EXISTE_EL_REGISTRO TO PUBLIC;
GRANT ON "interfaz_no_definida" TO PUBLIC;
GRANT ON ANO TO PUBLIC;
GRANT ON BOOLEANO TO PUBLIC;
GRANT ON CALIFICA TO PUBLIC;
GRANT ON CENTRO TO PUBLIC;
GRANT ON CORREO TO PUBLIC;
GRANT ON CTACONTA TO PUBLIC;
GRANT ON CUFE TO PUBLIC;
GRANT ON DATOAUDIT TO PUBLIC;
GRANT ON ENTERO TO PUBLIC;
GRANT ON ESTUDIANTE TO PUBLIC;
GRANT ON EXPLICA TO PUBLIC;
GRANT ON FECCONTA TO PUBLIC;
GRANT ON FECHA TO PUBLIC;
GRANT ON HORA TO PUBLIC;
GRANT ON ID TO PUBLIC;
GRANT ON MES TO PUBLIC;
GRANT ON MONTO TO PUBLIC;
GRANT ON NIT TO PUBLIC;
GRANT ON NOMBRE TO PUBLIC;
GRANT ON NUMERO TO PUBLIC;
GRANT ON OBSERVACIONT TO PUBLIC;
GRANT ON PORCENTAJE TO PUBLIC;
GRANT ON PORC_CONTA TO PUBLIC;
GRANT ON PREFIJO TO PUBLIC;
GRANT ON PREF_NUM TO PUBLIC;
GRANT ON SEXO TO PUBLIC;
GRANT ON TIPO_BENEF TO PUBLIC;
GRANT ON TRM TO PUBLIC;
GRANT ON T_ATRIBUTO TO PUBLIC;
GRANT ON T_BOOLEANO TO PUBLIC;
GRANT ON T_CANTIDAD TO PUBLIC;
GRANT ON T_CENTRO TO PUBLIC;
GRANT ON T_CODLARGO TO PUBLIC;
GRANT ON T_COD_ARTICULO TO PUBLIC;
GRANT ON T_CONCEPTO TO PUBLIC;
GRANT ON T_CTANOMNIIF TO PUBLIC;
GRANT ON T_CTA_CONTABLE TO PUBLIC;
GRANT ON T_DIR TO PUBLIC;
GRANT ON T_FECHA TO PUBLIC;
GRANT ON T_GRUPO TO PUBLIC;
GRANT ON T_ID TO PUBLIC;
GRANT ON T_LOTE TO PUBLIC;
GRANT ON T_MONTO TO PUBLIC;
GRANT ON T_NIT TO PUBLIC;
GRANT ON T_NOMCTANIIF TO PUBLIC;
GRANT ON T_NUMDOC TO PUBLIC;
GRANT ON T_NUMFACL TO PUBLIC;
GRANT ON T_NUMPROV TO PUBLIC;
GRANT ON T_PORCENTAJE TO PUBLIC;
GRANT ON T_PREFIJO TO PUBLIC;
GRANT ON T_PROYECTO TO PUBLIC;
GRANT ON T_REFERENCIA TO PUBLIC;
GRANT ON T_SERIAL TO PUBLIC;
GRANT ON T_SUBGRUPO TO PUBLIC;
GRANT ON T_TELEFONO TO PUBLIC;
GRANT ON T_TIPODOC TO PUBLIC;
GRANT ON T_TIPOID TO PUBLIC;
GRANT ON T_TIPO_COMP TO PUBLIC;
GRANT ON T_UNIDAD TO PUBLIC;
GRANT ON T_USUARIO TO PUBLIC;
GRANT ON T_ZONA TO PUBLIC;
GRANT ON VOLUMEN TO PUBLIC;
GRANT ON GEN_ENVIOS_FO TO PUBLIC;
GRANT ON GEN_REPORTE_ERRORES_ID TO PUBLIC;
GRANT ON GEN_REPORT_BANDEJA_ID TO PUBLIC;
GRANT ON GEN_REPORT_CAMBIOS_ID TO PUBLIC;
GRANT ON GEN_REPORT_CHAT TO PUBLIC;
GRANT ON GEN_REPORT_FIRMA_ID TO PUBLIC;
GRANT ON GEN_REPORT_NOTAS_ID TO PUBLIC;
GRANT ON GEN_REPORT_TICKETS_ID TO PUBLIC;
GRANT ON GEN_REPORT_TITULOS_ID TO PUBLIC;
GRANT ON ID_AJUSTECIE TO PUBLIC;
GRANT ON ID_AJUSTEINF TO PUBLIC;
GRANT ON ID_AJUSTEINV TO PUBLIC;
GRANT ON ID_ALERTAS TO PUBLIC;
GRANT ON ID_ANTICIPO_PROVEEDOR TO PUBLIC;
GRANT ON ID_ANTICLIE TO PUBLIC;
GRANT ON ID_APLICACLIE TO PUBLIC;
GRANT ON ID_APLICAPROV TO PUBLIC;
GRANT ON ID_ARQUEO TO PUBLIC;
GRANT ON ID_ARTICULO TO PUBLIC;
GRANT ON ID_AUDITORIA TO PUBLIC;
GRANT ON ID_AUTOCART TO PUBLIC;
GRANT ON ID_BANCO TO PUBLIC;
GRANT ON ID_BONOPAGO TO PUBLIC;
GRANT ON ID_CAMBART TO PUBLIC;
GRANT ON ID_CAMBCOSTO TO PUBLIC;
GRANT ON ID_CAMBIODOC TO PUBLIC;
GRANT ON ID_CAMBPRECIO TO PUBLIC;
GRANT ON ID_CAMPANA TO PUBLIC;
GRANT ON ID_CAMSITUA TO PUBLIC;
GRANT ON ID_CARGOGASTO TO PUBLIC;
GRANT ON ID_CHEQUES TO PUBLIC;
GRANT ON ID_CIERANUAL TO PUBLIC;
GRANT ON ID_CIERTERC TO PUBLIC;
GRANT ON ID_CLIFACT TO PUBLIC;
GRANT ON ID_COMPROBA TO PUBLIC;
GRANT ON ID_COMPROMISO TO PUBLIC;
GRANT ON ID_CONCILIAB TO PUBLIC;
GRANT ON ID_CONCILIAPATD TO PUBLIC;
GRANT ON ID_CONFIRMDEPOS TO PUBLIC;
GRANT ON ID_CONS TO PUBLIC;
GRANT ON ID_CONSIGNA TO PUBLIC;
GRANT ON ID_CONSIGNATAR TO PUBLIC;
GRANT ON ID_CONSNO TO PUBLIC;
GRANT ON ID_CONSNOMINA TO PUBLIC;
GRANT ON ID_CONSNOPROV TO PUBLIC;
GRANT ON ID_CONSOLIDA TO PUBLIC;
GRANT ON ID_CONSOLIDADO TO PUBLIC;
GRANT ON ID_CONSUMOS TO PUBLIC;
GRANT ON ID_CONTABILIZA TO PUBLIC;
GRANT ON ID_CONTRATOC TO PUBLIC;
GRANT ON ID_COTIPROV TO PUBLIC;
GRANT ON ID_COTIZACI TO PUBLIC;
GRANT ON ID_CUENTA_BANCO TO PUBLIC;
GRANT ON ID_DENOMINA TO PUBLIC;
GRANT ON ID_DEPRECIA TO PUBLIC;
GRANT ON ID_DESENSAMBLE TO PUBLIC;
GRANT ON ID_DETCART TO PUBLIC;
GRANT ON ID_DEVOLCLI TO PUBLIC;
GRANT ON ID_DEVOLPROV TO PUBLIC;
GRANT ON ID_DEVOLUCION_CHEQUES TO PUBLIC;
GRANT ON ID_DISFVACAC TO PUBLIC;
GRANT ON ID_DOCPAGOCAJA TO PUBLIC;
GRANT ON ID_DOMICILIO_SENVIO TO PUBLIC;
GRANT ON ID_EGRESOS TO PUBLIC;
GRANT ON ID_EMBARGO TO PUBLIC;
GRANT ON ID_ENSAMBLE TO PUBLIC;
GRANT ON ID_ENTRADA TO PUBLIC;
GRANT ON ID_ENTRSALEMPL TO PUBLIC;
GRANT ON ID_ENVIO TO PUBLIC;
GRANT ON ID_ERRORES TO PUBLIC;
GRANT ON ID_EVENEXIS TO PUBLIC;
GRANT ON ID_EVENTO TO PUBLIC;
GRANT ON ID_FACTCOMP TO PUBLIC;
GRANT ON ID_FACTCONT TO PUBLIC;
GRANT ON ID_FACTPER TO PUBLIC;
GRANT ON ID_FACTURA TO PUBLIC;
GRANT ON ID_FORMDATOS TO PUBLIC;
GRANT ON ID_GASTOIMP TO PUBLIC;
GRANT ON ID_HORAEMPL TO PUBLIC;
GRANT ON ID_IMPORTA TO PUBLIC;
GRANT ON ID_INTERBANCO TO PUBLIC;
GRANT ON ID_INTERCAJA TO PUBLIC;
GRANT ON ID_INTERCARTERA TO PUBLIC;
GRANT ON ID_INTERCMP TO PUBLIC;
GRANT ON ID_INTERCOMPRA TO PUBLIC;
GRANT ON ID_INTERCXPAGAR TO PUBLIC;
GRANT ON ID_INTERFAZ_INVENTARIO TO PUBLIC;
GRANT ON ID_INTERVTA TO PUBLIC;
GRANT ON ID_LIQRUTA TO PUBLIC;
GRANT ON ID_LIQUIDACION TO PUBLIC;
GRANT ON ID_LOTE TO PUBLIC;
GRANT ON ID_MENSAJE TO PUBLIC;
GRANT ON ID_MOVARTI TO PUBLIC;
GRANT ON ID_MOVBANCO TO PUBLIC;
GRANT ON ID_MOVCAJA TO PUBLIC;
GRANT ON ID_MOVCARGOEMP TO PUBLIC;
GRANT ON ID_MOVCLI TO PUBLIC;
GRANT ON ID_MOVPROV TO PUBLIC;
GRANT ON ID_MOVSALEMPL TO PUBLIC;
GRANT ON ID_MOVVINCULEMP TO PUBLIC;
GRANT ON ID_NOMICOMI TO PUBLIC;
GRANT ON ID_NOMINA TO PUBLIC;
GRANT ON ID_NOMINAEXTRA TO PUBLIC;
GRANT ON ID_NOMINA_PROV TO PUBLIC;
GRANT ON ID_NOMI_NOVEDADES TO PUBLIC;
GRANT ON ID_NOTACRCLI TO PUBLIC;
GRANT ON ID_NOTACRPROV TO PUBLIC;
GRANT ON ID_NOTADBCLI TO PUBLIC;
GRANT ON ID_NOTADBPROV TO PUBLIC;
GRANT ON ID_NOTADOC TO PUBLIC;
GRANT ON ID_NOTASCLIENTES TO PUBLIC;
GRANT ON ID_NOTASESTADOS TO PUBLIC;
GRANT ON ID_NOTAS_CREDITO_BANCO TO PUBLIC;
GRANT ON ID_NOTAS_DEBITO_BANCO TO PUBLIC;
GRANT ON ID_NOTCARAPP TO PUBLIC;
GRANT ON ID_ORDEMBAR TO PUBLIC;
GRANT ON ID_ORDENCOMP TO PUBLIC;
GRANT ON ID_ORDENMCIA TO PUBLIC;
GRANT ON ID_ORDENPROD TO PUBLIC;
GRANT ON ID_ORDENSERV TO PUBLIC;
GRANT ON ID_PAGONOMI TO PUBLIC;
GRANT ON ID_PAGO_CLIENTE TO PUBLIC;
GRANT ON ID_PAGO_PROVEEDOR TO PUBLIC;
GRANT ON ID_PARQUEADERO TO PUBLIC;
GRANT ON ID_PEDIDO TO PUBLIC;
GRANT ON ID_PEDWEB TO PUBLIC;
GRANT ON ID_PENDIENTE TO PUBLIC;
GRANT ON ID_PGAPORT TO PUBLIC;
GRANT ON ID_PLANPROD TO PUBLIC;
GRANT ON ID_PLANTILLA TO PUBLIC;
GRANT ON ID_PRESTAMOS TO PUBLIC;
GRANT ON ID_PRODDEV TO PUBLIC;
GRANT ON ID_PRODENT TO PUBLIC;
GRANT ON ID_PRODSAL TO PUBLIC;
GRANT ON ID_PROGPAGO TO PUBLIC;
GRANT ON ID_PRUEBA TO PUBLIC;
GRANT ON ID_PUNTOS TO PUBLIC;
GRANT ON ID_PUNTOSVEND TO PUBLIC;
GRANT ON ID_RECAPP TO PUBLIC;
GRANT ON ID_RECAUDO TO PUBLIC;
GRANT ON ID_RECICAJA TO PUBLIC;
GRANT ON ID_RECIPROV TO PUBLIC;
GRANT ON ID_REDPTOSV TO PUBLIC;
GRANT ON ID_REEMFAC TO PUBLIC;
GRANT ON ID_RELEVO TO PUBLIC;
GRANT ON ID_REMICLIE TO PUBLIC;
GRANT ON ID_REMIPROV TO PUBLIC;
GRANT ON ID_REPLARTICULO TO PUBLIC;
GRANT ON ID_REPLEVENTO TO PUBLIC;
GRANT ON ID_REPUTILIDAD TO PUBLIC;
GRANT ON ID_RESERVA TO PUBLIC;
GRANT ON ID_RETENCIONES TO PUBLIC;
GRANT ON ID_RETIROS TO PUBLIC;
GRANT ON ID_REVPRECIO TO PUBLIC;
GRANT ON ID_RUTERO TO PUBLIC;
GRANT ON ID_SALIDA TO PUBLIC;
GRANT ON ID_SOLIMP TO PUBLIC;
GRANT ON ID_SORTEO TO PUBLIC;
GRANT ON ID_TASACAMBIO TO PUBLIC;
GRANT ON ID_TAXINST TO PUBLIC;
GRANT ON ID_TERCERO TO PUBLIC;
GRANT ON ID_TRANSFER TO PUBLIC;
GRANT ON ID_TRASLACAJA TO PUBLIC;
GRANT ON ID_TRASLADOS TO PUBLIC;
GRANT ON ID_VACACIONES TO PUBLIC;
GRANT ON ID_VACACOL TO PUBLIC;
GRANT EXECUTE ON PROCEDURE "ABS" TO PUBLIC;
GRANT EXECUTE ON PROCEDURE "BIN_AND" TO PUBLIC;
GRANT EXECUTE ON PROCEDURE "CEILING" TO PUBLIC;
GRANT EXECUTE ON PROCEDURE DIV TO PUBLIC;
GRANT EXECUTE ON PROCEDURE "FLOOR" TO PUBLIC;
GRANT EXECUTE ON PROCEDURE LTRIM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE "MOD" TO PUBLIC;
GRANT EXECUTE ON PROCEDURE RTRIM TO PUBLIC;
GRANT EXECUTE ON PROCEDURE STRLEN TO PUBLIC;
GRANT EXECUTE ON PROCEDURE SUBSTR TO PUBLIC;
GRANT EXECUTE ON PROCEDURE CONTABIL_DETERIORO TO PUCLIC;
GRANT SELECT ON PLAN_PRODUCCION TO REPL;

/* Privileges of views */
GRANT REFERENCES(FECHA_ACTUALIZA) ON REPORT_ACTUALIZACION TO VIEW AJUSTE_TOTAL;

/* Privileges of triggers */
GRANT UPDATE, REFERENCES ON AJUSTES TO TRIGGER AJUSTES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER AJUSTES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER AJUSTES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER AJUSTES_AD;
GRANT UPDATE, REFERENCES ON AJUSTES TO TRIGGER AJUSTES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER AJUSTES_AI;
GRANT UPDATE, REFERENCES ON AJUSTES TO TRIGGER AJUSTES_AU;
GRANT SELECT, UPDATE ON AJUSTES_DETALLE TO TRIGGER AJUSTES_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER AJUSTES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER AJUSTES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER AJUSTES_AU;
GRANT SELECT, UPDATE, REFERENCES ON AJUSTES TO TRIGGER AJUSTES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER AJUSTES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER AJUSTES_BI;
GRANT UPDATE, REFERENCES ON AJUSTES_DETALLE TO TRIGGER AJUSTES_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER AJUSTES_DETALLE_AD;
GRANT SELECT ON AJUSTES TO TRIGGER AJUSTES_DETALLE_AI;
GRANT UPDATE, REFERENCES ON AJUSTES_DETALLE TO TRIGGER AJUSTES_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER AJUSTES_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER AJUSTES_DETALLE_AI;
GRANT SELECT ON AJUSTES TO TRIGGER AJUSTES_DETALLE_AU;
GRANT UPDATE, REFERENCES ON AJUSTES_DETALLE TO TRIGGER AJUSTES_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER AJUSTES_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER AJUSTES_DETALLE_AU;
GRANT SELECT ON AJUSTES TO TRIGGER AJUSTES_DETALLE_BI;
GRANT UPDATE, REFERENCES ON AJUSTES_DETALLE TO TRIGGER AJUSTES_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER AJUSTES_DETALLE_BI;
GRANT UPDATE, REFERENCES ON AJUSTES_INFLACION TO TRIGGER AJUSTES_INFLACION_BD;
GRANT INSERT ON AUDITORIA TO TRIGGER AJUSTES_INFLACION_BD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER AJUSTES_INFLACION_BD;
GRANT SELECT, UPDATE, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER AJUSTES_INFLACION_BD;
GRANT UPDATE, REFERENCES ON AJUSTES_INFLACION TO TRIGGER AJUSTES_INFLACION_BI;
GRANT INSERT ON COMPROBANTE_DETALLE TO TRIGGER AJUSTES_INFLACION_BI;
GRANT INSERT ON COMPROBANTE_ENCABEZADO TO TRIGGER AJUSTES_INFLACION_BI;
GRANT SELECT, REFERENCES ON CUENTAS TO TRIGGER AJUSTES_INFLACION_BI;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COMPROBA TO TRIGGER AJUSTES_INFLACION_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER AJUSTES_INFLACION_BI;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO TRIGGER AJUSTES_INFLACION_BI;
GRANT UPDATE, REFERENCES ON AJUSTES_INFLACION TO TRIGGER AJUSTES_INFLACION_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER AJUSTES_INFLACION_BU;
GRANT SELECT, UPDATE ON COMPROBANTE_ENCABEZADO TO TRIGGER AJUSTES_INFLACION_BU;
GRANT UPDATE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER ANTICIPOS_CLIENTE_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ANTICIPOS_CLIENTE_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ANTICIPOS_CLIENTE_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ANTICIPOS_CLIENTE_AD;
GRANT DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER ANTICIPOS_CLIENTE_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CARTERA TO TRIGGER ANTICIPOS_CLIENTE_AD;
GRANT UPDATE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER ANTICIPOS_CLIENTE_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ANTICIPOS_CLIENTE_AI;
GRANT INSERT ON MOVIMIENTO_CLIENTES TO TRIGGER ANTICIPOS_CLIENTE_AI;
GRANT INSERT ON SALDOS_DOC_CARTERA TO TRIGGER ANTICIPOS_CLIENTE_AI;
GRANT UPDATE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER ANTICIPOS_CLIENTE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER ANTICIPOS_CLIENTE_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ANTICIPOS_CLIENTE_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ANTICIPOS_CLIENTE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER ANTICIPOS_CLIENTE_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER ANTICIPOS_CLIENTE_AU;
GRANT SELECT, UPDATE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER ANTICIPOS_CLIENTE_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER ANTICIPOS_CLIENTE_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER ANTICIPOS_CLIENTE_BI;
GRANT UPDATE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ANTICIPOS_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ANTICIPOS_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ANTICIPOS_PROVEEDOR_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CXPAGAR TO TRIGGER ANTICIPOS_PROVEEDOR_AD;
GRANT UPDATE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ANTICIPOS_PROVEEDOR_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER ANTICIPOS_PROVEEDOR_AI;
GRANT UPDATE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER ANTICIPOS_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ANTICIPOS_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ANTICIPOS_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER ANTICIPOS_PROVEEDOR_AU;
GRANT SELECT, UPDATE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER ANTICIPOS_PROVEEDOR_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER ANTICIPOS_PROVEEDOR_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER ANTICIPOS_PROVEEDOR_BI;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER APLICACION_CLIENTE_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER APLICACION_CLIENTE_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER APLICACION_CLIENTE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER APLICACION_CLIENTE_AD;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER APLICACION_CLIENTE_AI;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_AU;
GRANT SELECT, UPDATE ON APLICACION_CLIENTE_DETALLE TO TRIGGER APLICACION_CLIENTE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER APLICACION_CLIENTE_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER APLICACION_CLIENTE_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER APLICACION_CLIENTE_AU;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER APLICACION_CLIENTE_AU;
GRANT SELECT, UPDATE, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER APLICACION_CLIENTE_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER APLICACION_CLIENTE_BI;
GRANT SELECT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_CLIENTE_CRUCE_AD;
GRANT SELECT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER APLICACION_CLIENTE_CRUCE_AD;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_CLIENTE_CRUCE_AI;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER APLICACION_CLIENTE_CRUCE_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_CLIENTE_CRUCE_AU;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER APLICACION_CLIENTE_CRUCE_AU;
GRANT SELECT, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_DETALLE_AD;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE_DETALLE TO TRIGGER APLICACION_CLIENTE_DETALLE_AD;
GRANT SELECT, UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER APLICACION_CLIENTE_DETALLE_AD;
GRANT SELECT, UPDATE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER APLICACION_CLIENTE_DETALLE_AD;
GRANT SELECT, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_DETALLE_AI;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE_DETALLE TO TRIGGER APLICACION_CLIENTE_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER APLICACION_CLIENTE_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER APLICACION_CLIENTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER APLICACION_CLIENTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO TRIGGER APLICACION_CLIENTE_DETALLE_AI;
GRANT SELECT, REFERENCES ON APLICACION_CLIENTE TO TRIGGER APLICACION_CLIENTE_DETALLE_AU;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE_DETALLE TO TRIGGER APLICACION_CLIENTE_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER APLICACION_CLIENTE_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER APLICACION_CLIENTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER APLICACION_CLIENTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO TRIGGER APLICACION_CLIENTE_DETALLE_AU;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEDOR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER APLICACION_PROVEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER APLICACION_PROVEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER APLICACION_PROVEDOR_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_PROVEDOR_AD;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEDOR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER APLICACION_PROVEDOR_AI;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEDOR_AU;
GRANT SELECT, UPDATE ON APLICACION_PROVEEDOR_DETALLE TO TRIGGER APLICACION_PROVEDOR_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER APLICACION_PROVEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER APLICACION_PROVEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER APLICACION_PROVEDOR_AU;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_PROVEDOR_AU;
GRANT SELECT, UPDATE, REFERENCES ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEDOR_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER APLICACION_PROVEDOR_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER APLICACION_PROVEDOR_BI;
GRANT SELECT ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AD;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEEDOR_DETALLE TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AD;
GRANT SELECT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AD;
GRANT SELECT ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AI;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEEDOR_DETALLE TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AI;
GRANT SELECT ON APLICACION_PROVEDOR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AU;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEEDOR_DETALLE TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO TRIGGER APLICACION_PROVEEDOR_DETALLE_AU;
GRANT UPDATE, REFERENCES ON ARTICULOS_PRODUCTO TO TRIGGER ARTICULOS_PRODUCTO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ARTICULOS_PRODUCTO_AD;
GRANT UPDATE, REFERENCES ON ARTICULOS_PRODUCTO TO TRIGGER ARTICULOS_PRODUCTO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ARTICULOS_PRODUCTO_AI;
GRANT UPDATE, REFERENCES ON ARTICULOS_PRODUCTO TO TRIGGER ARTICULOS_PRODUCTO_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER ARTICULOS_PRODUCTO_AU;
GRANT UPDATE, REFERENCES ON ARTICULO TO TRIGGER ARTICULO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ARTICULO_AD;
GRANT UPDATE, REFERENCES ON ARTICULO TO TRIGGER ARTICULO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ARTICULO_AI;
GRANT INSERT ON CONTABIL_ARTICULO TO TRIGGER ARTICULO_AI;
GRANT SELECT, REFERENCES ON GRUPO TO TRIGGER ARTICULO_AI;
GRANT SELECT, REFERENCES ON LISTA_PRECIOS TO TRIGGER ARTICULO_AI;
GRANT INSERT ON PRECIOS_ARTICULO TO TRIGGER ARTICULO_AI;
GRANT SELECT ON TARIFA_IVA TO TRIGGER ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ARTICULO_AI;
GRANT UPDATE, REFERENCES ON ARTICULO_ALERTAS TO TRIGGER ARTICULO_ALERTAS_BI;
GRANT UPDATE, REFERENCES ON ARTICULO TO TRIGGER ARTICULO_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER ARTICULO_AU;
GRANT SELECT, UPDATE ON CONTABIL_ARTICULO TO TRIGGER ARTICULO_AU;
GRANT SELECT ON GRUPO TO TRIGGER ARTICULO_AU;
GRANT SELECT ON TARIFA_IVA TO TRIGGER ARTICULO_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ARTICULO_AU;
GRANT UPDATE, REFERENCES ON ARTICULO TO TRIGGER ARTICULO_BD;
GRANT SELECT ON MOVIMIENTO_ARTICULO TO TRIGGER ARTICULO_BD;
GRANT SELECT, UPDATE, REFERENCES ON ARTICULO TO TRIGGER ARTICULO_BI;
GRANT SELECT ON AJUSTES_DETALLE TO TRIGGER ARTICULO_BU;
GRANT UPDATE, REFERENCES ON ARTICULO TO TRIGGER ARTICULO_BU;
GRANT SELECT ON ARTICULOS_PRODUCTO TO TRIGGER ARTICULO_BU;
GRANT SELECT ON DESENSAMBLES_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER ARTICULO_BU;
GRANT SELECT ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON ENSAMBLES_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON ENTRADAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON FACTURAS_COMPRAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON FACTURAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON MOVIMIENTO_ARTICULO TO TRIGGER ARTICULO_BU;
GRANT SELECT ON ORDENINVENTARIO_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON REMISIONES_VENTA_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON REMISION_PROVEEDOR_DET TO TRIGGER ARTICULO_BU;
GRANT SELECT ON RESERVAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON SALIDAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT SELECT ON TRASFERENCIAS_DETALLE TO TRIGGER ARTICULO_BU;
GRANT UPDATE, REFERENCES ON AUDITORIA TO TRIGGER AUDITORIA_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER AUTORIZACIONES_AD;
GRANT UPDATE, REFERENCES ON AUTORIZACIONES TO TRIGGER AUTORIZACIONES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER AUTORIZACIONES_AI;
GRANT UPDATE, REFERENCES ON AUTORIZACIONES TO TRIGGER AUTORIZACIONES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER AUTORIZACIONES_AU;
GRANT UPDATE, REFERENCES ON AUTORIZACIONES TO TRIGGER AUTORIZACIONES_AU;
GRANT UPDATE, REFERENCES ON AUTORIZACIONES TO TRIGGER AUTORIZACIONES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER AUTORIZACIONES_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER BARRAS_ARTICULO_AD;
GRANT UPDATE, REFERENCES ON BARRAS_ARTICULO TO TRIGGER BARRAS_ARTICULO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER BARRAS_ARTICULO_AI;
GRANT UPDATE, REFERENCES ON BARRAS_ARTICULO TO TRIGGER BARRAS_ARTICULO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER BARRAS_ARTICULO_AU;
GRANT UPDATE, REFERENCES ON BARRAS_ARTICULO TO TRIGGER BARRAS_ARTICULO_AU;
GRANT UPDATE, REFERENCES ON CAMBIODOC_ENTRADAS TO TRIGGER CAMBIODOC_ENTRADAS_AD;
GRANT SELECT ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIODOC_ENTRADAS_AD;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CAMBIODOC_ENTRADAS_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CAMBIODOC_ENTRADAS_AD;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER CAMBIODOC_ENTRADAS_AD;
GRANT UPDATE, REFERENCES ON CAMBIODOC_ENTRADAS TO TRIGGER CAMBIODOC_ENTRADAS_AI;
GRANT SELECT ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIODOC_ENTRADAS_AI;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CAMBIODOC_ENTRADAS_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CAMBIODOC_ENTRADAS_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CAMBIODOC_ENTRADAS_AI;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER CAMBIODOC_ENTRADAS_AI;
GRANT UPDATE, REFERENCES ON CAMBIODOC_ENTRADAS TO TRIGGER CAMBIODOC_ENTRADAS_AU;
GRANT SELECT ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIODOC_ENTRADAS_AU;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CAMBIODOC_ENTRADAS_AU;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CAMBIODOC_ENTRADAS_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CAMBIODOC_ENTRADAS_AU;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER CAMBIODOC_ENTRADAS_AU;
GRANT UPDATE, REFERENCES ON CAMBIODOC_SALIDAS TO TRIGGER CAMBIODOC_SALIDAS_AD;
GRANT SELECT ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIODOC_SALIDAS_AD;
GRANT SELECT, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CAMBIODOC_SALIDAS_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CAMBIODOC_SALIDAS_AD;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER CAMBIODOC_SALIDAS_AD;
GRANT UPDATE, REFERENCES ON CAMBIODOC_SALIDAS TO TRIGGER CAMBIODOC_SALIDAS_AI;
GRANT SELECT, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIODOC_SALIDAS_AI;
GRANT INSERT ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CAMBIODOC_SALIDAS_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CAMBIODOC_SALIDAS_AI;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER CAMBIODOC_SALIDAS_AI;
GRANT UPDATE, REFERENCES ON CAMBIODOC_SALIDAS TO TRIGGER CAMBIODOC_SALIDAS_AU;
GRANT SELECT ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIODOC_SALIDAS_AU;
GRANT SELECT, INSERT, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CAMBIODOC_SALIDAS_AU;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CAMBIODOC_SALIDAS_AU;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER CAMBIODOC_SALIDAS_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER CAMBIO_DOCUMENTOS_AD;
GRANT UPDATE, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIO_DOCUMENTOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CAMBIO_DOCUMENTOS_AI;
GRANT UPDATE, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIO_DOCUMENTOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CAMBIO_DOCUMENTOS_AU;
GRANT SELECT, UPDATE ON CAMBIODOC_ENTRADAS TO TRIGGER CAMBIO_DOCUMENTOS_AU;
GRANT SELECT, UPDATE ON CAMBIODOC_SALIDAS TO TRIGGER CAMBIO_DOCUMENTOS_AU;
GRANT UPDATE, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIO_DOCUMENTOS_AU;
GRANT SELECT, UPDATE, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER CAMBIO_DOCUMENTOS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER CAMBIO_DOCUMENTOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CAMBIO_DOCUMENTOS_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER CARGA_REMESA_AD;
GRANT UPDATE, REFERENCES ON CARGA_REMESA TO TRIGGER CARGA_REMESA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CARGA_REMESA_AI;
GRANT UPDATE, REFERENCES ON CARGA_REMESA TO TRIGGER CARGA_REMESA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CARGA_REMESA_AU;
GRANT UPDATE, REFERENCES ON CARGA_REMESA TO TRIGGER CARGA_REMESA_AU;
GRANT SELECT, UPDATE, REFERENCES ON CARGA_REMESA TO TRIGGER CARGA_REMESA_BI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER CARGA_REMESA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CARGA_REMESA_BI;
GRANT UPDATE, REFERENCES ON CENTROS TO TRIGGER CENTROS_BD;
GRANT SELECT ON COMPROBANTE_DETALLE TO TRIGGER CENTROS_BD;
GRANT INSERT ON AUDITORIA TO TRIGGER CHEQUES_AD;
GRANT UPDATE, REFERENCES ON CHEQUES TO TRIGGER CHEQUES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CHEQUES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CHEQUES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER CHEQUES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CHEQUES_AI;
GRANT UPDATE, REFERENCES ON CHEQUES TO TRIGGER CHEQUES_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER CHEQUES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CHEQUES_AU;
GRANT UPDATE, REFERENCES ON CHEQUES TO TRIGGER CHEQUES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CHEQUES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CHEQUES_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_BANCO TO TRIGGER CHEQUES_AU;
GRANT SELECT, UPDATE, REFERENCES ON CHEQUES TO TRIGGER CHEQUES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER CHEQUES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CHEQUES_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER CIERRE_ANUAL_AD;
GRANT UPDATE, REFERENCES ON CIERRE_ANUAL TO TRIGGER CIERRE_ANUAL_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CIERRE_ANUAL_AI;
GRANT UPDATE, REFERENCES ON CIERRE_ANUAL TO TRIGGER CIERRE_ANUAL_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CIERRE_ANUAL_AU;
GRANT UPDATE, REFERENCES ON CIERRE_ANUAL TO TRIGGER CIERRE_ANUAL_AU;
GRANT UPDATE, REFERENCES ON CIERRE_ANUAL TO TRIGGER CIERRE_ANUAL_BD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CIERRE_ANUAL_BD;
GRANT SELECT, UPDATE, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CIERRE_ANUAL_BD;
GRANT SELECT ON CENTROS TO TRIGGER CIERRE_ANUAL_BI;
GRANT UPDATE, REFERENCES ON CIERRE_ANUAL TO TRIGGER CIERRE_ANUAL_BI;
GRANT INSERT ON COMPROBANTE_DETALLE TO TRIGGER CIERRE_ANUAL_BI;
GRANT INSERT ON COMPROBANTE_ENCABEZADO TO TRIGGER CIERRE_ANUAL_BI;
GRANT SELECT ON CUENTAS TO TRIGGER CIERRE_ANUAL_BI;
GRANT SELECT ON TERCEROS TO TRIGGER CIERRE_ANUAL_BI;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COMPROBA TO TRIGGER CIERRE_ANUAL_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CIERRE_ANUAL_BI;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_TERCERO TO TRIGGER CIERRE_ANUAL_BI;
GRANT UPDATE, REFERENCES ON CIERRE_ANUAL TO TRIGGER CIERRE_ANUAL_BU;
GRANT SELECT, UPDATE ON COMPROBANTE_ENCABEZADO TO TRIGGER CIERRE_ANUAL_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER CIERRE_TERCEROS_AD;
GRANT UPDATE, REFERENCES ON CIERRE_TERCEROS TO TRIGGER CIERRE_TERCEROS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CIERRE_TERCEROS_AI;
GRANT UPDATE, REFERENCES ON CIERRE_TERCEROS TO TRIGGER CIERRE_TERCEROS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CIERRE_TERCEROS_AU;
GRANT UPDATE, REFERENCES ON CIERRE_TERCEROS TO TRIGGER CIERRE_TERCEROS_AU;
GRANT UPDATE, REFERENCES ON CIERRE_TERCEROS TO TRIGGER CIERRE_TERCEROS_BD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CIERRE_TERCEROS_BD;
GRANT SELECT, UPDATE, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CIERRE_TERCEROS_BD;
GRANT UPDATE, REFERENCES ON CIERRE_TERCEROS TO TRIGGER CIERRE_TERCEROS_BI;
GRANT INSERT ON COMPROBANTE_DETALLE TO TRIGGER CIERRE_TERCEROS_BI;
GRANT INSERT ON COMPROBANTE_ENCABEZADO TO TRIGGER CIERRE_TERCEROS_BI;
GRANT SELECT ON TERCEROS TO TRIGGER CIERRE_TERCEROS_BI;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_COMPROBA TO TRIGGER CIERRE_TERCEROS_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CIERRE_TERCEROS_BI;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO TO TRIGGER CIERRE_TERCEROS_BI;
GRANT UPDATE, REFERENCES ON CIERRE_TERCEROS TO TRIGGER CIERRE_TERCEROS_BU;
GRANT SELECT, UPDATE ON COMPROBANTE_ENCABEZADO TO TRIGGER CIERRE_TERCEROS_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER CLIENTES_AD;
GRANT UPDATE, REFERENCES ON CLIENTES TO TRIGGER CLIENTES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CLIENTES_AI;
GRANT UPDATE, REFERENCES ON CLIENTES TO TRIGGER CLIENTES_AI;
GRANT INSERT ON CLIENTE_SUCURSALES TO TRIGGER CLIENTES_AI;
GRANT SELECT ON TERCEROS TO TRIGGER CLIENTES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CLIENTES_AU;
GRANT UPDATE, REFERENCES ON CLIENTES TO TRIGGER CLIENTES_AU;
GRANT SELECT, UPDATE ON CLIENTE_SUCURSALES TO TRIGGER CLIENTES_AU;
GRANT SELECT ON TERCEROS TO TRIGGER CLIENTES_AU;
GRANT UPDATE, REFERENCES ON CLIENTES TO TRIGGER CLIENTES_BD;
GRANT SELECT ON MOVIMIENTO_CLIENTES TO TRIGGER CLIENTES_BD;
GRANT UPDATE, REFERENCES ON CLIENTES TO TRIGGER CLIENTES_BI;
GRANT UPDATE, REFERENCES ON CLIENTE_SUCURSALES TO TRIGGER CLIENTE_SUCURSALES_BD;
GRANT SELECT ON MOVIMIENTO_CLIENTES TO TRIGGER CLIENTE_SUCURSALES_BD;
GRANT UPDATE, REFERENCES ON CLIENTE_SUCURSALES TO TRIGGER CLIENTE_SUCURSALES_BU;
GRANT SELECT ON MOVIMIENTO_CLIENTES TO TRIGGER CLIENTE_SUCURSALES_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER COBRADORES_AD;
GRANT UPDATE, REFERENCES ON COBRADORES TO TRIGGER COBRADORES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER COBRADORES_AI;
GRANT UPDATE, REFERENCES ON COBRADORES TO TRIGGER COBRADORES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER COBRADORES_AU;
GRANT UPDATE, REFERENCES ON COBRADORES TO TRIGGER COBRADORES_AU;
GRANT UPDATE, REFERENCES ON COBRADORES TO TRIGGER COBRADORES_BD;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO TRIGGER COBRADORES_BD;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO TRIGGER COBRADORES_BD;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER COBRADORES_BD;
GRANT SELECT, UPDATE, REFERENCES ON COMISION_COBRO TO TRIGGER COMISION_COBRO_BI;
GRANT SELECT, UPDATE, REFERENCES ON COMISION_COBRO TO TRIGGER COMISION_COBRO_BU;
GRANT UPDATE, REFERENCES ON COMPROBANTE_DETALLE TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT SELECT ON CUENTAS TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ACTIVO TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ARTICULO TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO_TERCERO TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CUENTA TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_TERCERO TO TRIGGER COMPROBANTE_DETALLE_AD;
GRANT UPDATE, REFERENCES ON COMPROBANTE_DETALLE TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT SELECT ON CUENTAS TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ACTIVO TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ARTICULO TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO_TERCERO TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CUENTA TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_TERCERO TO TRIGGER COMPROBANTE_DETALLE_AI;
GRANT UPDATE, REFERENCES ON COMPROBANTE_DETALLE TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT SELECT ON CUENTAS TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ACTIVO TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_ARTICULO TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CENTRO_TERCERO TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_CUENTA TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE ACTUALICE_SALDO_TERCERO TO TRIGGER COMPROBANTE_DETALLE_AU;
GRANT UPDATE, REFERENCES ON COMPROBANTE_DETALLE TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT SELECT ON COMPROBANTE_ENCABEZADO TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT SELECT ON CUENTAS TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE EXISTE_CENTRO TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE EXISTE_TERCERO TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA TO TRIGGER COMPROBANTE_DETALLE_BI;
GRANT SELECT, UPDATE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER COMPROBANTE_ENCABEZADO_BI;
GRANT SELECT, UPDATE ON PREFIJOS_CONTA TO TRIGGER COMPROBANTE_ENCABEZADO_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER COMPROBANTE_ENCABEZADO_BI;
GRANT EXECUTE ON PROCEDURE DIAS_MES TO TRIGGER COMPROBANTE_ENCABEZADO_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER COMPROBANTE_ENCABEZADO_BI;
GRANT SELECT ON COMPROBANTE_DETALLE TO TRIGGER COMPROBANTE_ENCABEZADO_BU;
GRANT UPDATE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER COMPROBANTE_ENCABEZADO_BU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER COMPROBANTE_ENCABEZADO_BU;
GRANT UPDATE, REFERENCES ON CONCEPTOS_CUENTAS TO TRIGGER CONCEPTOS_CUENTAS_BI;
GRANT UPDATE, REFERENCES ON CONCEPTOS_NOMINA TO TRIGGER CONCEPTOS_NOMINA_BD;
GRANT SELECT ON EMPLEADO_CONCEPTOS TO TRIGGER CONCEPTOS_NOMINA_BD;
GRANT SELECT ON NOMINA_CONCEPTOS TO TRIGGER CONCEPTOS_NOMINA_BD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONCILIACION_ENCABEZADO_AD;
GRANT UPDATE, REFERENCES ON CONCILIACION_ENCABEZADO TO TRIGGER CONCILIACION_ENCABEZADO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONCILIACION_ENCABEZADO_AI;
GRANT UPDATE, REFERENCES ON CONCILIACION_ENCABEZADO TO TRIGGER CONCILIACION_ENCABEZADO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONCILIACION_ENCABEZADO_AU;
GRANT UPDATE, REFERENCES ON CONCILIACION_ENCABEZADO TO TRIGGER CONCILIACION_ENCABEZADO_AU;
GRANT SELECT, UPDATE, REFERENCES ON CONCILIACION_ENCABEZADO TO TRIGGER CONCILIACION_ENCABEZADO_BI;
GRANT SELECT, UPDATE ON PREFIJOS_BANCOS TO TRIGGER CONCILIACION_ENCABEZADO_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CONCILIACION_ENCABEZADO_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSIGNA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CONSIGNA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CONSIGNA_AD;
GRANT UPDATE, REFERENCES ON CONSIGNA TO TRIGGER CONSIGNA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSIGNA_AI;
GRANT UPDATE, REFERENCES ON CONSIGNA TO TRIGGER CONSIGNA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSIGNA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CONSIGNA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CONSIGNA_AU;
GRANT UPDATE, REFERENCES ON CONSIGNA TO TRIGGER CONSIGNA_AU;
GRANT SELECT, UPDATE ON CONSIGNA_DETALLE TO TRIGGER CONSIGNA_AU;
GRANT SELECT, UPDATE, REFERENCES ON CONSIGNA TO TRIGGER CONSIGNA_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER CONSIGNA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CONSIGNA_BI;
GRANT SELECT ON CONSIGNA TO TRIGGER CONSIGNA_DETALLE_AD;
GRANT UPDATE, REFERENCES ON CONSIGNA_DETALLE TO TRIGGER CONSIGNA_DETALLE_AD;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CONSIGNA_DETALLE_AD;
GRANT SELECT, UPDATE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER CONSIGNA_DETALLE_AD;
GRANT SELECT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER CONSIGNA_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER CONSIGNA_DETALLE_AD;
GRANT SELECT, REFERENCES ON CONSIGNA TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT UPDATE, REFERENCES ON CONSIGNA_DETALLE TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER CONSIGNA_DETALLE_AI;
GRANT SELECT, REFERENCES ON CONSIGNA TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT UPDATE, REFERENCES ON CONSIGNA_DETALLE TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER CONSIGNA_DETALLE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSIGNA_TARJETAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CONSIGNA_TARJETAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CONSIGNA_TARJETAS_AD;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS TO TRIGGER CONSIGNA_TARJETAS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER CONSIGNA_TARJETAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSIGNA_TARJETAS_AI;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS TO TRIGGER CONSIGNA_TARJETAS_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER CONSIGNA_TARJETAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSIGNA_TARJETAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER CONSIGNA_TARJETAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER CONSIGNA_TARJETAS_AU;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS TO TRIGGER CONSIGNA_TARJETAS_AU;
GRANT SELECT, UPDATE ON CONSIGNA_TARJETAS_DET TO TRIGGER CONSIGNA_TARJETAS_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER CONSIGNA_TARJETAS_AU;
GRANT SELECT, UPDATE, REFERENCES ON CONSIGNA_TARJETAS TO TRIGGER CONSIGNA_TARJETAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER CONSIGNA_TARJETAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CONSIGNA_TARJETAS_BI;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS_DET TO TRIGGER CONSIGNA_TARJETAS_DET_AD;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CONSIGNA_TARJETAS_DET_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CONSIGNA_TARJETAS_DET_AD;
GRANT SELECT ON CONSIGNA_TARJETAS TO TRIGGER CONSIGNA_TARJETAS_DET_AI;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS_DET TO TRIGGER CONSIGNA_TARJETAS_DET_AI;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CONSIGNA_TARJETAS_DET_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CONSIGNA_TARJETAS_DET_AI;
GRANT SELECT ON CONSIGNA_TARJETAS TO TRIGGER CONSIGNA_TARJETAS_DET_AU;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS_DET TO TRIGGER CONSIGNA_TARJETAS_DET_AU;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER CONSIGNA_TARJETAS_DET_AU;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER CONSIGNA_TARJETAS_DET_AU;
GRANT SELECT, UPDATE, REFERENCES ON CONSOLIDADO_NOMINA TO TRIGGER CONSOLIDADO_NOMINA_BI;
GRANT UPDATE, REFERENCES ON CONSOLIDADO_NOMINA_PROV TO TRIGGER CONSOLIDADO_NOMINA_PROV_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSUMOS_AD;
GRANT UPDATE, REFERENCES ON CONSUMOS TO TRIGGER CONSUMOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSUMOS_AI;
GRANT UPDATE, REFERENCES ON CONSUMOS TO TRIGGER CONSUMOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONSUMOS_AU;
GRANT UPDATE, REFERENCES ON CONSUMOS TO TRIGGER CONSUMOS_AU;
GRANT SELECT, UPDATE ON CONSUMO_DETALLE TO TRIGGER CONSUMOS_AU;
GRANT SELECT, UPDATE, REFERENCES ON CONSUMOS TO TRIGGER CONSUMOS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER CONSUMOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER CONSUMOS_BI;
GRANT UPDATE, REFERENCES ON CONSUMO_DETALLE TO TRIGGER CONSUMO_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER CONSUMO_DETALLE_AD;
GRANT SELECT, REFERENCES ON CONSUMOS TO TRIGGER CONSUMO_DETALLE_AI;
GRANT UPDATE, REFERENCES ON CONSUMO_DETALLE TO TRIGGER CONSUMO_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER CONSUMO_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER CONSUMO_DETALLE_AI;
GRANT SELECT ON CONSUMOS TO TRIGGER CONSUMO_DETALLE_AU;
GRANT UPDATE, REFERENCES ON CONSUMO_DETALLE TO TRIGGER CONSUMO_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER CONSUMO_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER CONSUMO_DETALLE_AU;
GRANT UPDATE, REFERENCES ON CONSUMO_DETALLE TO TRIGGER CONSUMO_DETALLE_BI;
GRANT UPDATE, REFERENCES ON CONTABILIZACION_DET TO TRIGGER CONTABILIZACION_DET_BI;
GRANT SELECT ON CUENTAS TO TRIGGER CONTABILIZACION_DET_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CONTABILIZACION_DET_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONTABIL_ARTICULO_AD;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO TO TRIGGER CONTABIL_ARTICULO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONTABIL_ARTICULO_AI;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO TO TRIGGER CONTABIL_ARTICULO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONTABIL_ARTICULO_AU;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO TO TRIGGER CONTABIL_ARTICULO_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER CONTABIL_ARTICULO_N_AD;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO_NIIF TO TRIGGER CONTABIL_ARTICULO_N_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER CONTABIL_ARTICULO_N_AI;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO_NIIF TO TRIGGER CONTABIL_ARTICULO_N_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER CONTABIL_ARTICULO_N_AU;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO_NIIF TO TRIGGER CONTABIL_ARTICULO_N_AU;
GRANT SELECT, UPDATE, REFERENCES ON COSTOS TO TRIGGER COSTOS_BI;
GRANT SELECT, UPDATE, REFERENCES ON COSTOS_NIIF TO TRIGGER COSTOS_NIIF_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER COTIZACIONES_AD;
GRANT UPDATE, REFERENCES ON COTIZACIONES TO TRIGGER COTIZACIONES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER COTIZACIONES_AI;
GRANT UPDATE, REFERENCES ON COTIZACIONES TO TRIGGER COTIZACIONES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER COTIZACIONES_AU;
GRANT UPDATE, REFERENCES ON COTIZACIONES TO TRIGGER COTIZACIONES_AU;
GRANT SELECT, UPDATE ON COTIZACIONES_DETALLE TO TRIGGER COTIZACIONES_AU;
GRANT SELECT, UPDATE, REFERENCES ON COTIZACIONES TO TRIGGER COTIZACIONES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER COTIZACIONES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER COTIZACIONES_BI;
GRANT UPDATE, REFERENCES ON COTIZACIONES_DETALLE TO TRIGGER COTIZACIONES_DETALLE_BI;
GRANT UPDATE, REFERENCES ON COTIZACIONES_PROVEEDOR_DET TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AI;
GRANT SELECT ON COTIZACION_PROVEEDOR TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AI;
GRANT SELECT, INSERT, UPDATE ON PROVEEDOR_ARTICULO TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AI;
GRANT UPDATE, REFERENCES ON COTIZACIONES_PROVEEDOR_DET TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AU;
GRANT SELECT ON COTIZACION_PROVEEDOR TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AU;
GRANT SELECT, INSERT, UPDATE ON PROVEEDOR_ARTICULO TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER COTIZACIONES_PROVEEDOR_DET_AU;
GRANT UPDATE, REFERENCES ON COTIZACIONES_PROVEEDOR_DET TO TRIGGER COTIZACIONES_PROVEEDOR_DET_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER COTIZACION_PROVEEDOR_AD;
GRANT UPDATE, REFERENCES ON COTIZACION_PROVEEDOR TO TRIGGER COTIZACION_PROVEEDOR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER COTIZACION_PROVEEDOR_AI;
GRANT UPDATE, REFERENCES ON COTIZACION_PROVEEDOR TO TRIGGER COTIZACION_PROVEEDOR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER COTIZACION_PROVEEDOR_AU;
GRANT SELECT, UPDATE ON COTIZACIONES_PROVEEDOR_DET TO TRIGGER COTIZACION_PROVEEDOR_AU;
GRANT UPDATE, REFERENCES ON COTIZACION_PROVEEDOR TO TRIGGER COTIZACION_PROVEEDOR_AU;
GRANT SELECT, UPDATE, REFERENCES ON COTIZACION_PROVEEDOR TO TRIGGER COTIZACION_PROVEEDOR_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER COTIZACION_PROVEEDOR_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER COTIZACION_PROVEEDOR_BI;
GRANT UPDATE, REFERENCES ON CUENTAS TO TRIGGER CUENTAS_AI;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_INICIALES TO TRIGGER CUENTAS_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CUENTAS_AI;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER CUENTAS_AI;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO TRIGGER CUENTAS_AI;
GRANT SELECT ON COMPROBANTE_DETALLE TO TRIGGER CUENTAS_BD;
GRANT SELECT, UPDATE, REFERENCES ON CUENTAS TO TRIGGER CUENTAS_BD;
GRANT UPDATE, REFERENCES ON CUENTAS TO TRIGGER CUENTAS_BI;
GRANT EXECUTE ON PROCEDURE VALIDE_PADRE TO TRIGGER CUENTAS_BI;
GRANT UPDATE, REFERENCES ON CUENTAS_NIIF TO TRIGGER CUENTAS_NIIF_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER CUENTAS_NIIF_AI;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER CUENTAS_NIIF_AI;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO TRIGGER CUENTAS_NIIF_AI;
GRANT SELECT ON COMPROBANTE_DETALLE TO TRIGGER CUENTAS_NIIF_BD;
GRANT SELECT, UPDATE, REFERENCES ON CUENTAS_NIIF TO TRIGGER CUENTAS_NIIF_BD;
GRANT UPDATE, REFERENCES ON CUENTAS_NIIF TO TRIGGER CUENTAS_NIIF_BI;
GRANT EXECUTE ON PROCEDURE VALIDE_PADRE TO TRIGGER CUENTAS_NIIF_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER DESENSAMBLES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DESENSAMBLES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DESENSAMBLES_AD;
GRANT UPDATE, REFERENCES ON DESENSAMBLES TO TRIGGER DESENSAMBLES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DESENSAMBLES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER DESENSAMBLES_AI;
GRANT UPDATE, REFERENCES ON DESENSAMBLES TO TRIGGER DESENSAMBLES_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER DESENSAMBLES_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DESENSAMBLES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER DESENSAMBLES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DESENSAMBLES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DESENSAMBLES_AU;
GRANT UPDATE, REFERENCES ON DESENSAMBLES TO TRIGGER DESENSAMBLES_AU;
GRANT SELECT, UPDATE ON DESENSAMBLES_DETALLE TO TRIGGER DESENSAMBLES_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DESENSAMBLES_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DESENSAMBLES_AU;
GRANT SELECT, UPDATE, REFERENCES ON DESENSAMBLES TO TRIGGER DESENSAMBLES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER DESENSAMBLES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER DESENSAMBLES_BI;
GRANT UPDATE, REFERENCES ON DESENSAMBLES_DETALLE TO TRIGGER DESENSAMBLES_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DESENSAMBLES_DETALLE_AD;
GRANT SELECT, REFERENCES ON DESENSAMBLES TO TRIGGER DESENSAMBLES_DETALLE_AI;
GRANT UPDATE, REFERENCES ON DESENSAMBLES_DETALLE TO TRIGGER DESENSAMBLES_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER DESENSAMBLES_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER DESENSAMBLES_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DESENSAMBLES_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER DESENSAMBLES_DETALLE_AI;
GRANT SELECT, REFERENCES ON DESENSAMBLES TO TRIGGER DESENSAMBLES_DETALLE_AU;
GRANT UPDATE, REFERENCES ON DESENSAMBLES_DETALLE TO TRIGGER DESENSAMBLES_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DESENSAMBLES_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER DESENSAMBLES_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DESENSAMBLES_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER DESENSAMBLES_DETALLE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT SELECT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER DEVOLUCIONES_COMPRAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCIONES_COMPRAS_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER DEVOLUCIONES_COMPRAS_AI;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER DEVOLUCIONES_COMPRAS_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER DEVOLUCIONES_COMPRAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, UPDATE ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER DEVOLUCIONES_COMPRAS_AU;
GRANT SELECT, UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_BI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER DEVOLUCIONES_COMPRAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER DEVOLUCIONES_COMPRAS_BI;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AD;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AD;
GRANT SELECT, UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AD;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AI;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AI;
GRANT SELECT, UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AI;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AU;
GRANT SELECT, UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER DEVOLUCIONES_COMPRAS_DET_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER DEVOLUCIONES_COMPRAS_DET_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCIONES_VENTAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DEVOLUCIONES_VENTAS_AD;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER DEVOLUCIONES_VENTAS_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CARTERA TO TRIGGER DEVOLUCIONES_VENTAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCIONES_VENTAS_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER DEVOLUCIONES_VENTAS_AI;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_AI;
GRANT INSERT ON MOVIMIENTO_CLIENTES TO TRIGGER DEVOLUCIONES_VENTAS_AI;
GRANT INSERT ON SALDOS_DOC_CARTERA TO TRIGGER DEVOLUCIONES_VENTAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT, UPDATE ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER DEVOLUCIONES_VENTAS_AU;
GRANT SELECT ON CLIENTES TO TRIGGER DEVOLUCIONES_VENTAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_BI;
GRANT SELECT ON FACTURAS TO TRIGGER DEVOLUCIONES_VENTAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER DEVOLUCIONES_VENTAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER DEVOLUCIONES_VENTAS_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER DEVOLUCIONES_VENTAS_BI;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AD;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AD;
GRANT SELECT, UPDATE ON FACTURAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AD;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AI;
GRANT SELECT, UPDATE ON FACTURAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AI;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AU;
GRANT SELECT, UPDATE ON FACTURAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER DEVOLUCIONES_VENTAS_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, UPDATE ON CONSIGNA_DETALLE TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT UPDATE, REFERENCES ON DEVOLUCION_CHEQUES TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CAJA TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CARTERA TO TRIGGER DEVOLUCION_CHEQUES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT SELECT, UPDATE ON CONSIGNA_DETALLE TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT UPDATE, REFERENCES ON DEVOLUCION_CHEQUES TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT INSERT ON DOCUMENTOS_PAGO_CAJA TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT INSERT ON MOVIMIENTO_CAJA TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT INSERT ON MOVIMIENTO_CLIENTES TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT INSERT ON SALDOS_DOC_CARTERA TO TRIGGER DEVOLUCION_CHEQUES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, UPDATE ON CONSIGNA_DETALLE TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT UPDATE, REFERENCES ON DEVOLUCION_CHEQUES TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, INSERT, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_BANCO TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CAJA TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT, INSERT, DELETE ON SALDOS_DOC_CARTERA TO TRIGGER DEVOLUCION_CHEQUES_AU;
GRANT SELECT ON CLIENTES TO TRIGGER DEVOLUCION_CHEQUES_BI;
GRANT SELECT, UPDATE, REFERENCES ON DEVOLUCION_CHEQUES TO TRIGGER DEVOLUCION_CHEQUES_BI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER DEVOLUCION_CHEQUES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER DEVOLUCION_CHEQUES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER DEVOLUCION_CHEQUES_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER DEVOLUCION_CHEQUES_BI;
GRANT SELECT, UPDATE, REFERENCES ON DOCUMENTOS_IMPORT_EMPLEADO TO TRIGGER DOCUMENTOS_IMPORT_EMPLEADO_BI;
GRANT UPDATE, REFERENCES ON DOCUMENTOS_PAGO_CAJA TO TRIGGER DOCUMENTOS_PAGO_CAJA_BD;
GRANT INSERT ON AUDITORIA TO TRIGGER EGRESOS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER EGRESOS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER EGRESOS_AD;
GRANT UPDATE, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CAJA TO TRIGGER EGRESOS_AD;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER EGRESOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER EGRESOS_AI;
GRANT UPDATE, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_AI;
GRANT INSERT ON MOVIMIENTO_CAJA TO TRIGGER EGRESOS_AI;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER EGRESOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER EGRESOS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER EGRESOS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER EGRESOS_AU;
GRANT UPDATE, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_AU;
GRANT SELECT, UPDATE ON EGRESOS_BANCO TO TRIGGER EGRESOS_AU;
GRANT SELECT, UPDATE ON EGRESOS_CAJA TO TRIGGER EGRESOS_AU;
GRANT SELECT, UPDATE ON EGRESOS_DETALLE TO TRIGGER EGRESOS_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CAJA TO TRIGGER EGRESOS_AU;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER EGRESOS_AU;
GRANT SELECT, DELETE ON CHEQUES TO TRIGGER EGRESOS_BANCO_AD;
GRANT UPDATE, REFERENCES ON EGRESOS_BANCO TO TRIGGER EGRESOS_BANCO_AD;
GRANT SELECT, DELETE ON RETIROS TO TRIGGER EGRESOS_BANCO_AD;
GRANT INSERT ON CHEQUES TO TRIGGER EGRESOS_BANCO_AI;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER EGRESOS_BANCO_AI;
GRANT UPDATE, REFERENCES ON EGRESOS_BANCO TO TRIGGER EGRESOS_BANCO_AI;
GRANT INSERT ON RETIROS TO TRIGGER EGRESOS_BANCO_AI;
GRANT SELECT, INSERT, UPDATE, DELETE ON CHEQUES TO TRIGGER EGRESOS_BANCO_AU;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER EGRESOS_BANCO_AU;
GRANT UPDATE, REFERENCES ON EGRESOS_BANCO TO TRIGGER EGRESOS_BANCO_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON RETIROS TO TRIGGER EGRESOS_BANCO_AU;
GRANT SELECT, UPDATE, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER EGRESOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER EGRESOS_BI;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER EGRESOS_CAJA_AD;
GRANT SELECT ON EGRESOS TO TRIGGER EGRESOS_CAJA_AD;
GRANT UPDATE, REFERENCES ON EGRESOS_CAJA TO TRIGGER EGRESOS_CAJA_AD;
GRANT SELECT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER EGRESOS_CAJA_AD;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER EGRESOS_CAJA_AD;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER EGRESOS_CAJA_AI;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_CAJA_AI;
GRANT UPDATE, REFERENCES ON EGRESOS_CAJA TO TRIGGER EGRESOS_CAJA_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER EGRESOS_CAJA_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EGRESOS_CAJA_AI;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER EGRESOS_CAJA_AI;
GRANT SELECT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER EGRESOS_CAJA_AU;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_CAJA_AU;
GRANT UPDATE, REFERENCES ON EGRESOS_CAJA TO TRIGGER EGRESOS_CAJA_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER EGRESOS_CAJA_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EGRESOS_CAJA_AU;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER EGRESOS_CAJA_AU;
GRANT SELECT ON EGRESOS TO TRIGGER EGRESOS_CRUCEC_AD;
GRANT UPDATE, REFERENCES ON EGRESOS_CRUCEC TO TRIGGER EGRESOS_CRUCEC_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CLIENTES TO TRIGGER EGRESOS_CRUCEC_AD;
GRANT SELECT, UPDATE ON SALDOS_DOC_CARTERA TO TRIGGER EGRESOS_CRUCEC_AD;
GRANT SELECT ON CLIENTE_SUCURSALES TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT SELECT ON EGRESOS TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT UPDATE, REFERENCES ON EGRESOS_CRUCEC TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CLIENTES TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CARTERA TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO TRIGGER EGRESOS_CRUCEC_AI;
GRANT SELECT ON CLIENTE_SUCURSALES TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT SELECT ON EGRESOS TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT UPDATE, REFERENCES ON EGRESOS_CRUCEC TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CLIENTES TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CARTERA TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO TRIGGER EGRESOS_CRUCEC_AU;
GRANT UPDATE, REFERENCES ON EGRESOS_CRUCEC TO TRIGGER EGRESOS_CRUCEC_BI;
GRANT SELECT, DELETE ON ANTICIPOS_PROVEEDOR TO TRIGGER EGRESOS_DETALLE_AD;
GRANT SELECT ON EGRESOS TO TRIGGER EGRESOS_DETALLE_AD;
GRANT UPDATE, REFERENCES ON EGRESOS_DETALLE TO TRIGGER EGRESOS_DETALLE_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER EGRESOS_DETALLE_AD;
GRANT SELECT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER EGRESOS_DETALLE_AD;
GRANT SELECT, UPDATE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER EGRESOS_DETALLE_AI;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON EGRESOS_DETALLE TO TRIGGER EGRESOS_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_PROVEEDOR TO TRIGGER EGRESOS_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER EGRESOS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EGRESOS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO TRIGGER EGRESOS_DETALLE_AI;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER EGRESOS_DETALLE_AU;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON EGRESOS_DETALLE TO TRIGGER EGRESOS_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_PROVEEDOR TO TRIGGER EGRESOS_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER EGRESOS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EGRESOS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO TRIGGER EGRESOS_DETALLE_AU;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER EGRESOS_DETALLE_BI;
GRANT UPDATE, REFERENCES ON EMPLEADOS TO TRIGGER EMPLEADOS_AI;
GRANT INSERT ON PROGRAM_VACACIONES TO TRIGGER EMPLEADOS_AI;
GRANT UPDATE, REFERENCES ON EMPLEADOS TO TRIGGER EMPLEADOS_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER ENSAMBLES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ENSAMBLES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ENSAMBLES_AD;
GRANT UPDATE, REFERENCES ON ENSAMBLES TO TRIGGER ENSAMBLES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER ENSAMBLES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ENSAMBLES_AI;
GRANT UPDATE, REFERENCES ON ENSAMBLES TO TRIGGER ENSAMBLES_AI;
GRANT SELECT, REFERENCES ON ENSAMBLES_DETALLE TO TRIGGER ENSAMBLES_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER ENSAMBLES_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ENSAMBLES_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ENSAMBLES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ENSAMBLES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ENSAMBLES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ENSAMBLES_AU;
GRANT UPDATE, REFERENCES ON ENSAMBLES TO TRIGGER ENSAMBLES_AU;
GRANT SELECT, UPDATE, REFERENCES ON ENSAMBLES_DETALLE TO TRIGGER ENSAMBLES_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER ENSAMBLES_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ENSAMBLES_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ENSAMBLES_AU;
GRANT SELECT, UPDATE, REFERENCES ON ENSAMBLES TO TRIGGER ENSAMBLES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER ENSAMBLES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER ENSAMBLES_BI;
GRANT UPDATE, REFERENCES ON ENSAMBLES_DETALLE TO TRIGGER ENSAMBLES_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER ENSAMBLES_DETALLE_AD;
GRANT SELECT, REFERENCES ON ENSAMBLES TO TRIGGER ENSAMBLES_DETALLE_AI;
GRANT UPDATE, REFERENCES ON ENSAMBLES_DETALLE TO TRIGGER ENSAMBLES_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER ENSAMBLES_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ENSAMBLES_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ENSAMBLES_DETALLE_AI;
GRANT SELECT, REFERENCES ON ENSAMBLES TO TRIGGER ENSAMBLES_DETALLE_AU;
GRANT UPDATE, REFERENCES ON ENSAMBLES_DETALLE TO TRIGGER ENSAMBLES_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER ENSAMBLES_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ENSAMBLES_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ENSAMBLES_DETALLE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER ENTRADAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ENTRADAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ENTRADAS_AD;
GRANT UPDATE, REFERENCES ON ENTRADAS TO TRIGGER ENTRADAS_AD;
GRANT SELECT, UPDATE ON ORDENES_INVENTARIO TO TRIGGER ENTRADAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ENTRADAS_AI;
GRANT UPDATE, REFERENCES ON ENTRADAS TO TRIGGER ENTRADAS_AI;
GRANT SELECT, UPDATE ON ORDENES_INVENTARIO TO TRIGGER ENTRADAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ENTRADAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER ENTRADAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER ENTRADAS_AU;
GRANT UPDATE, REFERENCES ON ENTRADAS TO TRIGGER ENTRADAS_AU;
GRANT SELECT, UPDATE ON ENTRADAS_DETALLE TO TRIGGER ENTRADAS_AU;
GRANT SELECT, UPDATE ON ORDENES_INVENTARIO TO TRIGGER ENTRADAS_AU;
GRANT SELECT, UPDATE, REFERENCES ON ENTRADAS TO TRIGGER ENTRADAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER ENTRADAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER ENTRADAS_BI;
GRANT UPDATE, REFERENCES ON ENTRADAS_DETALLE TO TRIGGER ENTRADAS_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER ENTRADAS_DETALLE_AD;
GRANT SELECT, REFERENCES ON ENTRADAS TO TRIGGER ENTRADAS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON ENTRADAS_DETALLE TO TRIGGER ENTRADAS_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER ENTRADAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER ENTRADAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ENTRADAS_DETALLE_AI;
GRANT SELECT, REFERENCES ON ENTRADAS TO TRIGGER ENTRADAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON ENTRADAS_DETALLE TO TRIGGER ENTRADAS_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER ENTRADAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER ENTRADAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ENTRADAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON ENTRADAS_DETALLE TO TRIGGER ENTRADAS_DETALLE_BI;
GRANT UPDATE, REFERENCES ON EXISTENCIA TO TRIGGER EXISTENCIA_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EXISTENCIA_BI;
GRANT UPDATE, REFERENCES ON EXISTENCIA TO TRIGGER EXISTENCIA_BU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER EXISTENCIA_BU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT SELECT ON FACTURAS_COMPRA TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTCOMP_DETALLE_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT SELECT, UPDATE ON COSTOS TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT SELECT ON FACTURAS_COMPRA TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE ON PROVEEDOR_ARTICULO TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTCOMP_DETALLE_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT SELECT, UPDATE ON COSTOS TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT SELECT, REFERENCES ON FACTURAS_COMPRA TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON PROVEEDOR_ARTICULO TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTCOMP_DETALLE_AU;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER FACTCOMP_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER FACTURAS_AD;
GRANT SELECT, DELETE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER FACTURAS_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_AD;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO TRIGGER FACTURAS_AD;
GRANT UPDATE, REFERENCES ON FACTURAS TO TRIGGER FACTURAS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER FACTURAS_AD;
GRANT SELECT, DELETE ON PEDIDOS TO TRIGGER FACTURAS_AD;
GRANT SELECT, DELETE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER FACTURAS_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_AI;
GRANT UPDATE, REFERENCES ON FACTURAS TO TRIGGER FACTURAS_AI;
GRANT SELECT ON FACTURAS_DETALLE TO TRIGGER FACTURAS_AI;
GRANT SELECT ON FORMATOS TO TRIGGER FACTURAS_AI;
GRANT INSERT ON MOVIMIENTO_CLIENTES TO TRIGGER FACTURAS_AI;
GRANT INSERT ON PEDIDOS TO TRIGGER FACTURAS_AI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER FACTURAS_AI;
GRANT INSERT ON SALDOS_DOC_CARTERA TO TRIGGER FACTURAS_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER FACTURAS_AU;
GRANT SELECT, DELETE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER FACTURAS_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_AU;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO TRIGGER FACTURAS_AU;
GRANT UPDATE, REFERENCES ON FACTURAS TO TRIGGER FACTURAS_AU;
GRANT SELECT, UPDATE ON FACTURAS_DETALLE TO TRIGGER FACTURAS_AU;
GRANT SELECT ON FORMATOS TO TRIGGER FACTURAS_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER FACTURAS_AU;
GRANT SELECT, INSERT, UPDATE ON PEDIDOS TO TRIGGER FACTURAS_AU;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER FACTURAS_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER FACTURAS_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_AU;
GRANT SELECT ON AUTORIZACIONES TO TRIGGER FACTURAS_BI;
GRANT SELECT ON CLIENTES TO TRIGGER FACTURAS_BI;
GRANT SELECT ON CLIENTE_SUCURSALES TO TRIGGER FACTURAS_BI;
GRANT SELECT ON COMISIONES TO TRIGGER FACTURAS_BI;
GRANT SELECT, UPDATE ON CONFIGURACION TO TRIGGER FACTURAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON FACTURAS TO TRIGGER FACTURAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER FACTURAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER FACTURAS_BI;
GRANT EXECUTE ON PROCEDURE CUPO_DISPONIBLE TO TRIGGER FACTURAS_BI;
GRANT EXECUTE ON PROCEDURE FECHA_A_CONTA TO TRIGGER FACTURAS_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_COMPRA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER FACTURAS_COMPRA_AD;
GRANT SELECT, DELETE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER FACTURAS_COMPRA_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_COMPRA_AD;
GRANT SELECT ON DEVOLUCIONES_COMPRAS TO TRIGGER FACTURAS_COMPRA_AD;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRA TO TRIGGER FACTURAS_COMPRA_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER FACTURAS_COMPRA_AD;
GRANT SELECT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER FACTURAS_COMPRA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_COMPRA_AI;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRA TO TRIGGER FACTURAS_COMPRA_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER FACTURAS_COMPRA_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER FACTURAS_COMPRA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, DELETE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT ON DEVOLUCIONES_COMPRAS TO TRIGGER FACTURAS_COMPRA_AU;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRA TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, UPDATE ON FACTURAS_COMPRAS_DETALLE TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER FACTURAS_COMPRA_AU;
GRANT SELECT, UPDATE, REFERENCES ON FACTURAS_COMPRA TO TRIGGER FACTURAS_COMPRA_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER FACTURAS_COMPRA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER FACTURAS_COMPRA_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER FACTURAS_CONTADO_AI;
GRANT UPDATE, REFERENCES ON FACTURAS_CONTADO TO TRIGGER FACTURAS_CONTADO_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_DETALLE_AD;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER FACTURAS_DETALLE_AD;
GRANT SELECT ON FACTURAS TO TRIGGER FACTURAS_DETALLE_AD;
GRANT UPDATE, REFERENCES ON FACTURAS_DETALLE TO TRIGGER FACTURAS_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER FACTURAS_DETALLE_AD;
GRANT SELECT ON PEDIDOS TO TRIGGER FACTURAS_DETALLE_AD;
GRANT SELECT, DELETE ON PEDIDOS_DETALLE TO TRIGGER FACTURAS_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_DETALLE_AD;
GRANT SELECT ON ARTICULO TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON BODEGA TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON CONFIGURACION TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON CONTABILIZACION TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE ON CONTABILIZACION_DET TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON CONTABIL_ARTICULO TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON CUENTAS TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT, REFERENCES ON FACTURAS TO TRIGGER FACTURAS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON FACTURAS_DETALLE TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON INTERFAZ_VENTAS TO TRIGGER FACTURAS_DETALLE_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER FACTURAS_DETALLE_AI;
GRANT INSERT ON PEDIDOS_DETALLE TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON PREFIJOS TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON TARIFA_IVA TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON TERCEROS TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT ON VENDEDORES TO TRIGGER FACTURAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER FACTURAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE ERROR TO TRIGGER FACTURAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER FACTURAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FECHA_A_CONTA TO TRIGGER FACTURAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE REDONDEE TO TRIGGER FACTURAS_DETALLE_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER FACTURAS_DETALLE_AU;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER FACTURAS_DETALLE_AU;
GRANT SELECT ON FACTURAS TO TRIGGER FACTURAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON FACTURAS_DETALLE TO TRIGGER FACTURAS_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER FACTURAS_DETALLE_AU;
GRANT SELECT ON PEDIDOS TO TRIGGER FACTURAS_DETALLE_AU;
GRANT SELECT, INSERT, DELETE ON PEDIDOS_DETALLE TO TRIGGER FACTURAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER FACTURAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON FACTURAS_DETALLE TO TRIGGER FACTURAS_DETALLE_BI;
GRANT SELECT, REFERENCES ON FACTURAS TO TRIGGER FACTURAS_DETALLE_BU;
GRANT INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER FACTURAS_DETALLE_BU;
GRANT INSERT ON PEDIDOS_DETALLE TO TRIGGER FACTURAS_DETALLE_BU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER FACTURAS_DETALLE_BU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER FACTURAS_DETALLE_BU;
GRANT UPDATE, REFERENCES ON FORMATOS TO TRIGGER FORMATOS_BI;
GRANT UPDATE, REFERENCES ON FORMATO_DATOS TO TRIGGER FORMATO_DATOS_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_BANCOS_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_BANCOS TO TRIGGER INTERFAZ_BANCOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_BANCOS_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_BANCOS TO TRIGGER INTERFAZ_BANCOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_BANCOS_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_BANCOS TO TRIGGER INTERFAZ_BANCOS_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_BANCOS_NIIF_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_BANCOS_NIIF TO TRIGGER INTERFAZ_BANCOS_NIIF_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_BANCOS_NIIF_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_BANCOS_NIIF TO TRIGGER INTERFAZ_BANCOS_NIIF_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_BANCOS_NIIF_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_BANCOS_NIIF TO TRIGGER INTERFAZ_BANCOS_NIIF_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CAJA_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_CAJA TO TRIGGER INTERFAZ_CAJA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CAJA_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_CAJA TO TRIGGER INTERFAZ_CAJA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CAJA_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_CAJA TO TRIGGER INTERFAZ_CAJA_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CARTERA_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_CARTERA TO TRIGGER INTERFAZ_CARTERA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CARTERA_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_CARTERA TO TRIGGER INTERFAZ_CARTERA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CARTERA_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_CARTERA TO TRIGGER INTERFAZ_CARTERA_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_COMPRAS_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_COMPRAS TO TRIGGER INTERFAZ_COMPRAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_COMPRAS_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_COMPRAS TO TRIGGER INTERFAZ_COMPRAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_COMPRAS_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_COMPRAS TO TRIGGER INTERFAZ_COMPRAS_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CXPAGAR_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_CXPAGAR TO TRIGGER INTERFAZ_CXPAGAR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CXPAGAR_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_CXPAGAR TO TRIGGER INTERFAZ_CXPAGAR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_CXPAGAR_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_CXPAGAR TO TRIGGER INTERFAZ_CXPAGAR_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_INVENTARIO_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_INVENTARIO TO TRIGGER INTERFAZ_INVENTARIO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_INVENTARIO_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_INVENTARIO TO TRIGGER INTERFAZ_INVENTARIO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_INVENTARIO_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_INVENTARIO TO TRIGGER INTERFAZ_INVENTARIO_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_INVENTARIO_N_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_INVENTARIO_NIIF TO TRIGGER INTERFAZ_INVENTARIO_N_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_INVENTARIO_N_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_INVENTARIO_NIIF TO TRIGGER INTERFAZ_INVENTARIO_N_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_INVENTARIO_N_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_INVENTARIO_NIIF TO TRIGGER INTERFAZ_INVENTARIO_N_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_VENTAS_AD;
GRANT UPDATE, REFERENCES ON INTERFAZ_VENTAS TO TRIGGER INTERFAZ_VENTAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_VENTAS_AI;
GRANT UPDATE, REFERENCES ON INTERFAZ_VENTAS TO TRIGGER INTERFAZ_VENTAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER INTERFAZ_VENTAS_AU;
GRANT UPDATE, REFERENCES ON INTERFAZ_VENTAS TO TRIGGER INTERFAZ_VENTAS_AU;
GRANT SELECT, UPDATE ON EMPLEADOS TO TRIGGER LIQUIDACION_AI;
GRANT UPDATE, REFERENCES ON LIQUIDACION TO TRIGGER LIQUIDACION_AI;
GRANT INSERT ON EXISTENCIA_LOTE TO TRIGGER LOTES_AI;
GRANT UPDATE, REFERENCES ON LOTES TO TRIGGER LOTES_AI;
GRANT SELECT, DELETE ON EXISTENCIA_LOTE TO TRIGGER LOTES_BD;
GRANT UPDATE, REFERENCES ON LOTES TO TRIGGER LOTES_BD;
GRANT SELECT ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER LOTES_BI;
GRANT SELECT ON ENSAMBLES TO TRIGGER LOTES_BI;
GRANT SELECT ON ENTRADAS_DETALLE TO TRIGGER LOTES_BI;
GRANT SELECT ON FACTURAS_COMPRAS_DETALLE TO TRIGGER LOTES_BI;
GRANT SELECT, UPDATE, REFERENCES ON LOTES TO TRIGGER LOTES_BI;
GRANT SELECT ON REMISION_PROVEEDOR_DET TO TRIGGER LOTES_BI;
GRANT UPDATE, REFERENCES ON LOTES TO TRIGGER LOTES_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER MANIFIESTO_CARGA_AD;
GRANT UPDATE, REFERENCES ON MANIFIESTO_CARGA TO TRIGGER MANIFIESTO_CARGA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER MANIFIESTO_CARGA_AI;
GRANT UPDATE, REFERENCES ON MANIFIESTO_CARGA TO TRIGGER MANIFIESTO_CARGA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER MANIFIESTO_CARGA_AU;
GRANT SELECT, UPDATE ON MANIFIESTOS_CARGA_CONC TO TRIGGER MANIFIESTO_CARGA_AU;
GRANT UPDATE, REFERENCES ON MANIFIESTO_CARGA TO TRIGGER MANIFIESTO_CARGA_AU;
GRANT SELECT, UPDATE ON MANIFIESTO_CARGA_DET TO TRIGGER MANIFIESTO_CARGA_AU;
GRANT SELECT, UPDATE, REFERENCES ON MANIFIESTO_CARGA TO TRIGGER MANIFIESTO_CARGA_BI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER MANIFIESTO_CARGA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER MANIFIESTO_CARGA_BI;
GRANT SELECT, UPDATE ON CARGA_REMESA TO TRIGGER MANIFIESTO_CARGA_DET_AD;
GRANT UPDATE, REFERENCES ON MANIFIESTO_CARGA_DET TO TRIGGER MANIFIESTO_CARGA_DET_AD;
GRANT SELECT, UPDATE ON CARGA_REMESA TO TRIGGER MANIFIESTO_CARGA_DET_AI;
GRANT UPDATE, REFERENCES ON MANIFIESTO_CARGA_DET TO TRIGGER MANIFIESTO_CARGA_DET_AI;
GRANT SELECT, UPDATE ON CARGA_REMESA TO TRIGGER MANIFIESTO_CARGA_DET_AU;
GRANT UPDATE, REFERENCES ON MANIFIESTO_CARGA_DET TO TRIGGER MANIFIESTO_CARGA_DET_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER MARCAS_AD;
GRANT UPDATE, REFERENCES ON MARCAS TO TRIGGER MARCAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER MARCAS_AI;
GRANT UPDATE, REFERENCES ON MARCAS TO TRIGGER MARCAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER MARCAS_AU;
GRANT UPDATE, REFERENCES ON MARCAS TO TRIGGER MARCAS_AU;
GRANT SELECT ON ARTICULO TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT SELECT, UPDATE, DELETE ON LOTES TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT EXECUTE ON PROCEDURE ACTUALICE_COSTO TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT EXECUTE ON PROCEDURE CHEQUEO_COSTOS TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT EXECUTE ON PROCEDURE RESTE_EXISTENCIA TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT EXECUTE ON PROCEDURE SUME_EXISTENCIA TO TRIGGER MOVIMIENTO_ARTICULO_AD;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT UPDATE ON EXISTENCIA TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON EXISTENCIA_LOTE TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT SELECT, INSERT, UPDATE ON LOTES TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE ACTUALICE_COSTO TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE CHEQUEO_COSTOS TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE RESTE_EXISTENCIA TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE SUME_EXISTENCIA TO TRIGGER MOVIMIENTO_ARTICULO_AI;
GRANT SELECT ON ARTICULO TO TRIGGER MOVIMIENTO_ARTICULO_BI;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER MOVIMIENTO_ARTICULO_BI;
GRANT EXECUTE ON PROCEDURE SELECCIONE_LOTE TO TRIGGER MOVIMIENTO_ARTICULO_BI;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AD;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AD;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AD;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AI;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AI;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AI;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AU;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AU;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_BANCO TO TRIGGER MOVIMIENTO_BANCO_AU;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AD;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AD;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AD;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AI;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AI;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AI;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AU;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AU;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_CAJA TO TRIGGER MOVIMIENTO_CAJA_AU;
GRANT SELECT ON APLICACION_CLIENTE TO TRIGGER MOVIMIENTO_CLIENTES_AU;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER MOVIMIENTO_CLIENTES_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER MOVIMIENTO_CLIENTES_AU;
GRANT SELECT ON CAJAS TO TRIGGER MOVIMIENTO_CLIENTES_BI;
GRANT SELECT ON DEVOLUCION_CHEQUES TO TRIGGER MOVIMIENTO_CLIENTES_BI;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER MOVIMIENTO_CLIENTES_BI;
GRANT SELECT ON PREFIJOS TO TRIGGER MOVIMIENTO_CLIENTES_BI;
GRANT SELECT ON APLICACION_PROVEDOR TO TRIGGER MOVIMIENTO_PROVEEDOR_AU;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON MOVIMIENTO_PROVEEDOR TO TRIGGER MOVIMIENTO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER MOVIMIENTO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE SALDO_PROVEEDOR TO TRIGGER MOVIMIENTO_PROVEEDOR_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER NOMINA_AI;
GRANT UPDATE, REFERENCES ON NOMINA TO TRIGGER NOMINA_AI;
GRANT SELECT, UPDATE, REFERENCES ON NOMINA_COMISIONES TO TRIGGER NOMINA_COMISIONES_BI;
GRANT UPDATE, REFERENCES ON NOMINA_CONCEPTOS_PROV TO TRIGGER NOMINA_CONCEPTOS_PROV_BU;
GRANT SELECT, UPDATE, REFERENCES ON NOMINA_DEPARTAMENTO TO TRIGGER NOMINA_DEPARTAMENTO_BI;
GRANT SELECT ON NOMINA TO TRIGGER NOMINA_DETALLE_BI;
GRANT UPDATE, REFERENCES ON NOMINA_DETALLE TO TRIGGER NOMINA_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE DIAS_LABORADOS TO TRIGGER NOMINA_DETALLE_BI;
GRANT UPDATE, REFERENCES ON NOMINA_HORASEXT TO TRIGGER NOMINA_HORASEXT_BI;
GRANT UPDATE, REFERENCES ON NOTAS_CLIENTES TO TRIGGER NOTAS_CLIENTES_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_CREDITO_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_CREDITO_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER NOTAS_CREDITO_AD;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO TO TRIGGER NOTAS_CREDITO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER NOTAS_CREDITO_AI;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO TO TRIGGER NOTAS_CREDITO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_CREDITO_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_CREDITO_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_BANCO TO TRIGGER NOTAS_CREDITO_AU;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO TO TRIGGER NOTAS_CREDITO_AU;
GRANT SELECT, UPDATE, REFERENCES ON NOTAS_CREDITO TO TRIGGER NOTAS_CREDITO_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER NOTAS_CREDITO_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER NOTAS_CREDITO_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_CLIENTES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_CREDITO_CLIENTES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_CREDITO_CLIENTES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_AD;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CARTERA TO TRIGGER NOTAS_CREDITO_CLIENTES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_CLIENTES_AI;
GRANT INSERT ON MOVIMIENTO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_AI;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_AI;
GRANT INSERT ON SALDOS_DOC_CARTERA TO TRIGGER NOTAS_CREDITO_CLIENTES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_CLIENTES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_CREDITO_CLIENTES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_CREDITO_CLIENTES_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_AU;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER NOTAS_CREDITO_CLIENTES_AU;
GRANT SELECT ON CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_BI;
GRANT SELECT, UPDATE, REFERENCES ON NOTAS_CREDITO_CLIENTES TO TRIGGER NOTAS_CREDITO_CLIENTES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER NOTAS_CREDITO_CLIENTES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER NOTAS_CREDITO_CLIENTES_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT SELECT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT SELECT, REFERENCES ON EXISTENCIA TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE SALDO_INVENTARIO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_INVENTARIO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, REFERENCES ON EXISTENCIA TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CXPAGAR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE SALDO_INVENTARIO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_INVENTARIO TO TRIGGER NOTAS_CREDITO_PROVEEDOR_AU;
GRANT SELECT, UPDATE, REFERENCES ON NOTAS_CREDITO_PROVEEDOR TO TRIGGER NOTAS_CREDITO_PROVEEDOR_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER NOTAS_CREDITO_PROVEEDOR_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER NOTAS_CREDITO_PROVEEDOR_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_DEBITO_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_DEBITO_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER NOTAS_DEBITO_AD;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO TO TRIGGER NOTAS_DEBITO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER NOTAS_DEBITO_AI;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO TO TRIGGER NOTAS_DEBITO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_DEBITO_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_DEBITO_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_BANCO TO TRIGGER NOTAS_DEBITO_AU;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO TO TRIGGER NOTAS_DEBITO_AU;
GRANT SELECT, UPDATE, REFERENCES ON NOTAS_DEBITO TO TRIGGER NOTAS_DEBITO_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER NOTAS_DEBITO_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER NOTAS_DEBITO_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_CLIENTES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_DEBITO_CLIENTES_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_DEBITO_CLIENTES_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_AD;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CARTERA TO TRIGGER NOTAS_DEBITO_CLIENTES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_CLIENTES_AI;
GRANT INSERT ON MOVIMIENTO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_AI;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_AI;
GRANT INSERT ON SALDOS_DOC_CARTERA TO TRIGGER NOTAS_DEBITO_CLIENTES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_CLIENTES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_DEBITO_CLIENTES_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_DEBITO_CLIENTES_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_AU;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER NOTAS_DEBITO_CLIENTES_AU;
GRANT SELECT ON CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_BI;
GRANT SELECT, UPDATE, REFERENCES ON NOTAS_DEBITO_CLIENTES TO TRIGGER NOTAS_DEBITO_CLIENTES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER NOTAS_DEBITO_CLIENTES_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER NOTAS_DEBITO_CLIENTES_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT SELECT, DELETE ON SALDOS_DOC_CXPAGAR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT SELECT ON EXISTENCIA TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT SELECT, INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE SALDO_INVENTARIO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_INVENTARIO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT ON EXISTENCIA TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT, INSERT, DELETE ON SALDOS_DOC_CXPAGAR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE SALDO_INVENTARIO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT EXECUTE ON PROCEDURE SALDO_TOTAL_INVENTARIO TO TRIGGER NOTAS_DEBITO_PROVEEDOR_AU;
GRANT SELECT, UPDATE, REFERENCES ON NOTAS_DEBITO_PROVEEDOR TO TRIGGER NOTAS_DEBITO_PROVEEDOR_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER NOTAS_DEBITO_PROVEEDOR_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER NOTAS_DEBITO_PROVEEDOR_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDENES_COMPRA_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER ORDENES_COMPRA_AD;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDENES_COMPRA_AI;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDENES_COMPRA_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER ORDENES_COMPRA_AU;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_AU;
GRANT SELECT, UPDATE ON ORDENES_COMPRA_DETALLE TO TRIGGER ORDENES_COMPRA_AU;
GRANT SELECT, UPDATE, REFERENCES ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_BI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER ORDENES_COMPRA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER ORDENES_COMPRA_BI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER ORDENES_COMPRA_DETALLE_AD;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER ORDENES_COMPRA_DETALLE_AD;
GRANT SELECT ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_DETALLE_AD;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA_DETALLE TO TRIGGER ORDENES_COMPRA_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ORDENES_COMPRA_DETALLE_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT SELECT ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA_DETALLE TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE ON PROVEEDOR_ARTICULO TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ORDENES_COMPRA_DETALLE_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT SELECT ON ORDENES_COMPRA TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA_DETALLE TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE ON PROVEEDOR_ARTICULO TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER ORDENES_COMPRA_DETALLE_AU;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA_DETALLE TO TRIGGER ORDENES_COMPRA_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ORDENES_COMPRA_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDENES_INVENTARIO_AD;
GRANT UPDATE, REFERENCES ON ORDENES_INVENTARIO TO TRIGGER ORDENES_INVENTARIO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDENES_INVENTARIO_AI;
GRANT UPDATE, REFERENCES ON ORDENES_INVENTARIO TO TRIGGER ORDENES_INVENTARIO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDENES_INVENTARIO_AU;
GRANT UPDATE, REFERENCES ON ORDENES_INVENTARIO TO TRIGGER ORDENES_INVENTARIO_AU;
GRANT SELECT, UPDATE, REFERENCES ON ORDENES_INVENTARIO TO TRIGGER ORDENES_INVENTARIO_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER ORDENES_INVENTARIO_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER ORDENES_INVENTARIO_BI;
GRANT UPDATE, REFERENCES ON ORDENINVENTARIO_DETALLE TO TRIGGER ORDENINVENTARIO_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER ORDENINVENTARIO_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER ORDEN_EMBARQUE_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER ORDEN_EMBARQUE_AI;
GRANT UPDATE, REFERENCES ON ORDEN_EMBARQUE TO TRIGGER ORDEN_EMBARQUE_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER ORDEN_EMBARQUE_AI;
GRANT UPDATE, REFERENCES ON ORDEN_EMBARQUE TO TRIGGER ORDEN_EMBARQUE_BI;
GRANT SELECT ON PROVEEDORES TO TRIGGER ORDEN_EMBARQUE_BI;
GRANT SELECT ON TERCEROS TO TRIGGER ORDEN_EMBARQUE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER PEDIDOS_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER PEDIDOS_AD;
GRANT UPDATE, REFERENCES ON PEDIDOS TO TRIGGER PEDIDOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PEDIDOS_AI;
GRANT UPDATE, REFERENCES ON PEDIDOS TO TRIGGER PEDIDOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PEDIDOS_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER PEDIDOS_AU;
GRANT UPDATE, REFERENCES ON PEDIDOS TO TRIGGER PEDIDOS_AU;
GRANT SELECT, UPDATE ON PEDIDOS_DETALLE TO TRIGGER PEDIDOS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PEDIDOS TO TRIGGER PEDIDOS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER PEDIDOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PEDIDOS_BI;
GRANT EXECUTE ON PROCEDURE CUPO_DISPONIBLE TO TRIGGER PEDIDOS_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PEDIDOS_BI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER PEDIDOS_DETALLE_AI;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER PEDIDOS_DETALLE_AI;
GRANT SELECT ON PEDIDOS TO TRIGGER PEDIDOS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON PEDIDOS_DETALLE TO TRIGGER PEDIDOS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PEDIDOS_DETALLE_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER PEDIDOS_DETALLE_AU;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER PEDIDOS_DETALLE_AU;
GRANT SELECT ON PEDIDOS TO TRIGGER PEDIDOS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON PEDIDOS_DETALLE TO TRIGGER PEDIDOS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PEDIDOS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON PEDIDOS_DETALLE TO TRIGGER PEDIDOS_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER PEDIDOS_DETALLE_BI;
GRANT SELECT, UPDATE, REFERENCES ON PERIODO_PAGO_NOMBRE TO TRIGGER PERIODO_PAGO_NOMBRE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER PLANILLA_PASAJEROS_AD;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS TO TRIGGER PLANILLA_PASAJEROS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PLANILLA_PASAJEROS_AI;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS TO TRIGGER PLANILLA_PASAJEROS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PLANILLA_PASAJEROS_AU;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS TO TRIGGER PLANILLA_PASAJEROS_AU;
GRANT SELECT, UPDATE ON PLANILLA_PASAJEROS_CON TO TRIGGER PLANILLA_PASAJEROS_AU;
GRANT SELECT, UPDATE ON PLANILLA_PASAJEROS_DET TO TRIGGER PLANILLA_PASAJEROS_AU;
GRANT SELECT, UPDATE ON PLANILLA_PASAJEROS_REM TO TRIGGER PLANILLA_PASAJEROS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PLANILLA_PASAJEROS TO TRIGGER PLANILLA_PASAJEROS_BI;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER PLANILLA_PASAJEROS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PLANILLA_PASAJEROS_BI;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS_DET TO TRIGGER PLANILLA_PASAJEROS_DET_AD;
GRANT SELECT, UPDATE ON TIQUETE_PASAJERO TO TRIGGER PLANILLA_PASAJEROS_DET_AD;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS_DET TO TRIGGER PLANILLA_PASAJEROS_DET_AI;
GRANT SELECT, UPDATE ON TIQUETE_PASAJERO TO TRIGGER PLANILLA_PASAJEROS_DET_AI;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS_DET TO TRIGGER PLANILLA_PASAJEROS_DET_AU;
GRANT SELECT, UPDATE ON TIQUETE_PASAJERO TO TRIGGER PLANILLA_PASAJEROS_DET_AU;
GRANT SELECT, UPDATE ON CARGA_REMESA TO TRIGGER PLANILLA_PASAJEROS_REM_AD;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS_REM TO TRIGGER PLANILLA_PASAJEROS_REM_AD;
GRANT SELECT, UPDATE ON CARGA_REMESA TO TRIGGER PLANILLA_PASAJEROS_REM_AI;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS_REM TO TRIGGER PLANILLA_PASAJEROS_REM_AI;
GRANT SELECT, UPDATE ON CARGA_REMESA TO TRIGGER PLANILLA_PASAJEROS_REM_AU;
GRANT UPDATE, REFERENCES ON PLANILLA_PASAJEROS_REM TO TRIGGER PLANILLA_PASAJEROS_REM_AU;
GRANT SELECT ON CUENTAS TO TRIGGER PLANTILLA_DETALLE_BI;
GRANT UPDATE, REFERENCES ON PLANTILLA_DETALLE TO TRIGGER PLANTILLA_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE EXISTE_CENTRO TO TRIGGER PLANTILLA_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE EXISTE_TERCERO TO TRIGGER PLANTILLA_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PLANTILLA_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA TO TRIGGER PLANTILLA_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER PLANTILLA_ENCABEZADO_AD;
GRANT UPDATE, REFERENCES ON PLANTILLA_ENCABEZADO TO TRIGGER PLANTILLA_ENCABEZADO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PLANTILLA_ENCABEZADO_AI;
GRANT UPDATE, REFERENCES ON PLANTILLA_ENCABEZADO TO TRIGGER PLANTILLA_ENCABEZADO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PLANTILLA_ENCABEZADO_AU;
GRANT UPDATE, REFERENCES ON PLANTILLA_ENCABEZADO TO TRIGGER PLANTILLA_ENCABEZADO_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER PRECIOS_ARTICULO_AD;
GRANT UPDATE, REFERENCES ON PRECIOS_ARTICULO TO TRIGGER PRECIOS_ARTICULO_AD;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT SELECT, REFERENCES ON LISTA_PRECIOS TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT UPDATE, REFERENCES ON PRECIOS_ARTICULO TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO TO TRIGGER PRECIOS_ARTICULO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PRECIOS_ARTICULO_AU;
GRANT UPDATE, REFERENCES ON PRECIOS_ARTICULO TO TRIGGER PRECIOS_ARTICULO_AU;
GRANT SELECT ON ARTICULO TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT SELECT ON LISTA_PRECIOS TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT UPDATE, REFERENCES ON PRECIOS_ARTICULO TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT SELECT ON TARIFA_IVA TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO TO TRIGGER PRECIOS_ARTICULO_BI;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT SELECT, REFERENCES ON LISTA_PRECIOS TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT UPDATE, REFERENCES ON PRECIOS_ARTICULO TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT SELECT ON TARIFA_IVA TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO TO TRIGGER PRECIOS_ARTICULO_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_AD;
GRANT UPDATE, REFERENCES ON PREFIJOS TO TRIGGER PREFIJOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_AI;
GRANT UPDATE, REFERENCES ON PREFIJOS TO TRIGGER PREFIJOS_AI;
GRANT SELECT, INSERT ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_AU;
GRANT UPDATE, REFERENCES ON PREFIJOS TO TRIGGER PREFIJOS_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_BANCOS_AD;
GRANT UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER PREFIJOS_BANCOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_BANCOS_AI;
GRANT UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER PREFIJOS_BANCOS_AI;
GRANT SELECT, INSERT ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_BANCOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_BANCOS_AU;
GRANT UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER PREFIJOS_BANCOS_AU;
GRANT UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER PREFIJOS_BANCOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PREFIJOS_BANCOS_BI;
GRANT UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER PREFIJOS_BANCOS_BU;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PREFIJOS_BANCOS_BU;
GRANT UPDATE, REFERENCES ON PREFIJOS TO TRIGGER PREFIJOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PREFIJOS_BI;
GRANT UPDATE, REFERENCES ON PREFIJOS TO TRIGGER PREFIJOS_BU;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PREFIJOS_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_CONTA_AD;
GRANT UPDATE, REFERENCES ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_CONTA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_CONTA_AI;
GRANT UPDATE, REFERENCES ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_CONTA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PREFIJOS_CONTA_AU;
GRANT UPDATE, REFERENCES ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_CONTA_AU;
GRANT UPDATE, REFERENCES ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_CONTA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PREFIJOS_CONTA_BI;
GRANT UPDATE, REFERENCES ON PREFIJOS_CONTA TO TRIGGER PREFIJOS_CONTA_BU;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER PREFIJOS_CONTA_BU;
GRANT UPDATE, REFERENCES ON PRESTAMO_CUOTAS TO TRIGGER PRESTAMO_CUOTAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON PRESUPUESTO TO TRIGGER PRESUPUESTO_AD;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER PRESUPUESTO_AD;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON PRESUPUESTO TO TRIGGER PRESUPUESTO_AI;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER PRESUPUESTO_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON PRESUPUESTO TO TRIGGER PRESUPUESTO_AU;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER PRESUPUESTO_AU;
GRANT SELECT, UPDATE, REFERENCES ON PROGRAM_VACACIONES TO TRIGGER PROGRAM_VACACIONES_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER PROVEEDORES_AD;
GRANT UPDATE, REFERENCES ON PROVEEDORES TO TRIGGER PROVEEDORES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER PROVEEDORES_AI;
GRANT UPDATE, REFERENCES ON PROVEEDORES TO TRIGGER PROVEEDORES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER PROVEEDORES_AU;
GRANT UPDATE, REFERENCES ON PROVEEDORES TO TRIGGER PROVEEDORES_AU;
GRANT SELECT ON MOVIMIENTO_PROVEEDOR TO TRIGGER PROVEEDORES_BD;
GRANT UPDATE, REFERENCES ON PROVEEDORES TO TRIGGER PROVEEDORES_BD;
GRANT SELECT, DELETE ON PROVEEDOR_ARTICULO TO TRIGGER PROVEEDORES_BD;
GRANT SELECT ON GRUPOS_PROVEEDORES TO TRIGGER PROVEEDORES_BI;
GRANT UPDATE, REFERENCES ON PROVEEDORES TO TRIGGER PROVEEDORES_BI;
GRANT SELECT, UPDATE, REFERENCES ON PUNTOS_VENDEDOR TO TRIGGER PUNTOS_VENDEDOR_BI;
GRANT DELETE ON PUNTOS_VENDEDOR TO TRIGGER PUNTOS_VEND_REDENCION_AD;
GRANT INSERT ON PUNTOS_VENDEDOR TO TRIGGER PUNTOS_VEND_REDENCION_AI;
GRANT INSERT, DELETE ON PUNTOS_VENDEDOR TO TRIGGER PUNTOS_VEND_REDENCION_AU;
GRANT UPDATE, REFERENCES ON PUNTO_VENTA TO TRIGGER PUNTO_VENTA_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER RECIBOS_CAJA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER RECIBOS_CAJA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER RECIBOS_CAJA_AD;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_AD;
GRANT SELECT, UPDATE ON RECIBO_PROVISIONAL TO TRIGGER RECIBOS_CAJA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER RECIBOS_CAJA_AI;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_AI;
GRANT SELECT, UPDATE ON RECIBO_PROVISIONAL TO TRIGGER RECIBOS_CAJA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER RECIBOS_CAJA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER RECIBOS_CAJA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER RECIBOS_CAJA_AU;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_AU;
GRANT SELECT, UPDATE ON RECIBOS_CAJA_DETALLE TO TRIGGER RECIBOS_CAJA_AU;
GRANT SELECT, UPDATE ON RECIBOS_CAJA_PAGO TO TRIGGER RECIBOS_CAJA_AU;
GRANT SELECT, UPDATE ON RECIBO_PROVISIONAL TO TRIGGER RECIBOS_CAJA_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER RECIBOS_CAJA_BI;
GRANT SELECT, UPDATE, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER RECIBOS_CAJA_BI;
GRANT SELECT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER RECIBOS_CAJA_CRUCEC_AD;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_CRUCEC_AD;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_CRUCEC TO TRIGGER RECIBOS_CAJA_CRUCEC_AD;
GRANT SELECT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER RECIBOS_CAJA_CRUCEC_AD;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER RECIBOS_CAJA_CRUCEC_AI;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_CRUCEC_AI;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_CRUCEC TO TRIGGER RECIBOS_CAJA_CRUCEC_AI;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER RECIBOS_CAJA_CRUCEC_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER RECIBOS_CAJA_CRUCEC_AI;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO TRIGGER RECIBOS_CAJA_CRUCEC_AI;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_PROVEEDOR TO TRIGGER RECIBOS_CAJA_CRUCEC_AU;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_CRUCEC_AU;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_CRUCEC TO TRIGGER RECIBOS_CAJA_CRUCEC_AU;
GRANT SELECT, INSERT, UPDATE ON SALDOS_DOC_CXPAGAR TO TRIGGER RECIBOS_CAJA_CRUCEC_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER RECIBOS_CAJA_CRUCEC_AU;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO TRIGGER RECIBOS_CAJA_CRUCEC_AU;
GRANT SELECT, DELETE ON ANTICIPOS_CLIENTE TO TRIGGER RECIBOS_CAJA_DETALLE_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CLIENTES TO TRIGGER RECIBOS_CAJA_DETALLE_AD;
GRANT DELETE ON PUNTOS_VENDEDOR TO TRIGGER RECIBOS_CAJA_DETALLE_AD;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_DETALLE_AD;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_DETALLE TO TRIGGER RECIBOS_CAJA_DETALLE_AD;
GRANT SELECT, UPDATE ON SALDOS_DOC_CARTERA TO TRIGGER RECIBOS_CAJA_DETALLE_AD;
GRANT SELECT, UPDATE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT SELECT ON COMISIONES_PUNTOS TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT INSERT ON PUNTOS_VENDEDOR TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT SELECT, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_DETALLE TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO TRIGGER RECIBOS_CAJA_DETALLE_AI;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT SELECT ON COMISIONES_PUNTOS TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT INSERT, DELETE ON PUNTOS_VENDEDOR TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT SELECT, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_DETALLE TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_DOC_CARTERA TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO TRIGGER RECIBOS_CAJA_DETALLE_AU;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_DETALLE_BI;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_DETALLE TO TRIGGER RECIBOS_CAJA_DETALLE_BI;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_DETALLE TO TRIGGER RECIBOS_CAJA_DETALLE_BU;
GRANT SELECT, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AD;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AD;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_PAGO TO TRIGGER RECIBOS_CAJA_PAGO_AD;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER RECIBOS_CAJA_PAGO_AD;
GRANT INSERT ON DOCUMENTOS_PAGO_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AI;
GRANT SELECT, REFERENCES ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AI;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_PAGO TO TRIGGER RECIBOS_CAJA_PAGO_AI;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER RECIBOS_CAJA_PAGO_AI;
GRANT SELECT, INSERT, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AU;
GRANT SELECT, INSERT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AU;
GRANT SELECT ON RECIBOS_CAJA TO TRIGGER RECIBOS_CAJA_PAGO_AU;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_PAGO TO TRIGGER RECIBOS_CAJA_PAGO_AU;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER RECIBOS_CAJA_PAGO_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER RECIBO_PROVISIONAL_AD;
GRANT UPDATE, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER RECIBO_PROVISIONAL_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER RECIBO_PROVISIONAL_AI;
GRANT UPDATE, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER RECIBO_PROVISIONAL_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER RECIBO_PROVISIONAL_AU;
GRANT UPDATE, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER RECIBO_PROVISIONAL_AU;
GRANT SELECT, UPDATE ON RECIBO_PROVISIONAL_DETALLE TO TRIGGER RECIBO_PROVISIONAL_AU;
GRANT SELECT, UPDATE ON RECIBO_PROVISIONAL_PAGO TO TRIGGER RECIBO_PROVISIONAL_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER RECIBO_PROVISIONAL_BI;
GRANT SELECT, UPDATE, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER RECIBO_PROVISIONAL_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER RECIBO_PROVISIONAL_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISIONES_VENTA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER REMISIONES_VENTA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER REMISIONES_VENTA_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISIONES_VENTA_AD;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISIONES_VENTA_AI;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISIONES_VENTA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER REMISIONES_VENTA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER REMISIONES_VENTA_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISIONES_VENTA_AU;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_AU;
GRANT SELECT, UPDATE ON REMISIONES_VENTA_DETALLE TO TRIGGER REMISIONES_VENTA_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER REMISIONES_VENTA_BI;
GRANT SELECT, UPDATE, REFERENCES ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER REMISIONES_VENTA_BI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISIONES_VENTA_DETALLE_AD;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER REMISIONES_VENTA_DETALLE_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER REMISIONES_VENTA_DETALLE_AD;
GRANT SELECT ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_DETALLE_AD;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA_DETALLE TO TRIGGER REMISIONES_VENTA_DETALLE_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER REMISIONES_VENTA_DETALLE_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT SELECT, INSERT, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT SELECT, REFERENCES ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA_DETALLE TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT SELECT, REFERENCES ON REMISIONES_VENTA_DOCRELA TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER REMISIONES_VENTA_DETALLE_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT SELECT, REFERENCES ON REMISIONES_VENTA TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA_DETALLE TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT SELECT, REFERENCES ON REMISIONES_VENTA_DOCRELA TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER REMISIONES_VENTA_DETALLE_AU;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA_DETALLE TO TRIGGER REMISIONES_VENTA_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISION_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER REMISION_PROVEEDOR_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER REMISION_PROVEEDOR_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISION_PROVEEDOR_AD;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISION_PROVEEDOR_AI;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISION_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER REMISION_PROVEEDOR_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER REMISION_PROVEEDOR_AU;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISION_PROVEEDOR_AU;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_AU;
GRANT SELECT, UPDATE ON REMISION_PROVEEDOR_DET TO TRIGGER REMISION_PROVEEDOR_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER REMISION_PROVEEDOR_AUA;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_AUA;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER REMISION_PROVEEDOR_BI;
GRANT SELECT, UPDATE, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER REMISION_PROVEEDOR_BI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISION_PROVEEDOR_DET_AD;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER REMISION_PROVEEDOR_DET_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER REMISION_PROVEEDOR_DET_AD;
GRANT SELECT ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_DET_AD;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR_DET TO TRIGGER REMISION_PROVEEDOR_DET_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER REMISION_PROVEEDOR_DET_AD;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT SELECT, INSERT, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON PROVEEDOR_ARTICULO TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT SELECT, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR_DET TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT SELECT, REFERENCES ON REMISION_PROVEEDOR_DOCRELA TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER REMISION_PROVEEDOR_DET_AI;
GRANT SELECT, UPDATE ON CONSOLIDADO_FALTANTES TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT SELECT ON CONSOLIDE_FALTANTES TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT SELECT ON FACTURAS_COMPRA TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT SELECT, INSERT, DELETE, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON PROVEEDOR_ARTICULO TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT SELECT, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR_DET TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT SELECT, REFERENCES ON REMISION_PROVEEDOR_DOCRELA TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER REMISION_PROVEEDOR_DET_AU;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR_DET TO TRIGGER REMISION_PROVEEDOR_DET_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER RESERVAS_AD;
GRANT UPDATE, REFERENCES ON RESERVAS TO TRIGGER RESERVAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER RESERVAS_AI;
GRANT UPDATE, REFERENCES ON RESERVAS TO TRIGGER RESERVAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER RESERVAS_AU;
GRANT UPDATE, REFERENCES ON RESERVAS TO TRIGGER RESERVAS_AU;
GRANT SELECT, UPDATE ON RESERVAS_DETALLE TO TRIGGER RESERVAS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER RESERVAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON RESERVAS TO TRIGGER RESERVAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER RESERVAS_BI;
GRANT UPDATE, REFERENCES ON RESERVAS_DETALLE TO TRIGGER RESERVAS_DETALLE_BI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER RESERVAS_DETALLE_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER RETIROS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER RETIROS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER RETIROS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER RETIROS_AD;
GRANT SELECT, DELETE ON NOTAS_DEBITO TO TRIGGER RETIROS_AD;
GRANT UPDATE, REFERENCES ON RETIROS TO TRIGGER RETIROS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER RETIROS_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER RETIROS_AI;
GRANT INSERT ON NOTAS_DEBITO TO TRIGGER RETIROS_AI;
GRANT UPDATE, REFERENCES ON RETIROS TO TRIGGER RETIROS_AI;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTA_DB_BANCO TO TRIGGER RETIROS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER RETIROS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER RETIROS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER RETIROS_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_BANCO TO TRIGGER RETIROS_AU;
GRANT SELECT, INSERT, DELETE ON NOTAS_DEBITO TO TRIGGER RETIROS_AU;
GRANT UPDATE, REFERENCES ON RETIROS TO TRIGGER RETIROS_AU;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTA_DB_BANCO TO TRIGGER RETIROS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER RETIROS_BI;
GRANT SELECT, UPDATE, REFERENCES ON RETIROS TO TRIGGER RETIROS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER RETIROS_BI;
GRANT UPDATE ON SALDOS_CUENTAS TO TRIGGER SALDOS_CUENTAS_BD;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER SALDOS_CUENTAS_BD;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_CUENTAS TO TRIGGER SALDOS_CUENTAS_BU;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER SALDOS_CUENTAS_BU;
GRANT SELECT, UPDATE ON SALDOS_CENTROS TO TRIGGER SALDOS_INICIALES_AD;
GRANT SELECT, UPDATE ON SALDOS_CUENTAS TO TRIGGER SALDOS_INICIALES_AD;
GRANT UPDATE, REFERENCES ON SALDOS_INICIALES TO TRIGGER SALDOS_INICIALES_AD;
GRANT SELECT, UPDATE ON SALDOS_TERCEROS TO TRIGGER SALDOS_INICIALES_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER SALDOS_INICIALES_AD;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER SALDOS_INICIALES_AD;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_ARTICULO TO TRIGGER SALDOS_INICIALES_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_CENTROS TO TRIGGER SALDOS_INICIALES_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_CUENTAS TO TRIGGER SALDOS_INICIALES_AI;
GRANT UPDATE, REFERENCES ON SALDOS_INICIALES TO TRIGGER SALDOS_INICIALES_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_TERCEROS TO TRIGGER SALDOS_INICIALES_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER SALDOS_INICIALES_AI;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER SALDOS_INICIALES_AI;
GRANT SELECT, INSERT, UPDATE ON SALDOS_CENTROS TO TRIGGER SALDOS_INICIALES_AU;
GRANT SELECT, INSERT, UPDATE ON SALDOS_CUENTAS TO TRIGGER SALDOS_INICIALES_AU;
GRANT UPDATE, REFERENCES ON SALDOS_INICIALES TO TRIGGER SALDOS_INICIALES_AU;
GRANT SELECT, INSERT, UPDATE ON SALDOS_TERCEROS TO TRIGGER SALDOS_INICIALES_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER SALDOS_INICIALES_AU;
GRANT EXECUTE ON PROCEDURE PADRE TO TRIGGER SALDOS_INICIALES_AU;
GRANT SELECT ON CUENTAS TO TRIGGER SALDOS_INICIALES_BI;
GRANT UPDATE, REFERENCES ON SALDOS_INICIALES TO TRIGGER SALDOS_INICIALES_BI;
GRANT EXECUTE ON PROCEDURE EXISTE_CENTRO TO TRIGGER SALDOS_INICIALES_BI;
GRANT EXECUTE ON PROCEDURE EXISTE_TERCERO TO TRIGGER SALDOS_INICIALES_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER SALDOS_INICIALES_BI;
GRANT EXECUTE ON PROCEDURE VALIDE_CUENTA TO TRIGGER SALDOS_INICIALES_BI;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON SALDO_BANCOS TO TRIGGER SALDO_BANCOS_AU;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON SALDO_BANCOS_CONF TO TRIGGER SALDO_BANCOS_CONF_AU;
GRANT SELECT, UPDATE, DELETE, REFERENCES ON SALDO_CAJA TO TRIGGER SALDO_CAJA_AU;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER SALDO_CAJA_BI;
GRANT UPDATE, REFERENCES ON SALDO_CAJA TO TRIGGER SALDO_CAJA_BI;
GRANT UPDATE, REFERENCES ON SALDO_EFECTIVO TO TRIGGER SALDO_EFECTIVO_BI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER SALDO_EFECTIVO_BI;
GRANT UPDATE, REFERENCES ON SALDO_EFECTIVO TO TRIGGER SALDO_EFECTIVO_BU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER SALDO_EFECTIVO_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER SALIDAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER SALIDAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER SALIDAS_AD;
GRANT SELECT, UPDATE ON RESERVAS TO TRIGGER SALIDAS_AD;
GRANT UPDATE, REFERENCES ON SALIDAS TO TRIGGER SALIDAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER SALIDAS_AI;
GRANT SELECT, UPDATE ON RESERVAS TO TRIGGER SALIDAS_AI;
GRANT UPDATE, REFERENCES ON SALIDAS TO TRIGGER SALIDAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER SALIDAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER SALIDAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER SALIDAS_AU;
GRANT SELECT, UPDATE ON RESERVAS TO TRIGGER SALIDAS_AU;
GRANT UPDATE, REFERENCES ON SALIDAS TO TRIGGER SALIDAS_AU;
GRANT SELECT, UPDATE ON SALIDAS_DETALLE TO TRIGGER SALIDAS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER SALIDAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON SALIDAS TO TRIGGER SALIDAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER SALIDAS_BI;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER SALIDAS_DETALLE_AD;
GRANT UPDATE, REFERENCES ON SALIDAS_DETALLE TO TRIGGER SALIDAS_DETALLE_AD;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER SALIDAS_DETALLE_AI;
GRANT SELECT ON SALIDAS TO TRIGGER SALIDAS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON SALIDAS_DETALLE TO TRIGGER SALIDAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER SALIDAS_DETALLE_AI;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER SALIDAS_DETALLE_AU;
GRANT SELECT, REFERENCES ON SALIDAS TO TRIGGER SALIDAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON SALIDAS_DETALLE TO TRIGGER SALIDAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER SALIDAS_DETALLE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER SOLICITUD_IMPORTACION_AI;
GRANT INSERT ON MOVIMIENTO_PROVEEDOR TO TRIGGER SOLICITUD_IMPORTACION_AI;
GRANT INSERT ON SALDOS_DOC_CXPAGAR TO TRIGGER SOLICITUD_IMPORTACION_AI;
GRANT UPDATE, REFERENCES ON SOLICITUD_IMPORTACION TO TRIGGER SOLICITUD_IMPORTACION_AI;
GRANT SELECT, UPDATE, REFERENCES ON TASA_CAMBIO_MONEDA TO TRIGGER TASA_CAMBIO_MONEDA_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER TERCEROS_AD;
GRANT UPDATE, REFERENCES ON TERCEROS TO TRIGGER TERCEROS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER TERCEROS_AI;
GRANT UPDATE, REFERENCES ON TERCEROS TO TRIGGER TERCEROS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER TERCEROS_AU;
GRANT UPDATE, REFERENCES ON TERCEROS TO TRIGGER TERCEROS_AU;
GRANT SELECT ON MOVIMIENTO_CLIENTES TO TRIGGER TERCEROS_BD;
GRANT SELECT ON MOVIMIENTO_CLIENTES TO TRIGGER TERCEROS_BU;
GRANT SELECT ON MOVIMIENTO_PROVEEDOR TO TRIGGER TERCEROS_BU;
GRANT UPDATE, REFERENCES ON TERCEROS TO TRIGGER TERCEROS_BU;
GRANT INSERT ON AUDITORIA TO TRIGGER TIQUETE_PASAJERO_AD;
GRANT UPDATE, REFERENCES ON TIQUETE_PASAJERO TO TRIGGER TIQUETE_PASAJERO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER TIQUETE_PASAJERO_AI;
GRANT UPDATE, REFERENCES ON TIQUETE_PASAJERO TO TRIGGER TIQUETE_PASAJERO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER TIQUETE_PASAJERO_AU;
GRANT UPDATE, REFERENCES ON TIQUETE_PASAJERO TO TRIGGER TIQUETE_PASAJERO_AU;
GRANT UPDATE, REFERENCES ON TIQUETE_PASAJERO TO TRIGGER TIQUETE_PASAJERO_BD;
GRANT SELECT, UPDATE ON PREFIJOS TO TRIGGER TIQUETE_PASAJERO_BI;
GRANT SELECT, UPDATE, REFERENCES ON TIQUETE_PASAJERO TO TRIGGER TIQUETE_PASAJERO_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER TIQUETE_PASAJERO_BI;
GRANT UPDATE, REFERENCES ON TIQUETE_PASAJERO TO TRIGGER TIQUETE_PASAJERO_BU;
GRANT UPDATE, REFERENCES ON AJUSTES TO TRIGGER TI_AJUSTES;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_AJUSTES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_AJUSTES;
GRANT SELECT, REFERENCES ON AJUSTES TO TRIGGER TI_AJUSTES_DETALLE;
GRANT UPDATE, REFERENCES ON AJUSTES_DETALLE TO TRIGGER TI_AJUSTES_DETALLE;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_AJUSTES_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_AJUSTES_DETALLE;
GRANT UPDATE, REFERENCES ON ANTICIPOS_CLIENTE TO TRIGGER TI_ANTICIPOS_CLIENTE;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_ANTICIPOS_CLIENTE;
GRANT SELECT, REFERENCES ON COBRADORES TO TRIGGER TI_ANTICIPOS_CLIENTE;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_ANTICIPOS_CLIENTE;
GRANT UPDATE, REFERENCES ON ANTICIPOS_PROVEEDOR TO TRIGGER TI_ANTICIPOS_PROVEEDOR;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_ANTICIPOS_PROVEEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_ANTICIPOS_PROVEEDOR;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE TO TRIGGER TI_APLICACION_CLIENTE;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_APLICACION_CLIENTE;
GRANT SELECT, REFERENCES ON COBRADORES TO TRIGGER TI_APLICACION_CLIENTE;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_APLICACION_CLIENTE;
GRANT SELECT, REFERENCES ON APLICACION_CLIENTE TO TRIGGER TI_APLICACION_CLIENTE_DETALLE;
GRANT UPDATE, REFERENCES ON APLICACION_CLIENTE_DETALLE TO TRIGGER TI_APLICACION_CLIENTE_DETALLE;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEDOR TO TRIGGER TI_APLICACION_PROVEDOR;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_APLICACION_PROVEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_APLICACION_PROVEDOR;
GRANT SELECT, REFERENCES ON APLICACION_PROVEDOR TO TRIGGER TI_APLICACION_PROVEEDOR_DETALLE;
GRANT UPDATE, REFERENCES ON APLICACION_PROVEEDOR_DETALLE TO TRIGGER TI_APLICACION_PROVEEDOR_DETALLE;
GRANT UPDATE, REFERENCES ON ARTICULO TO TRIGGER TI_ARTICULO;
GRANT SELECT, REFERENCES ON MARCAS TO TRIGGER TI_ARTICULO;
GRANT SELECT, REFERENCES ON SUBGRUPO TO TRIGGER TI_ARTICULO;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_ARTICULOS_PRODUCTO;
GRANT UPDATE, REFERENCES ON ARTICULOS_PRODUCTO TO TRIGGER TI_ARTICULOS_PRODUCTO;
GRANT UPDATE, REFERENCES ON AUTORIZACIONES TO TRIGGER TI_AUTORIZACIONES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_AUTORIZACIONES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_BARRAS_ARTICULO;
GRANT UPDATE, REFERENCES ON BARRAS_ARTICULO TO TRIGGER TI_BARRAS_ARTICULO;
GRANT UPDATE, REFERENCES ON CAMBIODOC_ENTRADAS TO TRIGGER TI_CAMBIODOC_ENTRADAS;
GRANT SELECT, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER TI_CAMBIODOC_ENTRADAS;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_CAMBIODOC_ENTRADAS;
GRANT UPDATE, REFERENCES ON CAMBIODOC_SALIDAS TO TRIGGER TI_CAMBIODOC_SALIDAS;
GRANT SELECT, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER TI_CAMBIODOC_SALIDAS;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_CAMBIODOC_SALIDAS;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_CAMBIO_DOCUMENTOS;
GRANT UPDATE, REFERENCES ON CAMBIO_DOCUMENTOS TO TRIGGER TI_CAMBIO_DOCUMENTOS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_CAMBIO_DOCUMENTOS;
GRANT UPDATE, REFERENCES ON CENTROS TO TRIGGER TI_CENTROS;
GRANT SELECT, REFERENCES ON PROYECTOS TO TRIGGER TI_CENTROS;
GRANT UPDATE, REFERENCES ON CHEQUERA TO TRIGGER TI_CHEQUERA;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_CHEQUERA;
GRANT UPDATE, REFERENCES ON CHEQUES TO TRIGGER TI_CHEQUES;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_CHEQUES;
GRANT UPDATE, REFERENCES ON CLIENTES TO TRIGGER TI_CLIENTES;
GRANT SELECT, REFERENCES ON COBRADORES TO TRIGGER TI_CLIENTES;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_CLIENTES;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_CLIENTES;
GRANT UPDATE, REFERENCES ON COMISIONES TO TRIGGER TI_COMISIONES;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_COMISIONES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT SELECT, REFERENCES ON CENTROS TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT UPDATE, REFERENCES ON COMPROBANTE_DETALLE TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT SELECT, REFERENCES ON CUENTAS TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT SELECT, REFERENCES ON PROYECTOS TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_COMPROBANTE_DETALLE;
GRANT UPDATE, REFERENCES ON COMPROBANTE_ENCABEZADO TO TRIGGER TI_COMPROBANTE_ENCABEZADO;
GRANT SELECT ON PREFIJOS_CONTA TO TRIGGER TI_COMPROBANTE_ENCABEZADO;
GRANT SELECT, REFERENCES ON CONCEPTOS TO TRIGGER TI_CONCEPTOS_CUENTAS;
GRANT UPDATE, REFERENCES ON CONCEPTOS_CUENTAS TO TRIGGER TI_CONCEPTOS_CUENTAS;
GRANT SELECT, REFERENCES ON CUENTAS TO TRIGGER TI_CONCEPTOS_CUENTAS;
GRANT UPDATE, REFERENCES ON CONSIGNA TO TRIGGER TI_CONSIGNA;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_CONSIGNA;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_CONSIGNA_DETALLE;
GRANT SELECT, REFERENCES ON CONSIGNA TO TRIGGER TI_CONSIGNA_DETALLE;
GRANT UPDATE, REFERENCES ON CONSIGNA_DETALLE TO TRIGGER TI_CONSIGNA_DETALLE;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_CONSIGNA_DETALLE;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_CONSIGNA_TARJETAS;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS TO TRIGGER TI_CONSIGNA_TARJETAS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_CONSIGNA_TARJETAS;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_CONSIGNA_TARJETAS_DET;
GRANT SELECT, REFERENCES ON CONSIGNA_TARJETAS TO TRIGGER TI_CONSIGNA_TARJETAS_DET;
GRANT UPDATE, REFERENCES ON CONSIGNA_TARJETAS_DET TO TRIGGER TI_CONSIGNA_TARJETAS_DET;
GRANT SELECT, REFERENCES ON TARJETAS TO TRIGGER TI_CONSIGNA_TARJETAS_DET;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_CONSUMOS;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_CONSUMOS;
GRANT UPDATE, REFERENCES ON CONSUMOS TO TRIGGER TI_CONSUMOS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_CONSUMOS;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_CONSUMOS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_CONSUMO_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_CONSUMO_DETALLE;
GRANT SELECT, REFERENCES ON CONSUMOS TO TRIGGER TI_CONSUMO_DETALLE;
GRANT UPDATE, REFERENCES ON CONSUMO_DETALLE TO TRIGGER TI_CONSUMO_DETALLE;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_CONTABIL_ARTICULO;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO TO TRIGGER TI_CONTABIL_ARTICULO;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_CONTABIL_ARTICULO_N;
GRANT UPDATE, REFERENCES ON CONTABIL_ARTICULO_NIIF TO TRIGGER TI_CONTABIL_ARTICULO_N;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_COSTOS;
GRANT UPDATE, REFERENCES ON COSTOS TO TRIGGER TI_COSTOS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_COSTOS_NIIF;
GRANT UPDATE, REFERENCES ON COSTOS_NIIF TO TRIGGER TI_COSTOS_NIIF;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_COTIZACIONES;
GRANT UPDATE, REFERENCES ON COTIZACIONES TO TRIGGER TI_COTIZACIONES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_COTIZACIONES;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_COTIZACIONES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_COTIZACIONES_DETALLE;
GRANT SELECT, REFERENCES ON COTIZACIONES TO TRIGGER TI_COTIZACIONES_DETALLE;
GRANT UPDATE, REFERENCES ON COTIZACIONES_DETALLE TO TRIGGER TI_COTIZACIONES_DETALLE;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_COTIZACIONES_PROVEEDOR_DET;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_COTIZACIONES_PROVEEDOR_DET;
GRANT UPDATE, REFERENCES ON COTIZACIONES_PROVEEDOR_DET TO TRIGGER TI_COTIZACIONES_PROVEEDOR_DET;
GRANT SELECT, REFERENCES ON COTIZACION_PROVEEDOR TO TRIGGER TI_COTIZACIONES_PROVEEDOR_DET;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_COTIZACION_PROVEEDOR;
GRANT UPDATE, REFERENCES ON COTIZACION_PROVEEDOR TO TRIGGER TI_COTIZACION_PROVEEDOR;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_COTIZACION_PROVEEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_COTIZACION_PROVEEDOR;
GRANT SELECT, REFERENCES ON BANCOS TO TRIGGER TI_CUENTAS_BANCO;
GRANT UPDATE, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_CUENTAS_BANCO;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_DESENSAMBLES;
GRANT UPDATE, REFERENCES ON DESENSAMBLES TO TRIGGER TI_DESENSAMBLES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_DESENSAMBLES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_DESENSAMBLES_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_DESENSAMBLES_DETALLE;
GRANT SELECT, REFERENCES ON DESENSAMBLES TO TRIGGER TI_DESENSAMBLES_DETALLE;
GRANT UPDATE, REFERENCES ON DESENSAMBLES_DETALLE TO TRIGGER TI_DESENSAMBLES_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_DEVOLUCIONES_COMPRAS;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER TI_DEVOLUCIONES_COMPRAS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_DEVOLUCIONES_COMPRAS;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_DEVOLUCIONES_COMPRAS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_DEVOLUCIONES_COMPRAS_DET;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_DEVOLUCIONES_COMPRAS_DET;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_COMPRAS TO TRIGGER TI_DEVOLUCIONES_COMPRAS_DET;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER TI_DEVOLUCIONES_COMPRAS_DET;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_DEVOLUCIONES_VENTAS;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER TI_DEVOLUCIONES_VENTAS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_DEVOLUCIONES_VENTAS;
GRANT SELECT, REFERENCES ON PUNTO_VENTA TO TRIGGER TI_DEVOLUCIONES_VENTAS;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_DEVOLUCIONES_VENTAS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_DEVOLUCIONES_VENTAS_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_DEVOLUCIONES_VENTAS_DETALLE;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_VENTAS TO TRIGGER TI_DEVOLUCIONES_VENTAS_DETALLE;
GRANT UPDATE, REFERENCES ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER TI_DEVOLUCIONES_VENTAS_DETALLE;
GRANT UPDATE, REFERENCES ON DEVOLUCION_CHEQUES TO TRIGGER TI_DEVOLUCION_CHEQUES;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_DEVOLUCION_CHEQUES;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_DEVOLUCION_CHEQUES;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_DOCUMENTOS_PAGO_CAJA;
GRANT UPDATE, REFERENCES ON DOCUMENTOS_PAGO_CAJA TO TRIGGER TI_DOCUMENTOS_PAGO_CAJA;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_DOCUMENTOS_PAGO_CAJA;
GRANT UPDATE, REFERENCES ON EGRESOS TO TRIGGER TI_EGRESOS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_EGRESOS;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_EGRESOS_BANCO;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER TI_EGRESOS_BANCO;
GRANT UPDATE, REFERENCES ON EGRESOS_BANCO TO TRIGGER TI_EGRESOS_BANCO;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_EGRESOS_CAJA;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER TI_EGRESOS_CAJA;
GRANT UPDATE, REFERENCES ON EGRESOS_CAJA TO TRIGGER TI_EGRESOS_CAJA;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_EGRESOS_CAJA;
GRANT SELECT, REFERENCES ON CUENTAS TO TRIGGER TI_EGRESOS_CONTABILIDAD;
GRANT SELECT, REFERENCES ON EGRESOS TO TRIGGER TI_EGRESOS_CONTABILIDAD;
GRANT UPDATE, REFERENCES ON EGRESOS_CONTABILIDAD TO TRIGGER TI_EGRESOS_CONTABILIDAD;
GRANT SELECT ON EGRESOS TO TRIGGER TI_EGRESOS_DETALLE;
GRANT UPDATE, REFERENCES ON EGRESOS_DETALLE TO TRIGGER TI_EGRESOS_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_ENSAMBLES;
GRANT UPDATE, REFERENCES ON ENSAMBLES TO TRIGGER TI_ENSAMBLES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_ENSAMBLES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_ENSAMBLES_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_ENSAMBLES_DETALLE;
GRANT SELECT, REFERENCES ON ENSAMBLES TO TRIGGER TI_ENSAMBLES_DETALLE;
GRANT UPDATE, REFERENCES ON ENSAMBLES_DETALLE TO TRIGGER TI_ENSAMBLES_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_ENTRADAS;
GRANT UPDATE, REFERENCES ON ENTRADAS TO TRIGGER TI_ENTRADAS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_ENTRADAS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_ENTRADAS_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_ENTRADAS_DETALLE;
GRANT SELECT, REFERENCES ON ENTRADAS TO TRIGGER TI_ENTRADAS_DETALLE;
GRANT UPDATE, REFERENCES ON ENTRADAS_DETALLE TO TRIGGER TI_ENTRADAS_DETALLE;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_EXISTENCIA;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_EXISTENCIA;
GRANT UPDATE, REFERENCES ON EXISTENCIA TO TRIGGER TI_EXISTENCIA;
GRANT UPDATE, REFERENCES ON EXISTENCIA_LOTE TO TRIGGER TI_EXISTENCIA_LOTE;
GRANT SELECT, REFERENCES ON LOTES TO TRIGGER TI_EXISTENCIA_LOTE;
GRANT SELECT, REFERENCES ON AUTORIZACIONES TO TRIGGER TI_FACTURAS;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_FACTURAS;
GRANT UPDATE, REFERENCES ON FACTURAS TO TRIGGER TI_FACTURAS;
GRANT SELECT, REFERENCES ON PUNTO_VENTA TO TRIGGER TI_FACTURAS;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_FACTURAS;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_FACTURAS_COMPRA;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRA TO TRIGGER TI_FACTURAS_COMPRA;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_FACTURAS_COMPRA;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_FACTURAS_COMPRA;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_FACTURAS_COMPRAS_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_FACTURAS_COMPRAS_DETALLE;
GRANT SELECT, REFERENCES ON FACTURAS_COMPRA TO TRIGGER TI_FACTURAS_COMPRAS_DETALLE;
GRANT UPDATE, REFERENCES ON FACTURAS_COMPRAS_DETALLE TO TRIGGER TI_FACTURAS_COMPRAS_DETALLE;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_FACTURAS_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_FACTURAS_DETALLE;
GRANT SELECT, REFERENCES ON FACTURAS TO TRIGGER TI_FACTURAS_DETALLE;
GRANT UPDATE, REFERENCES ON FACTURAS_DETALLE TO TRIGGER TI_FACTURAS_DETALLE;
GRANT UPDATE, REFERENCES ON LISTAPREC_VENDEDOR TO TRIGGER TI_LISTAPREC_VENDEDOR;
GRANT SELECT, REFERENCES ON LISTA_PRECIOS TO TRIGGER TI_LISTAPREC_VENDEDOR;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_LISTAPREC_VENDEDOR;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_LOTES;
GRANT UPDATE, REFERENCES ON LOTES TO TRIGGER TI_LOTES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_MOVIMIENTO_ARTICULO;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_MOVIMIENTO_ARTICULO;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_ARTICULO TO TRIGGER TI_MOVIMIENTO_ARTICULO;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_MOVIMIENTO_BANCO;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_BANCO TO TRIGGER TI_MOVIMIENTO_BANCO;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_MOVIMIENTO_CAJA;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER TI_MOVIMIENTO_CAJA;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_MOVIMIENTO_CLIENTES;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_CLIENTES TO TRIGGER TI_MOVIMIENTO_CLIENTES;
GRANT UPDATE, REFERENCES ON MOVIMIENTO_PROVEEDOR TO TRIGGER TI_MOVIMIENTO_PROVEEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_MOVIMIENTO_PROVEEDOR;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO TO TRIGGER TI_NOTAS_CREDITO;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_NOTAS_CREDITO;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_NOTAS_CREDITO_CLIENTES;
GRANT SELECT, REFERENCES ON COBRADORES TO TRIGGER TI_NOTAS_CREDITO_CLIENTES;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_CLIENTES TO TRIGGER TI_NOTAS_CREDITO_CLIENTES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_NOTAS_CREDITO_CLIENTES;
GRANT UPDATE, REFERENCES ON NOTAS_CREDITO_PROVEEDOR TO TRIGGER TI_NOTAS_CREDITO_PROVEEDOR;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_NOTAS_CREDITO_PROVEEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_NOTAS_CREDITO_PROVEEDOR;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO TO TRIGGER TI_NOTAS_DEBITO;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_NOTAS_DEBITO;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_NOTAS_DEBITO_CLIENTES;
GRANT SELECT, REFERENCES ON COBRADORES TO TRIGGER TI_NOTAS_DEBITO_CLIENTES;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_CLIENTES TO TRIGGER TI_NOTAS_DEBITO_CLIENTES;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_NOTAS_DEBITO_CLIENTES;
GRANT UPDATE, REFERENCES ON NOTAS_DEBITO_PROVEEDOR TO TRIGGER TI_NOTAS_DEBITO_PROVEEDOR;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_NOTAS_DEBITO_PROVEEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_NOTAS_DEBITO_PROVEEDOR;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_ORDENES_COMPRA;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA TO TRIGGER TI_ORDENES_COMPRA;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_ORDENES_COMPRA;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_ORDENES_COMPRA;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_ORDENES_COMPRA_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_ORDENES_COMPRA_DETALLE;
GRANT SELECT, REFERENCES ON ORDENES_COMPRA TO TRIGGER TI_ORDENES_COMPRA_DETALLE;
GRANT UPDATE, REFERENCES ON ORDENES_COMPRA_DETALLE TO TRIGGER TI_ORDENES_COMPRA_DETALLE;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_PEDIDOS;
GRANT UPDATE, REFERENCES ON PEDIDOS TO TRIGGER TI_PEDIDOS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_PEDIDOS;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_PEDIDOS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_PEDIDOS_DETALLE;
GRANT SELECT, REFERENCES ON PEDIDOS TO TRIGGER TI_PEDIDOS_DETALLE;
GRANT UPDATE, REFERENCES ON PEDIDOS_DETALLE TO TRIGGER TI_PEDIDOS_DETALLE;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT SELECT, REFERENCES ON CENTROS TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT SELECT, REFERENCES ON CUENTAS TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT UPDATE, REFERENCES ON PLANTILLA_DETALLE TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT SELECT, REFERENCES ON PLANTILLA_ENCABEZADO TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT SELECT, REFERENCES ON PROYECTOS TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_PLANTILLA_DETALLE;
GRANT UPDATE, REFERENCES ON PLANTILLA_ENCABEZADO TO TRIGGER TI_PLANTILLA_ENCABEZADO;
GRANT SELECT, REFERENCES ON PREFIJOS_CONTA TO TRIGGER TI_PLANTILLA_ENCABEZADO;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_PRECIOS_ARTICULO;
GRANT SELECT, REFERENCES ON LISTA_PRECIOS TO TRIGGER TI_PRECIOS_ARTICULO;
GRANT UPDATE, REFERENCES ON PRECIOS_ARTICULO TO TRIGGER TI_PRECIOS_ARTICULO;
GRANT UPDATE, REFERENCES ON PREFIJOS TO TRIGGER TI_PREFIJOS;
GRANT SELECT, REFERENCES ON TIPO_DOCUMENTO TO TRIGGER TI_PREFIJOS;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_PREFIJOS_BANCOS;
GRANT UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_PREFIJOS_BANCOS;
GRANT SELECT, REFERENCES ON TIPO_DOCUMENTO TO TRIGGER TI_PREFIJOS_BANCOS;
GRANT UPDATE, REFERENCES ON PREFIJOS_CONTA TO TRIGGER TI_PREFIJOS_CONTA;
GRANT SELECT, REFERENCES ON TIPO_COMPROBANTE TO TRIGGER TI_PREFIJOS_CONTA;
GRANT SELECT, REFERENCES ON GRUPOS_PROVEEDORES TO TRIGGER TI_PROVEEDORES;
GRANT UPDATE, REFERENCES ON PROVEEDORES TO TRIGGER TI_PROVEEDORES;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_PROVEEDORES;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_PROVEEDOR_ARTICULO;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_PROVEEDOR_ARTICULO;
GRANT UPDATE, REFERENCES ON PROVEEDOR_ARTICULO TO TRIGGER TI_PROVEEDOR_ARTICULO;
GRANT UPDATE, REFERENCES ON PUC TO TRIGGER TI_PUC;
GRANT SELECT ON TIPO_PUC TO TRIGGER TI_PUC;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_PUNTO_VENTA;
GRANT UPDATE, REFERENCES ON PUNTO_VENTA TO TRIGGER TI_PUNTO_VENTA;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_RECIBOS_CAJA;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_RECIBOS_CAJA;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA TO TRIGGER TI_RECIBOS_CAJA;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_RECIBOS_CAJA_PAGO;
GRANT SELECT, REFERENCES ON RECIBOS_CAJA TO TRIGGER TI_RECIBOS_CAJA_PAGO;
GRANT UPDATE, REFERENCES ON RECIBOS_CAJA_PAGO TO TRIGGER TI_RECIBOS_CAJA_PAGO;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_RECIBO_PROVISIONAL;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_RECIBO_PROVISIONAL;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_RECIBO_PROVISIONAL;
GRANT UPDATE, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER TI_RECIBO_PROVISIONAL;
GRANT SELECT ON TERCEROS TO TRIGGER TI_RECIBO_PROVISIONAL;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_RECIBO_PROVISIONAL;
GRANT SELECT, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER TI_RECIBO_PROVISIONAL_DETALLE;
GRANT UPDATE, REFERENCES ON RECIBO_PROVISIONAL_DETALLE TO TRIGGER TI_RECIBO_PROVISIONAL_DETALLE;
GRANT SELECT, REFERENCES ON FORMAS_PAGO TO TRIGGER TI_RECIBO_PROVISIONAL_PAGO;
GRANT SELECT, REFERENCES ON RECIBO_PROVISIONAL TO TRIGGER TI_RECIBO_PROVISIONAL_PAGO;
GRANT UPDATE, REFERENCES ON RECIBO_PROVISIONAL_PAGO TO TRIGGER TI_RECIBO_PROVISIONAL_PAGO;
GRANT SELECT ON CONCEPTOS TO TRIGGER TI_REGISTRO_CONCEPTOS;
GRANT SELECT ON REGISTRO_AUTOMATICO TO TRIGGER TI_REGISTRO_CONCEPTOS;
GRANT UPDATE, REFERENCES ON REGISTRO_CONCEPTOS TO TRIGGER TI_REGISTRO_CONCEPTOS;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_REMISIONES_VENTA;
GRANT SELECT, REFERENCES ON CLIENTES TO TRIGGER TI_REMISIONES_VENTA;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_REMISIONES_VENTA;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA TO TRIGGER TI_REMISIONES_VENTA;
GRANT SELECT, REFERENCES ON VENDEDORES TO TRIGGER TI_REMISIONES_VENTA;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_REMISIONES_VENTA_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_REMISIONES_VENTA_DETALLE;
GRANT SELECT, REFERENCES ON REMISIONES_VENTA TO TRIGGER TI_REMISIONES_VENTA_DETALLE;
GRANT UPDATE, REFERENCES ON REMISIONES_VENTA_DETALLE TO TRIGGER TI_REMISIONES_VENTA_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_REMISION_PROVEEDOR;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_REMISION_PROVEEDOR;
GRANT SELECT, REFERENCES ON PROVEEDORES TO TRIGGER TI_REMISION_PROVEEDOR;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER TI_REMISION_PROVEEDOR;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_REMISION_PROVEEDOR_DET;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_REMISION_PROVEEDOR_DET;
GRANT SELECT, REFERENCES ON REMISION_PROVEEDOR TO TRIGGER TI_REMISION_PROVEEDOR_DET;
GRANT UPDATE, REFERENCES ON REMISION_PROVEEDOR_DET TO TRIGGER TI_REMISION_PROVEEDOR_DET;
GRANT UPDATE, REFERENCES ON RESPUESTA_TIPOCUENTA TO TRIGGER TI_RESPUESTA_TIPOCUENTA;
GRANT SELECT ON TIPO_CUENTAS TO TRIGGER TI_RESPUESTA_TIPOCUENTA;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_RETIROS;
GRANT UPDATE, REFERENCES ON RETIROS TO TRIGGER TI_RETIROS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_SALDOS_ARTICULO;
GRANT UPDATE, REFERENCES ON SALDOS_ARTICULO TO TRIGGER TI_SALDOS_ARTICULO;
GRANT SELECT, REFERENCES ON SALDOS_CUENTAS TO TRIGGER TI_SALDOS_ARTICULO;
GRANT SELECT, REFERENCES ON CENTROS TO TRIGGER TI_SALDOS_CENTROS;
GRANT UPDATE, REFERENCES ON SALDOS_CENTROS TO TRIGGER TI_SALDOS_CENTROS;
GRANT SELECT, REFERENCES ON SALDOS_CUENTAS TO TRIGGER TI_SALDOS_CENTROS;
GRANT SELECT, REFERENCES ON SALDOS_CENTROS TO TRIGGER TI_SALDOS_CENTROS_TERCERO;
GRANT UPDATE, REFERENCES ON SALDOS_CENTROS_TERCERO TO TRIGGER TI_SALDOS_CENTROS_TERCERO;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_SALDOS_CENTROS_TERCERO;
GRANT SELECT, REFERENCES ON CUENTAS TO TRIGGER TI_SALDOS_CUENTAS;
GRANT UPDATE, REFERENCES ON SALDOS_CUENTAS TO TRIGGER TI_SALDOS_CUENTAS;
GRANT SELECT, REFERENCES ON SALDOS_CUENTAS TO TRIGGER TI_SALDOS_TERCEROS;
GRANT UPDATE, REFERENCES ON SALDOS_TERCEROS TO TRIGGER TI_SALDOS_TERCEROS;
GRANT SELECT, REFERENCES ON TERCEROS TO TRIGGER TI_SALDOS_TERCEROS;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_SALDO_BANCOS;
GRANT UPDATE, REFERENCES ON SALDO_BANCOS TO TRIGGER TI_SALDO_BANCOS;
GRANT SELECT, REFERENCES ON CUENTAS_BANCO TO TRIGGER TI_SALDO_BANCOS_CONF;
GRANT UPDATE, REFERENCES ON SALDO_BANCOS TO TRIGGER TI_SALDO_BANCOS_CONF;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_SALDO_EFECTIVO;
GRANT UPDATE, REFERENCES ON SALDO_EFECTIVO TO TRIGGER TI_SALDO_EFECTIVO;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_SALIDAS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_SALIDAS;
GRANT UPDATE, REFERENCES ON SALIDAS TO TRIGGER TI_SALIDAS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_SALIDAS_DETALLE;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_SALIDAS_DETALLE;
GRANT SELECT, REFERENCES ON SALIDAS TO TRIGGER TI_SALIDAS_DETALLE;
GRANT UPDATE, REFERENCES ON SALIDAS_DETALLE TO TRIGGER TI_SALIDAS_DETALLE;
GRANT SELECT, REFERENCES ON GRUPO TO TRIGGER TI_SUBGRUPO;
GRANT UPDATE, REFERENCES ON SUBGRUPO TO TRIGGER TI_SUBGRUPO;
GRANT SELECT ON CIUDADES TO TRIGGER TI_TERCEROS;
GRANT UPDATE, REFERENCES ON TERCEROS TO TRIGGER TI_TERCEROS;
GRANT SELECT, REFERENCES ON BODEGA TO TRIGGER TI_TRASFERENCIAS;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_TRASFERENCIAS;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS TO TRIGGER TI_TRASFERENCIAS;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_TRASFERENCIAS_DETALLE;
GRANT SELECT, REFERENCES ON TRASFERENCIAS TO TRIGGER TI_TRASFERENCIAS_DETALLE;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS_DETALLE TO TRIGGER TI_TRASFERENCIAS_DETALLE;
GRANT SELECT, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TI_TRASLADOS;
GRANT UPDATE, REFERENCES ON TRASLADOS TO TRIGGER TI_TRASLADOS;
GRANT SELECT, REFERENCES ON CAJAS TO TRIGGER TI_TRASLADO_CAJA;
GRANT SELECT, REFERENCES ON PREFIJOS TO TRIGGER TI_TRASLADO_CAJA;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TI_TRASLADO_CAJA;
GRANT SELECT, REFERENCES ON ARTICULO TO TRIGGER TI_UNIDAD_ARTICULO;
GRANT UPDATE, REFERENCES ON UNIDAD_ARTICULO TO TRIGGER TI_UNIDAD_ARTICULO;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASFERENCIAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER TRASFERENCIAS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER TRASFERENCIAS_AD;
GRANT SELECT, UPDATE ON ORDENES_INVENTARIO TO TRIGGER TRASFERENCIAS_AD;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS TO TRIGGER TRASFERENCIAS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASFERENCIAS_AI;
GRANT SELECT, UPDATE ON ORDENES_INVENTARIO TO TRIGGER TRASFERENCIAS_AI;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS TO TRIGGER TRASFERENCIAS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASFERENCIAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER TRASFERENCIAS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER TRASFERENCIAS_AU;
GRANT SELECT, UPDATE ON ORDENES_INVENTARIO TO TRIGGER TRASFERENCIAS_AU;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS TO TRIGGER TRASFERENCIAS_AU;
GRANT SELECT, UPDATE ON TRASFERENCIAS_DETALLE TO TRIGGER TRASFERENCIAS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER TRASFERENCIAS_BI;
GRANT SELECT, UPDATE, REFERENCES ON TRASFERENCIAS TO TRIGGER TRASFERENCIAS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER TRASFERENCIAS_BI;
GRANT SELECT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER TRASFERENCIAS_DETALLE_AD;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS_DETALLE TO TRIGGER TRASFERENCIAS_DETALLE_AD;
GRANT INSERT ON MOVIMIENTO_ARTICULO TO TRIGGER TRASFERENCIAS_DETALLE_AI;
GRANT SELECT, REFERENCES ON TRASFERENCIAS TO TRIGGER TRASFERENCIAS_DETALLE_AI;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS_DETALLE TO TRIGGER TRASFERENCIAS_DETALLE_AI;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER TRASFERENCIAS_DETALLE_AI;
GRANT SELECT, INSERT, DELETE ON MOVIMIENTO_ARTICULO TO TRIGGER TRASFERENCIAS_DETALLE_AU;
GRANT SELECT, REFERENCES ON TRASFERENCIAS TO TRIGGER TRASFERENCIAS_DETALLE_AU;
GRANT UPDATE, REFERENCES ON TRASFERENCIAS_DETALLE TO TRIGGER TRASFERENCIAS_DETALLE_AU;
GRANT EXECUTE ON PROCEDURE FACTOR_UNIDAD_CANT TO TRIGGER TRASFERENCIAS_DETALLE_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASLADOS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER TRASLADOS_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER TRASLADOS_AD;
GRANT SELECT, DELETE ON MOVIMIENTO_BANCO TO TRIGGER TRASLADOS_AD;
GRANT SELECT, DELETE ON NOTAS_DEBITO TO TRIGGER TRASLADOS_AD;
GRANT UPDATE, REFERENCES ON TRASLADOS TO TRIGGER TRASLADOS_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASLADOS_AI;
GRANT INSERT ON MOVIMIENTO_BANCO TO TRIGGER TRASLADOS_AI;
GRANT INSERT ON NOTAS_DEBITO TO TRIGGER TRASLADOS_AI;
GRANT UPDATE, REFERENCES ON TRASLADOS TO TRIGGER TRASLADOS_AI;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTA_DB_BANCO TO TRIGGER TRASLADOS_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASLADOS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER TRASLADOS_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER TRASLADOS_AU;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_BANCO TO TRIGGER TRASLADOS_AU;
GRANT SELECT, INSERT, DELETE ON NOTAS_DEBITO TO TRIGGER TRASLADOS_AU;
GRANT UPDATE, REFERENCES ON TRASLADOS TO TRIGGER TRASLADOS_AU;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOTA_DB_BANCO TO TRIGGER TRASLADOS_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS_BANCOS TO TRIGGER TRASLADOS_BI;
GRANT SELECT, UPDATE, REFERENCES ON TRASLADOS TO TRIGGER TRASLADOS_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER TRASLADOS_BI;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASLADOS_CAJA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER TRASLADOS_CAJA_AD;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER TRASLADOS_CAJA_AD;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASLADOS_CAJA_AI;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER TRASLADOS_CAJA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO TRIGGER TRASLADOS_CAJA_AU;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO TRIGGER TRASLADOS_CAJA_AU;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_AU;
GRANT SELECT, UPDATE ON TRASLADOS_CAJA_DET TO TRIGGER TRASLADOS_CAJA_AU;
GRANT SELECT, UPDATE, REFERENCES ON PREFIJOS TO TRIGGER TRASLADOS_CAJA_BI;
GRANT SELECT, UPDATE, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_BI;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO TRIGGER TRASLADOS_CAJA_BI;
GRANT SELECT, UPDATE, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AD;
GRANT SELECT, UPDATE ON MOVIMIENTO_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AD;
GRANT SELECT ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AD;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA_DET TO TRIGGER TRASLADOS_CAJA_DET_AD;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER TRASLADOS_CAJA_DET_AD;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER TRASLADOS_CAJA_DET_AD;
GRANT SELECT, INSERT, UPDATE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT SELECT, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA_DET TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER TRASLADOS_CAJA_DET_AI;
GRANT SELECT, INSERT, UPDATE, DELETE ON DOCUMENTOS_PAGO_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON MOVIMIENTO_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT SELECT, REFERENCES ON TRASLADOS_CAJA TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT UPDATE, REFERENCES ON TRASLADOS_CAJA_DET TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT EXECUTE ON PROCEDURE RESTE_SALDO_EFECTIVO TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT EXECUTE ON PROCEDURE SUME_SALDO_EFECTIVO TO TRIGGER TRASLADOS_CAJA_DET_AU;
GRANT INSERT ON AUDITORIA TO TRIGGER UNIDAD_ARTICULO_AD;
GRANT UPDATE, REFERENCES ON UNIDAD_ARTICULO TO TRIGGER UNIDAD_ARTICULO_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER UNIDAD_ARTICULO_AI;
GRANT UPDATE, REFERENCES ON UNIDAD_ARTICULO TO TRIGGER UNIDAD_ARTICULO_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER UNIDAD_ARTICULO_AU;
GRANT UPDATE, REFERENCES ON UNIDAD_ARTICULO TO TRIGGER UNIDAD_ARTICULO_AU;
GRANT SELECT ON AJUSTES_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON DESENSAMBLES_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON DEVOLUCIONES_COMPRAS_DET TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON DEVOLUCIONES_VENTAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON ENSAMBLES_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON ENTRADAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON FACTURAS_COMPRAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON FACTURAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON ORDENINVENTARIO_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON REMISIONES_VENTA_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON REMISION_PROVEEDOR_DET TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON RESERVAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON SALIDAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT SELECT ON TRASFERENCIAS_DETALLE TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT UPDATE, REFERENCES ON UNIDAD_ARTICULO TO TRIGGER UNIDAD_ARTICULO_BU;
GRANT INSERT ON NOMINA_NOVEDADES TO TRIGGER VACACIONES_AI;
GRANT UPDATE, REFERENCES ON VACACIONES TO TRIGGER VACACIONES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER VENDEDORES_AD;
GRANT SELECT, DELETE ON COBRADORES TO TRIGGER VENDEDORES_AD;
GRANT UPDATE, REFERENCES ON VENDEDORES TO TRIGGER VENDEDORES_AD;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER VENDEDORES_AD;
GRANT INSERT ON AUDITORIA TO TRIGGER VENDEDORES_AI;
GRANT SELECT, INSERT ON COBRADORES TO TRIGGER VENDEDORES_AI;
GRANT UPDATE, REFERENCES ON VENDEDORES TO TRIGGER VENDEDORES_AI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER VENDEDORES_AI;
GRANT INSERT ON AUDITORIA TO TRIGGER VENDEDORES_AU;
GRANT SELECT, INSERT, UPDATE ON COBRADORES TO TRIGGER VENDEDORES_AU;
GRANT UPDATE, REFERENCES ON VENDEDORES TO TRIGGER VENDEDORES_AU;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO TRIGGER VENDEDORES_AU;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO TRIGGER VENDEDORES_BD;
GRANT SELECT ON FACTURAS TO TRIGGER VENDEDORES_BD;
GRANT UPDATE, REFERENCES ON VENDEDORES TO TRIGGER VENDEDORES_BD;

/* Privileges of procedures */
GRANT SELECT ON PLAN_PRODUCCION TO REP_VENTAS_CLIENTE_ANO;
GRANT EXECUTE ON PROCEDURE VENTAS_CLIENTE_ANO TO REP_VENTAS_CLIENTE_ANO;
GRANT SELECT ON APLICACION_CLIENTE TO PROCEDURE ABONOS_DOCUMENTO_CARTERA;
GRANT SELECT ON APLICACION_CLIENTE_DETALLE TO PROCEDURE ABONOS_DOCUMENTO_CARTERA;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE ABONOS_DOCUMENTO_CARTERA;
GRANT SELECT ON RECIBOS_CAJA_DETALLE TO PROCEDURE ABONOS_DOCUMENTO_CARTERA;
GRANT SELECT ON APLICACION_PROVEDOR TO PROCEDURE ABONOS_DOCUMENTO_CXPAGAR;
GRANT SELECT ON APLICACION_PROVEEDOR_DETALLE TO PROCEDURE ABONOS_DOCUMENTO_CXPAGAR;
GRANT SELECT ON EGRESOS TO PROCEDURE ABONOS_DOCUMENTO_CXPAGAR;
GRANT SELECT ON EGRESOS_DETALLE TO PROCEDURE ABONOS_DOCUMENTO_CXPAGAR;
GRANT INSERT ON AUDITORIA TO PROCEDURE ACTIVAR_ACTUALIZACION_BALNIIF;
GRANT SELECT ON ARTICULO TO PROCEDURE ACTUALICE_COSTO;
GRANT SELECT, INSERT, DELETE ON COSTOS TO PROCEDURE ACTUALICE_COSTO;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO PROCEDURE ACTUALICE_COSTO;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO TO PROCEDURE ACTUALICE_COSTO;
GRANT SELECT, INSERT, UPDATE ON SALDOS_ACTIVO TO PROCEDURE ACTUALICE_SALDO_ACTIVO;
GRANT EXECUTE ON PROCEDURE SALDO_ACTIVO TO PROCEDURE ACTUALICE_SALDO_ACTIVO;
GRANT SELECT, INSERT, UPDATE ON SALDOS_ARTICULO TO PROCEDURE ACTUALICE_SALDO_ARTICULO;
GRANT EXECUTE ON PROCEDURE SALDO_ARTICULO TO PROCEDURE ACTUALICE_SALDO_ARTICULO;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_CENTROS TO PROCEDURE ACTUALICE_SALDO_CENTRO;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO TO PROCEDURE ACTUALICE_SALDO_CENTRO;
GRANT SELECT, INSERT, UPDATE ON SALDOS_CENTROS_TERCERO TO PROCEDURE ACTUALICE_SALDO_CENTRO_TERCERO;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_TERCERO TO PROCEDURE ACTUALICE_SALDO_CENTRO_TERCERO;
GRANT SELECT, INSERT, UPDATE, REFERENCES ON SALDOS_CUENTAS TO PROCEDURE ACTUALICE_SALDO_CUENTA;
GRANT EXECUTE ON PROCEDURE ES_AFECTABLE TO PROCEDURE ACTUALICE_SALDO_CUENTA;
GRANT EXECUTE ON PROCEDURE PADRE TO PROCEDURE ACTUALICE_SALDO_CUENTA;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA TO PROCEDURE ACTUALICE_SALDO_CUENTA;
GRANT SELECT, INSERT, UPDATE ON SALDOS_TERCEROS TO PROCEDURE ACTUALICE_SALDO_TERCERO;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO TO PROCEDURE ACTUALICE_SALDO_TERCERO;
GRANT SELECT, UPDATE ON CLIENTES TO PROCEDURE ACTUALIZA_BASES_RETENCION;
GRANT SELECT, UPDATE ON PROVEEDORES TO PROCEDURE ACTUALIZA_BASES_RETENCION;
GRANT SELECT ON TERCEROS TO PROCEDURE ACTUALIZA_BASES_RETENCION;
GRANT SELECT ON AUDITORIA TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT ON DEVOLUCIONES_VENTAS_DETALLE TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT ON FACTURAS TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT ON FACTURAS_DETALLE TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT ON PUNTOS_ARTICULOS TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT, INSERT ON PUNTOS_CLIENTE TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT ON PUNTOS_DIASESPECIAL TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE ACUMULA_PUNTOS_CLIENTE;
GRANT SELECT, UPDATE ON EMPLEADO_CONCEPTOS TO PROCEDURE AGREGA_ENTIDAD_CONCEPTOEMPL;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON DEVOLUCION_CHEQUES TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON FACTURAS TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON HISTORICO_VENTAS TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON PREFIJOS TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON PRESUPUESTO_VENTAS TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON PRESUPUESTO_VENTAS_MESES TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON RECIBOS_CAJA_DETALLE TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON SUCURSALES TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT ON VENDEDORES TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE ANALISIS_VENTAS_VENDEDOR;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_CAJA TO PROCEDURE ARREGLA_MOV_CAJA_RC;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE ARREGLA_MOV_CAJA_RC;
GRANT SELECT ON RECIBOS_CAJA_PAGO TO PROCEDURE ARREGLA_MOV_CAJA_RC;
GRANT SELECT ON ANTICIPOS_CLIENTE TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT ON DEVOLUCION_CHEQUES TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT ON FACTURAS TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT, UPDATE ON MOVIMIENTO_CLIENTES TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE ASIGNA_COBRADOR;
GRANT SELECT ON FACTURAS TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT SELECT ON FACTURAS_DETALLE TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT SELECT ON PREFIJOS TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT SELECT ON REMISIONES_VENTA TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT SELECT ON REMISIONES_VENTA_DETALLE TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT SELECT ON RUTERO_FAC TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE ASIGNA_RUTERO_FAC;
GRANT SELECT ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_ARTICULO_MES;
GRANT SELECT ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_ARTICULO_MES;
GRANT SELECT, REFERENCES ON CENTROS TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON PROYECTOS TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT ON SALDOS_CENTROS TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT ON TERCEROS TO PROCEDURE AUXILIAR_CENTRO_DESDE_HASTA;
GRANT SELECT ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_CENTRO_MES;
GRANT SELECT ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_CENTRO_MES;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_CUENTA_MES;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_CUENTA_MES;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_DESDE_HASTA;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_DESDE_HASTA;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE AUXILIAR_DESDE_HASTA;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA TO PROCEDURE AUXILIAR_DESDE_HASTA;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON SALDOS_TERCEROS TO PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON TERCEROS TO PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA TO PROCEDURE AUXILIAR_TERCERO_DESDE_HASTA;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE AUXILIAR_TERCERO_MES;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE AUXILIAR_TERCERO_MES;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE BALANCE_ANUAL;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES TO PROCEDURE BALANCE_ANUAL;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE BALANCE_ANUAL;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PROCEDURE BALANCE_ANUAL;
GRANT SELECT ON ARTICULO TO PROCEDURE BALANCE_ARTICULO_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_ARTICULOC_MES TO PROCEDURE BALANCE_ARTICULO_MES;
GRANT EXECUTE ON PROCEDURE SALDO_ARTICULO_MES TO PROCEDURE BALANCE_ARTICULO_MES;
GRANT SELECT ON CENTROS TO PROCEDURE BALANCE_CENTRO_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CENTRO_MES TO PROCEDURE BALANCE_CENTRO_MES;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_MES TO PROCEDURE BALANCE_CENTRO_MES;
GRANT SELECT ON TERCEROS TO PROCEDURE BALANCE_CENTRO_TERCERO_MES;
GRANT EXECUTE ON PROCEDURE COMPONE_FECHA_CONTA TO PROCEDURE BALANCE_CENTRO_TERCERO_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CENTRO_TERCERO_MES TO PROCEDURE BALANCE_CENTRO_TERCERO_MES;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_TERCERO TO PROCEDURE BALANCE_CENTRO_TERCERO_MES;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE BALANCE_COMPARATIVO;
GRANT SELECT, REFERENCES ON TERCEROS TO PROCEDURE BALANCE_COMPARATIVO;
GRANT EXECUTE ON PROCEDURE ES_AFECTABLE TO PROCEDURE BALANCE_COMPARATIVO;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES TO PROCEDURE BALANCE_COMPARATIVO;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_TERCERO_MES TO PROCEDURE BALANCE_COMPARATIVO;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE BALANCE_COMPARATIVO;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_MES TO PROCEDURE BALANCE_COMPARATIVO;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PROCEDURE BALANCE_COMPARATIVO;
GRANT SELECT, REFERENCES ON CENTROS TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT SELECT ON PROYECTOS TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT EXECUTE ON PROCEDURE ES_AFECTABLE TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CENTRO_MES TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT EXECUTE ON PROCEDURE SALDO_CENTRO_MES TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PROCEDURE BALANCE_CON_CENTROS_MES;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT SELECT, REFERENCES ON SALDOS_TERCEROS TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT SELECT, REFERENCES ON TERCEROS TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE ES_AFECTABLE TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_CUENTA_MES TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTOS_TERCERO_MES TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_TERCERO_MES TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_MES TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PROCEDURE BALANCE_CON_TERCEROS_MES;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE BALANCE_MES;
GRANT EXECUTE ON PROCEDURE DIGITOS_NIVEL TO PROCEDURE BALANCE_MES;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE BALANCE_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_MES TO PROCEDURE BALANCE_MES;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE BALANCE_MES;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PROCEDURE BALANCE_MES;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE BALANCE_PRUEBA_ACUMULADO;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_CUENTA_DESDE_HASTA TO PROCEDURE BALANCE_PRUEBA_ACUMULADO;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE BALANCE_PRUEBA_ACUMULADO;
GRANT EXECUTE ON PROCEDURE VALIDE_ESTRUCTURA TO PROCEDURE BALANCE_PRUEBA_ACUMULADO;
GRANT SELECT ON TERCEROS TO PROCEDURE BALANCE_TERCERO_MES;
GRANT EXECUTE ON PROCEDURE MOVIMIENTO_TERCERO_MES TO PROCEDURE BALANCE_TERCERO_MES;
GRANT EXECUTE ON PROCEDURE SALDO_TERCERO_MES TO PROCEDURE BALANCE_TERCERO_MES;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT, DELETE ON COMPROBANTE_ENCABEZADO TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON DEVOLUCIONES_COMPRAS TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON EGRESOS TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON ENSAMBLES TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON ENTRADAS TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON FACTURAS TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON FACTURAS_COMPRA TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT ON SALIDAS TO PROCEDURE BORRA_CONTABIL_DOCUMENTOS;
GRANT SELECT, DELETE ON COMPROBANTE_DETALLE TO PROCEDURE BORRE_CONTABIL_FACTURA;
GRANT SELECT, DELETE, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE BORRE_CONTABIL_FACTURA;
GRANT SELECT ON AJUSTES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON ANTICIPOS_CLIENTE TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON ANTICIPOS_PROVEEDOR TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON APLICACION_CLIENTE TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON APLICACION_PROVEDOR TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON CHEQUES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON CONSIGNA TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON CONSIGNA_TARJETAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON DESENSAMBLES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON DEVOLUCIONES_COMPRAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON DEVOLUCION_CHEQUES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON EGRESOS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON ENSAMBLES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON ENTRADAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON FACTURAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON FACTURAS_COMPRA TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON NOTAS_CREDITO TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON NOTAS_CREDITO_PROVEEDOR TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON NOTAS_DEBITO TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON NOTAS_DEBITO_PROVEEDOR TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON RETIROS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON SALIDAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON TRASFERENCIAS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON TRASLADOS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT ON TRASLADOS_CAJA TO PROCEDURE BUSCA_ID_DOC;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO PROCEDURE BUSCA_ID_DOC;
GRANT SELECT, REFERENCES ON ANTICIPOS_CLIENTE TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_VENTAS TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON DEVOLUCION_CHEQUES TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON FACTURAS TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON NOTAS_CREDITO_CLIENTES TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON NOTAS_DEBITO_CLIENTES TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT ON RECIBOS_CAJA_DETALLE TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON SALDOS_DOC_CARTERA TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO PROCEDURE BUSCA_ID_DOC_CARTERA;
GRANT SELECT, REFERENCES ON ANTICIPOS_PROVEEDOR TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_COMPRAS TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT ON EGRESOS_DETALLE TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT, REFERENCES ON FACTURAS_COMPRA TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT, REFERENCES ON NOTAS_CREDITO_PROVEEDOR TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT, REFERENCES ON NOTAS_DEBITO_PROVEEDOR TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT, REFERENCES ON SALDOS_DOC_CXPAGAR TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT EXECUTE ON PROCEDURE COMPLETA_CEROS TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CXPAGAR TO PROCEDURE BUSCA_ID_DOC_CXPAGAR;
GRANT SELECT ON CLASE_EGRESO TO PROCEDURE BUSQUEDA_EGRESOS;
GRANT SELECT ON EGRESOS TO PROCEDURE BUSQUEDA_EGRESOS;
GRANT SELECT ON EGRESOS_BANCO TO PROCEDURE BUSQUEDA_EGRESOS;
GRANT SELECT ON EGRESOS_CAJA TO PROCEDURE BUSQUEDA_EGRESOS;
GRANT SELECT ON PREFIJOS TO PROCEDURE BUSQUEDA_EGRESOS;
GRANT SELECT ON ARTICULO TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON AUDITORIA TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON AUTORIZACIONES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON CIUDADES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON CLIENTES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON CLIENTE_SUCURSALES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON CONTABIL_ARTICULO TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON DEVOLUCIONES_VENTAS_DETALLE TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON FACTURAS TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON FACTURAS_DETALLE TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON NOTAS_CARTERA_TIPOS TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON PAISES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON TARIFA_IVA TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON TERCEROS TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON TIPOS_MONEDA TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON TIPO_ID TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON VENDEDORES TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT EXECUTE ON PROCEDURE PARTE_CADENA_COMAS TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT EXECUTE ON PROCEDURE SERIALES_ITEM_DOCUMENTO TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT EXECUTE ON PROCEDURE TRUNCAR_TELEFONO TO PROCEDURE CADENA_FACTELECTRONICA21;
GRANT SELECT ON NOMINA_NOVEDADES TO PROCEDURE CALCULA_CESANTIA;
GRANT SELECT ON NOMINA_NOVEDADES_DETALLE TO PROCEDURE CALCULA_CESANTIA;
GRANT EXECUTE ON PROCEDURE DIAS_ENTRE_NOMINA TO PROCEDURE CALCULA_CESANTIA;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CALCULA_CESANTIA;
GRANT EXECUTE ON PROCEDURE REDONDEE TO PROCEDURE CALCULA_CESANTIA;
GRANT SELECT, REFERENCES ON ARTICULO TO PROCEDURE CALCULA_PRECIOS;
GRANT SELECT, REFERENCES ON LISTA_PRECIOS TO PROCEDURE CALCULA_PRECIOS;
GRANT SELECT, UPDATE, REFERENCES ON PRECIOS_ARTICULO TO PROCEDURE CALCULA_PRECIOS;
GRANT SELECT ON TARIFA_IVA TO PROCEDURE CALCULA_PRECIOS;
GRANT EXECUTE ON PROCEDURE COSTO_PROMEDIO TO PROCEDURE CALCULA_PRECIOS;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CALCULA_PRECIOS;
GRANT EXECUTE ON PROCEDURE REDONDEE TO PROCEDURE CALCULA_PRECIOS;
GRANT EXECUTE ON PROCEDURE ULTIMO_COSTO TO PROCEDURE CALCULA_PRECIOS;
GRANT SELECT, UPDATE ON TERCEROS TO PROCEDURE CALCULE_DV;
GRANT EXECUTE ON PROCEDURE DV TO PROCEDURE CALCULE_DV;
GRANT SELECT ON ANTICIPOS_CLIENTE TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON APLICACION_CLIENTE TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON APLICACION_CLIENTE_DETALLE TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON DEVOLUCION_CHEQUES TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON FACTURAS TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT, INSERT, UPDATE, DELETE ON MOVIMIENTO_CLIENTES TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON RECIBOS_CAJA_DETALLE TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT, INSERT, UPDATE, DELETE ON SALDOS_DOC_CARTERA TO PROCEDURE CAMBIA_CLIENTE;
GRANT SELECT ON ARTICULO TO PROCEDURE CAMBIA_CTAS_ARTI;
GRANT SELECT, UPDATE ON CONTABIL_ARTICULO TO PROCEDURE CAMBIA_CTAS_ARTI;
GRANT SELECT ON GRUPO TO PROCEDURE CAMBIA_CTAS_ARTI;
GRANT SELECT ON TARIFA_IVA TO PROCEDURE CAMBIA_CTAS_ARTI;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CAMBIA_CTAS_ARTI;
GRANT SELECT ON AJUSTES TO PROCEDURE CAMBIE_ID_AJUSTEINV;
GRANT SELECT ON AJUSTES_INFLACION TO PROCEDURE CAMBIE_ID_AJUSTESINF;
GRANT SELECT ON ANTICIPOS_CLIENTE TO PROCEDURE CAMBIE_ID_ANTICLIE;
GRANT SELECT ON ANTICIPOS_PROVEEDOR TO PROCEDURE CAMBIE_ID_ANTIPROV;
GRANT SELECT ON APLICACION_CLIENTE TO PROCEDURE CAMBIE_ID_APLICLIE;
GRANT SELECT ON APLICACION_PROVEDOR TO PROCEDURE CAMBIE_ID_APLIPROV;
GRANT SELECT ON ARQUEO_CAJA TO PROCEDURE CAMBIE_ID_ARQUEO;
GRANT SELECT ON CAMBIO_DOCUMENTOS TO PROCEDURE CAMBIE_ID_CAMBDOCU;
GRANT SELECT ON CRM_CAMPANA TO PROCEDURE CAMBIE_ID_CAMPANA;
GRANT SELECT ON CHEQUES TO PROCEDURE CAMBIE_ID_CHEQUE;
GRANT SELECT ON CIERRE_ANUAL TO PROCEDURE CAMBIE_ID_CIERANUAL;
GRANT SELECT ON CIERRE_TERCEROS TO PROCEDURE CAMBIE_ID_CIERTERC;
GRANT SELECT ON FACTURAS_COMPRA TO PROCEDURE CAMBIE_ID_COMPRAS;
GRANT SELECT ON COMPROBANTE_ENCABEZADO TO PROCEDURE CAMBIE_ID_COMPROBA;
GRANT SELECT ON CONCILIACION_BANCARIA TO PROCEDURE CAMBIE_ID_CONCILIAB;
GRANT SELECT ON CONSIGNA TO PROCEDURE CAMBIE_ID_CONSIGNA;
GRANT SELECT ON CONSIGNA_TARJETAS TO PROCEDURE CAMBIE_ID_CONSIGNATAR;
GRANT SELECT, UPDATE ON CONSUMOS TO PROCEDURE CAMBIE_ID_CONSUMO;
GRANT SELECT ON COTIZACION_PROVEEDOR TO PROCEDURE CAMBIE_ID_COTICOMP;
GRANT SELECT ON COTIZACIONES TO PROCEDURE CAMBIE_ID_COTIZACI;
GRANT SELECT ON DESENSAMBLES TO PROCEDURE CAMBIE_ID_DESENSAMBLE;
GRANT SELECT ON DEVOLUCIONES_VENTAS TO PROCEDURE CAMBIE_ID_DEVOLCLIE;
GRANT SELECT ON DEVOLUCIONES_COMPRAS TO PROCEDURE CAMBIE_ID_DEVOLPROV;
GRANT SELECT ON DEVOLUCION_CHEQUES TO PROCEDURE CAMBIE_ID_DEV_CHEQUES;
GRANT SELECT, UPDATE ON EGRESOS TO PROCEDURE CAMBIE_ID_EGRESO;
GRANT SELECT ON ENSAMBLES TO PROCEDURE CAMBIE_ID_ENSAMBLE;
GRANT SELECT ON ENTRADAS TO PROCEDURE CAMBIE_ID_ENTRADA;
GRANT SELECT ON FACTURAS TO PROCEDURE CAMBIE_ID_FACTURA;
GRANT UPDATE ON INTERFAZ_BANCOS TO PROCEDURE CAMBIE_ID_INTERBANCO;
GRANT UPDATE ON INTERFAZ_COMPRAS TO PROCEDURE CAMBIE_ID_INTERCMP;
GRANT UPDATE ON INTERFAZ_INVENTARIO TO PROCEDURE CAMBIE_ID_INTINVENTARIO;
GRANT SELECT ON NOTAS_CREDITO_CLIENTES TO PROCEDURE CAMBIE_ID_NOTACRCLIE;
GRANT SELECT ON NOTAS_CREDITO_PROVEEDOR TO PROCEDURE CAMBIE_ID_NOTACRPROV;
GRANT SELECT ON NOTAS_DEBITO_CLIENTES TO PROCEDURE CAMBIE_ID_NOTADBCLIE;
GRANT SELECT ON NOTAS_DEBITO_PROVEEDOR TO PROCEDURE CAMBIE_ID_NOTADBPROV;
GRANT SELECT ON NOTAS_CREDITO TO PROCEDURE CAMBIE_ID_NOTA_CR_BANCO;
GRANT SELECT ON NOTAS_DEBITO TO PROCEDURE CAMBIE_ID_NOTA_DB_BANCO;
GRANT SELECT ON ORDENES_COMPRA TO PROCEDURE CAMBIE_ID_ORDENCOMP;
GRANT SELECT ON ORDENES_INVENTARIO TO PROCEDURE CAMBIE_ID_ORDENMCIA;
GRANT SELECT ON PEDIDOS TO PROCEDURE CAMBIE_ID_PEDIDO;
GRANT SELECT ON PLANTILLA_ENCABEZADO TO PROCEDURE CAMBIE_ID_PLANTILLA;
GRANT SELECT, UPDATE ON RECIBOS_CAJA TO PROCEDURE CAMBIE_ID_RECICAJA;
GRANT SELECT, UPDATE ON RECIBO_PROVISIONAL TO PROCEDURE CAMBIE_ID_RECIPROV;
GRANT SELECT ON REMISIONES_VENTA TO PROCEDURE CAMBIE_ID_REMICLIE;
GRANT SELECT ON REMISION_PROVEEDOR TO PROCEDURE CAMBIE_ID_REMIPROV;
GRANT SELECT ON RESERVAS TO PROCEDURE CAMBIE_ID_RESERVA;
GRANT SELECT ON RETIROS TO PROCEDURE CAMBIE_ID_RETIRO;
GRANT SELECT ON SALIDAS TO PROCEDURE CAMBIE_ID_SALIDA;
GRANT SELECT ON SOLICITUD_IMPORTACION TO PROCEDURE CAMBIE_ID_SOLIMP;
GRANT SELECT ON TRASFERENCIAS TO PROCEDURE CAMBIE_ID_TRANSFER;
GRANT SELECT ON TRASLADOS_CAJA TO PROCEDURE CAMBIE_ID_TRASLACAJA;
GRANT SELECT ON TRASLADOS TO PROCEDURE CAMBIE_ID_TRASLADO;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE CAMBIOS_PATRIMONIO;
GRANT SELECT, REFERENCES ON COMPROBANTE_ENCABEZADO TO PROCEDURE CAMBIOS_PATRIMONIO;
GRANT EXECUTE ON PROCEDURE SALDO_CUENTA_MES TO PROCEDURE CAMBIOS_PATRIMONIO;
GRANT SELECT, REFERENCES ON CAMBIO_SITUACION TO PROCEDURE CAMBIOS_SITUACION;
GRANT SELECT, REFERENCES ON COMPROBANTE_DETALLE TO PROCEDURE CAMBIOS_SITUACION;
GRANT SELECT, REFERENCES ON CUENTAS TO PROCEDURE CAMBIOS_SITUACION;
GRANT SELECT, UPDATE ON COMPROBANTE_ENCABEZADO TO PROCEDURE CAMBIO_ANO_CONTA;
GRANT SELECT, REFERENCES ON ARTICULO TO PROCEDURE CAMBIO_PRECIOS;
GRANT EXECUTE ON PROCEDURE CALCULA_PRECIOS TO PROCEDURE CAMBIO_PRECIOS;
GRANT SELECT ON ARTICULO TO PROCEDURE CANTIDAD_POR_FACTOR;
GRANT SELECT ON UNIDAD_ARTICULO TO PROCEDURE CANTIDAD_POR_FACTOR;
GRANT SELECT, REFERENCES ON ANTICIPOS_CLIENTE TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON DEVOLUCIONES_VENTAS TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON FACTURAS TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON MOVIMIENTO_CLIENTES TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT ON NOTAS_CLIENTES TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON NOTAS_CREDITO_CLIENTES TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON NOTAS_DEBITO_CLIENTES TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT ON PUNTO_VENTA TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT ON RECIBOS_CAJA TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT ON RECIBOS_CAJA_DETALLE TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON RECIBO_PROVISIONAL TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT ON RECIBO_PROVISIONAL_DETALLE TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON SALDOS_DOC_CARTERA TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT, REFERENCES ON TIPO_DOCUMENTO TO PROCEDURE CARTERA_CLIENTE;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CARTERA_CLIENTE;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO PROCEDURE CARTERA_CLIENTE;
GRANT SELECT ON FACTURAS TO PROCEDURE CARTERA_PUNTO_DIA;
GRANT EXECUTE ON PROCEDURE SALDO_DOC_CARTERA TO PROCEDURE CARTERA_PUNTO_DIA;
GRANT SELECT ON CONCEPTOS_NOMINA TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON EMPLEADOS TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON EMPLEADO_CONCEPTOS TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT, INSERT ON NOMINA TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON NOMINA_COMISIONES TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT, INSERT, UPDATE ON NOMINA_CONCEPTOS TO PROCEDURE CAUSA_NOMINA;
GRANT INSERT ON NOMINA_DEPARTAMENTO TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON NOMINA_HORASEXT TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON NOMINA_NOVEDADES TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON PARAMETROS_ANO TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT, UPDATE ON PRESTAMO_CUOTAS TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON PRESTAMO_NOMINA TO PROCEDURE CAUSA_NOMINA;
GRANT EXECUTE ON PROCEDURE CAMBIE_ID_NOMINA TO PROCEDURE CAUSA_NOMINA;
GRANT EXECUTE ON PROCEDURE DIAS_LABORADOS TO PROCEDURE CAUSA_NOMINA;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CAUSA_NOMINA;
GRANT EXECUTE ON PROCEDURE REDONDEE TO PROCEDURE CAUSA_NOMINA;
GRANT SELECT ON CONCEPTOS_NOMINA TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON DEPARTAMENTO TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON EMPLEADOS TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON EMPLEADO_CONCEPTOS TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON FODO_SOL_PENSIONAL TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON NOMINA_CARTERA TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT, UPDATE ON NOMINA_CONCEPTOS TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON NOMINA_VALOR_PREDET TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON PARAMETROS_ANO TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON RETENCIONES TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON SECCION TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON VACACIONES TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT SELECT ON VACACIONES_DETALLE TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT EXECUTE ON PROCEDURE IBC_EMPLEADO TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT EXECUTE ON PROCEDURE LEE_CONFIGURACION TO PROCEDURE CAUSA_NOMINA_VACACIONES;
GRANT EXECUTE ON PROCEDURE PERIODO_NOM_FECHA TO PROCEDURE CAUSA_NOMINA_VACACIONES;
