Entrega Almacen, reporte
This commit is contained in:
@@ -2053,6 +2053,7 @@ Partial Class General_SaldosIniciales
|
||||
ObjRH.IniciaTransacSQL()
|
||||
Dim ErrorRH As Boolean = False
|
||||
Dim Contador As Integer = 0
|
||||
Dim ContadorAgregados As Integer = 0
|
||||
Dim NumRow As Integer = 0
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
@@ -2095,6 +2096,12 @@ Partial Class General_SaldosIniciales
|
||||
Dim MetodoPago As String = Row("Metodo Pago").ToString
|
||||
Dim Nominista As String = Row("Nominista").ToString
|
||||
|
||||
Dim NombreCompleto As String = $"{Nombre} {ApellidoPaterno} {ApellidoMaterno}"
|
||||
|
||||
If NombreCompleto.Trim.Replace(" ", "") = String.Empty Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
'CLAVES
|
||||
Dim CveGenero As Integer = 0
|
||||
Dim CveEstadoCivil As Integer = 0
|
||||
@@ -2152,7 +2159,7 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
|
||||
myarraystr = TipoContrato.Split(":"c)
|
||||
If (myarraystr.Length > 0) Then
|
||||
If (myarraystr.Length > 1) Then
|
||||
CveTipoContrato = myarraystr(0).ToEntero()
|
||||
Else
|
||||
CveTipoContrato = GlobalDTTiposContrato().FiltroPrimeroValor("CveTipoContrato", $"TipoContrato = '{TipoContrato}'").ToString.ToEntero
|
||||
@@ -2215,7 +2222,12 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
'VALIDACIONES
|
||||
' If Not CveSucursal > 0 Then Alert("La Empresa no cuenta con Sucursal, es necesario dar una Sucursal de alta.", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveDepartamento > 0 Then Alert($"No se encontró el Departamento: {Departamento} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveDepartamento > 0 Then
|
||||
Alert($"No se encontró el Departamento: {Departamento} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia)
|
||||
ErrorRH = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not CvePuesto > 0 Then Alert($"No se encontró el Puesto: {Puesto} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveTurno > 0 Then Alert($"No se encontró el turno: {Turno} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
If Not CveEstado > 0 Then Alert($"No se encontró el Estado: {Estado} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
@@ -2226,7 +2238,7 @@ Partial Class General_SaldosIniciales
|
||||
If Not CveUsuarioNomina > 0 Then CveUsuarioNomina = -1 'Alert("No se encontró el Nominista: " + Nominista + " Renglón: " + NumRow, TipoMensaje.MsgAdvertencia) : ErrorRH = True : Exit For
|
||||
|
||||
|
||||
Dim NombreCompleto As String = $"{Nombre} {ApellidoPaterno} {ApellidoMaterno}"
|
||||
|
||||
Dim CvePersonal As Integer = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePersonal", $"NombreCompletoNombre = '{NombreCompleto}'").ToString.ToEntero()
|
||||
|
||||
|
||||
@@ -2280,6 +2292,8 @@ Partial Class General_SaldosIniciales
|
||||
ClabeInterbancaria, "", CveJornada, CveJornada, "", -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveUsuarioNomina) Then
|
||||
ErrorRH = True
|
||||
Exit For
|
||||
Else
|
||||
ContadorAgregados = ContadorAgregados + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2289,7 +2303,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not ErrorRH Then
|
||||
If Contador > 0 Then
|
||||
Alert(String.Format("Se agregaron: <b>{0}</b> Empleados correctamente. <br>Se Omitieron: <b>{1}</b> Empleados ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
|
||||
Alert(String.Format("Se agregaron: <b>{0}</b> Empleados correctamente. <br>Se Omitieron: <b>{1}</b> Empleados ya que ya se encontraban registrados.", ContadorAgregados, Contador), TipoMensaje.MsgInformacion)
|
||||
ObjRH.Commit()
|
||||
TxtExcel.Text = ""
|
||||
UpDatos.Update()
|
||||
|
||||
Reference in New Issue
Block a user