diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index 417d972e9..50d497b46 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -492,7 +492,8 @@ Public Class ClsCGame #End Region #Region "ORDEN DE PRODUCCION" - Public Function GetOrdenProduccion(CveOrdenProduccion As Integer, CveEmpresa As Integer, CveEstatus As Integer, Folio As String, FEntregaI As Date, FEntregaF As Date, CveCliente As Integer) As Boolean + Public Function GetOrdenProduccion(CveOrdenProduccion As Integer, CveEmpresa As Integer, CveEstatus As Integer, Folio As String, FEntregaI As Date, FEntregaF As Date, + CveCliente As Integer, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CGame_OrdenProduccionGet") With SqlAdapter.SelectCommand.Parameters @@ -503,6 +504,7 @@ Public Class ClsCGame .Add("@FEntregaI", SqlDbType.Date).Value = FEntregaI .Add("@FEntregaF", SqlDbType.Date).Value = FEntregaF .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) @@ -1039,7 +1041,9 @@ Public Class ClsCGame #End Region #Region "PRODUCCION" - Public Function GetProduccion(CveEmpresa As Integer, Optional Folio As String = "-1", Optional CveProduccion As Integer = -1, Optional CveHuerta As Integer = -1, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional Opcion As Integer = -1, Optional Modalidad As Integer = -1) As Boolean + Public Function GetProduccion(CveEmpresa As Integer, Optional Folio As String = "-1", Optional CveProduccion As Integer = -1, Optional CveHuerta As Integer = -1, + Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional Opcion As Integer = -1, Optional Modalidad As Integer = -1, + Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CGame_ProduccionGet") With SqlAdapter.SelectCommand.Parameters @@ -1051,6 +1055,7 @@ Public Class ClsCGame .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Modalidad", SqlDbType.Int).Value = Modalidad + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index b4a4f540e..a07d2a7d3 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -651,7 +651,7 @@ Public Class ClsCRM Public Function GetAcercamiento(CveEmpresa As Integer, Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamiento As Integer = -1, Optional CveTipoProceso As Integer = -1, Optional CveVendedor As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional NombreAcercamiento As String = "-1", Optional CveMedioCaptacion As Integer = -1, Optional CveRechazoMotivo As Integer = -1, Optional CveProbabilidad As Integer = -1, - Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1") As Boolean + Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoGet") With SqlAdapter.SelectCommand.Parameters @@ -673,6 +673,8 @@ Public Class ClsCRM .Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin .Add("@FechaApertura", SqlDbType.VarChar).Value = FechaApertura .Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre + + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 8d0ca08f7..3da032b9a 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1880,7 +1880,8 @@ Public Class ClsContratos #Region " REPORTE BUSQUEDA" Public Function GetContratosBusquedaRep(TipoVenta As Integer, CveContratoTipo As Integer, NumeroContrato As String, DescripcionContrato As String, Ubicacion As String, Responsable As String, - EstatusContrato As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer) As Boolean + EstatusContrato As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer, + Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosBusquedaRepGet") @@ -1898,6 +1899,7 @@ Public Class ClsContratos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 480d478ec..62b5e8d2e 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -732,7 +732,8 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosRep(CveAlmacen As Integer, CveTipoMovimiento As Integer, Folio As Integer, FechaIngI As Date, FechaIngF As Date, FechaInicio As Date, FechaFin As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function GetMovimientosRep(CveAlmacen As Integer, CveTipoMovimiento As Integer, Folio As Integer, FechaIngI As Date, FechaIngF As Date, FechaInicio As Date, + FechaFin As Date, CveUsuario As Integer, CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosRep") @@ -746,6 +747,7 @@ Public Class ClsInventarios .Add("@FechaFin ", SqlDbType.DateTime).Value = FechaFin .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) @@ -1818,7 +1820,7 @@ Public Class ClsInventarios Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha, Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, - Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean + Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ExistenciasGet") @@ -1839,6 +1841,7 @@ Public Class ClsInventarios .Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output End With diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 586bd8874..54ee9c7b4 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -522,10 +522,28 @@ Public Class ClsNominas Return Retorno End Function + Public Function AutorizaNom_Nominas(CvePersonal As Integer, CvePeriodo As Integer, Optional Autorizado As Boolean = True) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Nom_Nominas_Autoriza") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@Autorizado", SqlDbType.Bit).Value = Autorizado + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al autorizar la nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function AddNom_Nominas(FolioNom As Integer, CveNominaTipo As Integer, CvePersonal As Integer, CvePeriodo As Integer, SubTotal As Double, Descuento As Double, RetISR As Double, Total As Double, CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, Fecha As Date, MotivoDescuento As String, Observaciones As String, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double, - Fech1 As Date, Fech2 As Date, Fech3 As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Fech1 As Date, Fech2 As Date, Fech3 As Date, CveUsuario As Integer, CveEmpresa As Integer, Optional Autorizado As Boolean = True) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Nom_NominasAdd") @@ -555,6 +573,7 @@ Public Class ClsNominas .Add("@Fech3", SqlDbType.VarChar).Value = IIf(Fech3.ToString = "01/01/0001 12:00:00 a.m.", "-1", Fech3.ToString) .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Autorizado", SqlDbType.Bit).Value = Autorizado .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With 'SqlTypes.SqlDateTime.Null diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index cf460fdab..2aa435c09 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -1728,7 +1728,7 @@ Public Class ClsOC Public Function GetOrdenesCompraRep(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveEstatus As Integer, FechaInicio As Date, FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer, CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1", Optional CveActivoFijo As Integer = -1, - Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1) As Boolean + Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraRep") @@ -1754,6 +1754,7 @@ Public Class ClsOC .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso .Add("@CveUsuarioAutorizo", SqlDbType.Int).Value = CveUsuarioAutorizo + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 565017490..431ef2037 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -470,7 +470,8 @@ Public Class ClsOS Return Retorno End Function - Public Function GetOrdenesServicios(CveOS As Integer, CveCliente As Integer, Folio As Integer, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1) As Boolean + Public Function GetOrdenesServicios(CveOS As Integer, CveCliente As Integer, Folio As Integer, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, + CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosGet") @@ -482,6 +483,7 @@ Public Class ClsOS .Add("@CveUsuarioRecibio", SqlDbType.Int).Value = CveUsuarioRecibio .Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 358cc7495..f0223a50f 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -2298,10 +2298,36 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno - End Function + End Function + + Public Function AddAsistenciaMasiva2(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + Data = New DataTable + SqlDataAdapter("PA_RH_PersonalAsistenciasMasivaAddUpd2") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("Ya se registró la Asistencia para el empleado.", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + OnError("Ocurrió un error al guardar la Asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function #End Region - + #Region "Asistencias Detalles" Public Function GetAsistenciasDetalle() As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 4fae8a392..07f8fecbf 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -6684,14 +6684,6 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value End Set End Property - Property GlobalDTFolios() As DataTable - Get - GlobalDTFolios = DirectCast(HttpContext.Current.Application("GlobalDTFolios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFolios") = value - End Set - End Property Property GlobalDTEstatusFactura() As DataTable Get GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable) diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index fa0c9409b..c1e46ead0 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -1,5 +1,5 @@ -<%@ WebHandler Language="VB" Class="SIGFacturacion" %> - +<%@ WebHandler Language="VB" Class="SIGFacturacion" %> + Imports System Imports System.Web Imports System.Net.Http @@ -212,8 +212,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState json.Add(New JProperty("Almacen", ObsInv.ToString())) Return json - End Function - + End Function + #Region "V A L I D A - D A T O S" Private Function ValidaUsuarioSistema(CveEmpresa As Integer) As Usuario Dim UsuarioActual As Usuario = Nothing @@ -247,8 +247,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState UsuarioActual.Empresa = ObjEmpresa.Empresa End If ObjEmpresa.Dispose() - End Sub - + End Sub + #End Region #Region "D E F I N I R - O B J E T O S" Private Function CreaFactura(Resp As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, DTRemisionesPS As DataTable, CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer, DatosRemisiones As JObject, FechaI As DateTime, FechaF As DateTime) As Modelos.Factura @@ -750,7 +750,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState 'RECARGAR GV Return Row - End Function + End Function #End Region #Region "E N V I O - C O R R E O" Private Sub EnviarCorreo(Objfactura As Modelos.Factura, UsuarioActual As Usuario) @@ -894,9 +894,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState End If End Try End If - End Sub + End Sub #End Region - + Public Sub GuardaLogFacturacion(Str As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String @@ -919,8 +919,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ArchivoW.Close() ArchivoW.Dispose() - End Sub - + End Sub + #Region "G L O B A L - D T" Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Get @@ -1105,10 +1105,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTPSATPS") = value End Set - End Property - + End Property + #Region "GLOBALES DE SAT COMERCIO EXTERIOR" - + Property GlobalDTClavePedimento() As DataTable Get GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable) @@ -1218,10 +1218,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTColonia") = value End Set - End Property - + End Property + #End Region - + Property GlobalDTPSATUM() As DataTable Get GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable) @@ -1605,15 +1605,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTLeyendasFiscales") = value End Set - End Property - Property GlobalDTFolios() As DataTable - Get - GlobalDTFolios = DirectCast(HttpContext.Current.Application("GlobalDTFolios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFolios") = value - End Set - End Property + End Property + Property GlobalDTEstatusFactura() As DataTable Get GlobalDTEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTEstatusFactura"), DataTable) @@ -2354,9 +2347,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value End Set - End Property - - + End Property + + #Region "***********************************************************************DT EVENTOS****************************************************************************************" Property GlobalDTTiposEventos() As DataTable Get @@ -2392,9 +2385,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value End Set - End Property + End Property #End Region - + #Region " **********************************************************************DT PROSPECTOS*************************************************************************************" Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable Get @@ -2435,9 +2428,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value End Set - End Property + End Property #End Region - + #Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************" Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable Get @@ -2530,10 +2523,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value End Set - End Property - + End Property + #End Region - + #Region "***********************************************************************DT GENERALES**************************************************************************************" Property GlobalDTGralPaises() As DataTable Get @@ -2621,10 +2614,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTGralColectivas") = value End Set - End Property - + End Property + #End Region - + #Region "***********************************************************************DT PROSPECTOS*************************************************************************************" Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable Get @@ -2833,8 +2826,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTProspectosTipos") = value End Set - End Property - + End Property + #Region " DT PROSPECTOS SOLICITUDES" Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable Get @@ -2901,15 +2894,15 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value End Set - End Property - + End Property + #End Region #End Region - + #Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************" - + #Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************" - + Property GlobalDTAC_RubrosIngreso() As DataTable Get GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable) @@ -3165,11 +3158,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value End Set - End Property - - + End Property + + #End Region - + Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable Get If CveEmpresa <> -1 Then @@ -3248,9 +3241,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value End Set - End Property + End Property #End Region - + #Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************" Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable Get @@ -3287,11 +3280,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value End Set - End Property - - + End Property + + #End Region - + #Region "F I N A N Z A S " Property GlobalDTFinan_RazonesFinancieras() As DataTable Get @@ -3300,10 +3293,10 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value End Set - End Property + End Property #End Region - - + + #Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************" Property GlobalDTContaPlantillasPolizas(CveEmpresa As Integer, Optional TipoPlantilla As Integer = -1) As DataTable Get @@ -3357,9 +3350,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTContaConceptosContables") = value End Set - End Property + End Property #End Region - + #Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" Property GlobalDTAsistenciaDetalle() As DataTable Get @@ -3511,13 +3504,13 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTTipoBuzon") = value End Set - End Property + End Property #End Region - + #Region "*********** D T - C O M B U S T I B L E S ***********" - - - + + + Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable Get If CveEmpresa <> -1 Then @@ -3556,11 +3549,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(ByVal value As DataTable) HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value End Set - End Property + End Property #End Region - + #Region "*********** D T - M A N T E N I M I E N T O S ***********" - + Property GlobalDTMantenimientosTipos() As DataTable Get GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) @@ -3599,13 +3592,13 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value End Set - End Property - + End Property + #End Region - - + + #Region "*********** D T - T A L L E R E S ***********" - + Property GlobalDTTalleresTipos() As DataTable Get GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable) @@ -3622,12 +3615,12 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTTalleres") = value End Set - End Property - + End Property + #End Region - + #Region "*********** D T - D I S T R I B U I D O R E S ***********" - + Property GlobalDTDistribuidoresTipos() As DataTable Get GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable) @@ -3644,11 +3637,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTDistribuidores") = value End Set - End Property - + End Property + #End Region - - + + Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable Get If CveEmpresa <> -1 Then @@ -3739,8 +3732,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Set(value As DataTable) HttpContext.Current.Application("GlobalDTPaqueterias") = value End Set - End Property - + End Property + #End Region - + End Class \ No newline at end of file diff --git a/CGame/PopUpBuscarEmpaque.aspx.cs b/CGame/PopUpBuscarEmpaque.aspx.cs index ce4a09ed2..e6e304158 100644 --- a/CGame/PopUpBuscarEmpaque.aspx.cs +++ b/CGame/PopUpBuscarEmpaque.aspx.cs @@ -31,7 +31,7 @@ public partial class CGame_PopUpBuscarProduccion :ClsPaginas String Folio; if (TxtFolio.Text != "") { Folio = TxtFolio.Text; } else { Folio = "-1"; } ClsCGame ObjCGame = new ClsCGame(); - if (ObjCGame.GetProduccion(UsuarioActual.CveEmpresa, Folio, -1, DdlHuerta.SelectedValue.ToEntero(), TxtFechaEntregaI.Text.ToDate(), TxtFechaEntregaF.Text.ToDate())) + if (ObjCGame.GetProduccion(UsuarioActual.CveEmpresa, Folio, -1, DdlHuerta.SelectedValue.ToEntero(), TxtFechaEntregaI.Text.ToDate(), TxtFechaEntregaF.Text.ToDate(),TopSelect:100)) { GvDatos.DataSource = ObjCGame.DtResultados; GvDatos.DataBind(); diff --git a/CGame/PopUpBuscarOrdenProduccion.aspx.vb b/CGame/PopUpBuscarOrdenProduccion.aspx.vb index f2bc848fc..ce1cd631e 100644 --- a/CGame/PopUpBuscarOrdenProduccion.aspx.vb +++ b/CGame/PopUpBuscarOrdenProduccion.aspx.vb @@ -39,7 +39,8 @@ Partial Class CGame_PopUpBuscarOrdenProduccion If TxtFolio.Text.Trim <> "" Then Folio = TxtFolio.Text Else Folio = "-1" If ValidarFiltrosSeleccionado() Then Dim ObjOP As New ClsCGame - If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero) Then + If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, + DdlCliente.SelectedValue.ToEntero, TopSelect:=100) Then GvOP.DataSource = ObjOP.DtResultados GvOP.DataBind() LtlTotalRegistros.Text = ObjOP.DtResultados.Rows.Count.ToString diff --git a/CRM/PopUpBuscarAcercamiento.aspx.cs b/CRM/PopUpBuscarAcercamiento.aspx.cs index 958a4cc7c..ecb41ae96 100644 --- a/CRM/PopUpBuscarAcercamiento.aspx.cs +++ b/CRM/PopUpBuscarAcercamiento.aspx.cs @@ -167,7 +167,8 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas if (ValidarFiltrosSeleccionados()) { ClsCRM ObjCRM = new ClsCRM(); - if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidad, FechaApertura, FechaCierre)) + if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, + CveProbabilidad, FechaApertura, FechaCierre, TopSelect:100)) { GVDatos.DataSource = ObjCRM.DtResultados; GVDatos.DataBind(); diff --git a/Contratos/FacturacionMasiva.aspx.vb b/Contratos/FacturacionMasiva.aspx.vb index 7155797ae..b005a874d 100644 --- a/Contratos/FacturacionMasiva.aspx.vb +++ b/Contratos/FacturacionMasiva.aspx.vb @@ -19,6 +19,15 @@ Partial Class Contratos_FacturacionMasiva ViewState("DTCicloComercial") = value End Set End Property + Private Property FolioVigentes As Boolean + Get + Return CType(ViewState("FolioVigentes"), Boolean) + End Get + Set(value As Boolean) + ViewState("FolioVigentes") = value + End Set + End Property + Private Property Mensaje As String Get Return CType(ViewState("Mensaje"), String) @@ -100,6 +109,7 @@ Partial Class Contratos_FacturacionMasiva Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then + FolioVigentes = False CargaCombos() txtFechaI.Text = DateTime.Today.ToString("d") txtFechaF.Text = DateTime.Today.ToString("d") @@ -118,6 +128,8 @@ Partial Class Contratos_FacturacionMasiva DdlSucursal.DataBind() End Sub Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer) + ValidaFolio() + Dim ObjContratos As New ClsContratos If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0") @@ -127,9 +139,21 @@ Partial Class Contratos_FacturacionMasiva GvCiclosComerciales.DataBind() UpGv.Update() End Sub + + Private Sub ValidaFolio() + Dim ObjFolios As New ClsGralFolios + If ObjFolios.GetFolios("Ing", UsuarioActual.CveEmpresa) Then + If ObjFolios.DtResultados.Rows.Count > 0 Then + FolioVigentes = True + End If + End If + + ObjFolios.Dispose() + End Sub Protected Sub GvCiclosComerciales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCiclosComerciales.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If GlobalDTFolios().FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto")} AND TipoDocto = 'Ing' ").Rows.Count = 0 Then + '' Pendiente de aplicar validacion + If Not FolioVigentes Then e.Row.FCCheckBox("chkDis").Enabled = False e.Row.FCCheckBox("chkDis").ToolTip = "La sucursal vinculada con este contrato no tiene folios" End If diff --git a/Contratos/PopUpBuscarContrato.aspx.vb b/Contratos/PopUpBuscarContrato.aspx.vb index b25785ab2..b4daf97d0 100644 --- a/Contratos/PopUpBuscarContrato.aspx.vb +++ b/Contratos/PopUpBuscarContrato.aspx.vb @@ -145,7 +145,7 @@ Partial Class Contratos_PopUpBuscarContrato Dim objContratos As New ClsContratos If (objContratos.GetContratosBusquedaRep(DdlTipo.SelectedValue.ToEntero, DdlTipoContrato.SelectedValue.ToEntero, NumeroContrato, Descripcion, Ubicacion, Responsable, Estatus, DdlProyecto.SelectedValue.ToEntero, DdlSubProtecto.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, DdlCliente.SelectedValue.ToEntero, - DdlProveedor.SelectedValue.ToEntero)) Then + DdlProveedor.SelectedValue.ToEntero, TopSelect:=100)) Then GV.DataSource = objContratos.DtResultados LtlTotalRegistros.Text = objContratos.DtResultados.Rows.Count.ToString Else diff --git a/GPS/FacturacionMasiva.aspx.vb b/GPS/FacturacionMasiva.aspx.vb index 5db90c87c..79ee47c03 100644 --- a/GPS/FacturacionMasiva.aspx.vb +++ b/GPS/FacturacionMasiva.aspx.vb @@ -27,6 +27,14 @@ Partial Class Contratos_FacturacionMasiva ViewState("Mensaje") = value End Set End Property + Private Property FolioVigentes As Boolean + Get + Return CType(ViewState("FolioVigentes"), Boolean) + End Get + Set(value As Boolean) + ViewState("FolioVigentes") = value + End Set + End Property Private Property ErrorList As List(Of String) Get Return CType(ViewState("ErrorList"), List(Of String)) @@ -79,6 +87,7 @@ Partial Class Contratos_FacturacionMasiva Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then + FolioVigentes = False CargaCombos() txtFechaI.Text = DateTime.Today.ToString("d") txtFechaF.Text = DateTime.Today.ToString("d") @@ -97,6 +106,7 @@ Partial Class Contratos_FacturacionMasiva DdlSucursal.DataBind() End Sub Private Sub CargaDatos(CveContrato As Integer, CveCliente As Integer) + ValidaFolio() Dim ObjContratos As New ClsContratos If ObjContratos.CicloComercialGet(CveContrato, CveCliente, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, DdlSucursal.SelectedValue.ToEntero) Then DTCicloComercial = ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0") @@ -106,9 +116,20 @@ Partial Class Contratos_FacturacionMasiva GvCiclosComerciales.DataBind() UpGv.Update() End Sub + + Private Sub ValidaFolio() + Dim ObjFolios As New ClsGralFolios + If ObjFolios.GetFolios("Ing", UsuarioActual.CveEmpresa) Then + If ObjFolios.DtResultados.Rows.Count > 0 Then + FolioVigentes = True + End If + End If + + ObjFolios.Dispose() + End Sub Protected Sub GvCiclosComerciales_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCiclosComerciales.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If GlobalDTFolios().FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto")} AND TipoDocto = 'Ing' ").Rows.Count = 0 Then + If Not FolioVigentes Then e.Row.FCCheckBox("chkDis").Enabled = False e.Row.FCCheckBox("chkDis").ToolTip = "La sucursal vinculada con este contrato no tiene folios" End If diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 70313db73..b3623247f 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -65,11 +65,15 @@