<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%@ LANGUAGE = "VBScript" %>
<%Response.Buffer = False%>
<!-- #include file="dbsinil1.inc" -->
<!-- #include file="config.inc" -->
<!-- #include file="functions.inc" -->
<%
Session.Timeout = 120
Server.ScriptTimeout = 5000
busca=request.QueryString("busca")
doc=request.QueryString("doc")
origen=request.QueryString("origen")
Date_ini=Request.Form("Date_ini")
Date_end=Request.Form("Date_end")
lvende=Request.Form("cvende")
criterio22=Request.Form("criterio22")
if criterio22="" then
 xcriterio22=" Todos "
end if
xday = Right("00" & Day(Date), 2)
xmonth = Right("00" & Month(Date), 2)
xyear = Right("00" & Year(Date), 4)
xdate=xyear&xmonth&xday 
Dim Rsfore0 
Dim Sqlfore0

set Rsfore0=dbsql3.execute("SELECT * FROM forecast WHERE id=49")
 '************** Transfer
 xday2 = Right("00" & Rsfore0("month"), 2)
 xmonth2 = Right("00" & Rsfore0("forecast"), 2)
 xyear2 = Right("00" & Rsfore0("year"), 4)
 xdate2=xyear2&xmonth2&xday2 

''''''''''''''''''''''''''''''''''''''
If xdate>xdate2 Then
  response.write (ErrorNo1)
  mensaje1=ErrorNo1
 else
if Date_ini="" or Date_ini=null then
 Date_ini=date()
 Date_end=date()
  lhora=right("00"&hour(time),2)
  lmin=right("00"&minute(time),2)
  ltime=lhora&lmin
  if ltime<"0659" then
   Date_ini=date()-1
   Date_end=date()-1
  end if
end if




''''''''''''''''''''''''''''''''''''''

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="es">

<head>
<meta http-equiv="refresh" content="3598">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Report Corrugator I</title>
<meta name="author" content="<%= Developer%>">  
<link href="css/style.css" rel="stylesheet" media="screen">

<meta charset="utf-8">
  <title>datepicker demo</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

<script type="text/javascript">
$(document).ready(function() {
   $("#datepicker").datepicker();
   $("#datepicker2").datepicker();
});
</script>

