diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index dd8c332f5..a98a423b0 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -812,7 +812,7 @@ Public Class ClsNominas Public Function AddConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, - AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer) As Integer + AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Nom_ConceptosAdd") @@ -838,6 +838,7 @@ Public Class ClsNominas .Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal .Add("Especie", SqlDbType.Bit).Value = Especie .Add("Imprimir", SqlDbType.Bit).Value = Imprimir + .Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto End With Try @@ -858,7 +859,7 @@ Public Class ClsNominas Public Function UpdateConcepto(Codigo As String, Concepto As String, Tipo As String, Formula As String, Sistema As Boolean, Estado As Boolean, CveConceptoPadre As Integer, CveConcepto As Integer, EsRetencion As Boolean, CveClasificacion As Integer, IdCtaContable As Integer, CveTipoGasto As Integer, TipoCalculo As Boolean, CveConceptoContable As Integer, - AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer) As Boolean + AplicaFiniquito As Integer, AutomaticoGlobal As Integer, Especie As Integer, Imprimir As Integer, CveSATConcepto As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Nom_ConceptosUpdate") @@ -882,6 +883,7 @@ Public Class ClsNominas .Add("AutomaticoGlobal", SqlDbType.Bit).Value = AutomaticoGlobal .Add("Especie", SqlDbType.Bit).Value = Especie .Add("Imprimir", SqlDbType.Bit).Value = Imprimir + .Add("CveSATConcepto", SqlDbType.Int).Value = CveSATConcepto End With Try @@ -1859,14 +1861,35 @@ Public Class ClsNominas retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al Realizar el calculo de utilidades.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al Realizar el calculo de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al Realizar el calculo de utilidades.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al Realizar el calculo de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function + Public Function GetTablasNomina(CveEmpresa As Integer) As Boolean + Dim retorno As Boolean = False + Try + DTSet = New DataSet() + DataAdapter("PA_Nom_Tablas", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + + SqlAdapter.Fill(DTSet) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener las tablas.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener las tablas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function #Region "IDisposable Support" ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) diff --git a/App_Code/DSNominas.xsd b/App_Code/DSNominas.xsd new file mode 100644 index 000000000..9417b50fa --- /dev/null +++ b/App_Code/DSNominas.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_Code/DSNominas.xss b/App_Code/DSNominas.xss new file mode 100644 index 000000000..e27cacce0 --- /dev/null +++ b/App_Code/DSNominas.xss @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 4a751b525..2c12cc557 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -72,9 +72,18 @@ Namespace Extensiones Public Sub GuardaLog(Str As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String + Dim Urlstring As String = "" + Try + If Not IsNothing(System.Web.HttpContext.Current) Then + If Not IsNothing(System.Web.HttpContext.Current.Request) Then + Urlstring = $"{HttpContext.Current.Request.Url.LocalPath.ToString()}{HttpContext.Current.Request.Url.Query}{Environment.NewLine}" + End If + End If + Catch + End Try ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring) Try ArchivoW = New StreamWriter(String.Format("{0}\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException diff --git a/Nomina/ConceptoNomina.aspx b/Nomina/ConceptoNomina.aspx index 21bb20f59..fa44998ab 100644 --- a/Nomina/ConceptoNomina.aspx +++ b/Nomina/ConceptoNomina.aspx @@ -190,7 +190,7 @@
-
+
@@ -199,12 +199,16 @@
-
+
+
+ + +
@@ -324,7 +328,7 @@
- +
diff --git a/Nomina/ConceptoNomina.aspx.cs b/Nomina/ConceptoNomina.aspx.cs index 723408486..3bbeb7283 100644 --- a/Nomina/ConceptoNomina.aspx.cs +++ b/Nomina/ConceptoNomina.aspx.cs @@ -199,7 +199,7 @@ public partial class Nomina_CatConcepto : ClsPaginas CargaClasificacion(); CargaTipoGasto(); CargaCtaContable(); - + CargaConceptoSAT(); CargaDatos(); } @@ -241,6 +241,18 @@ public partial class Nomina_CatConcepto : ClsPaginas DdlTipoGasto.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlTipoGasto.SelectedValueExist("-1"); } + protected void CargaConceptoSAT() + { + using (ClsNominas objnom = new ClsNominas()) + { + objnom.GetConceptos(); + DdlConceptoSAT.DataSource = objnom.DtResultados; + + } + DdlConceptoSAT.DataBind(); + DdlConceptoSAT.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlConceptoSAT.SelectedValueExist("-1"); + } protected void CargaCtaContable() { @@ -298,6 +310,7 @@ public partial class Nomina_CatConcepto : ClsPaginas int AutomaticoGlobal = ChkAutomaticoGlobal.Checked ? 1 : 0; int Especie = ChkEspecie.Checked ? 1 : 0; int Imprimir = ChkImprimir.Checked ? 1 : 0; + int CveSATConcepto = DdlConceptoSAT.SelectedValue.ToEntero(); ClsNominas ObjNomina = new ClsNominas(); ObjNomina.IniciaTransacSQL(); @@ -305,7 +318,7 @@ public partial class Nomina_CatConcepto : ClsPaginas if (EsEditar) { - TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir); + TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto); if (TieneError) { @@ -319,7 +332,7 @@ public partial class Nomina_CatConcepto : ClsPaginas } else { - CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir); + CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto); if (CveConcepto == -1) { @@ -403,6 +416,7 @@ public partial class Nomina_CatConcepto : ClsPaginas DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]); DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]); DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]); + DdlConceptoSAT.SelectedValueExist(drow["CveSATConcepto"]); } ObjNomina.Dispose(); @@ -416,8 +430,8 @@ public partial class Nomina_CatConcepto : ClsPaginas ChkRetencion.Checked = false; DdlConceptoPadre.SelectedValueExist("-1"); DdlConceptoContable.SelectedValueExist("-1"); - - ChkEstado.Checked = false; + ChkImprimir.Checked = true; + ChkEstado.Checked = true; ChkSistema.Checked = false; DdlClasificacion.SelectedValueExist("-1"); diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 213e4ac1b..2e7e910a4 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -8,6 +8,12 @@ border: 1px solid #E87E04; } + .ddlInfolabel { + font-size: 13px; + color: #888888; + opacity: 1; + } + table.GvConceptos td { white-space: nowrap; } @@ -60,7 +66,11 @@
  • - Cargar Nomina
  • + Cargar Nomina + +
  • + Tablas +
  • @@ -93,7 +103,9 @@
    - + + <%----%> + <%----%> @@ -162,7 +174,7 @@
    - + Nomina
    @@ -533,6 +545,7 @@ + + +
    + + + <%----%> + + +
    + + +
    + + + <%-- FIN MODAL SUBIR FACTURAS --%> + <%-- - --%> - - - - - - - - - - - <%-- MODAL Licencia --%> - - - - + + + + + + + + + - + + diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index d1fe3b2f4..9cfdf863e 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -620,139 +620,143 @@ Partial Class RH_Personal Const wdCharacter As Integer = 1 'Configuración Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - ViewState("Orden") = "" - ViewState("Orden1") = "" - Session("FileUpload") = "" - ViewState("Archivo") = "" - DTConsumos = Nothing - - If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then - TabGES.Visible = True - End If - - SetValues() - 'SetPermisos() - - CargaEscolaridad() - CargaEstadoCivil() - CargaDepartamento() - CargaPuestos() - CargaEstatusPersonal() - CargaGenero() - CargaMotivoBaja() - CargaRuta() - CargaTiposContrato() - CargaTipoPeriodo() - CargaTurno() - CargaJornadas() - CargaProyecto() - CargaTiposAsistencia() - 'CargaMotivoHoraExtra() - CargaMotivosHorasExtras() - CargaSupervisores() - CargaMetodosPago() - CargaTipoRegimen() - CargaRiesgoPuesto() - CargaBancos() - CargaSubProyectosZona() - CargaEstados(1) - CargaMonedas() - CargaSuperioresOrganigrama() - CargaUsuariosNomina() - CargaComboUniformes() - CargaPermisos() - CargaCombosBuzon() - CargaPermisosReemplazos() - - - If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then - ViewState("CvePersonal") = Request("CvePersonal") - 'CvePersonal = ViewState("CvePersonal").ToString.ToEntero - CargaDatos() - CargaDocumentacionFirmaDecontratos() - 'LnkAddLicencias.Visible = True - 'TabLicencias.Visible = True - 'Configuración de Modalidad Update - BtnGuardar.Text = "Guardar Cambios" - LtlTitulo.Text = "Consulta de Personal:" - If UsuarioActual.CveRol = 1 Then - 'ImgImprimir.Visible = True - ImgImprimirExpediente.Visible = True - End If - - 'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") - If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1 - - 'Inicia Permisos - If UsuarioActual.TienePermisoProceso(228) Then - GVAsistencia.Columns(10).Visible = True - End If - 'Fin Permisos - HlEvento.Visible = True - HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;" - - CargaViaticosPersonal() - - divBitacora.Visible = True - CargaGvBitacora() - Else - - 'Configuración de Modalidad Insert - - ImgAddObs.Visible = False - LblFechaCaptura.Text = Now.ToShortDateString() - LblUsuarioCapturo.Text = UsuarioActual.Usuario - ViewState("CvePersonal") = -1 - BtnEliminar.Visible = False - CarcaConceptosNomina() - For Each Gvr As GridViewRow In GVConceptos.Rows - If CBool(Gvr.DataKey("Obligatorio")) Then - Gvr.FCCheckBox("ChkAplica").Checked = True - Else - Gvr.Visible = False - End If - Next - 'Inicia Permisos - 'Fin Permisos - End If - CargaCuentasBancarias() - - If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then - - CrearEstructuraFamiliares() - CargaFamiliares() - - LIFamiliaresAcciones.Visible = True - DivFamiliares.Visible = True - DivPadres.Visible = False - - + If Not IsPostBack Then + If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then + pnlSalarioIMSS.Visible = False End If + ViewState("Orden") = "" + ViewState("Orden1") = "" + Session("FileUpload") = "" + ViewState("Archivo") = "" + DTConsumos = Nothing + + If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then + TabGES.Visible = True + End If + + SetValues() + 'SetPermisos() + + CargaEscolaridad() + CargaEstadoCivil() + CargaDepartamento() + CargaPuestos() + CargaEstatusPersonal() + CargaGenero() + CargaMotivoBaja() + CargaRuta() + CargaTiposContrato() + CargaTipoPeriodo() + CargaTurno() + CargaJornadas() + CargaProyecto() + CargaTiposAsistencia() + 'CargaMotivoHoraExtra() + CargaMotivosHorasExtras() + CargaSupervisores() + CargaMetodosPago() + CargaTipoRegimen() + CargaRiesgoPuesto() + CargaBancos() + CargaSubProyectosZona() + CargaEstados(1) + CargaMonedas() + CargaSuperioresOrganigrama() + CargaUsuariosNomina() + CargaComboUniformes() + CargaPermisos() + CargaCombosBuzon() + CargaPermisosReemplazos() + + + If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then + ViewState("CvePersonal") = Request("CvePersonal") + 'CvePersonal = ViewState("CvePersonal").ToString.ToEntero + CargaDatos() + CargaDocumentacionFirmaDecontratos() + 'LnkAddLicencias.Visible = True + 'TabLicencias.Visible = True + 'Configuración de Modalidad Update + BtnGuardar.Text = "Guardar Cambios" + LtlTitulo.Text = "Consulta de Personal:" + If UsuarioActual.CveRol = 1 Then + 'ImgImprimir.Visible = True + ImgImprimirExpediente.Visible = True + End If + + 'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") + If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1 + + 'Inicia Permisos + If UsuarioActual.TienePermisoProceso(228) Then + GVAsistencia.Columns(10).Visible = True + End If + 'Fin Permisos + HlEvento.Visible = True + HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;" + + CargaViaticosPersonal() + + divBitacora.Visible = True + CargaGvBitacora() + Else + + 'Configuración de Modalidad Insert + + ImgAddObs.Visible = False + LblFechaCaptura.Text = Now.ToShortDateString() + LblUsuarioCapturo.Text = UsuarioActual.Usuario + ViewState("CvePersonal") = -1 + BtnEliminar.Visible = False + CarcaConceptosNomina() + For Each Gvr As GridViewRow In GVConceptos.Rows + If CBool(Gvr.DataKey("Obligatorio")) Then + Gvr.FCCheckBox("ChkAplica").Checked = True + Else + Gvr.Visible = False + End If + Next + 'Inicia Permisos + 'Fin Permisos + End If + CargaCuentasBancarias() + + If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then + + CrearEstructuraFamiliares() + CargaFamiliares() + + LIFamiliaresAcciones.Visible = True + DivFamiliares.Visible = True + DivPadres.Visible = False + + + End If - 'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago - ' HplAbonarMasivo.Visible = True - ' GvGxC.Columns(7).Visible = True - 'End If + + 'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago + ' HplAbonarMasivo.Visible = True + ' GvGxC.Columns(7).Visible = True + 'End If - If Not CvePersonal > 0 Then - DivSuperiorInmediato.Visible = False - End If - - '09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte - If DTConsumos IsNot Nothing Then - If DTConsumos.Rows.Count > 0 Then - UpDescargaConsumos.Visible = True - End If - End If - CargaLicencias() - - End If - AgregarEventosAsincronosGvVacaciones() + If Not CvePersonal > 0 Then + DivSuperiorInmediato.Visible = False + End If + + '09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte + If DTConsumos IsNot Nothing Then + If DTConsumos.Rows.Count > 0 Then + UpDescargaConsumos.Visible = True + End If + End If + CargaLicencias() + + End If + AgregarEventosAsincronosGvVacaciones() End Sub Private Sub CargaCuentasContables() @@ -1089,22 +1093,9 @@ Partial Class RH_Personal End Sub Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.RowIndex = 0 Then - e.Row.Cells(0).Width = Unit.Pixel(120) - e.Row.Cells(1).Width = Unit.Pixel(180) - e.Row.Cells(2).Width = Unit.Pixel(110) - e.Row.Cells(3).Width = Unit.Pixel(110) - e.Row.Cells(4).Width = Unit.Pixel(70) - e.Row.Cells(5).Width = Unit.Pixel(50) - e.Row.Cells(6).Width = Unit.Pixel(56) - e.Row.Cells(7).Width = Unit.Pixel(56) - e.Row.Cells(8).Width = Unit.Pixel(110) - e.Row.Cells(9).Width = Unit.Pixel(90) - e.Row.Cells(10).Width = Unit.Pixel(60) - End If - + If e.Row.RowType = DataControlRowType.DataRow Then + + e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left @@ -1441,6 +1432,9 @@ Partial Class RH_Personal End If End If + If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then + TxtSalarioCotizado.Text = TxtSDI.Text + End If If CvePersonal = -1 Then URL = "" @@ -2183,32 +2177,46 @@ Partial Class RH_Personal e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(3).Text = "Calculado" e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(4).Text = "Permanente" Else - If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then - e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValue = "2600" - Else - e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValue = e.Row.DBCampo("TipoAplicacion") - End If + Dim TipoAplicacion As String = e.Row.DBCampo("TipoAplicacion").ToString() + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Clear() + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Seleccione", "-1")) + If (e.Row.DBCampo("CveSistema").ToString() = "3") Then + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Movto Permanente)", "5000")) + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Porcentaje)", "5001")) + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Factor Descuento)", "5002")) + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Cuota Fija)", "5003")) + Else + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Saldo", "1")) + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("No. Pagos", "2")) + e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Permanente", "2600")) + End If + + + If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then + TipoAplicacion = "2600" + End If + e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion) + End If + + 'If e.Row.DBCampo("TipoCalculo") = "False" Then + ' e.Row.FCTextBox("TxtImporte").Visible = False + ' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False + 'Else + ' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero + ' Case 1 + ' 'Saldo + ' e.Row.FCLiteral("LtlSaldo").Visible = True + ' e.Row.FCTextBox("TxtSaldoIni").Visible = True + ' Case 2 + ' 'Numero de Pagos + ' e.Row.FCLiteral("LtlNoPago").Visible = True + ' e.Row.FCTextBox("TxtNoPagos").Visible = True + ' Case 2600 + ' 'Permanente + ' End Select + 'End If + End If - - 'If e.Row.DBCampo("TipoCalculo") = "False" Then - ' e.Row.FCTextBox("TxtImporte").Visible = False - ' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False - 'Else - ' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero - ' Case 1 - ' 'Saldo - ' e.Row.FCLiteral("LtlSaldo").Visible = True - ' e.Row.FCTextBox("TxtSaldoIni").Visible = True - ' Case 2 - ' 'Numero de Pagos - ' e.Row.FCLiteral("LtlNoPago").Visible = True - ' e.Row.FCTextBox("TxtNoPagos").Visible = True - ' Case 2600 - ' 'Permanente - ' End Select - 'End If - - End If End Sub Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs) @@ -5874,4 +5882,11 @@ Partial Class RH_Personal #End Region + Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs) + Dim ddl As DropDownList = DirectCast(sender, DropDownList) + Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow) + If ddl.SelectedItem.Text = "Retardo" Then + gvrow.FCTextBox("TxtPorPago").Text = "87.5" + End If + End Sub End Class diff --git a/Scripts/custom.js b/Scripts/custom.js index 5ef8508ee..e009ab938 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1697,6 +1697,32 @@ function loadsortadscroll() { }); } +var listaADScroller = []; + +function saveposicionADScroller() { + $('.ADScroller-body>table').each(function () { + let _this = $(this); + let id = _this.attr("id"); + let scrollleft = $(_this.parent()).scrollLeft(); + let scrolltop = $(_this.parent()).scrollTop(); + listaADScroller.push({ id: id, scrollleft: scrollleft, scrolltop: scrolltop }) + }); +} +function setposicionADScroller() { + + setTimeout( + function () { + listaADScroller.forEach(function (_this) { + let id = _this.id; + let scrollleft = _this.scrollleft; + let scrolltop = _this.scrolltop; + $($('#' + id).parent()).scrollLeft(scrollleft); + $($('#' + id).parent().parent()).find('> .ADScroller-header').scrollLeft(scrollleft); + $($('#' + id).parent()).scrollTop(scrolltop); + }); + }, 99); +} + function loaderinit() { setTimeout( @@ -1727,7 +1753,6 @@ jQuery(document).ready(function () { setTimeout(loadadscroll, 10) }); - loadsortadscroll(); QuickSidebar.init(); @@ -1804,6 +1829,8 @@ jQuery(document).ready(function () { prm.add_initializeRequest(function (s, e) { objscollapse = $('.portlet-title .collapse').closest('.portlet[id]'); objsexpand = $('.portlet-title .expand').closest('.portlet[id]'); + + saveposicionADScroller(); loaderinit(); }); prm.add_endRequest(function (s, e) { @@ -1816,6 +1843,7 @@ jQuery(document).ready(function () { Metronic.initAjax(); loadjquerys(); loaderEnd(); + setposicionADScroller(); error = false; }); ADSSignalR(); diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 24c458fb8..dcfc698a1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14944,6 +14944,7 @@ Partial Class Ventas Else OcurrioError = True + Alert("Error traspaso almacen(sin Movtos. Detalle). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) End If MovDetalle.Dispose() @@ -15085,6 +15086,7 @@ Partial Class Ventas Dim CveVentaDetalle = If(ConceptoEntrada = 3, TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero) 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN If CveVentaDetalle < 0 Then + Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) OcurrioError = True Exit For End If @@ -15143,6 +15145,7 @@ Partial Class Ventas 'End If Catch ex As Exception OcurrioError = True + Alert("Error inesperado (15147). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) End Try Cont += 1 Next