diff --git a/AF/CatClasificacionesCaracteristicas.aspx.vb b/AF/CatClasificacionesCaracteristicas.aspx.vb index fbdc75167..d67d76f89 100644 --- a/AF/CatClasificacionesCaracteristicas.aspx.vb +++ b/AF/CatClasificacionesCaracteristicas.aspx.vb @@ -53,8 +53,8 @@ Partial Class AF_CatClasificacionesCaracteristicas 'Carga Globals para DT CargaTiposActivosFijos() CargaSubTiposActivosFijos() - CargaCaracteristicasClasificaciones() - CargaCaracteristicas() + ''CargaCaracteristicasClasificaciones() + 'CargaCaracteristicas() End If End Sub @@ -77,30 +77,6 @@ Partial Class AF_CatClasificacionesCaracteristicas ObjAF.Dispose() End Sub - Private Sub CargaCaracteristicasClasificaciones() - Dim ObjAF As New ClsAF - - If ObjAF.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then - - ViewState("DTCaracteristicaClasificacion") = ObjAF.DtResultados - Else - Alert("Ocurrio un error al obtener las caracteristicas clasificaciones de Activos Fijos", TipoMensaje.MsgError) - End If - - ObjAF.Dispose() - End Sub - Private Sub CargaCaracteristicas() - 'Dim ObjAF As New ClsAF - - 'If ObjAF.GetCaracteristicas(UsuarioActual.CveEmpresa) Then - ' GlobalDTAFCaracteristicas = ObjAF.DtResultados - 'Else - ' Alert("Ocurrio un error al obtener las caracteristicas de Activos Fijos", TipoMensaje.MsgError) - 'End If - - 'ObjAF.Dispose() - End Sub - #Region "CLASIFICACIONES" Protected Sub LbAgregarCL_Click(sender As Object, e As System.EventArgs) Handles LbAgregarCL.Click Dim ObjCaracteristicaClasificacion As New ClsAF @@ -111,7 +87,6 @@ Partial Class AF_CatClasificacionesCaracteristicas UpTitulosCL.Update() CargaSubTiposActivosFijos() - CargaCaracteristicasClasificaciones() If ViewState("OrdenCL").ToString() <> String.Empty Then CargaGrid(ViewState("OrdenCL").ToString(), 0) @@ -126,16 +101,6 @@ Partial Class AF_CatClasificacionesCaracteristicas #Region "CARGA DATOS" Public Sub CargaDatosCL() - Dim ObjCaracteristicaClasificacion As New ClsAF - If ObjCaracteristicaClasificacion.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then - ViewState("DTCaracteristicaClasificacion") = ObjCaracteristicaClasificacion.DtResultados - - Else - Me.GvDatosCL.DataSource = Nothing - End If - - ObjCaracteristicaClasificacion.Dispose() - If ViewState("OrdenCL").ToString() <> String.Empty Then CargaGrid(ViewState("OrdenCL").ToString(), 0) Else @@ -184,7 +149,7 @@ Partial Class AF_CatClasificacionesCaracteristicas GvDatosCL.EditIndex = -1 CargaSubTiposActivosFijos() - CargaCaracteristicasClasificaciones() + 'CargaCaracteristicasClasificaciones() Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion) End If @@ -219,7 +184,7 @@ Partial Class AF_CatClasificacionesCaracteristicas GvDatosCL.EditIndex = -1 CargaSubTiposActivosFijos() - CargaCaracteristicasClasificaciones() + 'CargaCaracteristicasClasificaciones() Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) End If @@ -264,11 +229,11 @@ Partial Class AF_CatClasificacionesCaracteristicas Alert("La Nueva Característica de Activo Fijo se guardó correctamente.", TipoMensaje.MsgInformacion) UpTitulosCA.Update() ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa) = Nothing + CargaSubTiposActivosFijos() - CargaCaracteristicasClasificaciones() - CargaCaracteristicas() + ''CargaCaracteristicasClasificaciones() + 'CargaCaracteristicas() If ViewState("OrdenCA").ToString() <> String.Empty Then CargaGrid(ViewState("OrdenCA").ToString(), 1) @@ -281,15 +246,6 @@ Partial Class AF_CatClasificacionesCaracteristicas #Region " CARGA DATOS" Public Sub CargaDatosCA() - Dim ObjCaracteristicas As New ClsAF - If ObjCaracteristicas.GetCaracteristicas(UsuarioActual.CveEmpresa) Then - ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - Else - Me.GvDatosCA.DataSource = Nothing - End If - - ObjCaracteristicas.Dispose() - If ViewState("OrdenCA").ToString() <> String.Empty Then CargaGrid(ViewState("OrdenCA").ToString(), 1) Else @@ -373,7 +329,6 @@ Partial Class AF_CatClasificacionesCaracteristicas Dim ObjCaracteristicas As New ClsAF If ObjCaracteristicas.RemoveCaracteristica(GvDatosCA.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then GvDatosCA.EditIndex = -1 - ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa) = Nothing Alert("La Característica se eliminó correctamente.", TipoMensaje.MsgInformacion) End If @@ -411,7 +366,7 @@ Partial Class AF_CatClasificacionesCaracteristicas If ObjCaracteristicas.UpdateCaracteristica(CveCaracteristicaClasificacion, Caracteristica, CveTipoActivoFijo, CveSubTipoActivoFijo, TipoCampo, Longitud, CBool(Requerida), Orden, Estatus, UsuarioActual.CveEmpresa, CveCaracteristica) Then GvDatosCA.EditIndex = -1 - ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa) = Nothing CargaSubTiposActivosFijos() @@ -741,21 +696,17 @@ Partial Class AF_CatClasificacionesCaracteristicas Private Sub CargaGrid(Orden As String, gvi As Integer) If gvi = 0 Then If Orden <> String.Empty Then - Dim DV As New DataView(CType(ViewState("DTCaracteristicaClasificacion"), DataTable), "", Orden, DataViewRowState.CurrentRows) - GvDatosCL.DataSource = DV.ToTable() - DV.Dispose() + GvDatosCL.DataSource = GlobalDTAFCaracteristicasClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(Nothing, Orden) Else - GvDatosCL.DataSource = CType(ViewState("DTCaracteristicaClasificacion"), DataTable) + GvDatosCL.DataSource = GlobalDTAFCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) End If GvDatosCL.DataBind() UpDatosCL.Update() ElseIf gvi = 1 Then If Orden <> String.Empty Then - Dim DV As New DataView(CType(ViewState("DTCatacteristica"), DataTable), "", Orden, DataViewRowState.CurrentRows) - GvDatosCA.DataSource = DV.ToTable() - DV.Dispose() + GvDatosCA.DataSource = GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa).FiltraParametros(Nothing, Orden) Else - GvDatosCA.DataSource = CType(ViewState("DTCatacteristica"), DataTable) + GvDatosCA.DataSource = GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa) End If GvDatosCA.DataBind() UpDatosCA.Update() diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 9531d6855..7be58e7ef 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -3843,6 +3843,8 @@ Public Class ClsContabilidad Return Retorno End Function + + 'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean Dim Retorno = False @@ -5533,6 +5535,7 @@ Public Class ClsContabilidad Return Retorno End Function + 'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean Dim Retorno = False diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 8bfdbc021..2308f3c28 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -261,6 +261,29 @@ Public Class ClsNominas End Try Return retorno End Function + + 'Reporte Conceptos Acumulados + Public Function GetRepConceptosAcumulados(CveConcepto As Integer, Ejercicio As Integer, CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Nom_ConceptosAcumuladosGetRep") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto + .Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio + .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 Reporte Conceptos Acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function ManifiestoForVtaGet(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, CveEmbarqueManifiesto As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_ManifiestoForVtaGet", CommandType.StoredProcedure) diff --git a/Contabilidad2/MovimientosconProveedores.aspx.vb b/Contabilidad2/MovimientosconProveedores.aspx.vb index 847129b32..a4d29fda1 100644 --- a/Contabilidad2/MovimientosconProveedores.aspx.vb +++ b/Contabilidad2/MovimientosconProveedores.aspx.vb @@ -54,7 +54,7 @@ Partial Class MovimientosconProveedores End Property Private Property CveSubProyecto As Integer Get - CveSubProyecto = ViewState("CveSubProyecto").ToString.ToEntero + CveSubProyecto = ViewState("CveSubProyecto").ToString End Get Set(value As Integer) ViewState("CveSubProyecto") = value @@ -189,7 +189,7 @@ Partial Class MovimientosconProveedores CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero End If - If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, 1) Then + If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin, DdlCuenta.SelectedValue.ToEntero, CveSubProyecto.ToEntero, UsuarioActual.CveEmpresa, TipoReporte, 1) Then If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then DtDatos = ObjConta.DtResultados.FiltraParametros(" SaldoInicial <> 0 OR Cargos <> 0 OR Abonos <> 0") diff --git a/Nomina/ConceptoNomina.aspx b/Nomina/ConceptoNomina.aspx index 5e4827a94..d469c80ac 100644 --- a/Nomina/ConceptoNomina.aspx +++ b/Nomina/ConceptoNomina.aspx @@ -200,12 +200,6 @@
-
-
- - -
-
@@ -216,6 +210,73 @@
+ +
+
+
+ + Provisión +
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ + + + + +
+
+
+
+ +
+
+ + +
+
+
+
+ + + + + +
+
+
+
+
+
+ + +
+
+
+
+ + + + + +
+
+
+
+
+
@@ -348,7 +409,7 @@
- +
diff --git a/Nomina/ConceptoNomina.aspx.cs b/Nomina/ConceptoNomina.aspx.cs index 7347cb4f8..c71b007ca 100644 --- a/Nomina/ConceptoNomina.aspx.cs +++ b/Nomina/ConceptoNomina.aspx.cs @@ -464,11 +464,15 @@ public partial class Nomina_CatConcepto : ClsPaginas ChkEstado.Checked = drow["Estado"].Equals("Activo"); ChkSistema.Checked = drow["Sistema"].Equals("Sí"); ChkAutomaticoLiquidacion.Checked = drow["AplicaFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); + ChkContabiliza.Checked = drow["Contabiliza"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkAutomaticoGlobal.Checked = drow["AutomaticoGlobal"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkEspecie.Checked = drow["Especie"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); ChkImprimir.Checked = drow["Imprimir"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" }); DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]); + DdlTipoProvision.SelectedValueExist(drow["TipoProvision"]); + ddlCargooAbono.SelectedValueExist(drow["CargoOAbono"]); + ddlCargooAbonoB.SelectedValueExist(drow["CargoOAbonoB"]); DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]); //DdlCtaContable.SelectedValueExist(drow["CveCuenta"]); if (DdlCtaContable.DataValueField == "Id") @@ -479,6 +483,14 @@ public partial class Nomina_CatConcepto : ClsPaginas { DdlCtaContable.SelectedValueExist(drow["CveCuenta"]); } + if (DdlCtaContableB.DataValueField == "Id") + { + DdlCtaContableB.SelectedValueExist(drow["IdCtaContableB"]); + } + else + { + DdlCtaContableB.SelectedValueExist(drow["CveCuentaB"]); + } //if (UsuarioActual.Empresa.TipoContabilidad == 1) //{ //} diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 8d0aa1b55..2ebfaa684 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -8466,15 +8466,17 @@ public partial class Nomina_Nomina2 : ClsPaginas DateTime fechai = TxtRIFechaInicio.Text.ToDateTime(); DateTime fechaf = TxtRIFechaFin.Text.ToDateTime(); ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook(); + int CveTipoPeriodo=0; using (ClsNominas nom = new ClsNominas()) { if (nom.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodoSeleccionado, -1) && (nom.DtResultados.Rows.Count > 0)) { fechai = nom.DtResultados.Rows[0]["FechaInicio"].ToString().ToDateTime(); fechaf = nom.DtResultados.Rows[0]["FechaFin"].ToString().ToDateTime(); + CveTipoPeriodo = -nom.DtResultados.Rows[0]["CveTipoPeriodo"].ToString().ToEntero(); } - if (nom.ReportedeincidenciasGET(UsuarioActual.CveEmpresa, fechai, fechaf, -4)) + if (nom.ReportedeincidenciasGET(UsuarioActual.CveEmpresa, fechai, fechaf, CveTipoPeriodo)) { var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[2], "Incidencias"); diff --git a/Nomina/ReportedeAcumulados.aspx b/Nomina/ReportedeAcumulados.aspx index 3bcd6de90..0236e30d8 100644 --- a/Nomina/ReportedeAcumulados.aspx +++ b/Nomina/ReportedeAcumulados.aspx @@ -321,7 +321,14 @@ - + + + + NSS + + + + Registro Patronal diff --git a/Nomina/ReportedeAcumulados.aspx.cs b/Nomina/ReportedeAcumulados.aspx.cs index af8ad6723..6338ae4a3 100644 --- a/Nomina/ReportedeAcumulados.aspx.cs +++ b/Nomina/ReportedeAcumulados.aspx.cs @@ -196,7 +196,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas //string ctipo = "P"; - int CurrentColumn = 4; + int CurrentColumn = 5; BoundField bf; foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows) { @@ -407,13 +407,28 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas libro.Cell(1, column).Value = " "; libro.Cell(2, column).Value = "Codigo"; libro.Cell(3, column).Value = " "; - column++; - libro.Cell(1, column).Value = " "; - libro.Cell(2, column).Value = "Empleado"; - libro.Cell(3, column).Value = " "; - libro.Column(column).Width = 35; + column++; + libro.Cell(1, column).Value = " "; + libro.Cell(2, column).Value = "Empleado"; + libro.Cell(3, column).Value = " "; + libro.Column(column).Width = 35; + column++; + libro.Cell(1, column).Value = " "; + libro.Cell(2, column).Value = "Sucursal"; + libro.Cell(3, column).Value = " "; + libro.Column(column).Width = 35; + column++; + libro.Cell(1, column).Value = " "; + libro.Cell(2, column).Value = "NSS"; + libro.Cell(3, column).Value = " "; + libro.Column(column).Width = 35; + column++; + libro.Cell(1, column).Value = " "; + libro.Cell(2, column).Value = "Registro Patronal"; + libro.Cell(3, column).Value = " "; + libro.Column(column).Width = 35; - int iniciotipe = column; + int iniciotipe = column; foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Rows) { @@ -520,11 +535,17 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas } column = 1; libro.Cell(Fila, column).Value = string.Format("'{0}",erow["Codigo"]); - column++; - if (newsubproyecto) { libro.Cell(Fila - 3, column).Value = string.Format("Total {0}", subproyectoold); } - if (newsubproyectoTitulo) { libro.Cell(Fila - 1, column).Value = subproyecto; subproyectoold = subproyecto; } - libro.Cell(Fila, column).Value = erow["Nombre"]; - foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ").Rows) + column++; + if (newsubproyecto) { libro.Cell(Fila - 3, column).Value = string.Format("Total {0}", subproyectoold); } + if (newsubproyectoTitulo) { libro.Cell(Fila - 1, column).Value = subproyecto; subproyectoold = subproyecto; } + libro.Cell(Fila, column).Value = erow["Nombre"]; + column++; + libro.Cell(Fila, column).Value = erow["SubProyecto"]; + column++; + libro.Cell(Fila, column).Value =string.Format("'{0}", erow["NumeroSS"]); + column++; + libro.Cell(Fila, column).Value = erow["RegistroPatronal"]; + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ").Rows) { column++; string Concepto = string.Format("V_{0}", row["CveConcepto"]); @@ -594,11 +615,11 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas if (newsubproyecto) { libro.Range(Fila - 3, 1, Fila - 3, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(184, 204, 228)); - libro.Range(Fila - 3, 3, Fila - 3, column).Style.NumberFormat.Format = "$###,###,##0.00"; - libro.Range(Fila - 3, 3, Fila - 3, column).DataType = ClosedXML.Excel.XLDataType.Number; + libro.Range(Fila - 3, 6, Fila - 3, column).Style.NumberFormat.Format = "$###,###,##0.00"; + libro.Range(Fila - 3,6, Fila - 3, column).DataType = ClosedXML.Excel.XLDataType.Number; } - libro.Range(Fila , 3, Fila , column).Style.NumberFormat.Format = "$###,###,##0.00"; - libro.Range(Fila, 3, Fila, column).DataType = ClosedXML.Excel.XLDataType.Number; + libro.Range(Fila , 6, Fila , column).Style.NumberFormat.Format = "$###,###,##0.00"; + libro.Range(Fila, 6, Fila, column).DataType = ClosedXML.Excel.XLDataType.Number; } diff --git a/OI/Circular.aspx b/OI/Circular.aspx index 8e76b0d57..fc7c6ac03 100644 --- a/OI/Circular.aspx +++ b/OI/Circular.aspx @@ -68,11 +68,12 @@ - + + diff --git a/OI/Circular.aspx.vb b/OI/Circular.aspx.vb index 63b26eecf..8f39dc8a6 100644 --- a/OI/Circular.aspx.vb +++ b/OI/Circular.aspx.vb @@ -30,7 +30,7 @@ Partial Class OI_Circular DdlUsuario.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) DdlUsuario.DataBind() - DdlUsuario.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlUsuario.Items.Insert(0, New ListItem("Todos", "-1")) End Sub Private Sub CargaDatos() Dim ObjOI As New ClsOIEventos @@ -40,6 +40,7 @@ Partial Class OI_Circular End If ObjOI.Dispose() GvDatos.DataBind() + UpDatos.Update() End Sub Protected Sub btConsultar_Click() Handles btConsultar.Click diff --git a/OI/CircularDetalleB.aspx b/OI/CircularDetalleB.aspx index 24f6fc8e6..cd5e17ab2 100644 --- a/OI/CircularDetalleB.aspx +++ b/OI/CircularDetalleB.aspx @@ -108,14 +108,14 @@

