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

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

if request.QueryString("ac")="c"  and request.Form("key")<>""   then
 conn.open Str
 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 request.Form("precios")="" then
	if ventamode="1" then
	precio=rs("preciodetalle")
	else
	precio=rs("preciomayor")
	end if
else
precio=request.Form("precios")
end if


	if billetecode="1" then
	precioxs=formatnumber(precio,2,-1,-1,0)
	else
	precioxs=precio
	end if
	

if PName2IgualPName1="0" then
name1=left(rs("nombrees"),PName1MAX)
name2=left(rs("nombrecn"),PName2MAX)
else
name1=left(rs("nombrees"),PName1MAX)
name2=mid(rs("nombrees"),PName1MAX+1,PName2MAX)
end if

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

if request.Form("Supplier")="" then
sql0 = "select * from proveedor where Empresaid= '"&rs("EmpresaID")&"'"
set rs0 = conn.execute(sql0)
nota=""
else
nota=request.Form("Supplier")
end if


response.Redirect("impremir.asp?ac=imp&tipo=8&articuloid="&code&"&preciodetalle="&precioxs&"&Url=pegatinas_moda&nombrees="&Server.URLEncode(name1)&"&nota="& nota &"&name2="&Server.URLEncode(name2)&"&tiendaname="& Server.URLEncode(tiendaname)&"&cantidad="&request.Form("cantidad")&"&billete="&billete&"&fecha="&request.Form("fecha")&"&BilleteAntes="&BilleteAntes&"")

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">MODA价格贴纸打印<br />
          <span class="STYLE14">PEGATINA DE MODA  </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="?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" onClick="this.form.submit()" autocomplete="off" /> 
			<br/>
		  <table width="200" height="120" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="45"><div align="center" style="font-weight: bold; font-size: 14px">自定价格:</div></td>
            <td height="45"><input name="precios" type="number" id="precios" style="width:88px; height:30px; border:#CCCCCC; border-style:solid; font-size:16px; text-align:center;"    size="5" maxlength="15" /></td>
          </tr>
          <tr>
            <td width="112" height="45"><div align="center" style="font-weight: bold; font-size: 14px">供应商:</div></td>
            <td width="32" height="45"><div align="center">
              <input name="Supplier" type="text" id="Supplier" style="width:88px; height:30px; border:#CCCCCC; border-style:solid; font-size:16px; text-align:center;"    size="5" maxlength="15" />
            </div></td>
          </tr>
          <tr>
            <td height="45"><div align="center" style="font-weight: bold; font-size: 14px">日期:</div></td>
            <td height="45"><input name="fecha" type="number" id="fecha" value="<%= right(YEAR(now()),2)&Right("0" & Month(now()),2)& Right("0" & DAY(now()),2) %>"   size="5" maxlength="6" style="width:88px; height:30px; border:#CCCCCC; border-style:solid; font-size:16px; text-align:center;" /></td>
          </tr>
          <tr>
            <td height="45"><div align="center" style="font-weight: bold; font-size: 14px">打印份数:</div></td>
            <td height="45"><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;" /></td>
          </tr>
        </table>
      </div>
      </td>
  </tr>
</table>
</form>
<div style="height:50px"/></div>
<!--#include file="fooder.asp"-->