<!--#include file="conn.asp"-->

<% 
if session("login")<>"1" then
response.Redirect("login.asp") 
end if

 %>
 
 <% 
 if modelo="0" and style="1"  then
tipo="1"
papel="普通58MM连续纸"
papeles="Papel 58MM Continuo"
end if

 if modelo="0" and style="2"  then
tipo="9"
papel="普通58MM连续纸"
papeles="Papel 58MM Continuo"
end if

 if modelo="0" and style="3"  then
tipo="13"
papel="普通58MM连续纸"
papeles="Papel 58MM Continuo"
end if

 if modelo="0" and style="80"  then
tipo="10"
papel="普通80MM连续纸"
papeles="Papel 80MM Continuo"
end if

if modelo="1" and style="13" then
tipo="6"
papel="58MM*40MM间隙贴纸"
papeles="58MM*40MM Pegatina Adhesivo"
end if

if modelo="1" and style="18" then
tipo="18"
papel="58MM*40MM间隙贴纸"
papeles="58MM*40MM Pegatina Adhesivo"
end if

if modelo="1" and style="14" then
tipo="14"
papel="58MM*40MM间隙贴纸"
papeles="58MM*40MM Pegatina Adhesivo"
end if


 conn.open Str
 

if request.QueryString("ac")="c"  and request.Form("key")<>""   then
 sql = "select * from articulo where ArticuloID = '"&request.Form("key")&"' or Codigobarra ='"&request.Form("key")&"' or FIND_IN_SET('"& request.Form("key") &"',replace(multicodigo,' ',','))"
 set rs = conn.execute(sql)
  
  
if not(rs.bof and rs.eof) then 


	if ventamode="1" then
	precio=rs("preciodetalle")
	else
	precio=rs("preciomayor")
	end if
	
	if billetecode="1" then
	precioxs=formatnumber(precio,2,-1,-1,0)
	else
	precioxs=precio
	end if
	
if EName2IgualEName1="0" then
name1=left(rs("nombrees"),EName1MAX)
name2=left(rs("nombrecn"),EName2MAX)
else
name1=left(rs("nombrees"),EName1MAX)
name2=mid(rs("nombrees"),EName1MAX+1,EName2MAX)
end if

if isnull(rs("UnidadNombre")) or rs("UnidadNombre")="" then
UnidadNombre="Litro/Kg"
else
UnidadNombre=rs("UnidadNombre")
end if

if notaxs="1" then
notaprint=nota
end if

if notaxs="2" then
notaprint=date()
end if

if notaxs="3" then
notaprint=nota1
end if

if notaxs="4" then
notaprint=rs("SITIOENALMACEN")&"-"&rs("SitioEnEstante")
end if

if Printidocodigo="2" and rs("Codigobarra")<>"" then
code=rs("Codigobarra")
else
code=rs("ArticuloID")
end if

if tipo="10" then
response.Redirect("almacen.asp?ac=print&tipo="&tipo&"&articuloid="&code&"&preciodetalle="&precioxs&"&Url=etiquetas&nombrees="&Server.URLEncode(name1)&"&nota="& notaprint &"&name2="&Server.URLEncode(name2)&"&tiendaname="& Server.URLEncode(tiendaname)&"&cantidad="&request.Form("cantidad")&"&billete="& billete &"&tiendanamesize="& tiendanamesize &"&tiendanamealign="& tiendanamealign &"&name1size="& name1size &"&name1align="& name1align &"&name2size="& name2size &"&name2align="& name2align &"&preciosize="& preciosize &"&precioalign="& precioalign &"&fxsize="& fxsize &"&fxalign="& fxalign &"&notasize="& notasize &"&notaalign="& notaalign &"&codesize="& codesize &"&codealign="& codealign &"&billetesize="& billetesize &"&billetealign="& billetealign &"&codebarwidth="& codebarwidth &"&codebarheight="& codebarheight &"&fx="& fx &"&BilleteAntes="& BilleteAntes &"")
else
response.Redirect("impremir.asp?ac=imp&tipo="&tipo&"&articuloid="&code&"&preciodetalle="&precioxs&"&Url=etiquetas&nombrees="&Server.URLEncode(name1)&"&nota="& notaprint &"&name2="&Server.URLEncode(name2)&"&tiendaname="& Server.URLEncode(tiendaname)&"&cantidad="&request.Form("cantidad")&"&billete="& billete &"&tiendanamesize="& tiendanamesize &"&tiendanamealign="& tiendanamealign &"&name1size="& name1size &"&name1align="& name1align &"&name2size="& name2size &"&name2align="& name2align &"&preciosize="& preciosize &"&precioalign="& precioalign &"&fxsize="& fxsize &"&fxalign="& fxalign &"&notasize="& notasize &"&notaalign="& notaalign &"&codesize="& codesize &"&codealign="& codealign &"&billetesize="& billetesize &"&billetealign="& billetealign &"&codebarwidth="& codebarwidth &"&codebarheight="& codebarheight &"&fx="& fx &"&BilleteAntes="& BilleteAntes &"")
end if

else
response.write("<script language='javascript'>alert('无此产品\nNo hay Producto');")   
response.write("javascript:history.go(-1);window.android.playFailed();</script>")
response.End()
end if

end if

  %>
 
 
 <table width="100%"  height="100" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">价签打印<br />
          <span class="STYLE14">ETIQUETA DE PRECIO </span><br />
          <span class="STYLE2"><%= request.Form("key") %></span>
  <div align="center" class="STYLE15"></div>
    </div></td>
  </tr>
</table>
<form id="form1" name="form1" method="post" action="etiquetas.asp?ac=c">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
      <label>
        <div align="center">
          <p>
            <input name="key" type="text" id="key" style=" width:90%;height:60px; font-size:24px;" autofocus="autofocus" autocomplete="off"   value="<%= request.QueryString("key") %>" />
          </p>
        </div>
      <div align="center">
	    <p><br />
            <INPUT type=image height="50" width="50" src="img/print.png" border=0 name="Submit2" />
	    </p> 
		<p>&nbsp;</p>
	    <% if modelo="1" then %> 
		<table width="200" height="30" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="112"><div align="center" style="font-weight: bold; font-size: 14px">打印份数:</div></td>
            <td width="32"><div align="center">
			
			  
              <input name="cantidad" type="number" id="cantidad" value="1"   size="5" maxlength="2" style="width:88px; height:30px; border:#CCCCCC; border-style:solid; font-size:16px; text-align:center;" />
			 
			       
            </div></td>
          </tr>
        </table>
		<% end if %>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<div align="center">
		
		<span style=" font-size:14px; font-weight: bold">当前所需纸张：<%= papel %></span>
		<br/>
		<span style=" font-size:14px; font-weight: bold">TIPO PAPEL：<%= papeles %></span>
		
		</div>
      </td>
  </tr>
</table>
</form>
<!--#include file="fooder.asp"-->
