diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index 388666a47..b92dc28d8 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -1646,12 +1646,14 @@ Public Class ClsCompProveedores Return Retorno End Function - Public Function GetTiposContratosDcumentos(CveEmpresa As Integer) As Boolean + Public Function GetTiposContratosDcumentos(CveEmpresa As Integer, Optional CveDocumentacion As Integer = -1, Optional CveTipoContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Prov_SAT_CatTipoContratosDocumentosGet") With SqlAdapter.SelectCommand.Parameters + .Add("@CveDocumentacion", SqlDbType.Int).Value = CveDocumentacion + .Add("@CveTipoContrato", SqlDbType.Int).Value = CveTipoContrato .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -1756,7 +1758,7 @@ Public Class ClsCompProveedores End Function - Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean + Public Function GetContrato(CveContrato As Integer, CveSubProyecto As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveRepresentanteLegal As Integer, Estatus As Integer, CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean Dim Retorno As Boolean = False @@ -1771,6 +1773,10 @@ Public Class ClsCompProveedores .Add("@CveRepresentanteLegal", SqlDbType.Int).Value = CveRepresentanteLegal .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + + End With diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index f99963785..b236d68a4 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -2056,7 +2056,7 @@ Namespace Extensiones End Sub - Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, FechaIMes As String, FechaFMes As String, Titulo As String, SubProyecto As String, Divisor As Integer, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional DatoTituloExtra As String ="") + Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, FechaIMes As String, FechaFMes As String, Titulo As String, SubProyecto As String, Divisor As Integer, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional DatoTituloExtra As String = "") Dim sw1 As New StringWriter() Dim htw1 As New HtmlTextWriter(sw1) @@ -2113,13 +2113,16 @@ Namespace Extensiones RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex) - RangoFechas.Merged = True - RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}" - RangoFechas.Style.Font.Size = 15 * 20 - RangoFechas.Style.Font.Name = "Calibri Light" - RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center - RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + If FechaIMes.Trim.Length > 0 And FechaFMes.Trim.Length > 0 Then + Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex) + RangoFechas.Merged = True + RangoFechas.Value = $"Fechas: {FechaIMes} a {FechaFMes}" + RangoFechas.Style.Font.Size = 15 * 20 + RangoFechas.Style.Font.Name = "Calibri Light" + RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + End If If SubProyecto.Length > 0 Then diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 52c0ff298..64f2539fc 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -784,7 +784,7 @@ <%----%> - + diff --git a/Edoc/CatDocumentosContratos.aspx b/Edoc/CatDocumentosContratos.aspx index 357a66069..42b20da14 100644 --- a/Edoc/CatDocumentosContratos.aspx +++ b/Edoc/CatDocumentosContratos.aspx @@ -20,10 +20,70 @@ - + + + +
+
+ +
+ + "> + +
+
+
+ + + + +
Documento:
+
+ + +
+ +
Tipo Contrato:
+
+ + Todos + +
+ +
+
+
+ <%--
+
+ +
Estatus:
+
+ + + Todos + Vigente + Rescindido + Suspendido + Terminado + + +
+
+
--%> + +
+ + + <%-- + + + --%> + + + diff --git a/Edoc/CatDocumentosContratos.aspx.vb b/Edoc/CatDocumentosContratos.aspx.vb index 9d9e86c54..9bce2a167 100644 --- a/Edoc/CatDocumentosContratos.aspx.vb +++ b/Edoc/CatDocumentosContratos.aspx.vb @@ -11,17 +11,53 @@ Partial Class Edoc_CatDocumentosContratos Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then + CargaDropDownList() CargaDatos() End If End Sub + Private Sub CargaDropDownList() + + + + Dim ObjProveedor As New ClsCompProveedores + + + If ObjProveedor.GetTiposContratos(-1, UsuarioActual.CveEmpresa, 1) Then + DdlTipoContratoFiltro.DataSource = ObjProveedor.DtResultados + End If + + + + ObjProveedor.Dispose() + + DdlTipoContratoFiltro.DataBind() + DdlTipoContratoFiltro.Items.Insert(0, New ListItem("Todos", "-1")) + + + Dim ObjEdoc As New ClsEdocumentacion + + If ObjEdoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa, 3) Then + DdlDocumentacion.DataSource = ObjEdoc.DtResultados + Else + DdlDocumentacion.DataSource = Nothing + End If + + ObjEdoc.Dispose() + + DdlDocumentacion.DataBind() + DdlDocumentacion.Items.Insert(0, New ListItem("Todos", "-1")) + + End Sub + + Private Sub CargaDatos() Dim ObjProv As New ClsCompProveedores - If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa) Then + If ObjProv.GetTiposContratosDcumentos(UsuarioActual.CveEmpresa, DdlDocumentacion.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjProv.DtResultados Else GvDatos.DataSource = Nothing @@ -30,7 +66,7 @@ Partial Class Edoc_CatDocumentosContratos ObjProv.Dispose() GvDatos.DataBind() - + UpDatos.Update() End Sub @@ -49,4 +85,7 @@ Partial Class Edoc_CatDocumentosContratos End Sub + Protected Sub btConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + End Sub End Class diff --git a/Edoc/Contratos.aspx b/Edoc/Contratos.aspx index ca690e7c6..37f211cec 100644 --- a/Edoc/Contratos.aspx +++ b/Edoc/Contratos.aspx @@ -71,23 +71,47 @@ - <%--
+
-
Estatus:
-
- - - Todos - Vigente - Rescindido - Suspendido - Terminado +
+ Fecha Inicio: +
+
+
+ + + + +
+ + + + + + +
+
+ Fecha Fin: +
+
+
+ + + + +
+ + + + + + +
+ -
-
-
--%> +
diff --git a/Edoc/Contratos.aspx.vb b/Edoc/Contratos.aspx.vb index 87fd7d107..84904c884 100644 --- a/Edoc/Contratos.aspx.vb +++ b/Edoc/Contratos.aspx.vb @@ -37,6 +37,9 @@ Partial Class Proveedores_Contratos CargaCombos() CargaDatos() + txtFechaI.Text = $"01/01/{Now.Year}" + txtFechaF.Text = $"31/12/{Now.AddYears(3).Year}" + End If @@ -47,7 +50,7 @@ Partial Class Proveedores_Contratos Dim ObjProv As New ClsCompProveedores - If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then + If ObjProv.GetContrato(-1, DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlProveedorFiltro.SelectedValue.ToEntero, DdlTipoContratoFiltro.SelectedValue.ToEntero, -1, -1, UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate) Then GvDatos.DataSource = ObjProv.DtResultados DtDatos = ObjProv.DtResultados Else diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index f21672890..55bb728e8 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -290,8 +290,9 @@ Partial Class Inventarios_EntradasSalidas TxtFecha.Text = Now.ToShortDateString RVFecha.MaximumValue = Now.ToShortDateString - If Not UsuarioActual.CveEmpresa = 41 Then + If Not UsuarioActual.CveEmpresa = 48 Then TxtFecha.Enabled = False + ImgFecha.Visible = False End If