<style type="text/css">
<!--
.style5 {color: #FFFFFF}
.style6 {color: #000000}
.style8 {font-size: 18pt}
.style15 {font-size: 12px}
-->
</style>
</head>
<body>

<form method="Post" action="reportcorrugatormail2018.asp?busca=ok&origen=<%=origen%>">
 <table>
   <tr>
   <td width="54">&nbsp;</td>
   <td width="180">&nbsp;</td>
   <td width="146">&nbsp; </td>
   <td width="124">&nbsp;</td>
   <td width="124"> </td>
   </tr>
   
   <tr>
   <td>Period:</td>
   <td>
   <input type="text" name="Date_ini" id="datepicker" size="20" value="<%=Date_ini%>">
   </td>
   <td><input type="text" name="Date_end" id="datepicker2" size="20" value="<%=Date_end%>">
    </td>
   <td><input type="submit" value="Generate" name="boton1">&nbsp;</td>
   <td>
    </td>
   </tr>
   
   <tr>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   </tr>
  </table>
</form>
<%
header
%>
<p>
  <%

'''''''''''calcula
 strday = Right("00" & Day(Date_ini), 2)
 strmonth = Right("00" & Month(Date_ini), 2)
 stryear = Right("00" & Year(Date_ini), 4)
 strday2 = Right("00" & Day(Date_end), 2)
 strmonth2 = Right("00" & Month(Date_end), 2)
 stryear2 = Right("00" & Year(Date_end), 4)
 fechainicial = CStr(stryear + strmonth + strday)
 fechafinal = CStr(stryear2 + strmonth2 + strday2)
 'response.write(fechainicial)&" FI "
 ' response.write(fechafinal)&" Ff "

%>
<center>
<span class="style8">Production Corrugator Machine</span><br>
<span class="style8">Date: <%=Date_ini%> To: <%=Date_end%> Generated: <%=time%></span>
</center>
<%    





'************** Inventory
'lturno=0
Dim Rsinven1, Rsinven2, rswip, Rsmachine
Dim Sqlinven1, sqlinven2, sqlwip

'''''''''''''''''''''''''''''''''''''''
set Rscorr=dbsqlcorr.execute("select GOL,JIJG,JANG,WPOK,QTY,PQTY,SUJUNO,JOBYMD,CUST,BOX_NM,eqty,jtime,dtime,JOBJO,STIME,Etime from SHPSOUT(nolock) where jobymd between '" & fechainicial & "' and '" & fechafinal & "' order by JOBYMD,JOBJO")

 
lturno1="1"
lturno2="1"
mensaje1=mensaje1&"<table cellspacing='0' cellpadding='0' border='2'>"
mensaje1=mensaje1&" <tr><td colspan='17' class='style8'>"& fechainicial &"-"&fechafinal&" <div align='center'> CORRUGATOR I</div></td>"
mensaje1=mensaje1&" </tr>"
mensaje1=mensaje1&"  <tr bgcolor='#AAFFAA'>"
mensaje1=mensaje1&"    <td width='48' bgcolor='#AAFFAA' class='tool_button style17'>JOB DATE </td>"
mensaje1=mensaje1&"    <td width='50' bgcolor='#AAFFAA' class='tool_button style17'>SHIFT</td>"
mensaje1=mensaje1&"    <td width='50' bgcolor='#AAFFAA' class='tool_button style17'>TIME</td>"
mensaje1=mensaje1&"    <td width='87' bgcolor='#AAFFAA' class='tool_button style17'>ORDER NO.</td>"
mensaje1=mensaje1&"	   <td width='130' bgcolor='#AAFFAA' class='tool_button style17'>CUSTOMER</td>"
mensaje1=mensaje1&"    <td width='189' bgcolor='#AAFFAA' class='tool_button style17'>ITEM</td>"
mensaje1=mensaje1&"    <td width='50' bgcolor='#AAFFAA' class='tool_button style17'>FLUTE</td>"
mensaje1=mensaje1&"    <td width='120' bgcolor='#AAFFAA' class='tool_button style17'>COMBINATION</td>"
mensaje1=mensaje1&"    <td width='51' bgcolor='#AAFFAA' class='tool_button style17'>LENGTH</td>"
mensaje1=mensaje1&"    <td width='67' bgcolor='#AAFFAA' class='tool_button style17'>WIDTH</td>"
mensaje1=mensaje1&"    <td width='58' bgcolor='#AAFFAA' class='tool_button style17'>WO QTY</td>"
mensaje1=mensaje1&"    <td width='55' bgcolor='#AAFFAA' class='tool_button style17'>PROD QTY</td>"
mensaje1=mensaje1&"    <td width='50' bgcolor='#AAFFAA' class='tool_button style17'>M</td>"
mensaje1=mensaje1&"    <td width='61' bgcolor='#AAFFAA' class='tool_button style17'>M2</td>"
mensaje1=mensaje1&"    <td width='61' bgcolor='#AAFFAA' class='tool_button style17'>BAD Qty</td>"
mensaje1=mensaje1&"    <td width='61' bgcolor='#AAFFAA' class='tool_button style17'>WORK HOUR</td>"
mensaje1=mensaje1&"    <td width='61' bgcolor='#FFFF66' class='tool_button style17'>STOP HOUR</td>"
mensaje1=mensaje1&"  </tr>"

 If Rscorr.EOF And Rscorr.BOF Then
   response.Write("No records exist for corr. this date.")
 Else
  

'   mensaje1=" <strong> TRANSFER (Samsung OB)</strong> <br><br>"
 

  TOTML=0
  TOTM2=0
  Rscorr.movefirst
  Do While Not Rscorr.EOF
      lstime=Rscorr("STIME")

     if left(Rscorr("JOBJO"),1)="A" then
	  if Rscorr("jtime")>25000 then
	   lstime="06:50:00"
       ehora1=int(mid(Rscorr("ETIME"),1,2))*3600
	   ehora2=int(mid(Rscorr("ETIME"),4,2))*60
	   ehora3=int(mid(Rscorr("ETIME"),7,2))
	   hend=ehora1+ehora2+ehora3
	   Tiempo2=hend-24600
      else
       Tiempo2 = Rscorr("jtime")
      end if	
	  'response.write(" 1 ")
	 else
	   lstime=Rscorr("STIME")
	   Tiempo2 = Rscorr("jtime")
	   	  'response.write(" 2 ")
	 end if
    'lturno1=Rscorr("JOBJO")
    mensaje1=mensaje1&"  <tr>"
    mensaje1=mensaje1&"    <td class='xl67'>"&Rscorr("JOBYMD")&"</td>"
    mensaje1=mensaje1&"    <td class='xl67'>"&Rscorr("JOBJO")&"</td>"
    mensaje1=mensaje1&"    <td class='xl67'>"&lstime&"</td>"
    mensaje1=mensaje1&"    <td class='xl68'>"& Rscorr("SUJUNO")&" </td>"
    mensaje1=mensaje1&"	   <td class='xl68'>"& Rscorr("CUST")&"</td>"
    mensaje1=mensaje1&"    <td class='xl68'>"& Rscorr("BOX_NM")&" </td>"
    mensaje1=mensaje1&"    <td class='xl68'>"&Rscorr("GOL")&"</td>"
    mensaje1=mensaje1&"    <td class='xl68'>"& Rscorr("JIJG")&" </td>"
    mensaje1=mensaje1&"    <td class='xl68' align='right'>"& Rscorr("JANG")&" </td>"
    mensaje1=mensaje1&"    <td class='xl68' align='right'>"& Rscorr("WPOK")&" </td>"
    mensaje1=mensaje1&"    <td class='xl68' align='right'>"& Rscorr("QTY")&"</td>"
    mensaje1=mensaje1&"    <td class='xl68' align='right'>"& Rscorr("PQTY")&" </td>"
    mensaje1=mensaje1&"    <td class='xl68' align='right'>"& formatnumber((Rscorr("JANG")*Rscorr("PQTY")/1000),0)&" </td>"
    mensaje1=mensaje1&"    <td class='xl68' align='right'>"& formatnumber((Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000),0) &"</td>"

totalTiempo = Rscorr("dtime")
hores = int((totalTiempo/3600))
aux = int(totalTiempo-(3600*hores))
minuts = int(aux/60)
segons = totalTiempo-hores*3600-minuts*60
Downtime = hores&":"&right("00"&minuts,2)&":"&right("00"&segons,2)
 
hores2 = int((Tiempo2/3600))
aux2 = int(Tiempo2-(3600*hores2))
minuts2 = int(aux2/60)
segons2 = Tiempo2-hores2*3600-minuts2*60
Worktime = hores2&":"&right("00"&minuts2,2)&":"&right("00"&segons2,2)


    mensaje1=mensaje1&"     <td class='xl68' align='right'>"&Rscorr("EQTY")&" </td>"
    mensaje1=mensaje1&"     <td class='xl68' align='right'>"& worktime &" </td>"
    mensaje1=mensaje1&"     <td class='xl68' align='right'>"& downtime &" </td>"
    mensaje1=mensaje1&"  </tr>"
  
 
    TOTTARGET=TOTTARGET+Rscorr("QTY")
    TOTPROD=TOTPROD+Rscorr("PQTY")
    TOTML=TOTML+(Rscorr("JANG")*Rscorr("PQTY")/1000)
    TOTM2=TOTM2+(Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000)
    TOTbad=TOTbad+Rscorr("eQTY")
    TOTjtime=TOTjtime+Tiempo2
    TOTdtime=TOTdtime+Rscorr("dtime")
	TOTITEMS=TOTITEMS+1
	TOTITEMS2=TOTITEMS2+1
	
	   TOTTARGET2=TOTTARGET2+cdbl(Rscorr("QTY"))
       TOTPROD2=TOTPROD2+cdbl(Rscorr("PQTY"))
       TOTML2=TOTML2+(Rscorr("JANG")*Rscorr("PQTY")/1000)
       TOTM22=TOTM22+(Rscorr("JANG")*Rscorr("WPOK")*Rscorr("PQTY")/1000000)
	   TOTbad2=TOTbad2+cdbl(Rscorr("eQTY"))
	   TOTjtime2=TOTjtime2+cdbl(Tiempo2)
       TOTdtime2=TOTdtime2+cdbl(Rscorr("dtime"))
	
  RsCORR.MoveNext
	
	if not RsCORR.eof then
         shora2=int(mid(RsCORR("STIME"),1,2)&mid(RsCORR("STIME"),4,2)&mid(RsCORR("STIME"),7,2))
		 Ehora2=int(mid(RsCORR("ETIME"),1,2)&mid(RsCORR("ETIME"),4,2)&mid(RsCORR("ETIME"),7,2))
		 'response.write(" sh "&shora2)
		 'response.write(" eh "&ehora2)
		 
 	     if shora2>064959 and shora2<152000 then
 	      lturno2="1"
	     end if
	     if shora2>151959 and shora2<232000 then
	      lturno2="2"
		  'response.write(" t2x "&ehora2)
	     end if
	     if shora2>231959 or shora2<065000 then
	      lturno2="3"
	     end if
		  if shora2<065000 and Ehora2>064959 then
		    'response.write(" t20 "&ehora2)
		    shora1x=int(mid(RsCORR("STIME"),1,2))*3600
	        shora2x=int(mid(RsCORR("STIME"),4,2))*60
	        shora3x=int(mid(RsCORR("STIME"),7,2))
	        hstartx=shora1x+shora2x+shora3x
	        ehora1x=int(mid(RsCORR("ETIME"),1,2))*3600
	        ehora2x=int(mid(RsCORR("ETIME"),4,2))*60
	        ehora3x=int(mid(RsCORR("ETIME"),7,2))
	        hendx=ehora1x+ehora2x+ehora3x
	        Shift1=24600
	        Sec1x=int(Shift1-hstartx)
	        Sec2x=int(hendx-Shift1)
			if Sec2x>Sec1x then
			 lturno2="1"
			end if
		  end if
		   'response.write(RsCORR("STIME")&" ")
		   'response.write(RsCORR("ETIME")&" ")
		  if (RsCORR("STIME")<"15:20:00" and RsCORR("ETIME")>"15:19:59") or (RsCORR("STIME")<"23:20:00" and RsCORR("ETIME")>"23:19:59") then
		   'response.write(" t21 "&ehora2)
 	       shn1=int(mid(RsCORR("STIME"),1,2))*3600
	       shn2=int(mid(RsCORR("STIME"),4,2))*60
	       shn3=int(mid(RsCORR("STIME"),7,2))
	       hstn=shn1+shn2+shn3
	       ehn1=int(mid(RsCORR("ETIME"),1,2))*3600
	       ehn2=int(mid(RsCORR("ETIME"),4,2))*60
	       ehn3=int(mid(RsCORR("ETIME"),7,2))
	       hend2n=ehn1+ehn2+ehn3
		   if (shora2<"152000" and Ehora2>"151959") then
	        Shift2=55200
	        Sec1n=int(Shift2-hstn)
	        Sec2n=int(hend2n-Shift2)
		    if Sec1n>Sec2n then
		     lturno2="1"
		    else
		     lturno2="2"
		    end if
			'response.write(" t2 "&Sec2n)
		   end if
		   if (shora2<232000 and Ehora2>231959) then
 		    Shift3=84000
	        Sec1n3=int(Shift3-hstn)
	        Sec2n3=int(hend2n-Shift3)
		    if Sec1n3>Sec2n3 then
		     lturno2="2"
		    else
		     lturno2="3"
			 
		    end if
           end if
          end if
		 'lturno2=Rscorr("JOBJO")
		 if lturno2="3" and Ehora2<235959 then
		  'RsCORR.MoveNext
	      ' if RsCORR.eof then
		  '  Lturno2="2"
		  ' end if
		  'RsCORR.MovePrevious
		 end if
    end if	
	
   if lturno1<>lturno2 or RsCorr.eof then
     if TOTML2>0 and (TOTjtime2+TOTdtime2)>0 then
	  lspeedtot2=int(TOTML2/((TOTjtime2+TOTdtime2)/60))
     else
	  lspeedtot2=0
	 end if
	 if  TOTTARGET2>0 then
	   hores5 = int((TOTjtime2/3600))
       aux5 = int(TOTjtime2-(3600*hores5))
       minuts5 = int(aux5/60)
       segons5 = TOTjtime2-hores5*3600-minuts5*60
       Worktime5 = hores5&":"&right("00"&minuts5,2)&":"&right("00"&segons5,2)
	   
	   hores6 = int((TOTdtime2/3600))
       aux6 = int(TOTdtime2-(3600*hores6))
       minuts6 = int(aux6/60)
       segons6 = TOTdtime2-hores6*3600-minuts6*60
       delaytime5 = hores6&":"&right("00"&minuts6,2)&":"&right("00"&segons6,2)
     
     mensaje1=mensaje1&"  <tr>"
     mensaje1=mensaje1&"    <td class='xl67'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68'>Total Shift</td>"
     mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68'>"& formatnumber(TOTITEMS2,0) &"</td>"
     mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68' align='right'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td class='xl68' align='right'>&nbsp;</td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTTARGETs,0)&"</strong></DIV></td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTPRODs,0)&"</strong></DIV></td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTMLs,0) &"&nbsp;M</strong></DIV></td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTM2s,0) &"&nbsp;M2</strong></DIV></td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong></strong></DIV></td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong></strong></DIV></td>"
     mensaje1=mensaje1&"    <td align='right' bgcolor='FFFF66' class='xl68'><div align='right' class=style15><strong></strong></DIV></td>"
     mensaje1=mensaje1&"  </tr>"
     TOTTARGETs=0
     TOTPRODs=0
     TOTMLs=0
     TOTM2s=0
	 TOTITEMS2=0
	 
	 lturno1=lturno2
	   TOTTARGET2=0
       TOTPROD2=0
       TOTML2=0
       TOTM22=0
	   TOTbad2=0
	   TOTjtime2=0
       TOTdtime2=0
   end if
  end if
  'lturno1=lturno2
 LOOP
END IF
rscorr.close
''''''''''''''''''''''''
Tiempod = TOTdtime
hores3 = int((Tiempod/3600))
aux3 = int(Tiempod-(3600*hores3))
minuts3 = int(aux3/60)
segons3 = Tiempod-hores3*3600-minuts3*60
totdt = hores3&":"&right("00"&minuts3,2)&":"&right("00"&segons3,2)

Tiempow = totjtime
hores4 = int((Tiempow/3600))
aux4 = int(Tiempow-(3600*hores4))
minuts4 = int(aux4/60)
segons4 = Tiempow-hores4*3600-minuts4*60
totwt = hores4&":"&right("00"&minuts4,2)&":"&right("00"&segons4,2)

mensaje1=mensaje1&"  <tr>"
mensaje1=mensaje1&"    <td class='xl67'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68'>"& formatnumber(TOTITEMS,0) &"</td>"
mensaje1=mensaje1&"    <td class='xl68'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68' align='right'>&nbsp;</td>"
mensaje1=mensaje1&"    <td class='xl68' align='right'>&nbsp;</td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTTARGET,0)&"</strong></DIV></td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTPROD,0)&"</strong></DIV></td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTML,0) &"&nbsp;M</strong></DIV></td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTM2,0) &"&nbsp;M2</strong></DIV></td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&FORMATNUMBER(TOTbad,0) &"&nbsp;</strong></DIV></td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='#D2D2D2' class='xl68'><div align='right' class=style15><strong>"&TOTwt &" hrs</strong></DIV></td>"
mensaje1=mensaje1&"    <td align='right' bgcolor='FFFF66' class='xl68'><div align='right' class=style15><strong>"&TOTdt &" hrs</strong></DIV></td>"
mensaje1=mensaje1&"  </tr>"
mensaje1=mensaje1&"</TABLE>"


