CREATE OR REPLACE PACKAGE PRICE_LIST AS 

   K_N CONSTANT CHAR := 'N';
   K_S CONSTANT CHAR := 'S';
   K_G CONSTANT CHAR := 'G';
   K_W CONSTANT CHAR := 'W';
   K_E CONSTANT CHAR := 'E';

   PROCEDURE INSERT_ITMPREVLIST(P_CDFILIAL         IN ITMPREVLIST.CDFILIAL%TYPE,
                                P_NRSEQPRELIST     IN ITMPREVLIST.NRSEQPRELIST%TYPE,
                                P_CDOPERADOR       IN OPERADOR.CDOPERADOR%TYPE,
                                P_LISTCDREGIAO     IN VARCHAR2,
                                P_DTINI            IN DATE,
                                P_DTFIN            IN DATE,
                                P_IDCOINVALIDLIST  IN CHAR, 
                                P_CDARVPRODINI     IN VARCHAR2,
                                P_CDARVPRODFIN     IN VARCHAR2,
                                P_IDCOTSEMMOVLIST  IN CHAR,
                                P_ROWSAFFECT      OUT INT);

   PROCEDURE INS_ITMPREVLIST_IDSISDOS3 (P_CDFILIAL      IN FILIAL.CDFILIAL%TYPE,
                                        P_CDOPERADOR    IN OPERADOR.CDOPERADOR%TYPE,
                                        P_TCDREGIAO     IN VARCHAR2,
                                        P_CDREGIAO      IN FILIAL.CDREGIAO%TYPE,
                                        P_DTINI         IN DATE,
                                        P_DTFIN         IN DATE,
                                        P_TPRODUTO      IN VARCHAR2,
                                        P_CDPRODINI     IN PRODUTO.CDARVPROD%TYPE,
                                        P_CDPRODFIN     IN PRODUTO.CDARVPROD%TYPE,
                                        P_CARGCOT       IN COLETAPR.IDTIPCOLREG%TYPE,
                                        P_NRSEQPRELIST  IN PREVLISTA.NRSEQPRELIST%TYPE,
                                        P_COINCIDEP     IN PREVLISTA.IDCOINVALIDLIST%TYPE,
                                        P_ROWSAFFECT    OUT INT);

   PROCEDURE APURA_MELHORES_PRECOS(P_CDFILIAL     IN FILIAL.CDFILIAL%TYPE,
                                   P_NRSEQPRELIST IN PREVLISTA.NRSEQPRELIST%TYPE);
   
   
   PROCEDURE CRIA_LISTA_WEB (P_CDFILIAL     IN ITMPREVLIST.CDFILIAL%TYPE,
                             P_NRSEQPRELIST IN ITMPREVLIST.NRSEQPRELIST%TYPE,
                             P_ROWSAFFECT  OUT INT);

   
    
END PRICE_LIST;
/
