This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-04-21 11:14:34 -07:00
26 changed files with 670 additions and 703 deletions

View File

@@ -1071,8 +1071,10 @@ Partial Class RH_Personal
End Sub
Private Sub CargaUsuariosNomina()
DDLUsuarioNomina.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
Dim dttemp As DataTable
Dim FiltroAD() As String = {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol", "Correo", "Empresa", "CveRol"}
dttemp = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
DDLUsuarioNomina.DataSource = dttemp.FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1 and CveRol <> 1", UsuarioActual.CveEmpresa), "Rol ASC", FiltroAD)
DDLUsuarioNomina.DataBind()
DDLUsuarioNomina.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
@@ -3540,69 +3542,71 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
End Sub
Private Sub GenerarPDFGastosXComp(Optional Formato As String = "PDF")
If CvePersonal > 0 Then
If RBLTipoGastos.SelectedValue = "1" Then
If RBLTipoGastos.SelectedValue = "1" Then
If DTGastosSinComp.Rows.Count > 0 Then
If DTGastosSinComp.Rows.Count > 0 Then
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString()))
params.Add(New ReportParameter("Saldo", LblSaldoGxC.Text.ToString()))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString()))
params.Add(New ReportParameter("Saldo", LblSaldoGxC.Text.ToString()))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarGral.rdlc", DTGastosSinComp, params, "GastosSinComprobarGral", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
ElseIf RBLTipoGastos.SelectedValue = "2" Then
If DTGastosPorCheque.Rows.Count > 0 Then
For Each Row As DataRow In DTGastosPorCheque.Rows
Dim FolioPago As String = Row("FolioPago").ToString()
Row("FolioPago") = ""
If Row("CveCompra").ToString() = "" And Row("CveIE").ToString() <> "" Then
Row("FechaVencimiento") = Row("FechaDocumento")
Row("FolioPago") = FolioPago
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
If Row("FolioPago").ToString() <> "" Then
Row("SerieFolio") = ""
End If
Next
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString()))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarGral.rdlc", DTGastosSinComp, params, "GastosSinComprobarGral", Formato)
Else
params.Add(New ReportParameter("pImg", ""))
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarCheque.rdlc", DTGastosPorCheque, params, "GastosPorCheque", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
ElseIf RBLTipoGastos.SelectedValue = "2" Then
If DTGastosPorCheque.Rows.Count > 0 Then
For Each Row As DataRow In DTGastosPorCheque.Rows
Dim FolioPago As String = Row("FolioPago").ToString()
Row("FolioPago") = ""
If Row("CveCompra").ToString() = "" And Row("CveIE").ToString() <> "" Then
Row("FechaVencimiento") = Row("FechaDocumento")
Row("FolioPago") = FolioPago
End If
If Row("FolioPago").ToString() <> "" Then
Row("SerieFolio") = ""
End If
Next
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Empleado", LtlPersonal.Text.ToString()))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("pImg", logouri))
Else
params.Add(New ReportParameter("pImg", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/GastosXComprobarCheque.rdlc", DTGastosPorCheque, params, "GastosPorCheque", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End If
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub