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("
", IDPoliza)
Dim Mensaje As String = String.Format(" El Documento se generó correctamente.
Descargas:
{0}
", 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.
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
+
+
+
+
+
+
+ Cuentas
+ 5.72992cm
+ 0.20457cm
+ 1.34594cm
+ 15.48536cm
+ 43
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+ 5.19589in
@@ -3403,6 +3443,12 @@
trueReportParameter1
+
+ String
+ true
+ true
+ ReportParameter1
+
diff --git a/Empresas/83/Formatos/OC.rdlc b/Empresas/83/Formatos/OC.rdlc
index ba7e012dd..19ed8b88d 100644
--- a/Empresas/83/Formatos/OC.rdlc
+++ b/Empresas/83/Formatos/OC.rdlc
@@ -2986,6 +2986,46 @@
2pt
+
+ true
+ true
+
+
+
+
+ Cuentas Bancarias:
+
+
+
+ =Parameters!Cuentas.Value
+ HTML
+
+
+
+
+
+
+ Cuentas
+ 5.38277cm
+ 0.20457cm
+ 1.34594cm
+ 15.48536cm
+ 42
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+ 5.1933in
@@ -3027,7 +3067,7 @@
Textbox8
- 0.08114cm
+ 0.08113cm0.20457cm0.46771cm6.86562cm
@@ -3396,6 +3436,12 @@
trueReportParameter1
+
+ String
+ true
+ true
+ ReportParameter1
+
diff --git a/Empresas/Grales/Formatos/RepFacturas.rdlc b/Empresas/Grales/Formatos/RepFacturas.rdlc
index a93425a4d..63975247d 100644
--- a/Empresas/Grales/Formatos/RepFacturas.rdlc
+++ b/Empresas/Grales/Formatos/RepFacturas.rdlc
@@ -6,6 +6,41 @@
+
+
+
+ true
+ true
+
+
+
+
+ Tipo
+
+
+
+
+
+
+ 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 @@
- SerieFolio
+ TipoComprobante
@@ -389,16 +430,51 @@
2pt
- true
+
+
+
+ 2.33715cm
+
+
+ true
+ true
+
+
+
+
+ =Fields!SerieFolio.Value
+
+
+
+
+
+
+ SerieFolio
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+ DataSet10.06614cm1.2cm
- 19.04475cm
+ 19.0265cm
@@ -805,6 +881,10 @@
/* Local Query */
+
+ TipoComprobante
+ System.String
+ SerieFolioSystem.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 @@