diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index a1169276d..69ac29dc8 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1026,6 +1026,24 @@ Public Class ClsClientes OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno + End Function + + Public Function GetListaSucursales(RFC As String, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ClientesSucursalesGet") + SqlAdapter.SelectCommand.Parameters.Add("@RFC", SqlDbType.VarChar).Value = RFC + SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 133cb56e1..075d0aca3 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -216,7 +216,36 @@ Public Class ClsNominas End Try Return retorno End Function - + Public Function Autorizaperiodoconta(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Nom_Autorizaperiodoconta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al autorizar periodo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function GetDispersiondenomina(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_PA_NomDispersiondenomina", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean Dim retorno As Boolean = False DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 990a3e2f5..95e161692 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5444,13 +5444,13 @@ Public Class ClsPaginas ''' Opcional Nombre del archivo que se descarga ''' Optional, Formato de Generacion PDF o Excel ''' - Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) + Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment") Dim lrds As New List(Of ReportDataSource) Dim rds As New ReportDataSource rds.Name = RDSName rds.Value = DtDatos lrds.Add(rds) - ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) + ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition) End Sub Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) @@ -5465,9 +5465,9 @@ Public Class ClsPaginas ''' Opcional Nombre del archivo que se descarga ''' Optional, Formato de Generacion PDF o Excel ''' - Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) + Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment") 'limpio ReportViwer - ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato) + ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato, Content_Disposition:=Content_Disposition) End Sub Public Function StreamPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) As Byte() Dim lrds As New List(Of ReportDataSource) @@ -5857,7 +5857,7 @@ Public Class ClsPaginas ''' ''' ''' - Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False) + Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment") 'limpio ReportViwer Dim mimeType As String = Nothing Dim extension As String = Nothing @@ -5880,7 +5880,7 @@ Public Class ClsPaginas Response.Buffer = True Response.Clear() Response.ContentType = mimeType - Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) + Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) Response.BinaryWrite(bytes) ' create the file Response.Flush() ' send it to the client to download HttpContext.Current.Response.SuppressContent = True diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 61f35a5e7..e19a7325e 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -240,7 +240,7 @@ Public Class LogicNominas For Each Row As DataRow In DtPercepciones.Rows If Row("Importe").ToString().ToDecimal > 0 AndAlso Row("SATCveConcepto").ToString().ToEntero() <> 17 Then If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For - ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), + ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = If(Row("SATCveConcepto").ToString() = "999", "038", Row("SATCveConcepto").ToString()), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()}) End If 'RMF, falta poner el numero de horas pagadas diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 9a18a5716..fbe97480e 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -968,25 +968,25 @@ Namespace Extensiones - Public Function RoundAD(Valor As Double, Optional Decimales As Integer = 2) As Double - Return Math.Round(Valor, Decimales) - End Function - - Public Function RoundAD(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal - Return Math.Round(Valor, Decimales) + Public Function RoundAD(Valor As Double, Optional Decimales As Integer = 2) As Double + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) + End Function + + Public Function RoundAD(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) End Function - Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double - 'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) - 'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo - Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)) + Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double + 'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) + 'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) End Function Public Function RoundSQL(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal 'primero, se redondea a 4, para que concuerde al redondeo de sql - Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)) + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) End Function Public Function Abs(Valor As Double) As Double diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index ca6e8c319..e139c0ecc 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -4,6 +4,7 @@ Option Strict On Option Explicit On Imports System.Data +Imports System.IO Imports System.Net.Http Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq @@ -66,6 +67,42 @@ Public Class E141 : Implements IHttpHandler End Get End Property + +#Region "GLOBAL DT" + Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then + Dim P As New ClsSubProyectos + If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados + P.Dispose() + End If + + If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then + Dim StrSQL As New StringBuilder + If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto) + If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto) + If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus) + If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + GlobalDTSubProyectos = Dv.ToTable + Dv.Dispose() + + Else + GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If + + End Get + Set(ByVal value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + +#End Region + Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim retorno As String = "" Try @@ -88,7 +125,56 @@ Public Class E141 : Implements IHttpHandler Dim Codigo = If(context.Request("Sku") = Nothing, "", context.Request("Sku").ToString()) retorno = GetExistencia(context, Codigo) + ElseIf Metodo = "ConsultarRFC" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + If Auth.IsSucces Then + retorno = ConsultaRFC(context) + Else + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "ValidarCarrito" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = ValidarCarrito(context) + Else + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "RegistrarPedido" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = RegistrarPedido(context) + Else + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "RegistrarCotizacion" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = RegistrarCotizacion(context) + Else + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "GetSucursales" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = GetSucursales(context) + Else + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + context.Response.StatusCode = Auth.StatusCode Else context.Response.ContentType = "text/html" @@ -132,11 +218,219 @@ Public Class E141 : Implements IHttpHandler End Try End Sub + Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage + Dim unauthorized As Boolean = True + Dim respuesta As New AuthMessage + + Dim authHeader = context.Request.Headers("Authorization") + If authHeader IsNot Nothing Then + Dim basicAuth As String = authHeader.Replace("Basic ", "") + + Dim usernamePasswordArray = Encoding.UTF8.GetString(Convert.FromBase64String(basicAuth)).Split(":"c) + + Dim userName = usernamePasswordArray(0) + Dim password = usernamePasswordArray(1) + unauthorized = Not (userName = Me.UsuarioWSE141 AndAlso password = Me.PasswordWSE141) + + Else + respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña son requeridos"} + respuesta.IsSucces = False + respuesta.StatusCode = 401 + + Return respuesta + End If + + If unauthorized Then + respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña no son validos"} + respuesta.IsSucces = False + respuesta.StatusCode = 401 + + Return respuesta + Else + respuesta.ErrorMessage = Nothing + respuesta.IsSucces = True + respuesta.StatusCode = 200 + + Return respuesta + End If + + End Function + + Private Function ConsultaRFC(ByVal context As HttpContext) As String + Dim Respuesta As New FidelityAppsResponse + Dim RespuestaError As New FidelityAppsResponseError + Dim TieneError As Boolean = False + Dim JsonRequest As JObject = Nothing + + If context.Request.InputStream IsNot Nothing Then + Using reader As New StreamReader(context.Request.InputStream) + Dim json = reader.ReadToEnd + + If Not String.IsNullOrEmpty(json) Then + JsonRequest = JObject.Parse(json) + If JsonRequest Is Nothing Then + TieneError = True + End If + End If + + End Using + End If + + If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("rfc").ToString().Trim()) Then + + Dim data As New JArray + Dim Nombre As String = "-1" + Dim Codigo As String = "-1" + Dim NombreCorto As String = "-1" + Dim RFC As String = JsonRequest("rfc").ToString() + Dim Telefono As String = "-1" + Dim Mail As String = "-1" + + Dim DtSucursales As DataTable = Nothing + + Using ObjClientes As New ClsClientes + If ObjClientes.GetListaSucursales(RFC, CveEmpresa) Then + DtSucursales = ObjClientes.DtResultados.Copy() + End If + End Using + + If DtSucursales IsNot Nothing Then + Try + For Each Row As DataRow In DtSucursales.Rows + Dim objSucursal As New JObject( + New JProperty("Id", Row("CveCliente")), + New JProperty("rfc", Row("RFC")), + New JProperty("name", Row("SucursalCliente")), + New JProperty("phone", Row("Telefono")), + New JProperty("email", Row("Correo")), + New JProperty("address", Row("Direccion")), + New JProperty("int_number", Row("NoInt")), + New JProperty("ext_number", Row("NoExt")), + New JProperty("street", Row("Direccion")), + New JProperty("between_streets", ""), + New JProperty("city", Row("Localidad")), + New JProperty("state", Row("Estado")), + New JProperty("zip_code", Row("CP")), + New JProperty("reference", ""), + New JProperty("Branch_office_code", ""), + New JProperty("Branch_office_name", ""), + New JProperty("Branch_office_id", "") + ) + data.Add(objSucursal) + Next + Catch ex As Exception + TieneError = True + RespuestaError.message = "Ocurrió un error al obtener la sucursales" + End Try + DtSucursales.Dispose() + Else + TieneError = True + End If + + If data.Count > 0 Then + Respuesta.data = data + End If + End If + + If TieneError Then + Return JsonConvert.SerializeObject(RespuestaError) + Else + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + Private Function ValidarCarrito(ByVal context As HttpContext) As String + Dim Respuesta As New FidelityAppsResponse + Dim RespuestaError As New FidelityAppsResponseError + Dim TieneError As Boolean = False + + + If TieneError Then + Return JsonConvert.SerializeObject(RespuestaError) + Else + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + Private Function RegistrarPedido(ByVal context As HttpContext) As String + Dim Respuesta As New FidelityAppsResponse + Dim RespuestaError As New FidelityAppsResponseError + Dim TieneError As Boolean = False + + + If TieneError Then + Return JsonConvert.SerializeObject(RespuestaError) + Else + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + Private Function RegistrarCotizacion(ByVal context As HttpContext) As String + Dim Respuesta As New FidelityAppsResponse + Dim RespuestaError As New FidelityAppsResponseError + Dim TieneError As Boolean = False + + + If TieneError Then + Return JsonConvert.SerializeObject(RespuestaError) + Else + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + Private Function GetSucursales(ByVal context As HttpContext) As String + Dim Respuesta As New FidelityAppsResponse + Dim RespuestaError As New FidelityAppsResponseError + Dim TieneError As Boolean = False + + Dim data As New JArray + + Dim DtSucursales As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltraParametros("EsSucursal = True") + If DtSucursales IsNot Nothing Then + Try + For Each Row As DataRow In DtSucursales.Rows + Dim objSucursal As New JObject( + New JProperty("code", Row("CveSubProyecto")), + New JProperty("name", Row("SubProyecto")), + New JProperty("street", Row("Calle")), + New JProperty("no_ext", Row("NoExt")), + New JProperty("no_int", Row("NoInt")), + New JProperty("zip", Row("CP")), + New JProperty("neighborhood", Row("Colonia")), + New JProperty("city", Row("Municipio")), + New JProperty("phone", Row("Telefono")), + New JProperty("email", Row("Correo")), + New JProperty("geo_lat", ""), + New JProperty("geo_lng", ""), + New JProperty("image", "") + ) + data.Add(objSucursal) + Next + Catch ex As Exception + TieneError = True + RespuestaError.message = "Ocurrió un error al obtener la sucursales" + End Try + DtSucursales.Dispose() + Else + TieneError = True + End If + + If data.Count > 0 Then + Respuesta.data = data + End If + + If TieneError Then + Return JsonConvert.SerializeObject(RespuestaError) + Else + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + Private Function GetExistencia(ByVal context As HttpContext, Codigo As String) As String Dim respuesta = New With {.isSuccess = False, .message = "", .products = New JArray} If String.IsNullOrEmpty(Codigo) OrElse Codigo = "-1" Then respuesta.message = "el parametro 'Sku' es invalido" - respuesta.isSuccess = False + Respuesta.isSuccess = False Return JsonConvert.SerializeObject(respuesta) End If @@ -735,4 +1029,23 @@ Public Class E141 : Implements IHttpHandler End If End Function + Private Class FidelityAppsResponse + Public Property status As String + Public Property data As Object + End Class + + Private Class FidelityAppsResponseError + Sub New() + status = "error" + End Sub + Public Property status As String + Public Property message As String + End Class + + Private Class AuthMessage + Public Property IsSucces As Boolean + Public Property ErrorMessage As FidelityAppsResponseError + Public Property StatusCode As Integer + End Class + End Class \ No newline at end of file diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 198ef02e0..7a06ef3a6 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6960,8 +6960,31 @@ Partial Class Compras_Compras Dim DTDistinct = DT.Copy If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then + + For Each drowdis As DataRow In DTDistinct.Rows + If drowdis("CveTipoGasto").ToString = "" Then + drowdis("CveTipoGasto") = 0 + End If + If drowdis("TipoGasto").ToString.Trim = "" Then + drowdis("TipoGasto") = "ND" + + End If + Next + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF, 0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) Else + + For Each drowdis As DataRow In DTDistinct.Rows + If drowdis("CveTipoGasto").ToString = "" Then + drowdis("CveTipoGasto") = 0 + End If + If drowdis("TipoGasto").ToString.Trim = "" Then + drowdis("TipoGasto") = "ND" + + End If + Next + DTDistinct.AcceptChanges() + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) End If 'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto @@ -17816,6 +17839,8 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto")) + Else + DdlProyecto.SelectedValueExist("-1") End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 6bae061c3..f477a8d99 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4696,7 +4696,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF") + ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF", Content_Disposition:="inline") End Sub #End Region diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index baafd9844..87dd131f3 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -712,7 +712,7 @@ Partial Class Compras_ReembolsosComprobaciones If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 - If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, DDlCheques.SelectedValue.ToEntero, -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then MsgError = "Detalle" End If End If diff --git a/Contratos/ContratoAvance.aspx b/Contratos/ContratoAvance.aspx index fdccdf370..2a42ad29a 100644 --- a/Contratos/ContratoAvance.aspx +++ b/Contratos/ContratoAvance.aspx @@ -8,8 +8,8 @@ width:100%; } .txtimporte{ - background: transparent; - border: none; + /*background: transparent;*/ + /*border: none;*/ } .txtcant,.txtimporte, @@ -183,14 +183,22 @@ - + - + + + + + + + + + @@ -254,115 +262,6 @@ -<%-- - - - - - - - - - - - - - - - - -
-
- -
- -
- -
- - - -
-
- - -
-
- -
-
-
-
-
- - -
-
- - - - - - - - - - - - <%# Eval("Cantidad", "{0:N2}")%> - - - - - <%# Eval("Importe", "{0:N2}")%> - - - - - <%# Eval("Cantidad_Ultima", "{0:N2}")%> - - - - - <%# Eval("Importe_Ultima", "{0:N2}")%> - - - - - - - - - -
-
- - -
-
-
- - - - -
-
-
- -
- - - -
- - -
-
- - -
--%> @@ -473,6 +372,7 @@ }); }); }); + function showmodalFile(obj) { $('#' + obj).data("append", 'my-dropzone');<% Dim url = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "")%> $('#' + obj).data("urlup", '<%= url%>/Ashx/SIGWeb.ashx?Metodo=Uploadfile'); @@ -481,38 +381,92 @@ ADDropzone(obj); $('#dropmodal').modal(); } - function ValidateCant(variable) { + function ValidateCant(opcion, cve) { - var txt = $(variable); - var max = txt.data('cantidad'); - var value = parseInt(txt.val()); - if (value > max) { - txt.val(max); + var txtimporte = $('.txtimporte[data-cve="' + cve + '"]'); + var txtPorcentaje = $('.txtporcentaje[data-cve="' + cve + '"]'); + var txtCantidad = $('.txtcant[data-cve="' + cve + '"]'); + + var max = parseFloat(txtCantidad.data('cantidad')); + var pu = parseFloat(txtCantidad.data('pu')); + var cantidad = parseFloat(txtCantidad.val()); + + + + + if (!Math.round10) { + Math.round10 = function (value, exp) { + return decimalAdjust('round', value, exp); + }; + } + + if (opcion == 2) { + + if (txtimporte.val().toString().length > 0) { + + var importe = parseFloat(txtimporte.val()); + cantidad = parseFloat(importe / pu); + txtCantidad.val(cantidad); + + }else{ + cantidad = 0.0 + txtCantidad.val(''); + + } } - if (value < 0) { - txt.val(0); + + if (opcion == 3) { + + if (txtPorcentaje.val().toString().length > 0) { + var porcentaje = parseFloat(txtPorcentaje.val()); + cantidad = (porcentaje * max / 100); + txtCantidad.val(cantidad); + } else { + cantidad = 0; + txtCantidad.val(''); + } } - var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]'); - importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu'))); - //FormatoMoneda2(importe); + if (cantidad > max) { + txtCantidad.val(max); + cantidad = max; + } + if (cantidad < 0) { + txtCantidad.val(0); + } - //if (parseInt(txt.val()) > 0) { - - // $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden"); - - //} else { - - // var ocultar = $($(txt.parent()).parent()).find(".linkfile"); - - // if (!ocultar.hasClass("hidden")) { - // ocultar.addClass("hidden"); - // } - //} + if (cantidad > 0) { + txtimporte.val(cantidad * pu); + txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); + } else { + txtimporte.val(''); + txtPorcentaje.val(''); + } + + } - //); + + function decimalAdjust(type, value, exp) { + // Si el exp no está definido o es cero... + if (typeof exp === 'undefined' || +exp === 0) { + return Math[type](value); + } + value = +value; + exp = +exp; + // Si el valor no es un número o el exp no es un entero... + if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) { + return NaN; + } + // Shift + value = value.toString().split('e'); + value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp))); + // Shift back + value = value.toString().split('e'); + return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp)); + } + diff --git a/Contratos/ContratoAvance.aspx.vb b/Contratos/ContratoAvance.aspx.vb index 15d5ccce3..a2271dff1 100644 --- a/Contratos/ContratoAvance.aspx.vb +++ b/Contratos/ContratoAvance.aspx.vb @@ -136,10 +136,8 @@ Partial Class Contratos_ContratoAvance Private Sub CargaContrato() DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}")) - DdlContratos.DataBind() - - 'DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}")) - 'DDlContratosEstimaciones.DataBind() + DdlContratos.DataBind() + End Sub @@ -189,8 +187,16 @@ Partial Class Contratos_ContratoAvance e.Row.FCTextBox("TxtCantidad").Visible = (fecha = "") e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "") - If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then + If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then + e.Row.FCTextBox("TxtCantidad").Visible = False + e.Row.FCTextBox("TxtImporte").Visible = False + e.Row.FCTextBox("TxtPorcentaje").Visible = False + + + + + 'txtimporte e.Row.FCLinkButton("LnkAnexo").Visible = False If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then @@ -221,9 +227,17 @@ Partial Class Contratos_ContratoAvance LnkGuardarAvance.Visible = True + e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"ValidateCant(1,{e.Row.DataKey("CveContratoDetalle")})") + e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"ValidateCant(2,{e.Row.DataKey("CveContratoDetalle")})") + e.Row.FCTextBox("TxtPorcentaje").Attributes.Add("onkeyup", $"ValidateCant(3,{e.Row.DataKey("CveContratoDetalle")})") + + If e.Row.DataKey("CantidadMax").ToDouble = 0 Then LnkAnexo.Visible = False e.Row.FCTextBox("TxtCantidad").Visible = False + e.Row.FCTextBox("TxtImporte").Visible = False + e.Row.FCTextBox("TxtPorcentaje").Visible = False + LnkGuardarAvance.Visible = False End If diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index 6efbb60f6..d004923ae 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -740,7 +740,7 @@
- + @@ -962,7 +962,7 @@ - + diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 43ff3f4ee..7f2e52877 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -953,6 +953,13 @@ Partial Class Contratos_ContratoObra Exit Sub End If + If TxtPorAmortizacionAnticipo.Text.ToDecimal < TxtPorAnticipo.Text.ToDecimal Then + Alert("El porcentaje de amortización no debe de ser menor al porcentaje de anticipo.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + Dim TieneError = False Dim Modificado = False ' Dim Extension = Session("FileExtension").ToString diff --git a/Empresas/119/Formatos/Nomina.rdlc b/Empresas/119/Formatos/Nomina.rdlc index 23240a972..84d07c8ba 100644 --- a/Empresas/119/Formatos/Nomina.rdlc +++ b/Empresas/119/Formatos/Nomina.rdlc @@ -179,7 +179,7 @@ Clave @@ -213,7 +213,7 @@ Concepto @@ -247,7 +247,7 @@ Importe @@ -262,7 +262,7 @@ @@ -656,8 +656,8 @@ DsOC - 8.8134cm - 0.14687cm + 7.70215cm + 0.15979cm 2.05138cm 10.0953cm @@ -773,7 +773,7 @@ Concepto @@ -807,7 +807,7 @@ Importe @@ -822,7 +822,7 @@ @@ -1100,7 +1100,6 @@ es-MX - true @@ -1235,8 +1234,8 @@ DataSet1 - 8.8156cm - 10.24218cm + 7.70435cm + 10.2551cm 2.05606cm 9.79494cm 1 @@ -1246,474 +1245,6 @@ - - - - Database - =First(Fields!ImagenByte.Value, "dsImagenes") - image/png - FitProportional - 0.27213in - 0.20622in - 1.30194in - 1.48366in - - - - - - - - - 7.3669cm - - - 7.37355cm - - - - - 0.6cm - - - - - true - true - - - - - Éste documento es una representación impresa de un CFDi - - - - - - - Textbox258 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Sello digital del emisor - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!SelloDigitalEmisor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Sello dígital del SAT: - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!SelloDigitalSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Cadena Original del timbre - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.57354cm - - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.44125cm - - - - - true - true - - - - - Versión del comprobante: 3.3 - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Versión del complemento: 1.2 - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Usos del CFDI "P01"(Por definir) - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - dsImagenes - 0.11768cm - 5.05803cm - 5.21479cm - 14.74045cm - 1 - - - - - - true - 13.41609cm - 0.14687cm - 5.61496cm - 19.90317cm - 2 - - - - true true @@ -1738,7 +1269,7 @@ AJA850608L7A @@ -1769,7 +1300,7 @@ =Parameters!RegistroPatronal.Value @@ -1833,7 +1364,7 @@ Lugar de expedición: 83220 Hermosillo - 0.49417cm + 0.38834cm @@ -1847,7 +1378,7 @@ Lugar de expedición: 83220 Hermosillo @@ -1915,7 +1446,7 @@ Lugar de expedición: 83220 Hermosillo SubTotal @@ -1977,7 +1508,7 @@ Lugar de expedición: 83220 Hermosillo - 0.52062cm + 0.44125cm @@ -1991,7 +1522,7 @@ Lugar de expedición: 83220 Hermosillo Folio Fiscal @@ -2059,7 +1590,7 @@ Lugar de expedición: 83220 Hermosillo Descuentos @@ -2094,7 +1625,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Descuentos.Value @@ -2121,7 +1652,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.44125cm @@ -2135,7 +1666,7 @@ Lugar de expedición: 83220 Hermosillo No. Certificado del SAT @@ -2170,7 +1701,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!CertificadoSAT.Value @@ -2203,7 +1734,7 @@ Lugar de expedición: 83220 Hermosillo Retenciones @@ -2243,7 +1774,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!ISR.Value @@ -2274,7 +1805,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.44125cm @@ -2288,7 +1819,7 @@ Lugar de expedición: 83220 Hermosillo Fecha de certificación @@ -2355,7 +1886,7 @@ Lugar de expedición: 83220 Hermosillo TOTAL @@ -2389,6 +1920,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Total.Value @@ -2432,2437 +1964,11 @@ Lugar de expedición: 83220 Hermosillo DsOC - 10.97749cm - 0.14687cm - 2.21479cm + 9.86624cm + 0.15979cm + 1.71208cm 19.89025cm - 4 - - - - - - - - - 2.2642cm - - - 2.11107cm - - - 2.2102cm - - - 2.57342cm - - - 4.85068cm - - - 2.633cm - - - 3.2606cm - - - - - 0.49417cm - - - - - true - true - - - - - DATOS DEL EMPLEADO - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 7 - - - - - - - - - - - - 0.46771cm - - - - - true - true - - - - - No Empleado - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!NoEmpleado.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Nombre - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!NombreCompleto.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - NSS - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!NSS.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - RFC - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!RFC.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Régimen - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Regimen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Departamento - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Departamento.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - CURP - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!CURP.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Riesgo Puesto - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!RiesgoPuesto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Puesto - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Puesto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - INFORMACION LABORAL - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 7 - - - - - - - - - - - - 0.4677cm - - - - - true - true - - - - - Contrato - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Contrato.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Jornada - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Jornada.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salario Base - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SalarioBase.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - Dias Pagados - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasPagados.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Periodo - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Periodo.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salario Diario Int - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SalarioDiarioInt.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - Fecha ingreso - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaIngreso.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44124cm - - - - - true - true - - - - - PAGO - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 7 - - - - - - - - - - - - 0.44125cm - - - - - true - true - - - - - Banco - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Banco.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Método de Pago - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!MetodoPago.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha Inicio - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaInicio.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - CLABE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!CLABE.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Forma de Pago - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha Fin - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaFin.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - - - true - true - - - - - Clave - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Precio Unit. - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49416cm - - - - - true - true - - - - - =Parameters!Clave.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Cantidad.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Unidad.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - MXN - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Descripcion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!PU.Value - - - - - - - Textbox103 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox110 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 2.58974cm - 0.14687cm - 6.13311cm - 19.90317cm - 5 + 3 @@ -4877,7 +1983,7 @@ Lugar de expedición: 83220 Hermosillo 0.29576cm 2.1513cm 3.93798cm - 6 + 4 @@ -4896,7 +2002,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.51659cm @@ -4909,7 +2015,7 @@ Lugar de expedición: 83220 Hermosillo Recibo Nómina @@ -4944,7 +2050,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!ReciboNomina.Value @@ -4969,7 +2075,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.50702cm @@ -4983,7 +2089,7 @@ Lugar de expedición: 83220 Hermosillo Serie @@ -5018,7 +2124,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Serie.Value @@ -5058,7 +2164,7 @@ Lugar de expedición: 83220 Hermosillo Fecha @@ -5092,7 +2198,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Fecha.Value @@ -5131,7 +2237,7 @@ Lugar de expedición: 83220 Hermosillo Tipo de comprobante @@ -5164,7 +2270,9 @@ Lugar de expedición: 83220 Hermosillo N - @@ -5241,7 +2349,7 @@ Lugar de expedición: 83220 Hermosillo Recibí de la empresa arriba mencionada, la cantidad neta a que este documento, se refiere, estando conforme con las Percepciones y deducciones que en el aparecen especificados. @@ -5259,37 +2367,10 @@ Lugar de expedición: 83220 Hermosillo 2pt + 2 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -5444,10 +2525,464 @@ Lugar de expedición: 83220 Hermosillo DsOC - 19.20744cm - 0.14687cm + 17.07534cm + 0.15979cm 1.12062cm 19.89024cm + 6 + + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png + FitProportional + 4.64173in + 0.068in + 1.30194in + 1.48366in + 7 + + + + + + + + + 7.90238cm + + + 8.04297cm + + + + + 0.6cm + + + + + true + true + + + + + Éste documento es una representación impresa de un CFDi + + + + + + + Textbox258 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Sello digital del emisor + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!SelloDigitalEmisor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Sello dígital del SAT: + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!SelloDigitalSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Cadena Original del timbre + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.57354cm + + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.44125cm + + + + + true + true + + + + + Versión del comprobante: 3.3 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Versión del complemento: 1.2 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Usos del CFDI "P01"(Por definir) + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + dsImagenes + 11.78999cm + 4.13053cm + 5.21479cm + 15.94535cm 8 + + + + + 2.2642cm + + + 2.11107cm + + + 2.2102cm + + + 2.57342cm + + + 2.70756cm + + + 2.08963cm + + + 2.633cm + + + 3.2606cm + + + + + 0.49417cm + + + + + true + true + + + + + DATOS DEL EMPLEADO + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.41479cm + + + + + true + true + + + + + No Empleado + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NoEmpleado.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NombreCompleto.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + NSS + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NSS.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + RFC + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!RFC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Régimen + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Regimen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Departamento + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Departamento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + CURP + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CURP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Riesgo Puesto + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!RiesgoPuesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Puesto + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Puesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + + + true + true + + + + + INFORMACION LABORAL + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.38832cm + + + + + true + true + + + + + Jornada + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Jornada.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Contrato + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Contrato.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Periodo + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Periodo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + Dias Pagados + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!DiasPagados.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha ingreso + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaIngreso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salario Base + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SalarioBase.Value + + + + + + + Textbox166 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salario Diario Int + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SalarioDiarioInt.Value + + + + + + + Textbox159 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44124cm + + + + + true + true + + + + + PAGO + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.36187cm + + + + + true + true + + + + + Banco + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Banco.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Método de Pago + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!MetodoPago.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Fecha Inicio + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaInicio.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + CLABE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CLABE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Forma de Pago + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Fecha Fin + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaFin.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + Clave + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Precio Unit. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49416cm + + + + + true + true + + + + + =Parameters!Clave.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Unidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MXN + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox103 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox110 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 2.51578cm + 0.15979cm + 5.0304cm + 19.84967cm + 9 + + + + - 20.50445cm + 18.41425cm - - -
  • - - Volver a Consultar - -
  • -
    - -
    - - - - - - + + +
    + + - - - + + + + diff --git a/GPS/RepGeoReferencias.aspx.vb b/GPS/RepGeoReferencias.aspx.vb index b322bcf74..3c4c9a164 100644 --- a/GPS/RepGeoReferencias.aspx.vb +++ b/GPS/RepGeoReferencias.aspx.vb @@ -12,6 +12,14 @@ Partial Class GPS_RepGeoReferencias Set(value As Integer) ViewState("CveGeoReferencia") = value End Set + End Property + Private Property DtGeoReferencias As DataTable + Get + Return CType(ViewState("DtGeoReferencias"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtGeoReferencias") = value + End Set End Property Private Property DtPosiciones As DataTable Get @@ -49,13 +57,27 @@ Partial Class GPS_RepGeoReferencias Private Sub CargaGeoReferencias() Dim Estatus = If(ChkEstatusGeocerca.Checked, 1, 0) - Dim GPS As New ClsGPS - If GPS.GeoReferenciaGet(-1, Estatus, "-1", UsuarioActual.CveCliente) Then - GVGeoreferencias.DataSource = GPS.DtResultados - Else - GVGeoreferencias.DataSource = Nothing + + Using GPS As New ClsGPS + If GPS.GeoReferenciaGet(-1, Estatus, "-1", UsuarioActual.CveCliente) Then + DtGeoReferencias = GPS.DtResultados.Copy() + End If + End Using + + If DtGeoReferencias IsNot Nothing Then + Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count + Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize + If TotalRegistros > TotalRowsPage Then + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(0, TotalRowsPage - 1) + DivPaginacion.Visible = True + LblRegistros.Text = $"Distribución de datos desde 0 hasta {TotalRowsPage.ToString().ToDecimal().FormatoNumero(0)}. Total de registros: {TotalRegistros.ToString().ToDecimal().FormatoNumero(0)}" + Else + GVGeoreferencias.DataSource = DtGeoReferencias + End If + Else + GVGeoreferencias.DataSource = DtGeoReferencias End If - GPS.Dispose() + GVGeoreferencias.DataBind() End Sub Private Sub CargaDispositivos() @@ -190,16 +212,11 @@ Partial Class GPS_RepGeoReferencias TxtHoraF.Text = GvRow.DataKey("HoraFin").ToString.ToDateTime.ToString("HH:mm") Using ObjGPS As New ClsGPS - If ObjGPS.GetReferenciaDetalle(-1, CveGeoReferencia, -1, UsuarioActual.CveCliente) Then - If ObjGPS.DtResultados.Rows.Count > 0 Then - DtDetalle = ObjGPS.DtResultados - GvEquiposDetalle.DataSource = DtDetalle - Else - DtDetalle = Nothing - DtDetalleEliminar = Nothing - GvEquiposDetalle.DataSource = Nothing - End If - + If ObjGPS.GetReferenciaDetalle(-1, CveGeoReferencia, -1, UsuarioActual.CveCliente) Then + DtDetalle = ObjGPS.DtResultados.Copy() + DtDetalleEliminar = ObjGPS.DtResultados.Copy() + + GvEquiposDetalle.DataSource = DtDetalle End If End Using GvEquiposDetalle.DataBind() @@ -239,27 +256,22 @@ Partial Class GPS_RepGeoReferencias Dim HoraF As Date = ($"{Date.Now.ToString("dd/MM/yyyy")} {TxtHoraF.Text}").ToDate If ObjGPS.GeoReferenciaUpdate(CveGeoReferencia, TxtNombre.Text, -1, chkEstatus.Checked, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, - chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then - - For Each Dr As DataRow In DtDetalle.Rows - Dim CveGeoReferenciaDetalle = Dr("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero - If CveGeoReferenciaDetalle > 0 Then - If Not ObjGPS.UpdateReferenciaDetalle(CveGeoReferenciaDetalle, CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then - TieneError = True - Exit For - End If - Else - If Not ObjGPS.AddGeoReferenciaDetalle(CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then - TieneError = True - Exit For - End If - End If - Next + chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then If Not TieneError Then For Each DrE As DataRow In DtDetalleEliminar.Rows - TieneError = Not ObjGPS.RemoveferenciaDetalle(DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero) + If DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero > 0 Then + TieneError = Not ObjGPS.RemoveferenciaDetalle(DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero) + End If Next End If + + For Each Dr As DataRow In DtDetalle.Rows + If Not ObjGPS.AddGeoReferenciaDetalle(CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then + TieneError = True + Exit For + End If + Next + Else TieneError = True End If @@ -336,14 +348,15 @@ Partial Class GPS_RepGeoReferencias Dim Dr As DataRow = DtDetalle.Rows(e.RowIndex) Dim CveGeoReferenciaDetalle = Dr("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero If CveGeoReferenciaDetalle > 0 Then - - Dim DrEliminar = DtDetalleEliminar.NewRow - DrEliminar("CveDispositivoGeoreferenciaDetalle") = CveGeoReferenciaDetalle - DrEliminar("CveDispositivo") = Dr("CveDispositivo").ToString.ToEntero - DrEliminar("NoEconomico") = Dr("NoEconomico").ToString - DtDetalleEliminar.Rows.Add(DrEliminar) - DtDetalleEliminar.AcceptChanges() - + If DtDetalleEliminar.COUNT("CveDispositivo", $"CveDispositivoGeoreferenciaDetalle={CveGeoReferenciaDetalle}") <= 0 Then + Dim DrEliminar = DtDetalleEliminar.NewRow + DrEliminar("CveDispositivoGeoreferenciaDetalle") = CveGeoReferenciaDetalle + DrEliminar("CveDispositivo") = Dr("CveDispositivo").ToString.ToEntero + DrEliminar("NoEconomico") = Dr("NoEconomico").ToString + DtDetalleEliminar.Rows.Add(DrEliminar) + DtDetalleEliminar.AcceptChanges() + End If + End If DtDetalle.Rows.RemoveAt(e.RowIndex) @@ -415,5 +428,63 @@ Partial Class GPS_RepGeoReferencias Protected Sub ChkEstatusGeocerca_CheckedChanged(sender As Object, e As EventArgs) CargaGeoReferencias() + End Sub + + Protected Sub btnPagePrev_Click(sender As Object, e As EventArgs) + Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count + Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize + Dim PrevIndex As Integer = HdnIndexPage.Value.ToEntero - 1 + Dim CurrentIndex As Integer = PrevIndex + 1 + + Dim PrevIndexDT As Integer = (TotalRowsPage) * PrevIndex + Dim CurrentIndexDT As Integer = (TotalRowsPage) * CurrentIndex + + HdnIndexPage.Value = PrevIndex.ToString + + If Not btnPageNext.Enabled Then + btnPageNext.Enabled = True + End If + + If PrevIndexDT <= 0 Then + btnPagePrev.Enabled = False + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(0, CurrentIndexDT) + LblRegistros.Text = $"Distribución de datos desde 0 hasta {CurrentIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + Else + LblRegistros.Text = $"Distribución de datos desde {PrevIndexDT.ToString.FormatoNumero(0)} hasta {CurrentIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(PrevIndexDT, CurrentIndexDT) + End If + + GVGeoreferencias.DataBind() + UPGV.Update() + + End Sub + + Protected Sub btnPageNext_Click(sender As Object, e As EventArgs) + Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count + Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize + Dim Index As Integer = HdnIndexPage.Value.ToEntero + 1 + Dim NextIndex As Integer = Index + 1 + + Dim CurrentIndexDT As Integer = (TotalRowsPage) * Index + Dim NextIndexDT As Integer = (TotalRowsPage) * NextIndex + + HdnIndexPage.Value = Index.ToString + + If Not btnPagePrev.Enabled Then + btnPagePrev.Enabled = True + End If + + If NextIndexDT >= TotalRegistros Then + btnPageNext.Enabled = False + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(CurrentIndexDT, TotalRegistros - 1) + LblRegistros.Text = $"Distribución de datos desde {CurrentIndexDT.ToString.FormatoNumero(0)} hasta {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + Else + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(CurrentIndexDT, NextIndexDT) + LblRegistros.Text = $"Distribución de datos desde {CurrentIndexDT.ToString.FormatoNumero(0)} hasta {NextIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + End If + + GVGeoreferencias.DataBind() + UPGV.Update() + End Sub End Class diff --git a/Nomina/CatPeriodos.aspx b/Nomina/CatPeriodos.aspx index 840cf8ad8..3bad19558 100644 --- a/Nomina/CatPeriodos.aspx +++ b/Nomina/CatPeriodos.aspx @@ -8,350 +8,385 @@ - Catálogo de Periodos + Catálogo de periodos - - - - - - - - - - - - - - - - - - - - <%----%> - <%-- --%> - - - - - - - - - - - - - - - - - - - - -
    - - Tipo - - - - - Ej. - - - - - Mes - - - - - No. - - - - - Fecha Ini - - - - - Fecha Fin - - - - - Ini. Mes - - - - - Fin Mes - - - - - Ini. SS - - - - - Fin SS - - - - - Ini. Año - - - - - Fin Año - - - - - Calculado - - - - - Estatus - - -   Comandos
    - - - - - - - - <%-- - --%> - - - <%-- - --%> - - - - - - -   - - - - - -   - -   - - -   - - - - - -   - -   - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- +
    +
    +
    + + Periodos +
    + +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + <%----%> + <%-- --%> + + + + + + + + + + + + + + + + + + + + +
    + + Tipo + + + + + Ej. + + + + + Mes + + + + + No. + + + + + Fecha Ini + + + + + Fecha Fin + + + + + Ini. Mes + + + + + Fin Mes + + + + + Ini. SS + + + + + Fin SS + + + + + Ini. Año + + + + + Fin Año + + + + + Calculado + + + + + Estatus + + + Comandos
    + + + + + + + + <%-- + --%> + + + <%-- + --%> + + + + + + +
    + + + + +
    + + + + + + + + +
    +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> - <%-- + <%-- --%> - - -
    - -   -
    -
    - - - -
    - - - - - -
    - - -
    -
    -
    + + +
    + + +
    +
    + +
    + +
    +
    +
    + + +
    + +
    +
    +
    + + + + + + +
    +
    + diff --git a/Nomina/CatPeriodos.aspx.vb b/Nomina/CatPeriodos.aspx.vb index b718791a8..a2fff6cc9 100644 --- a/Nomina/CatPeriodos.aspx.vb +++ b/Nomina/CatPeriodos.aspx.vb @@ -62,14 +62,14 @@ Partial Class Nomina_CatPeriodos If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, ChkEsInicioSS.Checked, ChkEsFinAño.Checked, ChkEsInicioAño.Checked, ChkEsFinAño.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion) - UpTitulos.Update() - ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + UpDatos.Update() + ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados - - If ViewState("Orden").ToString() <> String.Empty Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") + CargaDatos() + If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then + CargaGrid(ViewState("Orden").ToString()) + Else + CargaGrid("") End If End If @@ -87,22 +87,22 @@ Partial Class Nomina_CatPeriodos Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 0 Then - e.Row.Cells(0).Width = Unit.Pixel(100) - e.Row.Cells(1).Width = Unit.Pixel(80) - e.Row.Cells(2).Width = Unit.Pixel(80) - e.Row.Cells(3).Width = Unit.Pixel(80) - e.Row.Cells(4).Width = Unit.Pixel(100) - e.Row.Cells(5).Width = Unit.Pixel(100) - e.Row.Cells(6).Width = Unit.Pixel(80) - e.Row.Cells(7).Width = Unit.Pixel(80) - e.Row.Cells(8).Width = Unit.Pixel(80) - e.Row.Cells(9).Width = Unit.Pixel(80) - e.Row.Cells(10).Width = Unit.Pixel(80) - e.Row.Cells(11).Width = Unit.Pixel(80) - e.Row.Cells(12).Width = Unit.Pixel(80) - e.Row.Cells(13).Width = Unit.Pixel(100) - e.Row.Cells(14).Width = Unit.Pixel(53) - e.Row.Cells(15).Width = Unit.Pixel(68) + 'e.Row.Cells(0).Width = Unit.Pixel(100) + 'e.Row.Cells(1).Width = Unit.Pixel(80) + 'e.Row.Cells(2).Width = Unit.Pixel(80) + 'e.Row.Cells(3).Width = Unit.Pixel(80) + 'e.Row.Cells(4).Width = Unit.Pixel(100) + 'e.Row.Cells(5).Width = Unit.Pixel(100) + 'e.Row.Cells(6).Width = Unit.Pixel(80) + 'e.Row.Cells(7).Width = Unit.Pixel(80) + 'e.Row.Cells(8).Width = Unit.Pixel(80) + 'e.Row.Cells(9).Width = Unit.Pixel(80) + 'e.Row.Cells(10).Width = Unit.Pixel(80) + 'e.Row.Cells(11).Width = Unit.Pixel(80) + 'e.Row.Cells(12).Width = Unit.Pixel(80) + 'e.Row.Cells(13).Width = Unit.Pixel(100) + 'e.Row.Cells(14).Width = Unit.Pixel(53) + 'e.Row.Cells(15).Width = Unit.Pixel(68) 'e.Row.Cells(15).Width = Unit.Pixel(100) End If e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left diff --git a/Nomina/Finiquito.aspx b/Nomina/Finiquito.aspx index c2112291a..89572f6d0 100644 --- a/Nomina/Finiquito.aspx +++ b/Nomina/Finiquito.aspx @@ -81,7 +81,9 @@ - + + +
    <%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%> @@ -370,7 +372,7 @@
    - + +
    +