End If   ' licencia expirada
'Se cierra y se destruye el objeto connection
'ConexionBD.Close
'Set ConexionBD = Nothing
response.write(mensaje1)
If Err.Number <> 0 then
HandleError Err.Description
End If

Sub HandleError
  response.write("No DATE created")
End Sub
'*********************
correo="ilkim@shinwoousa.com;inwans@shinwoousa.com"
 Dim objCDO
 Dim Conf
 Dim Fields
'''''''''''
 Set cdoConfig = CreateObject("CDO.Configuration")

 With cdoConfig.Fields
  .Item(cdoSendUsingMethod) = 2
  .Item(cdoSMTPServer) = "mail.shinwoousa.com"
  '"64.87.26.218"
  .Item(cdoSMTPauthenticate)=1
  .Item(cdoSendUsername)="sechevarria@shinwoousa.com"
   .Item(cdoSendPassword)="Sergio586*"
  .Item(cdoSMTPServerport)=587
  .Update
 End With

  Set cdoMessage = CreateObject("CDO.Message")
  Set Fields = Nothing
 Set objCDO = Nothing
 Set Conf = Nothing
  With cdoMessage
    Set .Configuration = cdoConfig
    .From = "sechevarria@shinwoousa.com"
    '.To = correo
	'.cc = "jamesoh@shinwoousa.com"
    '.cc = "avaldez@shinwoousa.com;jmontano@shinwoousa.com;yvizcarra@shinwoousa.com;jamesoh@shinwoousa.com;jmedina@shinwoousa.com; lramirez@shinwoousa.com; asaldana@shinwoousa.com; dvilchis@shinwoousa.com;jguzman@shinwoousa.com;mahernandez@shinwoousa.com;ehernandez@shinwoousa.com;ikejung@shinwoousa.com"
    
	.bcc = "sistemas@shinwoousa.com"
     if acthora=7  or acthora=14 then 
      .Subject = "sending Automatic - Corr I"
	 else
      .Subject = "sending Automatic - Corr I"
	 end if
    '.TextBody = "Esta es una Prueba de envio automatico ASECO-Sergio"
    .HTMLBody = mensaje1
    '.AddAttachment (archivopdf)
    '.AddAttachment (archivoxml)
    .Send
  End With
   
  Set cdoMessage = Nothing
  Set cdoConfig = Nothing
  ''termina envio de correo
'end if
'response.Redirect("reportdailytransfer.asp?msg=enviado!")
%>

</center>
</div>
</body>
</html>
<%

Rsfore0.Close
Set Rsfore0 = Nothing
'''''''''''''

%>