
create or replace package venpel is

   Function TerminalActiva return boolean;

   Procedure inicializar(pcia in char, pcaja in char, pdia in date);

   Function TipoTarjeta(ptarjeta in varchar2) return varchar2;

   Function AutoValida(ptarjeta in varchar2, pconc in varchar2) return boolean;

   Procedure ReintenteRespuesta(presp in out varchar2, pest in char default 'A');

   Procedure Autorizacion(pcliente in varchar2, pnombre in varchar2, ptarjeta in varchar2,
                         pexpira in date, plec in varchar2, pbanda in varchar2, pmonto in number, 
                         pdoc in out number, presp in out varchar2);

   Procedure Reversion(pcia in varchar2, pcaja in varchar2, pdoc in number, pcliente in varchar2,
                       pmonto in number, prever in out number, presp in out varchar2);

   Procedure AutoReversion(pcliente in varchar2, pnombre in varchar2, ptarjeta in varchar2,
                           pexpira in date, plec in varchar2, pbanda in varchar2, pmonto in number,
                           pRever in out number, presp in out varchar2);

   Procedure AnotaPago(Pdoc in number, PPag in number);

   Function DescRespuesta(Presp in varchar2) return varchar2;

   Function TerminalCaja(pcia in varchar2, pcaja in varchar2) return varchar2;

   Function ObtTerminal return varchar2;

   Function ObtComercio return varchar2;

   Procedure Liberar;

   Procedure ValidaBanda(pBanda in varchar2, pTarjeta in varchar2);

End;
/

start ventas\eclientbod.plb


-- SYS have to grant execute on dbms_alert to llobet;