Asunto

- +
-
+

Adjuntar Archivos:

@@ -137,6 +137,7 @@
+
@@ -173,7 +174,7 @@
- +
@@ -221,8 +222,8 @@
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> + +
@@ -315,7 +316,6 @@ function chkAll_OncLick(chk) { $('.GVUsuarios tr:visible input[type="checkbox"]').prop("checked", chk.checked); } - //function showhideUser() { // // alert(CveRol); @@ -346,12 +346,20 @@ // }); // input.addClass('ConEvento'); //} - //function ADSReady() { + function filtrarx() { + //console.log('Entre 3') + //var filtro = sotext($("div[id^='C_DVModalFiltros'] select:first").attr("id")); + //console.log(filtro) + FiltrarTablaStrMulti('<%=GVUsuarios.ClientID %>', null, sotext('<%=DdlRoles.ClientID %>'), $('#TxtBusquedaCorreos').val()); + } + function ADSBegin() { // loadeventos(); // showhideUser() - //} - - + } + //inicializa tablas select2me etc etc..... + function ADSReady() { + filtrarx(); + } diff --git a/OI/CircularDetalleB.aspx.cs b/OI/CircularDetalleB.aspx.cs index 600a24197..9a363615b 100644 --- a/OI/CircularDetalleB.aspx.cs +++ b/OI/CircularDetalleB.aspx.cs @@ -189,7 +189,7 @@ public partial class OI_CircularDetalleB : ClsPaginas ClsOIEventos ObjOI = new ClsOIEventos(); - if (ObjOI.GetCircularCorreos(intTipoConsulta, UsuarioActual.CveEmpresa,DdlRoles.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(), DdlCveClasificacionProveedor.SelectedValue.ToEntero(), DdlSubProyectoPersonal.SelectedValue.ToEntero(),DdlClasificacion.SelectedValue.ToEntero())) + if (ObjOI.GetCircularCorreos(intTipoConsulta, UsuarioActual.CveEmpresa, -1, DdlSubProyecto.SelectedValue.ToEntero(), DdlCveClasificacionProveedor.SelectedValue.ToEntero(), DdlSubProyectoPersonal.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero())) { if (ObjOI.DtResultados.Rows.Count >= 1000) @@ -203,7 +203,7 @@ public partial class OI_CircularDetalleB : ClsPaginas GVUsuarios.DataSource = dt; - Alert($"{ObjOI.DtResultados.Rows.Count } registros se limito a 2000 registros, se recomienda usar los filtros.", ModExtensiones.TipoMensaje.ToastAdventencia); + Alert($"{ObjOI.DtResultados.Rows.Count} registros se limito a 2000 registros, se recomienda usar los filtros.", ModExtensiones.TipoMensaje.ToastAdventencia); } else { @@ -216,14 +216,11 @@ public partial class OI_CircularDetalleB : ClsPaginas GVUsuarios.DataSource = null; } - RegistraScript("CveRol = -1; CveSucursal = -1;usuariotext = \"\";"); - ObjOI.Dispose(); GVUsuarios.DataBind(); UpModalSeleccionCorreos.Update(); - } protected void GVUsuarios_RowDataBound(object sender, GridViewRowEventArgs e) @@ -301,7 +298,7 @@ public partial class OI_CircularDetalleB : ClsPaginas if (ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Text.Replace("< ","<"), TxtCorreo.Text, TxtCorreoAdicional.Text, AdjuntoValidate)) { GuardarArchivo(CveCircular); - Alert("Actualizado correctamente"); + Alert("La circular se ha actualizado correctamente."); } } else @@ -313,7 +310,7 @@ public partial class OI_CircularDetalleB : ClsPaginas if (CircularInsertado > 0) { GuardarArchivo(CircularInsertado); - Alert("Ingresado correctamente"); + Alert("La circular se ha guardado correctamente."); CveCircular = CircularInsertado; if (CveCircular > 0) @@ -443,7 +440,7 @@ public partial class OI_CircularDetalleB : ClsPaginas MandaCorreo(TxtAsunto.Text, Correo, Contador > 0 ? "" : TxtCorreoAdicional.Text, TxtCircular.Text.Replace("< ", "<"), ArchivoBytes, HkArchivo.Text); Contador += 1; } - Alert("El correo se envió correctamente"); + Alert("El correo se envió correctamente."); } catch (Exception ) { @@ -522,10 +519,13 @@ public partial class OI_CircularDetalleB : ClsPaginas protected void DdlRoles_SelectedIndexChanged(object sender, EventArgs e) { - ConsultaCorreos(); - } + //ConsultaCorreos(); + // Filtro las filas según el dropdown option + //RegistraScript("console.log('Entre 1')"); + //RegistraScript($"FiltrarTablaStrMulti('{GVUsuarios.ClientID}', null, sotext('{DdlRoles.ClientID}'), $('#TxtBusquedaCorreos').val());"); + } - protected void DdlSubProyecto_SelectedIndexChanged(object sender, EventArgs e) + protected void DdlSubProyecto_SelectedIndexChanged(object sender, EventArgs e) { ConsultaCorreos(); } @@ -542,7 +542,7 @@ public partial class OI_CircularDetalleB : ClsPaginas protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e) { - // ConsultaCorreos(); + ConsultaCorreos(); } protected void LnlActualizarCorreos_Click(object sender, EventArgs e) diff --git a/RH/CatTurno.aspx b/RH/CatTurno.aspx index 071c837a8..e1ca00d75 100644 --- a/RH/CatTurno.aspx +++ b/RH/CatTurno.aspx @@ -39,7 +39,7 @@
- + @@ -50,9 +50,16 @@ DataKeyNames="CveTurno,Turno,CveChecadorHorario,HorarioDe,HorarioA,Estatus,FechaIng,CveUsuario,CveEmpresa,Usuario,ChecadorHorario,ToleranciaERetardo,ToleranciaEFalta,ToleranciaEFalta2,ToleranciaSRetardo,ToleranciaSFalta"> - + <%----%> + + + + + > + + diff --git a/Scripts/custom.js b/Scripts/custom.js index ca375cedc..c630cc62c 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -69,6 +69,15 @@ function alertatoast(tipo, Mensaje, Funcion, timeout) { function log(mensaje) { console.log(mensaje); } + +function soval(dropdown) { + return $('option:selected', '#' + dropdown).val(); +} + +function sotext(dropdown) { + return $('option:selected', '#' + dropdown).text(); +} + function FiltrarTabla(idtxt, idtable, idcontador) { if ($('#' + idtxt).val() == '') { $('table#' + idtable + ' tr').css('display', ''); } else { @@ -79,6 +88,38 @@ function FiltrarTabla(idtxt, idtable, idcontador) { $('#' + idcontador).html($('#' + idtable + ' tr:visible').length); } } + +function FiltrarTablaStr(str, idtable, idcontador) { + if (str == '' || str == 'Todos') { $('table#' + idtable + ' tr').css('display', ''); } + else { + $('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); + $('table#' + idtable + ' tr:contains("' + str + '")').css('display', ''); + $('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', ''); + } + if ($('#' + idcontador).length > 0) { + $('#' + idcontador).html($('#' + idtable + ' tr:visible').length); + } +} + +function FiltrarTablaStrMulti(idtable, idcontador /*, str1, str2, str3...*/ ) { + if (arguments.length <= 2) { return; } + let strc = ''; + for (let i = 2 /*a partir del 3er argumento obtiene los str*/; i < arguments.length; i++) { + let str = arguments[i]; + if (str != '' && str != 'Todos') { + strc += ':contains("' + str + '")'; + } + } + $('table#' + idtable + ' tr:not(.ADtr)').css('display', 'none'); + $('table#' + idtable + ' tr' + strc).css('display', ''); + $('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', ''); + if (idcontador) { + if ($('#' + idcontador).length > 0) { + $('#' + idcontador).html($('#' + idtable + ' tr:visible').length); + } + } +} + function FiltrarTablaClass(idtxt, idtable, idcontador, resta) { if (resta == null) { resta =1 diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 7be511d61..1d3ca0dca 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1130,10 +1130,6 @@ Partial Class Clientes End If End If - - - - ObjCliente.Dispose() DdlSucursalCliente.DataBind() @@ -1148,9 +1144,9 @@ Partial Class Clientes DdlClienteSucursalEnvio.DataBind() DdlClienteSucursalEnvio.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClienteSucursalEnvio.SelectedValue = "-1" - - - + End Sub + Private Sub CargaSubProyectosSuscursales() + CargarCentrosDeCosto(Nothing, DdlSubProyectoClienteSucursal, Nothing, LblSubProyectoClienteSucursal) End Sub Private Sub CargaGridRetenciones() Dim ObjClientes As New ClsClientes @@ -1161,10 +1157,6 @@ Partial Class Clientes ObjClientes.Dispose() GvRetenciones.DataBind() End Sub - - - - Private Sub CargaCuentasEquipos() Dim Objeto As New ClsGenerales If Objeto.GetCuentasEquipos(CveCliente, -1) Then diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e277d860f..6de9db860 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -35386,7 +35386,7 @@ Partial Class Ventas DdlRegimenFiscalCliente.DataBind() Else Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal") - Dim Val As String + Dim Val As String = "" If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then 'verifico que sino existe el valor. lo limpie