<% PUBLIC mUID, mUSER LOCAL VLISTAINT,VPARIDAD,XORDEN,XORDEN2,TMFIL,PREFIL,PREFIL2,TMFIL2,ABUS,XFAM,XABUS,XTIPO,XREDONDEO mUSER=" " mUID=Request.QueryString('uid') IF !USED('PRECIOS') USE DATABASE\PRECIOS IN 0 SHARED SET ORDER TO SALTO IN PRECIOS ENDIF IF !USED('WEBREG') USE DATABASE\WEBREG IN 0 ORDER UID SHARED IF val(mUID)>0 SEEK VAL(mUID) IN WEBREG IF FOUND('WEBREG') mUSER=TT("Usuario")+": "+PROPER(ALLTRIM(WEBREG.RAZON))+" " ENDIF ENDIF ENDIF IF !USED('STOCK') USE DATABASE\STOCK IN 0 SHARED SET ORDER TO SALTO IN STOCK ENDIF IF !USED('SUCURSAL') USE DATABASE\SUCURSAL IN 0 SHARED ENDIF IF !USED('PROVEEDO') USE DATABASE\PROVEEDO IN 0 SHARED SET ORDER TO CODIGO IN PROVEEDO ENDIF IF !USED('GRUPO') USE DATABASE\GRUPO IN 0 SHARED SET ORDER TO DESCRI IN GRUPO ENDIF IF !USED('DESCUENT') USE DATABASE\DESCUENT IN 0 SHARED ENDIF IF !USED('SUBG') USE DATABASE\SUBG IN 0 SHARED SET ORDER TO DESCRI IN SUBG ENDIF IF !USED('CONTROL') USE DATABASE\CONTROL IN 0 SHARED GO TOP IN CONTROL ENDIF VPARIDAD=CONTROL.PARIDAD VLISTAINT=CONTROL.LISTAINT IF !USED('recargos') USE DATABASE\RECARGOS IN 0 SHARED ENDIF IF !USED('LISTAS') USE DATABASE\LISTAS IN 0 SHARED ENDIF IF SEEK(VLISTAINT,"LISTAS","LISTA") XREDONDEO=LISTAS.REDONDEO2 ELSE XREDONDEO=0 ENDIF IF !USED('PARTES') USE DATABASE\PARTES IN 0 SHARED ENDIF XORDEN="Partes.parte" XORDEN2=Request.QueryString('orden') XDIRECCION=Request.QueryString('orden2') DO CASE CASE XORDEN2="descri" XORDEN="Partes.descri" CASE XORDEN2="codigo" XORDEN="Partes.codigo" CASE XORDEN2="parte" XORDEN="Partes.parte" CASE XORDEN2="stock" XORDEN="stock" CASE XORDEN2="precio" XORDEN="precio_R" ENDCASE PREFIL="F"+SYS(2015) PREFIL2="WEB\TEMP\"+PREFIL TMFIL="F"+SYS(2015) TMFIL2="WEB\TEMP\"+TMFIL ABUS="Partes.FILTROWEB = .F." USE IN CONTROL XFAM=Request.QueryString('fam') IF EMPTY(XFAM) XABUS=Request.form('bus') IF EMPTY(XABUS) XABUS=Request.QueryString('bus') ENDIF XTIPO=Request.form('tipo') IF EMPTY(XTIPO) XTIPO=Request.QueryString('tipo') ENDIF DO CASE CASE !EMPTY(Request.QueryString('grupo')) .OR. !EMPTY(Request.QueryString('subgrupo')) IF !EMPTY(Request.QueryString('grupo')) ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+[SUBSTR(Partes.GRUPO,1,2) = "]+Request.QueryString('grupo')+["] ENDIF IF !EMPTY(Request.QueryString('subgrupo')) ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+[SUBSTR(Partes.GRUPO,3,2) = "]+Request.QueryString('subgrupo')+["] ENDIF CASE XTIPO="2" ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+"Partes.CODIGO LIKE "+['%]+UPPER(XABUS)+[%'] CASE XTIPO="3" ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+"Partes.DESCRI LIKE "+['%]+UPPER(XABUS)+[%'] CASE XTIPO="4" ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+"Partes.parte LIKE "+['%]+UPPER(XABUS)+[%'] OTHERWISE ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+"("+"Partes.parte LIKE "+['%]+UPPER(XABUS)+[%'] ABUS=ABUS+".OR. Partes.CODIGO LIKE "+['%]+UPPER(XABUS)+[%'] ABUS=ABUS+".OR. Partes.DESCRI LIKE "+['%]+UPPER(XABUS)+[%']+")" ENDCASE ELSE ABUS=ABUS+IIF(LEN(ABUS)>0," .AND. ","")+"Partes.FAMILIA = "+Request.QueryString('fam')+" .AND. Partes.FAMILIA != 0" ENDIF SELECT TOP 1000 Partes.parte, Partes.codigo, Partes.descri, Partes.salto, Recargos.recargo, Proveedo.dealer, Precios.precio as precio_o, Precios.iva, Precios.moneda, Precios.fecha, ; Partes.imagen1, 9999999 as STOCK2, 999999999.99 AS PRECIO2, (SELECT SUM(Stock.stockact) FROM master!stock WHERE stock.salto=partes.salto) as stock, Proveedo.codigo as pcodigo, descuento; FROM master!partes LEFT OUTER JOIN master!proveedo ON Partes.dealer = Proveedo.codigo ; LEFT OUTER JOIN master!precios ON Partes.salto = Precios.salto .and. Proveedo.dealer = Precios.dealer ; LEFT OUTER JOIN recargos ON recargos.lista = VLISTAINT .and. (precios.precio>=recargos.rangoi .and. precios.precio<=recargos.rangos and vot=2) ; LEFT OUTER JOIN descuent ON partes.salto = descuent.salto .and. Proveedo.codigo = descuent.proveedo .and. descuent.lista = VLISTAINT ; WHERE &ABUS; ORDER BY &XORDEN &XDIRECCION; INTO TABLE &PREFIL2 SELECT *, iif(!empty(precio_o),OBTENER_PRECIO(precio_o, recargo, iva, XREDONDEO)-iif(!isnull(descuento),descuento,0),0)*IIF(moneda=2,VPARIDAD,1) as precio_r, ; iif(!empty(precio_o),OBTENER_PRECIO(precio_o, recargo, iva, XREDONDEO)-iif(!isnull(descuento),descuento,0),0) as precio; FROM &PREFIL2; INTO TABLE &TMFIL2 IF EOF() APPE BLAN ENDIF USE IN &PREFIL %>

><%=TT("> <%=TT("> <% IF MOD_ECOMMERCE RETURN []+TT(] ENDIF %> <% IF MOD_ESTADOS RETURN []+TT(] ENDIF %> <% IF MOD_ABONADOSENINTERNET .AND. WEBREG.ACCESO>3 RETURN []+TT(] ENDIF %> <%=TT(">

<%=TT("Compras")%>

<%=mUSER%>

<%=TT("¿Qué está buscando?")%>   ">

<%=TT("Categorías de Productos")%>:

 

<% ACTBAS=ALIAS() LISTA_GRUPOS="" IF Request.QueryString('grupo')=="" SELE GRUPO SCAN TOTGRU=0 SELE PARTES COUNT FOR SUBSTR(PARTES.GRUPO,1,2)==GRUPO.GRUPO .AND. PARTES.FILTROWEB=.F. TO TOTGRU SELE GRUPO IF TOTGRU>0 LISTA_GRUPOS=LISTA_GRUPOS+[
  • ]+PROPER(GRUPO.DESCRI)+[(]+ALLTRIM(STR(TOTGRU))+[)]+[

  • ] ENDIF ENDSCAN ELSE SELE GRUPO SET ORDER TO GRUPO SEEK Request.QueryString('grupo') IF FOUND() LISTA_GRUPOS=LISTA_GRUPOS+[

    < ]+PROPER(GRUPO.DESCRI)+[

    ] ENDIF SELE SUBG SCAN FOR SUBG.GRUPO==Request.QueryString('grupo') TOTGRU=0 SELE PARTES FILGRU=Request.QueryString('grupo')+SUBG.SUB COUNT FOR PARTES.GRUPO==FILGRU .AND. PARTES.FILTROWEB=.F. TO TOTGRU SELE SUBG IF TOTGRU>0 LISTA_GRUPOS=LISTA_GRUPOS+[

        ]+[] LISTA_GRUPOS=LISTA_GRUPOS+[]+PROPER(SUBG.DESCRI)+[(]+ALLTRIM(STR(TOTGRU))+[)]+[

    ] ENDIF ENDSCAN ENDIF SELE &ACTBAS RETURN LISTA_GRUPOS %>

     

    ] CASE Request.QueryString('orden')="parte" .and. Request.QueryString('orden2')="desc" return [

    ]+TT("Artículo")+[] OTHERWISE return [

    ]+TT("Artículo")+[] ENDCASE %>

    ] CASE Request.QueryString('orden')="codigo" .and. Request.QueryString('orden2')="desc" return [

    ]+TT("Código")+[] OTHERWISE return [

    ]+TT("Código")+[] ENDCASE %>

    ] CASE Request.QueryString('orden')="descri" .and. Request.QueryString('orden2')="desc" return [

    ]+TT("Descripción")+[] OTHERWISE return [

    ]+TT("Descripción")+[] ENDCASE %>

    ] CASE Request.QueryString('orden')="stock" .and. Request.QueryString('orden2')="desc" return [

    ]+TT("Stock")+[] OTHERWISE return [

    ]+TT("Stock")+[] ENDCASE %>

    ] CASE Request.QueryString('orden')="precio" .and. Request.QueryString('orden2')="desc" return [

    ]+TT("Precio")+[] OTHERWISE return [

    ]+TT("Precio")+[] ENDCASE %>

    <% ARTICS=[] *SELE &TMFIL UCOLOR="#F3FFFF" actpag=VAL(Request.QueryString('actpag')) IF actpag=0 actpag=1 ENDIF PAG_RECS=20 actrec=(actpag-1)*PAG_RECS+1 GO actrec DO WHILE !EOF() .AND. RECNO()<=ACTREC+PAG_RECS-1 IF UCOLOR=[#F3FFFF] UCOLOR=[#EEFFFF] ELSE UCOLOR=[#F3FFFF] ENDIF PICTT="" ARTICS=ARTICS+[] XST="" IF !ISNULL(STOCK) XST=STR(STOCK) ENDIF XPR="" IF !ISNULL(PRECIO) XPR=ALLTRIM(IIF(MONEDA=2,SUCURSAL.SIMBOLO2,SUCURSAL.SIMBOLO))+" "+ALLTRIM(STR(PRECIO,12,2)) ENDIF XFE="" IF !ISNULL(FECHA) XFE=DTOC(FECHA) ENDIF HREF=[] IF !EMPTY(IMAGEN1) PICTT="mini\"+REPLICATE("0",7-LEN(ALLTRIM(STR(SALTO))))+ALLTRIM(STR(SALTO))+"-1.JPG" ARTICS=ARTICS+[] ELSE ARTICS=ARTICS+[] ARTICS=ARTICS+[] ARTICS=ARTICS+[] *** STOCK ARTICS=ARTICS+[] *** PRECIO ARTICS=ARTICS+[] ARTICS=ARTICS+[] SKIP ENDDO RETURN ARTICS %>

    <%=TT("Foto")%>

    <% DO CASE CASE Request.QueryString('orden')="parte" .and. Request.QueryString('orden2')="asc" return [

    ]+TT("Artículo")+[

    <% DO CASE CASE Request.QueryString('orden')="codigo" .and. Request.QueryString('orden2')="asc" return [

    ]+TT("Código")+[

    <% DO CASE CASE Request.QueryString('orden')="descri" .and. Request.QueryString('orden2')="asc" return [

    ]+TT("Descripción")+[

    <% DO CASE CASE Request.QueryString('orden')="stock" .and. Request.QueryString('orden2')="asc" return [

    ]+TT("Stock")+[

    <% DO CASE CASE Request.QueryString('orden')="precio" .and. Request.QueryString('orden2')="asc" return [

    ]+TT("Precio")+[

    ] ARTICS=ARTICS+HREF+[] ENDIF ARTICS=ARTICS+[]+HREF+PARTE+[]+HREF+CODIGO+[]+HREF+DESCRI+[]+XST+[]+XPR+[

     

     

     

    <%=TT("Servicios al Cliente")%>,

    <%=TT("Complemento del Sistema SatNetwork SAT")%>

    www.satnetwork.com.ar

    <% RELEASE mUID, mUSER FILDEL="WEB\TEMP\"+ALIAS()+".*" USE IN ALIAS() USE IN DESCUENT USE IN PRECIOS USE IN WEBREG USE IN STOCK USE IN SUCURSAL USE IN PROVEEDO USE IN GRUPO USE IN SUBG USE IN RECARGOS USE IN LISTAS USE IN PARTES ERASE &FILDEL %>