diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 64e685e71..08090d2a5 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -696,7 +696,8 @@ Public Class ClsBancos Public Function GetBancosIE(CveIE As Integer, CveBanco As Integer, CveCuenta As Integer, TipoMovimiento As String, CveTipoTransaccion As Integer, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, EsAbonoEnCuenta As Integer, FueConciliado As Integer, CveEstatusIE As Integer, FechaInicio As Date, FechaFin As Date, FechaAplicacionInicio As Date, FechaAplicacionFin As Date, - FechaConciliadoInicio As Date, FechaConciliadoFin As Date, CveUsuarioConcilio As Integer, TImporte As Double, CveEmpresa As Integer, Optional CveEstatusNotificacion As Integer = -1, Optional CveCuentaTarjeta As Integer = -1) As Boolean + FechaConciliadoInicio As Date, FechaConciliadoFin As Date, CveUsuarioConcilio As Integer, TImporte As Double, CveEmpresa As Integer, + Optional CveEstatusNotificacion As Integer = -1, Optional CveCuentaTarjeta As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_IEGet") @@ -725,6 +726,7 @@ Public Class ClsBancos .Add("@CveEstatusNotificacion", SqlDbType.Int).Value = CveEstatusNotificacion .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCuentaTarjeta", SqlDbType.Int).Value = CveCuentaTarjeta + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 0904a892b..4ed4b5dd5 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -23,11 +23,13 @@ Public Class ClsClientes 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'REGISTRAR CONEXIÓN - Private CveConexion As Integer = 0 + Private CveConexion As Integer = 0 + Private EsTransaccionCompartida As Boolean = False + #End Region - + #Region "Propiedades" - + Public Property CveCliente As Integer Public Property Nombre As String Public Property NombreComercial As String @@ -186,7 +188,8 @@ Public Class ClsClientes End Try Else SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida + SqlTransacc = TransaccionCompartida + EsTransaccionCompartida = True End If SqlCommand = New SqlCommand("", SqlConexion) @@ -201,11 +204,11 @@ Public Class ClsClientes End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub #Region "Conexiones" - + Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try DataAdapter("PA_Sis_RegistrarConexion") With SqlAdapter.SelectCommand.Parameters @@ -261,7 +264,7 @@ Public Class ClsClientes End Sub Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1, - Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesGet") @@ -282,6 +285,7 @@ Public Class ClsClientes .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index 813a15016..7532b38b7 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -297,7 +297,7 @@ Public Class ClsCompProveedores Public Function GetProveedores(tipoConsulta As TipoConsulta, CveProveedor As Integer, Codigo As String, RazonSocial As String, NombreComercial As String, NombreCorto As String, RFC As String, ContactoNombre As String, Telefono As String, Estatus As Integer, CveEmpresa As Integer, Optional CveTipoProveedor As Integer = -1, Optional CveUsuarioResponsable As Integer = -1, - Optional CveMonedaPreferente As Integer = -1, Optional CveProveedorClasificacion As Integer = -1) As Boolean + Optional CveMonedaPreferente As Integer = -1, Optional CveProveedorClasificacion As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedoresGet") @@ -318,6 +318,7 @@ Public Class ClsCompProveedores .Add("@CveUsuarioResponsable", SqlDbType.Int).Value = CveUsuarioResponsable .Add("@CveProveedorClasificacion", SqlDbType.Int).Value = CveProveedorClasificacion .Add("@CveMonedaPreferente", SqlDbType.Int).Value = CveMonedaPreferente + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 7f1873b42..88fb94258 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -143,7 +143,8 @@ Public Class ClsCompras Return Retorno End Function - Public Function GetCompras(CveEmpresa As Integer, TipoDocto As String, Folio As String, FolioFiscal As String, Codigo As String, Proveedor As String, FechaI As String, FechaF As String, Descripcion As String, Observaciones As String, Optional CveProveedor As Integer = -1) As Boolean + Public Function GetCompras(CveEmpresa As Integer, TipoDocto As String, Folio As String, FolioFiscal As String, Codigo As String, Proveedor As String, FechaI As String, + FechaF As String, Descripcion As String, Observaciones As String, Optional CveProveedor As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComprasGetBuscar") @@ -160,6 +161,7 @@ Public Class ClsCompras .Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7ae8d56ae..a7b7a4a24 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5045,8 +5045,8 @@ Public Class ClsPaginas Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object) 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) - 'Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache - Session.Add(VSKey, pviewState) 'Store the ViewState on Cache + Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache + 'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) End Sub @@ -5056,11 +5056,11 @@ Public Class ClsPaginas If Not VSKey.StartsWith("VIEWSTATE_") Then 'Request the Key from the page and validade it. Throw New Exception(String.Format("Invalid VIEWSTATE Key: {0}", VSKey)) End If - If Session(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío + If Cache(VSKey) Is Nothing Then 'si por algún motivo, el caché expiró, le dice a la página que se recargue y obtenga los datos de nuevo, y así evitar errores al obtener el viewstate vacío Response.Redirect(Request.RawUrl) Return Nothing Else - Return Session(VSKey) + Return Cache(VSKey) End If End Function @@ -5268,6 +5268,8 @@ Public Class ClsPaginas params.Add(param) Next Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) + wsreport = Nothing + params = Nothing Else If IsNothing(MR) Then MR = New ReportViewer Try @@ -5340,6 +5342,7 @@ Public Class ClsPaginas End If sw.Stop() + If sw.Elapsed.TotalSeconds > 5 Then GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ") End If @@ -5592,7 +5595,7 @@ Public Class ClsPaginas HttpContext.Current.Response.SuppressContent = True HttpContext.Current.ApplicationInstance.CompleteRequest() HttpContext.Current.Response.End() - + bytes = Nothing Catch ex As Exception If UsuarioActual.CveRol = 1 Then @@ -7247,6 +7250,20 @@ Public Class ClsPaginas params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) End If + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + Dim ObjCuentasBancos As New ClsGenerales() + If ObjCuentasBancos.GetCuentasDepositos(ObjOC.CveProveedor) Then + Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'") + Dim CuentasStr As New StringBuilder("") + For Each CuentasBancarios As DataRow In CuentasActivas.Rows + Dim CuentaClabe As String = If(CuentasBancarios.Item("BancoNombre").ToString.Contains("BBVA") Or CuentasBancarios.Item("BancoNombre").ToString.Contains("BANCOMER"), CuentasBancarios.Item("Cuenta").ToString, CuentasBancarios.Item("CLABE").ToString) + Dim infoCuenta As String = String.Format("
{0} {1}: {2}", CuentasBancarios.Item("BancoNombre").ToString, CuentasBancarios.Item("Abreviatura").ToString, CuentaClabe) + CuentasStr.AppendFormat(infoCuenta) + Next + params.Add(New ReportParameter("Cuentas", CuentasStr.ToString)) + End If + ObjCuentasBancos.Dispose() + End If 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString)) Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol) Dim RutaVirtuaSol As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={0}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaSol)) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 4160a2279..055d4bf36 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -204,9 +204,12 @@ Public Class ClsProductosServicios CveConexion = 0 End If - End Sub + End Sub #End Region - Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1") As Boolean + Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1", + Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, + Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, + Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProductosServiciosGet") @@ -227,6 +230,7 @@ Public Class ClsProductosServicios .Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@SATClavePS", SqlDbType.VarChar).Value = SATClavePS + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index f0223a50f..998375e3e 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1546,10 +1546,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Public Function GetPersonal2(CvePersonal As Integer, Codigo As String, Nombre As String, NSS As String, RFC As String, CveTurno As Integer, CvePuesto As Integer, - CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer, - CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer, - CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer, - FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer, CveEmpresa As Integer) As Boolean + CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer, + CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer, + CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer, + FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer, + CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_Personal2Get") @@ -1584,6 +1585,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@SqlStr ", SqlDbType.VarChar).Value = SqlStr .Add("@NCaracteristicas", SqlDbType.Int).Value = NCaracteristicas .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb index 79b05c132..b63c12e88 100644 --- a/App_Code/ClsSisNotificaciones.vb +++ b/App_Code/ClsSisNotificaciones.vb @@ -209,24 +209,25 @@ Public Class ClsSisNotificaciones #Region "C O R R E O" Private Sub EnviarCorreos(DTNotificacionesCorreo As DataTable) - For Each notificacion As DataRow In DTNotificacionesCorreo.Rows - MandaMail(notificacion("CveNotificacionBitacora").ToString.ToEntero, notificacion("Encabezado").ToString, notificacion("Cuerpo").ToString, notificacion("Correo").ToString, "") + For Each notificacion As DataRow In DTNotificacionesCorreo.Rows + Dim Hilo As New System.Threading.Thread(Sub() MandaMail(notificacion("CveNotificacionBitacora").ToString.ToEntero, notificacion("Encabezado").ToString, notificacion("Cuerpo").ToString, notificacion("Correo").ToString, "")) + Hilo.Start() Next End Sub Private Sub MandaMail(CveNotificacionBitacora As Integer, Asunto As String, Cuerpo As String, Mail As String, MailCC As String) Dim ObjMail As New ClsSisMail() - + Dim ObjNotificacion As New ClsSisNotificaciones Try Dim ResultadoMail As Integer = 0 Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Mail, Asunto, Cuerpo, MailCC, LSRutasMail) Then - UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) + ObjNotificacion.UpdateNotificacionesBitacoraNotifico(CveNotificacionBitacora, 1) End If - Catch ex As Exception OnError("Ocurrió error al mandar el Mail", ex) End Try + ObjNotificacion.Dispose() End Sub #End Region @@ -1328,10 +1329,6 @@ Public Class ClsSisNotificaciones Next End If - If DTNotificacionesCorreo IsNot Nothing AndAlso DTNotificacionesCorreo.Rows.Count > 0 Then - EnviarCorreos(DTNotificacionesCorreo) - End If - If DTNotificacionesApp IsNot Nothing AndAlso DTNotificacionesApp.Rows.Count > 0 Then Dim DtTokens As DataTable = Nothing @@ -1389,6 +1386,10 @@ Public Class ClsSisNotificaciones DtTokens.Dispose() End If End If + End If + + If DTNotificacionesCorreo IsNot Nothing AndAlso DTNotificacionesCorreo.Rows.Count > 0 Then + EnviarCorreos(DTNotificacionesCorreo) End If If Not DTNotificacionesApp Is Nothing Then DTNotificacionesApp.Dispose() diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 130483e9c..f78d1e3bf 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -204,7 +204,7 @@ Public Class ClsVentas Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer, CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1", Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1", - Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1) As Boolean + Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetBuscar") @@ -229,6 +229,7 @@ Public Class ClsVentas .Add("@ClienteRFC", SqlDbType.VarChar).Value = ClienteRFC .Add("@CveEmpresaCRM", SqlDbType.Int).Value = CveEmpresaCRM .Add("@CveAcercamientoCRM", SqlDbType.Int).Value = CveAcercamientoCRM + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 2032e20f1..0c2141fd0 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -192,10 +192,10 @@ Namespace Extensiones Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log") Dim ArchivoW As StreamWriter - Dim MensajeFormato = $"{Chr(13)}{Chr(10)}Log: {Mensaje} | Fecha:{Now.ToString("dd/MM/yyyy HH:mm")}" + Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, Now.ToString("dd/MM/yyyy HH:mm")) Try - ArchivoW = New StreamWriter($"{AppDomain.CurrentDomain.BaseDirectory}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) Exit Sub diff --git a/Bancos/PopUpBuscarIE.aspx.vb b/Bancos/PopUpBuscarIE.aspx.vb index 28e66b31b..d46b4d027 100644 --- a/Bancos/PopUpBuscarIE.aspx.vb +++ b/Bancos/PopUpBuscarIE.aspx.vb @@ -74,7 +74,7 @@ Partial Class Bancos_PopUpBuscarIE Dim ObjBancosIE As New ClsBancos If ObjBancosIE.GetBancosIE(-1, DdlBanco.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate, - MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then + MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados) Else Alert("Ocurrió un error al consultar los Anticipos", TipoMensaje.MsgError) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 1cc586d2c..67a28c29a 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2292,7 +2292,7 @@ Partial Class Bancos_ProveedoresAbonar 'If Archivo.Exists Then Msg.AppendFormat("
  • Imprimir movimiento
  • ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE))) 'End If - Msg.AppendFormat("
  • Listado
  • ", CveIE) + Msg.AppendFormat("
  • Listado
  • ", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIE))) If IDPoliza > 0 Then Msg.AppendFormat("
  • Póliza
  • ", IDPoliza) Dim Mensaje As String = String.Format("
    El Documento se generó correctamente.


    Descargas:", Msg.ToString) diff --git a/Compras/PopUpBuscarFolioC.aspx.vb b/Compras/PopUpBuscarFolioC.aspx.vb index 07f3e27be..de4e0e45b 100644 --- a/Compras/PopUpBuscarFolioC.aspx.vb +++ b/Compras/PopUpBuscarFolioC.aspx.vb @@ -57,7 +57,7 @@ Partial Class Compras_PopUpBuscarFolioC If ValidarUnFiltroSeleccionado() Then Dim ObjCompras As New ClsCompras() If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Folio, FolioFiscal, Codigo, Proveedor, FechaI, FechaF, Descripcion, Obs, - CveProveedor:=DdlProveedor.SelectedValue.ToEntero) Then + CveProveedor:=DdlProveedor.SelectedValue.ToEntero, TopSelect:=100) Then If ObjCompras.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjCompras.DtResultados.Rows.Count.ToString.FormatoNumero(0) GV.DataSource = ObjCompras.DtResultados @@ -111,7 +111,8 @@ Partial Class Compras_PopUpBuscarFolioC If TxtFolioFiscal.Text.Trim.Length > 0 Then Return True If TxtDescripcion.Text.Trim.Length > 0 Then Return True If TxtObservaciones.Text.Trim.Length > 0 Then Return True - If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True + If DdlTipoDocto.SelectedValue <> "-1" Then Return True + If DdlProveedor.SelectedValue.ToEntero <> 0 Then Return True Return False End Function End Class diff --git a/Compras/PopUpBuscarProveedor.aspx.vb b/Compras/PopUpBuscarProveedor.aspx.vb index e86761bd7..cef681977 100644 --- a/Compras/PopUpBuscarProveedor.aspx.vb +++ b/Compras/PopUpBuscarProveedor.aspx.vb @@ -61,7 +61,8 @@ Partial Class Compras_PopUpBuscarProveedor CveTipoProveedor = DdlTipoProveedor.SelectedValue.ToEntero If ValidarUnFiltroSeleccionado() Then - If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, Codigo, RazonSocial, NombreComercial, NombreCorto, RFC, Contacto, Telefono, -1, UsuarioActual.CveEmpresa, CveTipoProveedor:=CveTipoProveedor) Then + If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, Codigo, RazonSocial, NombreComercial, NombreCorto, RFC, Contacto, Telefono, -1, + UsuarioActual.CveEmpresa, CveTipoProveedor:=CveTipoProveedor, TopSelect:=100) Then If ObjProveedor.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjProveedor.DtResultados.Rows.Count.ToString.FormatoNumero(0) GV.DataSource = ObjProveedor.DtResultados diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 548e22999..afbf7ad7b 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4047,6 +4047,7 @@ Partial Class PopUpVerFactura ObjCompra.Dispose() Dim rds2 = New ReportDataSource("DataSet2", dtnc) reportDataSetsList.Add(rds2) + dtnc.Dispose() Dim paramList As New List(Of ReportParameter) With paramList @@ -4075,15 +4076,19 @@ Partial Class PopUpVerFactura End If End With + dtMovs.Dispose() - - ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, "IE Movimient", "PDF") + ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF") End If End If End If + DtGvRH.Dispose() + DtComprobacion.Dispose() + ParamComprobacion.Dispose() + ObjIE.Dispose() End Sub diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 6b3f13f29..87e301517 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -1432,11 +1432,11 @@ Partial Class Compras_ReembolsosComprobaciones Dim Mensaje As New StringBuilder If CvePrePolizaExcedente > 0 Then - Mensaje.AppendFormat("Abono Registrado Correctamente.

    Cheque: {1}

    Imprimir", CveIEExcedente, TxtFolio.Text) + Mensaje.AppendFormat("Abono Registrado Correctamente.

    Cheque: {1}

    Imprimir", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIEExcedente))) Mensaje.AppendFormat("

    Póliza: {1}
    ", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) Else - Mensaje.AppendFormat("Abono Registrado Correctamente.

    Imprimir", CveIERegistrado) + Mensaje.AppendFormat("Abono Registrado Correctamente.

    Imprimir", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIERegistrado))) If CvePrePolizaIERegistrado > 0 Then Mensaje.AppendFormat("

    Póliza: {1}
    ", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) End If diff --git a/Empresas/13/Formatos/OC.rdlc b/Empresas/13/Formatos/OC.rdlc index 281ecf1a6..d4506917f 100644 --- a/Empresas/13/Formatos/OC.rdlc +++ b/Empresas/13/Formatos/OC.rdlc @@ -3089,6 +3089,46 @@ 2pt + + true + true + + + + + Cuentas Bancarias: + + + + =Parameters!Cuentas.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + 5.19589in + + true + true + + + + + Cuentas Bancarias: + + + + =Parameters!Cuentas.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + 5.1933in + + + Textbox3 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -47,16 +82,16 @@ - 3.5579cm + 2.36727cm - 7.63463cm + 7.23964cm - 2.64509cm + 2.57894cm - 2.86998cm + 2.34081cm @@ -172,7 +207,10 @@ - =Switch(Fields!FueValidado.Value = "1","Validado", Fields!FueValidado.Value = "2","Cancelada", Fields!FueValidado.Value = "3","Omitida") + =Switch(Fields!FueValidado.Value = "1","Validado", +Fields!FueValidado.Value = "2","Cancelada", +Fields!FueValidado.Value = "3","Omitida", +1=1,"No validado") @@ -378,7 +419,7 @@ @@ -389,16 +430,51 @@ 2pt - true + + + + 2.33715cm + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + DataSet1 0.06614cm 1.2cm - 19.04475cm + 19.0265cm @@ -805,6 +881,10 @@ /* Local Query */ + + TipoComprobante + System.String + SerieFolio System.String diff --git a/Inventarios/AjustesSeccionAlmacen.aspx b/Inventarios/AjustesSeccionAlmacen.aspx index c54c8728c..ac203fa05 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx +++ b/Inventarios/AjustesSeccionAlmacen.aspx @@ -54,7 +54,7 @@
    - + diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index ec0aeb1f9..e00c268dd 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -1,6 +1,7 @@  Imports System.Data Imports Extensiones +Imports GemBox.Spreadsheet Partial Class Inventarios_AjustesSeccionAlmacen Inherits ClsPaginas @@ -145,21 +146,69 @@ Partial Class Inventarios_AjustesSeccionAlmacen End Sub Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click, BtnDescargar.Click - Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteSecCad.xlsx" - Dim Archivo As New IO.FileInfo(Directorio) - If Archivo.Exists Then - Response.Clear() - Response.ClearHeaders() - Response.ClearContent() - Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name) - Response.AddHeader("Content-Length", Archivo.Length.ToString()) - Response.ContentType = "text/plain" - Response.Flush() - Response.TransmitFile(Archivo.FullName) - Response.End() + If GvD.Rows.Count > 0 Then + DescargarExcel() + Else + Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteSecCad.xlsx" + Dim Archivo As New IO.FileInfo(Directorio) + If Archivo.Exists Then + Response.Clear() + Response.ClearHeaders() + Response.ClearContent() + Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name) + Response.AddHeader("Content-Length", Archivo.Length.ToString()) + Response.ContentType = "text/plain" + Response.Flush() + Response.TransmitFile(Archivo.FullName) + Response.End() + End If End If End Sub + Private Sub DescargarExcel() + Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows + Where row.RowType = DataControlRowType.DataRow + Select New With + { + .Cantidad = row.DataKey("Existencia"), + .Codigo = row.DataKey("Codigo"), + .PS = row.DataKey("PS"), + .SeccionAlmacen = row.DataKey("SeccionAlmacen"), + .Serie = row.DataKey("Serie"), + .Lote = row.DataKey("Lote"), + .FechaCaducidad = row.DataKey("FechaCaducidad") + }).QueryToDataTable(True) + If DtExcel.Rows.Count < 1 Then + Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + DtExcel.TableName = "Ajustes" + DtExcel.Columns("Codigo").ColumnName = "Código" + DtExcel.Columns("PS").ColumnName = "Producto/Servicio" + SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) + + Dim FileExcel As New ExcelFile() + + Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName) + worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With + { + .ColumnHeaders = True, + .StartRow = 0, + .StartColumn = 0 + }) + worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255)) + worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255) + + Dim columnCount = worksheet.CalculateMaxUsedColumns() + For i = 0 To columnCount + worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) + Next + + FileExcel.Save(Response, "FormatoAjusteSecCad.xlsx", SaveOptions.XlsxDefault) + + End Sub + Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click If TxtExcel.getfiles().Archivos.Count > 0 Then Dim file As Archivo = TxtExcel.getfiles().Archivos(0) @@ -257,7 +306,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim CveUM As Integer = DrPS("CveUM").ToString().ToEntero() Dim SeccionAlmacen As String = RowExcel("SeccionAlmacen").ToString.Trim - Dim CveSeccionAlmacen As Integer = dtSecciones.FiltroPrimeroValor("CveSeccion", $"SeccionAlmacen='{SeccionAlmacen}'") + Dim CveSeccionAlmacen As Integer = -1 + + Dim DrSeccion As DataRow = dtSecciones.FiltroPrimero($"SeccionAlmacen='{SeccionAlmacen}'") + If DrSeccion IsNot Nothing Then + CveSeccionAlmacen = DrSeccion("CveSeccion").ToString().ToEntero() + End If Dim Serie As String = RowExcel("Serie").ToString() Dim Lote As String = RowExcel("Lote").ToString() diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 393d66ab9..996067e98 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1325,7 +1325,7 @@ - +
    @@ -1342,6 +1342,7 @@
    +
    @@ -1350,7 +1351,7 @@
    diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 0013d4efd..977f91881 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -2165,6 +2165,10 @@ Partial Class Inventarios_EntradasSalidas 'TrLote2.Visible = True End If + If CBool(dr("AplicaSeccion")) Then + divSeccionAlmacen.Visible = True + + End If End If End If @@ -2370,6 +2374,9 @@ Partial Class Inventarios_EntradasSalidas TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) LkAgregarDetalle.Text = "Actualizar" + Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero + divPrecio.Visible = Origen = 1 + txtPrecio.Visible = Origen = 1 UpAgregar.Update() RegistraScript("$('#ModalAgregar').modal()") CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) @@ -2392,6 +2399,9 @@ Partial Class Inventarios_EntradasSalidas TxtnSerie.Text = GvRow.DataKey("Serie") TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones") DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen")) + Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero + divPrecio.Visible = Origen = 1 + txtPrecio.Visible = Origen = 1 LkAgregarDetalle.Text = "Actualizar" UpAgregar.Update() RegistraScript("$('#ModalAgregar').modal()") @@ -4198,7 +4208,9 @@ Partial Class Inventarios_EntradasSalidas Else VisualizaPUExtranjero(False) End If - + Dim Origen As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue)).ToEntero + divPrecio.Visible = Origen = 1 + txtPrecio.Visible = Origen = 1 UpAgregar.Update() End Sub diff --git a/Inventarios/EntregasPorRealizar.aspx b/Inventarios/EntregasPorRealizar.aspx index 97be17592..98b35e26b 100644 --- a/Inventarios/EntregasPorRealizar.aspx +++ b/Inventarios/EntregasPorRealizar.aspx @@ -18,9 +18,7 @@ Entregas por Realizar -
  • - PDF -
  • +
    diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index f0f919c1a..d63df0d6a 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1019,7 +1019,7 @@ Partial Class Inventarios_RecepcionAlmacen CveImportacionSurtir = pCveImportacion CveImportacionProveedor = ddlProveedor.SelectedValue.ToEntero CveImportacionCompra = DdlFactura.SelectedValue.ToEntero - LbProveedor.Text = ObjCompras.DtResultados.Rows(0)("Aduanal").ToString + LbProveedor.Text = ObjCompras.DtResultados.Rows(0)("ProveedorCompra").ToString HLFolio.Text = ObjCompras.DtResultados.Rows(0)("PedimentoDescripcion").ToString If UsuarioActual.TienePermisoProceso(201) Then HLFolio.NavigateUrl = $"/Compras/Importaciones.aspx?CveImportacion={CveImportacionSurtir}" @@ -3100,12 +3100,13 @@ Partial Class Inventarios_RecepcionAlmacen End If Dim CvePrePoliza As Integer = 0 Dim UsaComplementariaCostoIndirecto As Boolean = False + Dim ConceptoPrePoliza As String = LbProveedor.Text If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaCostoIndirecto = False Dim PorcentajeCompraImportacion As Decimal = 0 ' si hay mas de una factura de importación saber lo que se está recibiendo 'SE REGISTRAN LAS PREPOLIZAS If Not ErrorMovInv Then - CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen CostoInd", 74, 0, 0, 1, FechaMovto, TxtObservaciones.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen CostoInd", 74, 0, 0, 1, FechaMovto, ConceptoPrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim DtTempCompras As DataTable = Nothing PorcentajeCompraImportacion = 1 If CveFleteSurtir > 0 Then diff --git a/Inventarios/RepMovimientosSalida.aspx b/Inventarios/RepMovimientosSalida.aspx index 4a75260b7..5a5fe95da 100644 --- a/Inventarios/RepMovimientosSalida.aspx +++ b/Inventarios/RepMovimientosSalida.aspx @@ -63,21 +63,68 @@
    + +
    + + + +
    + +
    + + + + + + + + + +
    + +
    + -
    + -
    + +
    +
    +
    +
    + + Información: + +
    +
    +
    + +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
    - +
    @@ -94,6 +141,13 @@ + + + + + + + diff --git a/Inventarios/RepMovimientosSalida.aspx.cs b/Inventarios/RepMovimientosSalida.aspx.cs index 399526c7f..c845da4e0 100644 --- a/Inventarios/RepMovimientosSalida.aspx.cs +++ b/Inventarios/RepMovimientosSalida.aspx.cs @@ -16,18 +16,50 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas { txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); txtFechaF.Text = DateTime.Now.ToShortDateString(); + DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa); + DdlSubProyecto.DataBind(); + + //Cargo Clasificaciones + DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa); + DdlClasificacion.DataBind(); + + DdlClientes.setEsWebService(true); + } private void Consulta() { + int tCveCliente = -1; + int tCveGrupo = -1; + if (DdlClientes.SelectedValue.ToEntero() > 0) tCveCliente = DdlClientes.SelectedValue.ToEntero(); + if (DdlGrupo.SelectedValue.ToEntero() > 0) tCveGrupo = DdlGrupo.SelectedValue.ToEntero(); + ClsInventarios ObjInv = new ClsInventarios(); - if (ObjInv.GetRepMovimientosSalida(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa)) + if (ObjInv.GetRepMovimientosSalida(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlSubProyecto.SelectedValue.ToEntero(), tCveCliente, DdlClasificacion.SelectedValue.ToEntero(), DdlGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)) { - GvDatos.DataSource = ObjInv.DtResultados; + if (tCveGrupo == 1) + GvDatos.DataSource = ObjInv.DtResultados; + else + GvGrupo.DataSource = ObjInv.DtResultados; } ObjInv.Dispose(); GvDatos.DataBind(); + GvGrupo.DataBind(); UpDatos.Update(); + + if (DdlGrupo.SelectedValue == "1") + { + TbDetalle.Visible = true; + GvDatos.Visible = true; + GvGrupo.Visible = false; + } + else + { + TbDetalle.Visible = false; + GvDatos.Visible = false; + GvGrupo.Visible = true; + } + } protected void BtnConsultar_Click(object sender, EventArgs e) @@ -48,6 +80,25 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas } + protected void GvGrupo_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + if (e.Row.RowIndex == 0) + { + e.Row.Cells[0].Text = "Total"; + e.Row.CssClass = "Totales"; + } + else + { + if (e.Row.DBCampo("Grupo2") == "" && e.Row.DBCampo("Grupo1") != "") + { + e.Row.CssClass = "SubTotales"; + } + } + } + } + public override void VerifyRenderingInServerForm(Control control) { //base.VerifyRenderingInServerForm(control); @@ -55,6 +106,14 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas protected void LnkExcel_Click(object sender, EventArgs e) { - GvDatos.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); + if (DdlGrupo.SelectedValue == "1") + { + GvDatos.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); + } + else + { + GvGrupo.ExportToExcelG("Movimientos de Salida", "Movimientos de Salida", UsuarioActual); + } + } } \ No newline at end of file diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb index e10ef7db4..118f8aa6a 100644 --- a/OC/PopUpBuscarReq.aspx.vb +++ b/OC/PopUpBuscarReq.aspx.vb @@ -253,7 +253,7 @@ Partial Class OC_PopUpBuscarReq End Sub Private Function ValidarFiltrosSeleccionado() As Boolean - If DdlTipo.SelectedValue.ToEntero > 0 Then Return True + If DdlTipo.SelectedValue = "REQ" OrElse DdlTipo.SelectedValue = "OC" Then Return True If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True If TxtFolio.Text.ToEntero > 0 Then Return True diff --git a/OC/RepSolicitudesAnticipo.aspx b/OC/RepSolicitudesAnticipo.aspx index 7b3187682..1cb414460 100644 --- a/OC/RepSolicitudesAnticipo.aspx +++ b/OC/RepSolicitudesAnticipo.aspx @@ -16,6 +16,9 @@
  • Exporta Excel
  • +
  • + Descargar PDFs +
  • @@ -34,7 +37,8 @@
    - + <%----%> +
    @@ -92,7 +96,7 @@ " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - diff --git a/OC/RepSolicitudesAnticipo.aspx.cs b/OC/RepSolicitudesAnticipo.aspx.cs index b8cc189ea..265ea97ca 100644 --- a/OC/RepSolicitudesAnticipo.aspx.cs +++ b/OC/RepSolicitudesAnticipo.aspx.cs @@ -9,7 +9,11 @@ using System.Web.UI.WebControls; using Extensiones; using Microsoft.Reporting.WebForms; using static Extensiones.ModExtensiones; - +using iTextSharp; +using iTextSharp.text; +using iTextSharp.text.pdf; +using System.IO; +using Ionic.Zip; public partial class OC_RepSolicitudesAnticipo : ClsPaginas { #region "Propiedades" @@ -66,6 +70,8 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas protected void InicializaDatos() { + txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = DateTime.Now.ToShortDateString(); CveProveedor = -1; CargaProveedor(); CargaDatos(); @@ -73,17 +79,17 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas protected void CargaProveedor() { - DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); - DdlProveedor.DataBind(); - DdlProveedor.Items.Insert(0, new ListItem("Todos", "-1")); - DdlProveedor.SelectedValue = "-1"; + DdlProveedores.setEsWebService(true); + DdlProveedores.Attributes.Add("data-metodo", "getproveedores"); + DdlProveedores.SelectedText = "Seleccione"; + DdlProveedores.SelectedValue = "-1"; } protected void CargaDatos() { ClsOC ObjOC = new ClsOC(); - CveProveedor = DdlProveedor.SelectedValue.ToEntero(); + CveProveedor = DdlProveedores.SelectedValue.ToEntero(); FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha); FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now); @@ -124,6 +130,10 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas { GenerarPDF("PDF"); } + protected void LnkImpresionMasiva_Click(object sender,EventArgs e) + { + GenerarImpresionMasiva(); + } protected void GenerarPDF(String Opcion) { @@ -132,7 +142,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas String FechaF; if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $" Fecha Final: {txtFechaF.Text}"; } String Proveedor; - if (DdlProveedor.SelectedValue != "-1") { Proveedor = $" Proveedor: {DdlProveedor.SelectedItem.Text}"; } else { Proveedor = ""; } + if (DdlProveedores.SelectedValue != "-1") { Proveedor = $" Proveedor: {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; } String Estatus; if (DdlEstatus.SelectedValue != "1") { Estatus = $" Estatus: {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; } @@ -161,4 +171,38 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia); } } + + private void GenerarImpresionMasiva() + { + + byte[] all; + + using (MemoryStream ms = new MemoryStream()) + { + using (Document d = new Document()) + { + using (PdfCopy copy = new PdfCopy(d,ms)) + { + d.Open(); + foreach (GridViewRow Gvr in GvSolicitudes.Rows) + { + int CveOC = Gvr.DataKey("CveOrdenCompra").ToEntero(); + byte[] reporteByte = NewGeneraBytesOC(CveOC); + PdfReader reader = new PdfReader(reporteByte); + int n = reader.NumberOfPages; + int page = 0; + while (page < n) + { + page++; + copy.AddPage(copy.GetImportedPage(reader, page)); + } + } + } + + } + all = ms.ToArray(); + } + ImprimirbytesPDF(all, "RepSolicitudesAnticipo"); + + } } \ No newline at end of file diff --git a/RH/PopUpBuscarPersonal.aspx.vb b/RH/PopUpBuscarPersonal.aspx.vb index 06a779f57..eec974cf1 100644 --- a/RH/PopUpBuscarPersonal.aspx.vb +++ b/RH/PopUpBuscarPersonal.aspx.vb @@ -396,16 +396,19 @@ Partial Class RH_PopUpBuscarPersonal If TxtRFC.Text.Trim <> String.Empty Then Return True If TxtHorarioDe.Text.Trim <> String.Empty Then Return True - If DdlTurnos.SelectedValue.ToEntero > 0 Then Return True - If DdlPuestos.SelectedValue.ToEntero > 0 Then Return True + If DdlTipoPeriodo.SelectedValue.ToEntero > 0 Then Return True + If DdlTipoContrato.SelectedValue.ToEntero > 0 Then Return True If DdlDepartamentos.SelectedValue.ToEntero > 0 Then Return True - If DdlRuta.SelectedValue.ToEntero > 0 Then Return True - If DdlEscolaridad.SelectedValue.ToEntero > 0 Then Return True - If DdlEstadoCivil.SelectedValue.ToEntero > 0 Then Return True If DdlGenero.SelectedValue.ToEntero > 0 Then Return True - If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True - If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True + If DdlEstadoCivil.SelectedValue.ToEntero > 0 Then Return True + If DdlEscolaridad.SelectedValue.ToEntero > 0 Then Return True + If DdlTurnos.SelectedValue.ToEntero > 0 Then Return True If DdlClienteAsignado.SelectedValue.ToEntero > 0 Then Return True + If DdlProyecto.SelectedValue.ToEntero > 0 Then Return True + If DdlPuestos.SelectedValue.ToEntero > 0 Then Return True + If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True + If DdlRuta.SelectedValue.ToEntero > 0 Then Return True + If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True Return False End Function diff --git a/Sistemas/CatSesiones.aspx b/Sistemas/CatSesiones.aspx index 266a9afff..0f9885da8 100644 --- a/Sistemas/CatSesiones.aspx +++ b/Sistemas/CatSesiones.aspx @@ -1,67 +1,70 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSesiones.aspx.vb" Inherits="Sistemas_CatSesiones" %> - - - - - - - - - - - - - - - - - - - - - - - <%-- --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSesiones.aspx.vb" Inherits="Sistemas_CatSesiones" %> + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +    -    -
    -
    - - -
    - - \ No newline at end of file + +    +
    +
    + + +
    + + diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index 943e3b585..0b2111830 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -59,7 +59,7 @@ Partial Class Sistemas_CatSesiones ElseIf DdlVariable.SelectedItem.Value = "ProductosServicios" Then CargaProductosServicios() ElseIf DdlVariable.SelectedItem.Value = "PSSimplificado" Then - CargaProductosServiciossimplificado() + CargaProductosServiciosSimplificado() ElseIf DdlVariable.SelectedItem.Value = "CONAC" Then CargaCONAC() @@ -88,14 +88,16 @@ Partial Class Sistemas_CatSesiones ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSATMotivoTraslado" Then CargaSATMotivoTraslado() ElseIf DdlVariable.SelectedItem.Value = "GlobalDTConceptosContables" Then - CargaConceptosContables() - ElseIf DdlVariable.SelectedItem.Value = "GlobalDTClasificacionPorcentaje" Then - CargaDTClasificacionPorcentaje() - End If - - - - + CargaConceptosContables() + ElseIf DdlVariable.SelectedItem.Value = "GlobalDTClasificacionPorcentaje" Then + CargaDTClasificacionPorcentaje() + ElseIf DdlVariable.SelectedItem.Value = "GlobalDTInvPSSeccionesAlmacen" Then + CargaDTInvPSSeccionesAlmacen() + End If + + + + End Sub Private Sub CargaConceptosContables() Dim ObjContabilidad As New ClsContabilidad @@ -363,8 +365,8 @@ Partial Class Sistemas_CatSesiones Private Sub CargaPaises() Dim Gral As New ClsGenerales - If Gral.GetGralPaises Then Application("GlobalDTGralPaises") = Gral.DtResultados Else Application("GlobalDTGralPaises") = Nothing - If Gral.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = Gral.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing + If Gral.GetGralPaises Then Application("GlobalDTGralPaises") = Gral.DtResultados Else Application("GlobalDTGralPaises") = Nothing + If Gral.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = Gral.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing Gral.Dispose() End Sub @@ -552,14 +554,18 @@ Partial Class Sistemas_CatSesiones ' Response.Redirect(dominio) 'End If LblTotal.Text = dominio - End Sub - - Private Sub CargaDTClasificacionPorcentaje() - - Dim ObjGenerales As New ClsGenerales - If ObjGenerales.GetClasificacionPorcentaje(-1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing - ObjGenerales.Dispose() - - End Sub - + End Sub + + Private Sub CargaDTClasificacionPorcentaje() + + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetClasificacionPorcentaje(-1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing + ObjGenerales.Dispose() + + End Sub + + Private Sub CargaDTInvPSSeccionesAlmacen() + GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, -1, -1) = Nothing + End Sub + End Class diff --git a/Ventas/PopUpBuscarClientes.aspx.vb b/Ventas/PopUpBuscarClientes.aspx.vb index 96af8f67b..7a988792a 100644 --- a/Ventas/PopUpBuscarClientes.aspx.vb +++ b/Ventas/PopUpBuscarClientes.aspx.vb @@ -73,7 +73,7 @@ Partial Class PopUpBuscarClientes Dim ObjClientes As New ClsClientes() If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, - DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then + DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100) Then If ObjClientes.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0) GV.DataSource = ObjClientes.DtResultados diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb index 7ecfa5de0..960074304 100644 --- a/Ventas/PopUpBuscarFolio.aspx.vb +++ b/Ventas/PopUpBuscarFolio.aspx.vb @@ -127,7 +127,7 @@ Partial Class PopUpBuscarFolio Dim ObjVentas As New ClsVentas() If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1), - DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100) Then If ObjVentas.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0) GV.DataSource = ObjVentas.DtResultados @@ -280,6 +280,7 @@ Partial Class PopUpBuscarFolio End Sub Private Function ValidarUnFiltroSeleccionado() As Boolean + If DdlClasificacion.SelectedValue.ToEntero > 0 Then Return True If DdlTipoDocto.SelectedValue <> "-1" Then Return True If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True If DdlEstatusFactura.SelectedValue.ToEntero > 0 Then Return True diff --git a/Ventas/PopUpBuscarPs.aspx.vb b/Ventas/PopUpBuscarPs.aspx.vb index 44825d642..986ee61da 100644 --- a/Ventas/PopUpBuscarPs.aspx.vb +++ b/Ventas/PopUpBuscarPs.aspx.vb @@ -68,7 +68,7 @@ Partial Class PopUpBuscarPs Dim ObjPS As New ClsProductosServicios If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre, pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero, - CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then + CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, TopSelect:=100) Then GvDatos.DataSource = ObjPS.DtResultados dvbusqueda.Visible = True Else @@ -103,7 +103,9 @@ Partial Class PopUpBuscarPs If TxtNombre.Text.Trim <> String.Empty Then Return True If DdlCveTipoPS.SelectedValue.ToEntero > 0 Then Return True + If DdlEstado.SelectedValue.ToEntero > 0 Then Return True If DdlAplicaVenta.SelectedValue.ToEntero > 0 Then Return True + If Ddlclasificacion.SelectedValue.ToEntero > 0 Then Return True If DdlCompuesto.SelectedValue.ToEntero > 0 Then Return True Return False diff --git a/Ventas/RepIngresos.aspx.vb b/Ventas/RepIngresos.aspx.vb index e82b64b60..8e5a5f6af 100644 --- a/Ventas/RepIngresos.aspx.vb +++ b/Ventas/RepIngresos.aspx.vb @@ -94,7 +94,7 @@ Partial Class Ventas_RepIngresos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then TCEspecifico = -1 - TipoCambio = 2 + TipoCambio = 1 CveSubProyecto = -1 TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year) DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) diff --git a/asmx/WSSIGApp.asmx b/asmx/WSSIGApp.asmx index 71c1f2945..1a6b79d95 100644 --- a/asmx/WSSIGApp.asmx +++ b/asmx/WSSIGApp.asmx @@ -2049,7 +2049,7 @@ Public Class WSSIGApp Return TmpDT End Function Private Function AgregarProductoServicioRem(TmpDT As DataTable, PS As MVentaProductos, CveEmpresa As Integer, CveSubProyecto As Integer, - Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, + Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0) As DataRow @@ -2083,7 +2083,7 @@ Public Class WSSIGApp Row("Proyecto") = DrSubProyecto("Proyecto").ToString() Row("CveSubProyecto") = CveSubProyecto Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString() - Row("SerieLote") = SerieLote + Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega Row("Orden") = TmpDT.Rows.Count + 1 Row("Cantidad") = PS.Cantidad
    Ventas Movimientos