This commit is contained in:
@@ -947,12 +947,17 @@ Partial Class RH_Personal
|
||||
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)
|
||||
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)
|
||||
End If
|
||||
If Request("FechaI") IsNot Nothing AndAlso IsDate(Request("FechaI")) Then
|
||||
txtFechaI.Text = Request("FechaI")
|
||||
@@ -1195,7 +1200,9 @@ Partial Class RH_Personal
|
||||
|
||||
Private Sub CargaBancos()
|
||||
DdlBanco.DataSource = GlobalDTNomSatBancos
|
||||
DdlBancoSat.DataSource = GlobalDTNomSatBancos
|
||||
DdlBanco.DataBind()
|
||||
DdlBancoSat.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstados(pCvePais As Integer)
|
||||
@@ -1265,7 +1272,11 @@ Partial Class RH_Personal
|
||||
|
||||
Protected Sub CargaGvAsistencias(Optional Orden As String = "")
|
||||
Dim objpersonal As New ClsRH
|
||||
If objpersonal.GetAsistencias(CvePersonal, DdlClienteAsistenciaC.SelectedValue.ToEntero, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveCliente As Integer = DdlClienteAsistenciaC.SelectedValue.ToEntero()
|
||||
If CveCliente <= 0 Then
|
||||
CveCliente = -1
|
||||
End If
|
||||
If objpersonal.GetAsistencias(CvePersonal, CveCliente, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL")
|
||||
Else
|
||||
GVAsistencia.DataSource = Nothing
|
||||
@@ -2878,10 +2889,16 @@ Partial Class RH_Personal
|
||||
DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub Lnkopenaddcuentabancaria_Click(sender As Object, e As EventArgs)
|
||||
BtnAgregarCuentaBanco.Visible = False
|
||||
BtnAgregarCuentaBanco.Visible = True
|
||||
|
||||
RegistraScript("$('#DivCuentasVancarias').modal();")
|
||||
End Sub
|
||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||
Dim EsBancomer = False
|
||||
|
||||
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
||||
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
||||
If nombrebanco.ToUpper.Contains("BBVA") Or nombrebanco.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
||||
EsBancomer = True
|
||||
End If
|
||||
|
||||
@@ -2914,23 +2931,19 @@ Partial Class RH_Personal
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 6 Y REFERENCIA OBLIGATORIA
|
||||
If (TxtConvenioCIE.Text.Trim.Length <> 0 And TxtConvenioCIE.Text.Trim.Length <> 6) Or (TxtConvenioCIE.Text.Trim.Length = 6 And TxtReferenciaCB.Text.Trim.Length < 3) Then
|
||||
Alert("El Convenio CIE debe tener una longitud de 6 dígitos y se debe especificar una referencia. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
|
||||
If EsBancomer AndAlso Not (TxtNumeroCuenta.Text.Trim.Length = 10 Or TxtConvenioCIE.Text.Trim.Length = 6) Then
|
||||
Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
''CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
|
||||
'If EsBancomer AndAlso Not (TxtNumeroCuenta.Text.Trim.Length = 10 Or TxtConvenioCIE.Text.Trim.Length = 6) Then
|
||||
' Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABECB.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferenciaCB.Text.Trim, DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, TxtBBVAAlias.Text)
|
||||
AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero())
|
||||
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
||||
End Sub
|
||||
Private Sub CargaGridCuentasBancos(Orden As String)
|
||||
If CvePersonal > 0 Then
|
||||
If Orden <> String.Empty Then
|
||||
If Not String.IsNullOrEmpty(Orden) Then
|
||||
Dim DV As New DataView(DTCuentasBancos, "", Orden, DataViewRowState.CurrentRows)
|
||||
GvBancosCuentas.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
@@ -2938,7 +2951,7 @@ Partial Class RH_Personal
|
||||
GvBancosCuentas.DataSource = DTCuentasBancos
|
||||
End If
|
||||
Else
|
||||
If Orden <> String.Empty Then
|
||||
If Not String.IsNullOrEmpty(Orden) Then
|
||||
Dim DV As New DataView(TempDTCuentasBancos, "", Orden, DataViewRowState.CurrentRows)
|
||||
GvBancosCuentas.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
@@ -2950,13 +2963,13 @@ Partial Class RH_Personal
|
||||
GvBancosCuentas.DataBind()
|
||||
UpCuentasBancos.Update()
|
||||
End Sub
|
||||
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String)
|
||||
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String, CveSATBanco As Integer)
|
||||
|
||||
Dim Row As DataRow
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
|
||||
|
||||
@@ -2991,14 +3004,8 @@ Partial Class RH_Personal
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaCuentasBancarias()
|
||||
TxtNombreBanco.Text = ""
|
||||
TxtNumeroSucursal.Text = ""
|
||||
TxtCLABECB.Text = ""
|
||||
TxtSWIFT.Text = ""
|
||||
TxtPlaza.Text = ""
|
||||
TxtNumeroCuenta.Text = ""
|
||||
TxtConvenioCIE.Text = ""
|
||||
TxtReferenciaCB.Text = ""
|
||||
End Sub
|
||||
Private Sub CargaCuentasBancarias()
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
Reference in New Issue
Block a user