From c4e58b18fc96eb62e99c4479b241229a94b7c5d9 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 28 Apr 2025 15:51:29 -0700 Subject: [PATCH] TareasProgramadas Envio de estado cuenta, compras cvetipoOperacion, , reembolsos filtror rwo acumulado, ajkustes carta porte, OC carga desde excel filtro rows vacios, personal cuentas deposito --- Ashx/TareasProgramadas.ashx | 17 +- Compras/Compras.aspx.vb | 6 +- Compras/Proveedores.aspx | 186 ++++++------- Compras/ReembolsosComprobaciones.aspx.vb | 2 +- .../Grales/Formatos/CartaPorteTimbrado.rdlc | 7 +- OC/OC.aspx.vb | 22 ++ OI/Proyecto.aspx | 50 +++- RH/Personal.aspx | 200 +++++++++++++- RH/Personal.aspx.vb | 248 +++++++++++++++--- 9 files changed, 577 insertions(+), 161 deletions(-) diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index fb461e57e..8e79bea06 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -108,7 +108,9 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState context.Response.Write(retorno) Case "EstadosCuenta" 'CargaEstadosCuenta(context, 119, 227774) - CargaEstadosCuenta(context, 119, -1, FechaEnvio, FechaActual) + 'CargaEstadosCuenta(context, 119, -1, FechaEnvio, FechaActual) + Dim tCveEmpresa As Integer = context.Request("CveEmpresa").ToString.ToEntero + CargaEstadosCuenta(context, tCveEmpresa, -1, FechaEnvio, FechaActual) Case "ScoreCard" CargaScoreCard(context, 140, FechaEnvio) @@ -354,6 +356,9 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState #Region "E S T A D O S D E C U E N T A" Private Sub CargaEstadosCuenta(ByVal context As HttpContext, pCveEmpresa As Integer, pCveCliente As Integer, FechaEnvio As DateTime, FechaActual As DateTime) + + Dim Usuario As Usuario = ValidaUsuarioSistema(100, pCveEmpresa) + Dim Retorno As New JArray() Dim DtEmpresas As DataTable = Nothing Using ObjEmpresas As New ClsSisEmpresas() @@ -364,7 +369,7 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState If DtEmpresas IsNot Nothing Then For Each Row As DataRow In DtEmpresas.Rows - Dim Usuario As Usuario = ValidaUsuarioSistema(100, Row("CveEmpresa").ToString().ToEntero()) + 'Dim Usuario As Usuario = ValidaUsuarioSistema(100, Row("CveEmpresa").ToString().ToEntero()) Dim obj As JObject = EjecutarEnvioEstadoCuenta(Usuario, FechaEnvio, FechaActual, pCveCliente:=pCveCliente) Retorno.Add(obj) @@ -499,7 +504,9 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState Dim Envio As Boolean = False If Not String.IsNullOrEmpty(Correo) Then + 'Correo = "oscar.irigoyen@adssistemas.mx" Envio = EnviarEstadoCuenta(UsuarioActual, Correo, Cliente) + GuardaLog($"Log envio Estados Cuenta correo {If(Envio, "Enviado", "Error")} CveCliente {CveCliente} ") End If If Envio Then @@ -522,6 +529,7 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState New JProperty("Cliente", Cliente.Nombre) )) End If + End If Next End If @@ -857,7 +865,10 @@ Public Class TareasProgramadas : Implements IHttpHandler, IReadOnlySessionState If sw.Elapsed.TotalSeconds > 10 Then GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ") End If - If MR IsNot Nothing Then MR.Dispose() + If MR IsNot Nothing Then + 'MR.Close() + MR.Dispose() + End If Return Bytes End Function diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 6ed284990..985b03230 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2562,7 +2562,7 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) End If - If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros + If DIOTCveTipoOperacion.Contiene(0, 3, 4) Then ' 85 - Otros If UsuarioActual.CveEmpresa <> 119 Then DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) @@ -2585,7 +2585,7 @@ Partial Class Compras_Compras DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) End If - If DIOTCveTipoOperacion.Contiene(3) Then ' 85 - Otros + If DIOTCveTipoOperacion.Contiene(3, 4) Then ' 85 - Otros If UsuarioActual.CveEmpresa <> 119 Then DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) @@ -2619,7 +2619,7 @@ Partial Class Compras_Compras DdlRetISRConcepto.Items.Insert(0, New ListItem("Arrendamiento", "2")) End If - If DIOTCveTipoOperacion.Contiene(3) Then ' 85 - Otros + If DIOTCveTipoOperacion.Contiene(3, 4) Then ' 85 - Otros If UsuarioActual.CveEmpresa <> 119 Then DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1")) DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2")) diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 4a7d61348..4c7dd8fa6 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -3326,89 +3326,89 @@ - -
+
+
-
-
-
-
- - -
-
-
-
- - - -
-
-
-
-
-
- - -
-
-
-
- - -
-
-
-
- - <%----%> - -
-
-
-
- - - -
-
-
-
-
-
- - - -
-
-
-
- - -
-
-
-
-
- - -
+
+ + +
-
-
- - - +
+
+
+ + + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + + +
+
-
-
@@ -3427,38 +3427,38 @@
-
-
-
+
+
+
-
-
+
+
-
- - +
+ +
-
-
+
+
-
- - - Seleccione uno - - - - +
+ + + Seleccione uno + + + + + +
-
-
- + + + + +
@@ -320,6 +314,36 @@