--- func 509, para ver solo clientes relacionados al personal

-- acomodo visual
This commit is contained in:
2023-07-15 10:28:28 -07:00
parent 9c71d8536a
commit 5197f2a1db
2 changed files with 79 additions and 68 deletions

View File

@@ -1048,22 +1048,14 @@ Partial Class RH_Personal
End Sub
Private Sub SetValues()
ViewState("Orden") = String.Empty
'DdlClienteAsignado.Attributes.Add("onclick", "CargaClientes();")
'DdlClienteAsistenciaC.Attributes.Add("onclick", "CargaClientes();")
'DdlClienteAsistenciaA.Attributes.Add("onclick", "CargaClientes();")
CargaClientes()
Dim fechainicioasistencia As String
Dim fechaFinasistencia As String
If Now.Day >= 15 Then
'fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now)
'fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now)
fechainicioasistencia = String.Format("{0:16/MM/yyyy}", Now)
Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddMonths(1).AddDays(-1)
fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis)
Else
'Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddDays(-1)
'fechainicioasistencia = String.Format("{0:16/MM/yyyy}", dateendasis)
'fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis)
fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now)
fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now)
End If
@@ -1089,12 +1081,18 @@ Partial Class RH_Personal
DdlSubProyectoAsistenciasC.SelectedValue = Request("CveSubProyecto")
End If
End If
'DdlProyectoAsistenciaC
'DdlSubProyectoAsistenciasC
End If
TxtFechaICredito.Text = $"01/01/{Now.Year}"
TxtFechaFCredito.Text = Now.ToShortDateString
If UsuarioActual.Empresa.Funcionalidad(509) = "1" Then
divCliente.Visible = True
tdCliente1.Visible = True
tdCliente2.Visible = True
GVAsistencia.Columns(1).Visible = True
End If
End Sub
Private Sub SetPermisos()
'Permisos
@@ -1147,20 +1145,29 @@ Partial Class RH_Personal
End Sub
Protected Sub cargaagrodeptos()
Using objrh As New ClsRH()
If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then
Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveTipoTrabajador ={0}", DdlTipoTrabajador.SelectedValue.ToEntero()))
Dim drow As DataRow = dt.NewRow()
drow("CveDepartamento") = "-1"
drow("Departamento") = "Seleccione"
dt.Rows.InsertAt(drow, 0)
If DDlAgroDepartamento.Items.Count() > 0 Then
DDlAgroDepartamento.SelectedValueExist("-1")
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then 'empresa agricola
Using objrh As New ClsRH()
divAgroTipoTrabajador.Visible = True
divAgroDepto.Visible = True
divMedioTransporte.Visible = True
divAgro1.Visible = True
divAgro2.Visible = True
If (objrh.AgroDepartamentosGet(UsuarioActual.CveEmpresa, -1, -1)) Then
Dim dt As DataTable = objrh.DtResultados.FiltraParametros(String.Format("CveTipoTrabajador ={0}", DdlTipoTrabajador.SelectedValue.ToEntero()))
Dim drow As DataRow = dt.NewRow()
drow("CveDepartamento") = "-1"
drow("Departamento") = "Seleccione"
dt.Rows.InsertAt(drow, 0)
If DDlAgroDepartamento.Items.Count() > 0 Then
DDlAgroDepartamento.SelectedValueExist("-1")
End If
DDlAgroDepartamento.DataSource = dt
DDlAgroDepartamento.DataBind()
End If
DDlAgroDepartamento.DataSource = dt
DDlAgroDepartamento.DataBind()
End If
End Using
End Using
End If
End Sub
Private Sub CargaEscolaridad()
DdlEscolaridad.DataSource = GlobalDTEscolaridad
@@ -1786,7 +1793,7 @@ Partial Class RH_Personal
salarioVariable = If(salarioVariable > 0, salarioVariable, 0)
TxtSalarioCotizado.Text = ObjPersonal.SalarioDiarioSS.ToString()
TxtFISalariodiario.Text = ObjPersonal.SalarioDiario.ToString()
TxtBono.Text = ObjPersonal.Bono.ToString()
'TxtBono.Text = ObjPersonal.Bono.ToString()
TxtNumDiasAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString()
TxtFIAguinaldo.Text = ObjPersonal.NumDiasAguinaldo.ToString()
TxtPorPrimaVacacional.Text = ObjPersonal.PorPrimaVacacional.ToString()
@@ -3746,7 +3753,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString()))
params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString()))
params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString()))
params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString()))
params.Add(New ReportParameter("Bono", ""))
params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString()))
params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString()))
params.Add(New ReportParameter("MetodoPago", If(DdlMetodoPago.SelectedValue = "-1", "", DdlMetodoPago.SelectedItem.Text)))
@@ -3836,7 +3843,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("SDD", ObjPersonal.SalarioDiario.ToString()))
params.Add(New ReportParameter("SDI", ObjPersonal.SDI.ToString()))
params.Add(New ReportParameter("SalarioIMSS", ObjPersonal.SalarioDiarioSS.ToString()))
params.Add(New ReportParameter("Bono", ObjPersonal.Bono.ToString()))
params.Add(New ReportParameter("Bono", ""))
params.Add(New ReportParameter("DiasAguinaldo", ObjPersonal.NumDiasAguinaldo.ToString()))
params.Add(New ReportParameter("PrimaVacacional", ObjPersonal.PorPrimaVacacional.ToString()))
params.Add(New ReportParameter("MetodoPago", If(DdlMetodoPago.SelectedValue = "-1", "", DdlMetodoPago.SelectedItem.Text)))