diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index 7ab7d8c50..4b2861f5b 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -77,15 +77,6 @@ Public Class TareasProgramadas : Implements IHttpHandler URLParametros = Parametros(context.Request("var")) metodo = URLParametros("metodo") 'SI TRAE UN JSON COMO PARAMETRO - ElseIf context.Request.Headers("Content-Type") IsNot Nothing AndAlso context.Request.Headers("Content-Type").Contains("json") AndAlso context.Request.InputStream IsNot Nothing AndAlso (context.Request("var") Is Nothing AndAlso context.Request("metodo") IsNot Nothing) Then - context.Response.ContentType = "application/json" - Using reader As New StreamReader(context.Request.InputStream) - Dim json = reader.ReadToEnd() - Dim JsonRequest As JObject = JObject.Parse(json) - If JsonRequest IsNot Nothing Then - metodo = JsonRequest("Metodo").ToString - End If - End Using ElseIf context.Request("metodo") IsNot Nothing Then metodo = context.Request("metodo").ToString() If context.Request("FechaEnvio") IsNot Nothing Then @@ -422,7 +413,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim CveVendedor As Integer = -1 Dim Grupo As Integer = 5 Dim TipoCambio As Integer = 1 - Dim TipoDocto As String = "-1" + Dim TipoDocto As String = "Ing" Dim FechaCorte As DateTime = New DateTime(Now.Year, 12, 31) If ObjMov.GetCxC(FechaI, FechaF, CveCliente, CveSubProyecto, CveVendedor, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, -1, TipoCambio, TCEspecifico, TipoDocto, FechaVI, FechaVF, FechaCorte:=FechaCorte, @@ -436,7 +427,8 @@ Public Class TareasProgramadas : Implements IHttpHandler If DTClientes IsNot Nothing OrElse EnviarPendientes Then - 'DTClientes = DTClientes.FiltraParametros("CveCliente IN (227289,227429,227733,227838,228181,228544,229176,229481,230029,230432,230860,230911,230918,231197,231576,232173,232185,233055,233295,233357,233588,236379,236460,237161,237635,238285,238530,238622,238724,239033,239099,239865,239895,239903,240202,240235,240236,240238,240303,240340,262404,262517,264765,264806,264825,264848,264930,265063,265180,265213,265214,265236,265344,265492,265555,265669,265797,265952,265963,266156,266182,268346,268396,268488,268535,268539,268558,268562,268706,268726,268787,268868,268889,268910,268925,269023,269081,269089,272066,272070,272657,273080,273084,275627,276259,276587,281115,283110,284664,285392,287653,288711,291374,292444,295578,296375,296598,302728,303936,306897,307183,311007,320060,320685,320800,323520,323772,325237,326996,327801,330630,331741,332118,337105,340502,341796,342807,343858,355862,358123,365794,371524,375391,377122,377948,378267,380167,381210,381878,383098,383250,383339,383650,384472,385321,385585,386630,387114,388987,396341,396405,396541,401995,404175,408306,416386,416819,420275,438732,447566,447636,450284,464150,464376,468051,475172,475932,476984,477997,478426)") + DTClientes = DTClientes.FiltraParametros("CveCliente NOT IN (228080,228565,228910,233126,231465,232730,232697,227338)") + Dim DtNotificaciones As DataTable = Nothing Dim TieneErrorRegistro As Boolean = False @@ -478,7 +470,10 @@ Public Class TareasProgramadas : Implements IHttpHandler End If End If ObjMovimientos.Dispose() - DTClientes.Dispose() + + If DTClientes IsNot Nothing Then + DTClientes.Dispose() + End If Try If DtNotificaciones IsNot Nothing Then @@ -557,7 +552,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim ContaAnt As Integer = 0 Dim FechaCorte As Date = ("9999/01/01").ToDate - Dim TipoDocto2 As String = "'Ing','NC','Dev'" + Dim TipoDocto2 As String = "'Ing'" Dim FechaVencimientoI As String = "-1" Dim FechaVencimientoF As String = "-1" Dim FI As String = "-1"