@@ -679,7 +679,7 @@
+
<%--
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 01c715847..e6bb0c374 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -190,7 +190,7 @@ Partial Class RH_Personal
If ViewState("CvePersonal") Is Nothing Then
Return -1
Else
- Return ViewState("CvePersonal").ToString().ToEntero
+ Return ViewState("CvePersonal").ToString().ToEntero()
End If
End Get
End Property
@@ -218,7 +218,7 @@ Partial Class RH_Personal
If ViewState("CveUniforme") Is Nothing Then
Return -1
Else
- Return ViewState("CveUniforme").ToString().ToEntero
+ Return ViewState("CveUniforme").ToString().ToEntero()
End If
End Get
End Property
@@ -260,7 +260,7 @@ Partial Class RH_Personal
If ViewState("CvePersonalEstatusInicial") Is Nothing Then
Return -1
Else
- Return ViewState("CvePersonalEstatusInicial").ToString().ToEntero
+ Return ViewState("CvePersonalEstatusInicial").ToString().ToEntero()
End If
End Get
Set(value As Integer)
@@ -475,7 +475,7 @@ Partial Class RH_Personal
If ViewState("VacCveSupervisor") Is Nothing Then
Return -1
Else
- Return ViewState("VacCveSupervisor").ToString().ToEntero
+ Return ViewState("VacCveSupervisor").ToString().ToEntero()
End If
End Get
Set(value As Integer)
@@ -545,7 +545,7 @@ Partial Class RH_Personal
If ViewState("CvePermiso") Is Nothing Then
Return -1
Else
- Return ViewState("CvePermiso").ToString().ToEntero
+ Return ViewState("CvePermiso").ToString().ToEntero()
End If
End Get
Set(value As Integer)
@@ -827,7 +827,7 @@ Partial Class RH_Personal
CargaJornadas()
CargaProyecto()
CargaTiposAsistencia()
- 'CargaMotivoHoraExtra()
+ CargaMotivoHoraExtra()
CargaMotivosHorasExtras()
CargaSupervisores()
CargaMetodosPago()
@@ -845,9 +845,9 @@ Partial Class RH_Personal
CargaPermisosReemplazos()
CargaPaises()
- If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
+ If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero() > 0 Then
ViewState("CvePersonal") = Request("CvePersonal")
- 'CvePersonal = ViewState("CvePersonal").ToString().ToEntero
+ 'CvePersonal = ViewState("CvePersonal").ToString().ToEntero()
CargaDatos()
CargaDocumentacionFirmaDecontratos()
'LnkAddLicencias.Visible = True
@@ -861,7 +861,7 @@ Partial Class RH_Personal
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
+ If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() - 1
'Inicia Permisos
If UsuarioActual.TienePermisoProceso(228) Then
@@ -876,6 +876,7 @@ Partial Class RH_Personal
divBitacora.Visible = True
CargaGvBitacora()
Else
+ MostrarOcultarFechasEstatus()
LoadDefaultValues()
'Configuración de Modalidad Insert
@@ -995,7 +996,7 @@ Partial Class RH_Personal
End If
If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then
- Dim DTSub As DataTable = GlobalDTSubProyectos(-1, Request("CveSubProyecto").ToEntero) 'Cambiame
+ Dim DTSub As DataTable = GlobalDTSubProyectos(-1, Request("CveSubProyecto").ToEntero()) 'Cambiame
If DTSub.Rows.Count > 0 Then
Dim DTProy As DataTable = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("CveProyecto = " & DTSub.Rows(0)("CveProyecto").ToString())
If DTProy.Rows.Count > 0 Then
@@ -1054,10 +1055,10 @@ Partial Class RH_Personal
DdlJornada.DataBind()
End Sub
- 'Private Sub CargaMotivoHoraExtra()
- ' DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- ' DdlMotivoHoraExtra.DataBind()
- 'End Sub
+ Private Sub CargaMotivoHoraExtra()
+ DdlMotivoHoraExtra.DataSource = GlobalDTMotivosHorasExtras.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
+ DdlMotivoHoraExtra.DataBind()
+ End Sub
Private Sub CargaDepartamento()
DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
@@ -1075,8 +1076,8 @@ Partial Class RH_Personal
End Sub
Private Sub CargaMotivoBaja()
- 'DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- 'DdlMotivoBaja.DataBind()
+ DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
+ DdlMotivoBaja.DataBind()
End Sub
Private Sub CargaEstatusPersonal()
@@ -1141,7 +1142,7 @@ Partial Class RH_Personal
DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Todos", "-1"))
'old
'DdlSubProyectoAsignado.Items.Clear()
- 'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero)
+ 'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero())
'DdlSubProyectoAsignado.DataBind()
'DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1"))
@@ -1150,7 +1151,7 @@ Partial Class RH_Personal
Private Sub CargaSubProyectoAsistenciaC()
DdlSubProyectoAsistenciasC.Items.Clear()
- DdlSubProyectoAsistenciasC.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaC.SelectedValue.ToEntero)
+ DdlSubProyectoAsistenciasC.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaC.SelectedValue.ToEntero())
DdlSubProyectoAsistenciasC.DataBind()
DdlSubProyectoAsistenciasC.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -1158,7 +1159,7 @@ Partial Class RH_Personal
Private Sub CargaSubProyectoAsistenciaA()
DdlSubProyectoAsistenciasA.Items.Clear()
- DdlSubProyectoAsistenciasA.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaA.SelectedValue.ToEntero)
+ DdlSubProyectoAsistenciasA.DataSource = GlobalDTSubProyectos(DdlProyectoAsistenciaA.SelectedValue.ToEntero())
DdlSubProyectoAsistenciasA.DataBind()
DdlSubProyectoAsistenciasA.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -1299,7 +1300,7 @@ Partial Class RH_Personal
Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim ObjRH As New ClsRH
- If ObjRH.RemovePersonalAsistencias(GvRow.DataKey("CveAsistencia").ToEntero) Then
+ If ObjRH.RemovePersonalAsistencias(GvRow.DataKey("CveAsistencia").ToEntero()) Then
Alert("La asistencia ha sido eliminada correctamente.")
CargaGvAsistencias()
End If
@@ -1317,7 +1318,7 @@ Partial Class RH_Personal
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
+ 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
@@ -1328,9 +1329,9 @@ Partial Class RH_Personal
End Sub
Protected Sub LbGuardarAsistencia_Click(sender As Object, e As System.EventArgs) Handles LbGuardarAsistencia.Click
Dim ObjPersonal As New ClsRH()
- If ObjPersonal.AddAsistencia(CvePersonal, DdlClienteAsistenciaA.SelectedValue.ToEntero, DdlSubProyectoAsistenciasA.SelectedValue.ToEntero, TxtFechaAsistencia.Text.Trim.ToDate,
- DdlTipoAsistencias.SelectedValue.ToEntero, TxtPorPago.Text.Trim.ToDouble, TxtHorasDobles.Text.Trim.ToDouble,
- TxtHorasTriples.Text.Trim.ToDouble, DdlMotivoHoraExtra.SelectedValue.ToEntero, TxtObservaciones.Text.Trim,
+ If ObjPersonal.AddAsistencia(CvePersonal, DdlClienteAsistenciaA.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasA.SelectedValue.ToEntero(), TxtFechaAsistencia.Text.Trim.ToDate,
+ DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim.ToDouble, TxtHorasDobles.Text.Trim.ToDouble,
+ TxtHorasTriples.Text.Trim.ToDouble, DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion)
@@ -1387,9 +1388,9 @@ Partial Class RH_Personal
Dim OcurrioError As Boolean = False
For Each Row As GridViewRow In GVAsistencia.Rows
- If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero, DdlClienteAsistenciaC.SelectedValue.ToEntero, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
- Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero, Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
- Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero, Row.FCTextBox("TxtObservaciones").Text.Trim,
+ If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero(), DdlClienteAsistenciaC.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
+ Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(), Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
+ Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
OcurrioError = True
Exit For
@@ -1524,7 +1525,9 @@ Partial Class RH_Personal
DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString()
DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString()
- 'DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
+ DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
+
+ TxtFechaBaja.Text = If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)
'If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
@@ -1716,11 +1719,11 @@ Partial Class RH_Personal
'Dim FechaActivo As Date = MinFecha
'Dim FechaReingreso As Date = MinFecha
- 'If DdlEstatusPersonal.SelectedValue.ToEntero <> CvePersonalEstatusInicial Then
- ' If DdlEstatusPersonal.SelectedValue.ToEntero = 1 Then
+ 'If DdlEstatusPersonal.SelectedValue.ToEntero() <> CvePersonalEstatusInicial Then
+ ' If DdlEstatusPersonal.SelectedValue.ToEntero() = 1 Then
' FechaActivo = TxtFechaActivo.Text.ToDate
- ' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 2 Then
- ' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 5 Then
+ ' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero() = 2 Then
+ ' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero() = 5 Then
' FechaReingreso = TxtFechaReingreso.Text.ToDate
' End If
'End If
@@ -1733,25 +1736,25 @@ Partial Class RH_Personal
URL = ""
If ObjPersonal.AddPersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate,
- DdlTipoPeriodo.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
- TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero,
- TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero, TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
- DdlTipoContrato.SelectedValue.ToEntero, TxtUbicacion.Text.Trim,
- DdlTurno.SelectedValue.ToEntero, DdlPuesto.SelectedValue.ToEntero,
- DdlDepartamento.SelectedValue.ToEntero,
- DdlRuta.SelectedValue.ToEntero,
- DdlEscolaridad.SelectedValue.ToEntero,
- DdlEstadoCivil.SelectedValue.ToEntero,
- DdlGenero.SelectedValue.ToEntero,
+ DdlTipoPeriodo.SelectedValue.ToEntero(), TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
+ TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero(),
+ TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero(), TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
+ DdlTipoContrato.SelectedValue.ToEntero(), TxtUbicacion.Text.Trim,
+ DdlTurno.SelectedValue.ToEntero(), DdlPuesto.SelectedValue.ToEntero(),
+ DdlDepartamento.SelectedValue.ToEntero(),
+ DdlRuta.SelectedValue.ToEntero(),
+ DdlEscolaridad.SelectedValue.ToEntero(),
+ DdlEstadoCivil.SelectedValue.ToEntero(),
+ DdlGenero.SelectedValue.ToEntero(),
-1, "-1",
- DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
+ DdlEstatusPersonal.SelectedValue.ToEntero(), TxtFechaNacimiento.Text.ToDate,
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
- DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
- TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero, DdlRiesgoPuesto.SelectedValue.ToEntero, DdlRegimenContratacion.SelectedValue.ToEntero,
- DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, URL,
- DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
- DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
- TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero) Then
+ DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
+ TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
+ DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), URL,
+ DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
+ DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
+ TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero()) Then
If Archivo.Exists Then
@@ -1772,7 +1775,7 @@ Partial Class RH_Personal
If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows
- If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
+ If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
TieneError = True
Exit For
End If
@@ -1804,27 +1807,27 @@ Partial Class RH_Personal
Else
'If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
If ObjPersonal.UpdatePersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate,
- DdlTipoPeriodo.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
- TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero,
- TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero, TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
- DdlTipoContrato.SelectedValue.ToEntero, TxtUbicacion.Text.Trim,
- DdlTurno.SelectedValue.ToEntero, DdlPuesto.SelectedValue.ToEntero,
- DdlDepartamento.SelectedValue.ToEntero,
- DdlRuta.SelectedValue.ToEntero,
- DdlEscolaridad.SelectedValue.ToEntero,
- DdlEstadoCivil.SelectedValue.ToEntero,
- DdlGenero.SelectedValue.ToEntero,
- -1, "-1",
- DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
+ DdlTipoPeriodo.SelectedValue.ToEntero(), TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
+ TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero(),
+ TxtPorPrimaVacacional.Text.Trim.ToDouble, DdlMetodoPago.SelectedValue.ToEntero(), TxtFechaInicioContrato.Text.Trim.ToDate, If(IsDate(TxtFechaFinContrato.Text.Trim()), TxtFechaFinContrato.Text.Trim(), "-1"),
+ DdlTipoContrato.SelectedValue.ToEntero(), TxtUbicacion.Text.Trim,
+ DdlTurno.SelectedValue.ToEntero(), DdlPuesto.SelectedValue.ToEntero(),
+ DdlDepartamento.SelectedValue.ToEntero(),
+ DdlRuta.SelectedValue.ToEntero(),
+ DdlEscolaridad.SelectedValue.ToEntero(),
+ DdlEstadoCivil.SelectedValue.ToEntero(),
+ DdlGenero.SelectedValue.ToEntero(),
+ DdlMotivoBaja.SelectedValue.ToEntero(), If(DdlEstatusPersonal.SelectedValue = "2", TxtFechaBaja.Text.Trim, "-1"),
+ DdlEstatusPersonal.SelectedValue.ToEntero(), TxtFechaNacimiento.Text.ToDate,
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
- DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
+ DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
TxtCURP.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim,
- DdlBanco.SelectedValue.ToEntero, DdlRiesgoPuesto.SelectedValue.ToEntero, DdlRegimenContratacion.SelectedValue.ToEntero,
- DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, CvePersonal,
- URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
- DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
+ DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(),
+ DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), CvePersonal,
+ URL, DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text,
+ DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
- CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then
+ CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero()) Then
'Funsion usa RH Familiares
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
@@ -1856,7 +1859,7 @@ Partial Class RH_Personal
'GUARDA ORGANIGRAMA
If Not TieneError Then
- If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero)) Then
+ If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero() = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero())) Then
TieneError = True
End If
End If
@@ -2133,12 +2136,12 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- CvePersonalBuzon = GvRow.DataKey("CvePersonalBuzon").ToEntero
+ CvePersonalBuzon = GvRow.DataKey("CvePersonalBuzon").ToEntero()
CargaBuzonCalidadSeguimiento()
DdlClienteBuzon.SelectedValue = GvRow.DataKey("CveCliente")
' DdlClienteBuzon.Enabled = False
- If GvRow.DataKey("CveClienteSucursal").ToEntero > 0 Then
+ If GvRow.DataKey("CveClienteSucursal").ToEntero() > 0 Then
CargaClienteSucursal()
DdlSucursalClienteBuzon.SelectedValueExist(GvRow.DataKey("CveClienteSucursal"))
Else
@@ -2151,7 +2154,7 @@ Partial Class RH_Personal
DdlTipoBuzonCalidad.SelectedValueExist(GvRow.DataKey("CveTipoBuzon"))
ChkSeAtendio.Visible = True
- ChkSeAtendio.Checked = If(GvRow.DataKey("SeAtendioChk").ToString().ToEntero = 1, True, False)
+ ChkSeAtendio.Checked = If(GvRow.DataKey("SeAtendioChk").ToString().ToEntero() = 1, True, False)
TxtFechaBuzonCalidad.Text = GvRow.DataKey("FechaQueja").ToDate.ToString("dd/MM/yyyy")
TxtBuzonDescriptcion.Text = GvRow.DataKey("Descripcion")
@@ -2187,7 +2190,7 @@ Partial Class RH_Personal
If ViewState("CvePersonalBuzon") Is Nothing Then
Return -1
Else
- Return ViewState("CvePersonalBuzon").ToString().ToEntero
+ Return ViewState("CvePersonalBuzon").ToString().ToEntero()
End If
End Get
Set(value As Integer)
@@ -2200,11 +2203,11 @@ Partial Class RH_Personal
Dim objRH As New ClsRH
If CvePersonalBuzon = -1 Then
- objRH.AddBuzonCalidad(CvePersonal, DdlClienteBuzon.SelectedValue.ToEntero, DdlSucursalClienteBuzon.SelectedValue.ToEntero, DdlTipoBuzonCalidad.SelectedValue.ToEntero, TxtFechaBuzonCalidad.Text.ToDate, TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.Empresa.CveEmpresa, UsuarioActual.CveUsuario)
+ objRH.AddBuzonCalidad(CvePersonal, DdlClienteBuzon.SelectedValue.ToEntero(), DdlSucursalClienteBuzon.SelectedValue.ToEntero(), DdlTipoBuzonCalidad.SelectedValue.ToEntero(), TxtFechaBuzonCalidad.Text.ToDate, TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.Empresa.CveEmpresa, UsuarioActual.CveUsuario)
RegistraScript(" $('#ModalBuzonCalidad').modal('hide')", "HideModalCalidadAgregar")
Else
- objRH.UpdateBuzonCalidad(CvePersonalBuzon, If(ChkSeAtendio.Checked, 1, 0), DdlClienteBuzon.SelectedValue.ToEntero, DdlSucursalClienteBuzon.SelectedValue.ToEntero, DdlTipoBuzonCalidad.SelectedValue.ToEntero, TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.CveUsuario)
+ objRH.UpdateBuzonCalidad(CvePersonalBuzon, If(ChkSeAtendio.Checked, 1, 0), DdlClienteBuzon.SelectedValue.ToEntero(), DdlSucursalClienteBuzon.SelectedValue.ToEntero(), DdlTipoBuzonCalidad.SelectedValue.ToEntero(), TxtBuzonDescriptcion.Text.Trim, TxtNombreClienteBuzonCalidad.Text.Trim, TxtTelefono.Text.Trim, TxtMailBuzonCalidad.Text.Trim, TxtObservacionesBuzon.Text, UsuarioActual.CveUsuario)
RegistraScript(" $('#ModalBuzonCalidad').modal('hide')", "HideModalCalidadAgregar")
End If
CargaBuzonCalidad()
@@ -2316,7 +2319,7 @@ Partial Class RH_Personal
Dim ObjCliente As New ClsClientes()
- If ObjCliente.GetSucursales(DdlClienteBuzon.SelectedValue.ToEntero) Then
+ If ObjCliente.GetSucursales(DdlClienteBuzon.SelectedValue.ToEntero()) Then
DdlSucursalClienteBuzon.DataSource = ObjCliente.DtResultados
If ObjCliente.DtResultados.Rows.Count > 0 Then
Divsucursalciente.Visible = True
@@ -2354,7 +2357,7 @@ Partial Class RH_Personal
' Dim Observaciones As String = DirectCast(GvBuzonCalidad.Rows(e.RowIndex).FindControl("TxtObs"), TextBox).Text.Trim
' Dim SeAtendio As Boolean = GvBuzonCalidad.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
- ' Dim CveBuzonCalidad As Integer = GvBuzonCalidad.DataKeys(e.RowIndex).Value.ToString().ToEntero
+ ' Dim CveBuzonCalidad As Integer = GvBuzonCalidad.DataKeys(e.RowIndex).Value.ToString().ToEntero()
' If ObjBuzonCalidad.UpdateBuzonCalidad(SeAtendio, Observaciones, CveBuzonCalidad, UsuarioActual.CveUsuario) Then
' GvBuzonCalidad.EditIndex = -1
@@ -2436,7 +2439,7 @@ Partial Class RH_Personal
TxtInfoValor.Text = String.Format("{0:###,###.##}", frow("Importe"))
DdlInfoTipoAplicacion.SelectedValueExist(frow("TipoAplicacion").ToString())
- Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero
+ Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero()
TxtInfoDescripcion.Text = String.Format("{0}", frow("Descripcion02"))
TxtInfoNumCredito.Text = String.Format("{0}", frow("Descripcion01"))
TxtInfoFechaInicio.Text = String.Format("{0:dd/MM/yyyy}", frow("FInicioAplicacion"))
@@ -2483,7 +2486,7 @@ Partial Class RH_Personal
e.Row.Cells(5).Width = Unit.Pixel(160)
- If e.Row.DBCampo("Aplica").ToEntero = 1 Then e.Row.FCCheckBox("ChkAplica").Checked = True
+ If e.Row.DBCampo("Aplica").ToEntero() = 1 Then e.Row.FCCheckBox("ChkAplica").Checked = True
If e.Row.DBCampo("Formula") = "S" Then
e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False : e.Row.Cells(3).Text = "Calculado"
@@ -2508,7 +2511,7 @@ Partial Class RH_Personal
End If
- If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
+ If e.Row.DBCampo("TipoAplicacion").ToEntero() > 5 Then
TipoAplicacion = "2600"
End If
e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
@@ -2518,7 +2521,7 @@ Partial Class RH_Personal
' e.Row.FCTextBox("TxtImporte").Visible = False
' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
'Else
- ' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
+ ' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero()
' Case 1
' 'Saldo
' e.Row.FCLiteral("LtlSaldo").Visible = True
@@ -2537,7 +2540,7 @@ Partial Class RH_Personal
Protected Sub BtnGuardarInfornavit_Click(sender As Object, e As EventArgs)
Dim importe As Decimal = TxtInfoValor.Text.ToDecimal()
- Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero
+ Dim TipoAplicacion As Integer = DdlInfoTipoAplicacion.SelectedValue.ToEntero()
Dim NoPagos As Integer = 0
Dim SaldoIni As Decimal = 0
Dim descripcion02 As String = TxtInfoDescripcion.Text
@@ -2569,10 +2572,10 @@ Partial Class RH_Personal
Dim OcurrioError As Boolean = False
For Each Row As GridViewRow In GVConceptos.Rows
If Row.FCCheckBox("ChkAplica").Checked = True Then
- Dim CveConcepto As Integer = Row.DataKey("CveConcepto").ToEntero
+ Dim CveConcepto As Integer = Row.DataKey("CveConcepto").ToEntero()
Dim Importe As Double = Row.FCTextBox("TxtImporte").Text.ToDouble
- Dim TipoAplicacion As Integer = Row.FCDropDownList("DdlTipoAplicacion").SelectedValue.ToEntero
- Dim NoPagos As Integer = If(Row.FCTextBox("TxtNoPagos").Text.ToEntero = 0, -1, Row.FCTextBox("TxtNoPagos").Text.ToEntero)
+ Dim TipoAplicacion As Integer = Row.FCDropDownList("DdlTipoAplicacion").SelectedValue.ToEntero()
+ Dim NoPagos As Integer = If(Row.FCTextBox("TxtNoPagos").Text.ToEntero() = 0, -1, Row.FCTextBox("TxtNoPagos").Text.ToEntero())
Dim SaldoIni As Double = If(Row.FCTextBox("TxtSaldoIni").Text.ToDouble = 0, -1, Row.FCTextBox("TxtSaldoIni").Text.ToDouble)
Select Case TipoAplicacion
@@ -2597,7 +2600,7 @@ Partial Class RH_Personal
Else
'Borrarlo
If Row.DataKey("CvePersonalConcepto") <> "" Then
- If Not ObjPersonal.RemoveConcepto(Row.DataKey("CvePersonalConcepto").ToEntero) Then
+ If Not ObjPersonal.RemoveConcepto(Row.DataKey("CvePersonalConcepto").ToEntero()) Then
OcurrioError = True
ObjPersonal.RollBack()
Exit For
@@ -2623,7 +2626,7 @@ Partial Class RH_Personal
Dim gvr As GridViewRow = DirectCast(Ddl.NamingContainer, GridViewRow)
- Select Case Ddl.SelectedValue.ToEntero
+ Select Case Ddl.SelectedValue.ToEntero()
Case 1
'Descontar hasta pagar el saldo prestado
GVConceptos.Rows(gvr.RowIndex).FCTextBox("TxtSaldoIni").Visible = True
@@ -2653,16 +2656,16 @@ Partial Class RH_Personal
'DivFechaReingreso.Visible = False
'DivFechaActivo.Visible = False
- 'If DdlEstatusPersonal.SelectedValue.ToEntero.Contiene(1, 2, 5) Then
- ' DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 1, True, False)
- ' 'DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 2, True, False)
- ' 'DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 5, True, False)
- 'Else
- ' DivFechaActivo.Visible = False
- ' 'DivFechaBaja.Visible = False
- ' DivFechaReingreso.Visible = False
- 'End If
-
+ If DdlEstatusPersonal.SelectedValue.ToEntero().Contiene(1, 2, 5) Then
+ 'DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero() = 1, True, False)
+ DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero() = 2, True, False)
+ 'DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero() = 5, True, False)
+ Else
+ 'DivFechaActivo.Visible = False
+ DivFechaBaja.Visible = False
+ 'DivFechaReingreso.Visible = False
+ End If
+ DivMotivoBaja.Visible = DivFechaBaja.Visible
End Sub
Protected Sub GvNominas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvNominas.RowDataBound
@@ -2890,12 +2893,12 @@ Partial Class RH_Personal
If e.Row.DBCampo("FechaDocumento") = "" Then e.Row.BackColor = Drawing.Color.LightGray
- If e.Row.DBCampo("CveIE").ToEntero > 0 Then
+ If e.Row.DBCampo("CveIE").ToEntero() > 0 Then
e.Row.FCHyperLink("HplRef").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
e.Row.FCLabel("LtlC").CssClass = "label label-sm label-success"
e.Row.FCLabel("LtlC").ForeColor = Drawing.Color.White
End If
- If e.Row.DBCampo("CveCompra").ToEntero > 0 Then
+ If e.Row.DBCampo("CveCompra").ToEntero() > 0 Then
e.Row.FCHyperLink("HplRef").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DBCampo("CveCompra"))
e.Row.FCLabel("LtlC").CssClass = "label label-sm label-warning"
e.Row.FCLabel("LtlC").ForeColor = Drawing.Color.White
@@ -2945,7 +2948,7 @@ Partial Class RH_Personal
Protected Sub LbActualizarCuentaBanco_Click(sender As Object, e As EventArgs)
Using ObjCuentasBancos As New ClsGenerales
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
- If ObjCuentasBancos.UpdateCuentasDepositosPersonal(CveCuentaDeposito, nombrebanco, TxtNumeroCuenta.Text, TxtCLABECB.Text, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ChkEstatusPagoE.Checked, ChkEstatuscuenta.Checked, DdlBancoSat.SelectedValue.ToEntero()) Then
+ If ObjCuentasBancos.UpdateCuentasDepositosPersonal(CveCuentaDeposito, nombrebanco, TxtNumeroCuenta.Text, TxtCLABECB.Text, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, ChkEstatusPagoE.Checked, ChkEstatuscuenta.Checked, DdlBancoSat.SelectedValue.ToEntero()) Then
'UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean
Alert("Cuenta actualizada")
End If
@@ -2974,9 +2977,9 @@ Partial Class RH_Personal
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
If TxtCLABECB.Text.Trim.Length <> 18 AndAlso TxtCLABECB.Text.Trim.Length = 0 AndAlso Not EsBancomer Then
- Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
+ Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
If TxtCLABECB.Text.Trim.Length <> 0 AndAlso TxtCLABECB.Text.Trim.Length <> 18 Then
Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -2998,7 +3001,7 @@ Partial Class RH_Personal
' Exit Sub
'End If
- AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero(), ChkEstatusPagoE.Checked)
+ AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero(), DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero(), ChkEstatusPagoE.Checked)
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
End Sub
Private Sub CargaGridCuentasBancos(Orden As String)
@@ -3157,7 +3160,7 @@ Partial Class RH_Personal
Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
- Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero
+ Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
@@ -3215,14 +3218,14 @@ Partial Class RH_Personal
End If
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
- If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
+ If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion)
End If
Else
- Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero - 1
+ Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
Row("BancoNombre") = NombreBanco
Row("Sucursal") = NumeroSucursal
@@ -3246,14 +3249,14 @@ Partial Class RH_Personal
Dim ObjCuentasBancos As New ClsGenerales
If CvePersonal > 0 Then
- If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If ObjCuentasBancos.RemoveCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero(), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
Alert("Cuenta Bancaria borrada con exito.", TipoMensaje.MsgInformacion)
End If
Else
- Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero - 1
+ Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
TempDTCuentasBancos.Rows.RemoveAt(index)
End If
@@ -3276,7 +3279,7 @@ Partial Class RH_Personal
Arg = CType(sender, LinkButton).CommandArgument().ToString().Split(";"c)
Campo = Arg(0)
- gvi = Arg(1).ToEntero
+ gvi = Arg(1).ToEntero()
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
Campo = Campo.Substring(0, Campo.Length - 1)
@@ -3317,8 +3320,8 @@ Partial Class RH_Personal
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
Dim LB = CType(sender, LinkButton)
- ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
- ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
+ ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
+ ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
End Sub
@@ -3553,7 +3556,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("Nombre", String.Format("{0} {1} {2}", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim)))
params.Add(New ReportParameter("Vigencia", TxtFechaFinContrato.Text))
- params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero > 0, DdlPuesto.SelectedItem.Text, "")))
+ params.Add(New ReportParameter("Puesto", If(DdlPuesto.SelectedValue.ToEntero() > 0, DdlPuesto.SelectedItem.Text, "")))
params.Add(New ReportParameter("CURP", TxtCURP.Text))
params.Add(New ReportParameter("NoRegistro", ""))
params.Add(New ReportParameter("RegIMSS", TxtNumeroSS.Text))
@@ -3683,8 +3686,8 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim chkEstatus As CheckBox
- CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero
- CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
+ CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
+ CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
Documentacion = GvRow.DataKey("Documentacion")
AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString()
@@ -3711,10 +3714,10 @@ Partial Class RH_Personal
For Each dRow As GridViewRow In GvDocumentosFirma.Rows
- Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString().ToEntero
+ Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString().ToEntero()
Dim _Adjunto As String = dRow.DataKey("Adjunto")
'Dim _Documentacion As String = dRow.DataKey("Documentacion")
- Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero
+ Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
Dim _txtObservaciones As TextBox = dRow.FCTextBox("TxtObservaciones")
Dim _TxtFechaLimite As TextBox = dRow.FCTextBox("TxtFechaLimite")
Dim _TxtFechaVigencia As TextBox = dRow.FCTextBox("TxtFechaVigencia")
@@ -3726,7 +3729,7 @@ Partial Class RH_Personal
Dim _FechaVigencia As Date
Dim _FechaLimite As Date
- Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString().ToEntero
+ Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString().ToEntero()
Dim AplicaDiasLimite As Boolean = If(dRow.DataKey("AplicaDiasLimite").ToString() = "1", True, False)
Dim AplicaFechaVencimiento As Boolean = If(dRow.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False)
@@ -3844,8 +3847,8 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = False
- Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero
- Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
+ Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
+ Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString()
Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
@@ -3889,7 +3892,7 @@ Partial Class RH_Personal
Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
Dim documentacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString()
Dim Documentacion As String = e.Row.DBCampo("Documentacion").ToString()
- Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString().ToEntero
+ Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString().ToEntero()
Dim separado As Char() = ".".ToString().ToCharArray
Dim array() As String = Adjunto.Split(separado)
Dim extencion As String = ""
@@ -3897,7 +3900,7 @@ Partial Class RH_Personal
Dim TxtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
' FechaVigencia
- Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero
+ Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero()
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString() = "1", True, False)
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False)
@@ -3912,7 +3915,7 @@ Partial Class RH_Personal
extencion = array(array.Length - 1)
End If
- If e.Row.DBCampo("Estatus").ToString().ToEntero = 1 Then
+ If e.Row.DBCampo("Estatus").ToString().ToEntero() = 1 Then
chkEstatus.Checked = True
Else
chkEstatus.Checked = False
@@ -3960,7 +3963,7 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
+ Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
@@ -4382,7 +4385,7 @@ Partial Class RH_Personal
Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString()
Dim gvr As GridViewRow = CType(CType(sender, LinkButton).BindingContainer, GridViewRow)
- Dim CveNomina As Integer = gvr.DataKey("CveNomina").ToString().ToEntero
+ Dim CveNomina As Integer = gvr.DataKey("CveNomina").ToString().ToEntero()
Dim Total As Decimal = gvr.DataKey("Total").ToString().ToDecimal
Dim RFCReceptor As String = gvr.DataKey("RFC").ToString()
@@ -4410,7 +4413,7 @@ Partial Class RH_Personal
GvVacaciones.DataSource = objRH.DtResultados
If objRH.DtResultados.Rows.Count > 0 Then
- VacFolioActual = objRH.DtResultados.Compute("Max(Folio)", String.Empty).ToString().ToEntero
+ VacFolioActual = objRH.DtResultados.Compute("Max(Folio)", String.Empty).ToString().ToEntero()
Else
VacFolioActual = 0
End If
@@ -4476,7 +4479,7 @@ Partial Class RH_Personal
For Each GvRow As GridViewRow In GvVacaciones.Rows
'Dim _Estatus As Boolean = Boolean.Parse(GvRow.DataKey("Estatus").ToString())
'Dim _Documento As String = GvRow.DataKey("Documento")
- 'Dim _CveAutoriza As Integer = GvRow.DataKey("CveAutoriza").ToEntero
+ 'Dim _CveAutoriza As Integer = GvRow.DataKey("CveAutoriza").ToEntero()
'Dim RutaDocuemntoAutorizacion As String = String.Format("{0}Personal\{1}\Vacaciones\{2}", UsuarioActual.Empresa.Ruta, CvePersonal, _Documento)
Dim lnkDescargaFormato As LinkButton = GvRow.FCLinkButton("ImgDescargaFormato")
Dim lnkDescargaAutorizacion As LinkButton = GvRow.FCLinkButton("ImgDescargaAutorizacion")
@@ -4509,15 +4512,15 @@ Partial Class RH_Personal
VacInicioPeriodo = objRH.DtResultados(0)("InicioPeriodo").ToString().ToDate
VacFinPeriodo = objRH.DtResultados(0)("FinPeriodo").ToString().ToDate
- VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero
- VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero
- VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero
- VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero
- VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero
+ VacAnios = objRH.DtResultados(0)("Anios").ToString().ToEntero()
+ VacDias = objRH.DtResultados(0)("Dias").ToString().ToEntero()
+ VacDiasUsados = objRH.DtResultados(0)("DiasUsados").ToString().ToEntero()
+ VacDiasCancelados = objRH.DtResultados(0)("DiasCancelados").ToString().ToEntero()
+ VacDiasDisponibles = objRH.DtResultados(0)("DiasDisponibles").ToString().ToEntero()
GvVacacionesResumen.DataSource = objRH.DtResultados
VacSupervisorNombre = objRH.DtResultados(0)("SupervisorNombre").ToString()
VacSupervisorCorreo = objRH.DtResultados(0)("SupervisorCorreo").ToString()
- VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero
+ VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero()
Else
VacInicioPeriodo = Now
@@ -4578,7 +4581,7 @@ Partial Class RH_Personal
' Dim fInicio As Date = TxtFechaInicioVac.Text.ToDate
' Dim fFin As Date = TxtFechaFinVac.Text.ToDate
' Dim ErrorSolicitud As Boolean = True
- ' Dim DiasSolicitados As Integer = (fFin - fInicio).TotalDays.ToString().ToEntero
+ ' Dim DiasSolicitados As Integer = (fFin - fInicio).TotalDays.ToString().ToEntero()
' If fInicio < fFin Or fInicio = fFin Then
@@ -4689,7 +4692,7 @@ Partial Class RH_Personal
' For x As Integer = 1 To 8
- ' If DdlPermisoTipo.SelectedValue.ToEntero = x Then
+ ' If DdlPermisoTipo.SelectedValue.ToEntero() = x Then
' ListaTagsDocumentost.Add(New TagsDocumentos("{op" & x & "}", "X"))
' Else
' ListaTagsDocumentost.Add(New TagsDocumentos("{op" & x & "}", ""))
@@ -4787,9 +4790,9 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero
+ CvePersonalVacaciones = GvRow.DataKey("CvePersonalVacaciones").ToEntero()
'ChkEstatusDiaVacacion.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
- VacFolio = GvRow.DataKey("Folio").ToString().ToEntero
+ VacFolio = GvRow.DataKey("Folio").ToString().ToEntero()
TxtFechaDiaVacacion.Text = GvRow.DataKey("FechaInicio").ToString().ToDate.ToString("dd/MM/yyyy")
TxtFechaDiaVacacionFin.Text = GvRow.DataKey("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy")
@@ -4846,7 +4849,7 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- 'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
+ 'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero()
'DescarSolicitudVacaciones(Folio)
Dim RutaFormato As String = String.Format("{0}Formatos\SolicitudVacaciones.docx", UsuarioActual.Empresa.Ruta)
@@ -4920,7 +4923,7 @@ Partial Class RH_Personal
Public Sub DownLoad_ClickSolicitudPermiso(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- 'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
+ 'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero()
'DescarSolicitudVacaciones(Folio)
Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
@@ -5009,7 +5012,7 @@ Partial Class RH_Personal
objRH.Dispose()
objEdoc.Dispose()
- _CveDocumentacion = DTVacaciones(0)("CveDocumentacion").ToString().ToEntero
+ _CveDocumentacion = DTVacaciones(0)("CveDocumentacion").ToString().ToEntero()
_DocumentacionFormato = DTVacaciones(0)("DocumentacionFormato").ToString()
_PathDocumento = UsuarioActual.Empresa.Ruta & "Formatos\" & _CveDocumentacion & "_" & _DocumentacionFormato
@@ -5165,7 +5168,7 @@ Partial Class RH_Personal
'RutaDocumento = Path.Combine(RutaDocumento, "Empresas\Grales\FormatoDC3.docx")
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim _CveCurso As Integer = GvRow.DataKey("CveCurso").ToEntero
+ Dim _CveCurso As Integer = GvRow.DataKey("CveCurso").ToEntero()
@@ -5219,7 +5222,7 @@ Partial Class RH_Personal
If DdlUniforme.SelectedIndex > 0 Then
Dim objRH As New ClsRH
- If objRH.UniformeDetallePersonalGet(CvePersonal, DdlUniforme.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then
+ If objRH.UniformeDetallePersonalGet(CvePersonal, DdlUniforme.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then
GvUniforme.DataSource = objRH.DtResultados
If objRH.DtResultados.Rows.Count > 0 Then
@@ -5277,22 +5280,22 @@ Partial Class RH_Personal
Dim row As GridViewRow = CType(lb.NamingContainer, GridViewRow)
- CveAlmacenUniforme = row.DataKey("CveAlmacen").ToString().ToEntero
+ CveAlmacenUniforme = row.DataKey("CveAlmacen").ToString().ToEntero()
DescripcionUniforme = row.DataKey("CodigoPS")
PU = row.DataKey("PU").ToString().ToDecimal
- CveSeccionAlmacenUniforme = row.DataKey("CveSeccionAlmacen").ToString().ToEntero
- CveUM = row.DataKey("CveUM").ToString().ToEntero
- CvePS = row.DataKey("CvePS").ToString().ToEntero
- CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
- CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
- Dim Cantidad As Integer = row.DataKey("Saldo").ToString().ToEntero
+ CveSeccionAlmacenUniforme = row.DataKey("CveSeccionAlmacen").ToString().ToEntero()
+ CveUM = row.DataKey("CveUM").ToString().ToEntero()
+ CvePS = row.DataKey("CvePS").ToString().ToEntero()
+ CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero()
+ CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero()
+ Dim Cantidad As Integer = row.DataKey("Cantidad").ToString().ToEntero()
TxtCantidadResguardo.Text = Cantidad.ToString
RvTxtCantidadResguardo.MaximumValue = Cantidad.ToString
If row.DataKey("AplicaSeccion").ToString = "True" Then
divSeccionAlmacen.Visible = True
DdlSeccionAlmacen.Items.Clear()
- CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS, UsuarioActual.CveEmpresa)
- DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePS)
+ CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa)
+ DdlSeccionAlmacen.DataSource = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePS)
DdlSeccionAlmacen.DataBind()
End If
TxtLiberarSerie.Text = ""
@@ -5325,10 +5328,10 @@ Partial Class RH_Personal
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
Dim Serie As String = TxtLiberarSerie.Text.Trim
- Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
+ Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=-3, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
- Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
- Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
+ Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero()
+ Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie)
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
@@ -5395,7 +5398,7 @@ Partial Class RH_Personal
Public Sub CargaPermisos()
Dim ObjRH As New ClsRH
- Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString().ToEntero, -1)
+ Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString().ToEntero(), -1)
If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, Now.AddMonths(-3), Now.AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then
GvPermisos.DataSource = ObjRH.DtResultados
Else
@@ -5467,7 +5470,7 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- CvePermiso = GvRow.DataKey("CvePermiso").ToString().ToEntero
+ CvePermiso = GvRow.DataKey("CvePermiso").ToString().ToEntero()
TxtPermisoDescripcion.Text = GvRow.DataKey("Descripcion").ToString()
TxtFechaInicioPer.Text = GvRow.DataKey("FechaInicio").ToString()
TxtFechaFinPer.Text = GvRow.DataKey("FechaFin").ToString()
@@ -5509,7 +5512,7 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjRH As New ClsRH
- Dim CvePermisoInterno As Integer = GvRow.DataKey("CvePermiso").ToEntero
+ Dim CvePermisoInterno As Integer = GvRow.DataKey("CvePermiso").ToEntero()
If ObjRH.ChecadorPermisosRemove(CvePermisoInterno, UsuarioActual.CveEmpresa) Then
End If
@@ -5663,7 +5666,7 @@ Partial Class RH_Personal
Dim Personal = gvr.DataKey("Nombre").ToString()
Dim fechai = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
Dim fechaf = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
- Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero
+ Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero()
If UsuarioActual.CveRol = 1 Then
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
@@ -5750,7 +5753,7 @@ Partial Class RH_Personal
Protected Sub LnkViaticoDetalle_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim CveSolicitudViatico As Integer = GvRow.DataKey("CveSolicitudViatico").ToEntero
+ Dim CveSolicitudViatico As Integer = GvRow.DataKey("CveSolicitudViatico").ToEntero()
CargaViaticosDetalle(CveSolicitudViatico)
RegistraScript("$('#DivViaticoDetalle').modal({ backdrop: 'static', keyboard: false});")
End Sub
@@ -5881,14 +5884,14 @@ Partial Class RH_Personal
If CvePersonal > 0 Then
Dim ObjAF As New ClsAF()
- If ObjAF.RemoveLicencia(HdnIDLicencia.Value.ToEntero) Then
+ If ObjAF.RemoveLicencia(HdnIDLicencia.Value.ToEntero()) Then
CargaLicencias()
Alert("La licencia se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjAF.Dispose()
Else
If DTLicencias IsNot Nothing Then
- Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero}")(0)
+ Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
DTLicencias.Rows.Remove(Row)
GvLicencias.DataSource = DTLicencias
GvLicencias.DataBind()
@@ -5924,7 +5927,7 @@ Partial Class RH_Personal
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidadLicencia.Value = "U" Then
- If ObjAF.UpdateLicencia(HdnIDLicencia.Value.ToEntero, TxtLicencia.Text.Trim, TxtFechaExpLicencia.Text.ToDateTime, TxtFechaVencLicencia.Text.ToDateTime, Estatus:=ChkModalLicenciaEstatus.Checked) Then
+ If ObjAF.UpdateLicencia(HdnIDLicencia.Value.ToEntero(), TxtLicencia.Text.Trim, TxtFechaExpLicencia.Text.ToDateTime, TxtFechaVencLicencia.Text.ToDateTime, Estatus:=ChkModalLicenciaEstatus.Checked) Then
Alert("La licencia se actualizó correctamente.", TipoMensaje.MsgInformacion)
End If
End If
@@ -5950,7 +5953,7 @@ Partial Class RH_Personal
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
ElseIf HdnModalidadLicencia.Value = "U" Then
Try
- Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero}")(0)
+ Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
Row("Licencia") = TxtLicencia.Text.Trim()
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
@@ -6005,17 +6008,17 @@ Partial Class RH_Personal
'End If
Dim SBDomicilioSucursal As New StringBuilder()
- Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("")
+ Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero(), Estatus:=1).FiltroPrimero("")
If DRSucursal IsNot Nothing Then
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
Dim DomicilioSucursal As String = ""
SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle"))
- If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero)
- If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero)
+ If DRSucursal("NoExt").ToString().ToEntero() > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero())
+ If DRSucursal("NoInt").ToString().ToEntero() > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero())
If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString())
- If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString())
+ If DRSucursal("CP").ToString().ToEntero() > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString())
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString())
End If
@@ -6140,10 +6143,10 @@ Partial Class RH_Personal
'DtRowFamiliar("CveFamiliar") = -1
DTFamiliares(IndexActual)("CvePersonal") = -1
DTFamiliares(IndexActual)("Parentesco") = DDLParentescoFamiliar4.SelectedItem.Text
- DTFamiliares(IndexActual)("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero
+ DTFamiliares(IndexActual)("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero()
DTFamiliares(IndexActual)("Nombre") = TxtNombreFamiliar4.Text.Trim
DTFamiliares(IndexActual)("Domicilio") = TxtDomicilioFamiliar4.Text.Trim
- DTFamiliares(IndexActual)("Edad") = TxtEdadFamiliar4.Text.ToEntero
+ DTFamiliares(IndexActual)("Edad") = TxtEdadFamiliar4.Text.ToEntero()
DTFamiliares(IndexActual)("Ocupacion") = TxtOcupacionFamiliar4.Text.Trim
DTFamiliares(IndexActual)("Telefono") = TxtTelefonoFamiliar.Text.Trim
DTFamiliares(IndexActual)("Observaciones") = TxtObservacionesFamiliar.Text.Trim
@@ -6165,10 +6168,10 @@ Partial Class RH_Personal
DtRowFamiliar("CveFamiliar") = -1
DtRowFamiliar("CvePersonal") = -1
DtRowFamiliar("Parentesco") = DDLParentescoFamiliar4.SelectedItem.Text
- DtRowFamiliar("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero
+ DtRowFamiliar("CveParentesco") = DDLParentescoFamiliar4.SelectedValue.ToEntero()
DtRowFamiliar("Nombre") = TxtNombreFamiliar4.Text.Trim
DtRowFamiliar("Domicilio") = TxtDomicilioFamiliar4.Text.Trim
- DtRowFamiliar("Edad") = TxtEdadFamiliar4.Text.ToEntero
+ DtRowFamiliar("Edad") = TxtEdadFamiliar4.Text.ToEntero()
DtRowFamiliar("Ocupacion") = TxtOcupacionFamiliar4.Text.Trim
DtRowFamiliar("Telefono") = TxtTelefonoFamiliar.Text.Trim
DtRowFamiliar("Observaciones") = TxtObservacionesFamiliar.Text.Trim
@@ -6200,7 +6203,7 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = True
- CveFamiliar = GvRow.DataKey("CveFamiliar").ToString().ToEntero
+ CveFamiliar = GvRow.DataKey("CveFamiliar").ToString().ToEntero()
ActualizarFamiliar = True
IndexActual = GvRow.RowIndex
@@ -6229,7 +6232,7 @@ Partial Class RH_Personal
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
IndexActual = GvRow.RowIndex
Dim activo As Boolean = False
- Dim CveFamiliar As Integer = GvRow.DataKey("CveFamiliar").ToString().ToEntero
+ Dim CveFamiliar As Integer = GvRow.DataKey("CveFamiliar").ToString().ToEntero()
If CveFamiliar > 0 Then
@@ -6275,7 +6278,7 @@ Partial Class RH_Personal
End If
- objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString().ToEntero, CvePersonal, dRow("CveParentesco").ToString().ToEntero, dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero, dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
+ objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString().ToEntero(), CvePersonal, dRow("CveParentesco").ToString().ToEntero(), dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero(), dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
End If
If dRow("Accion").ToString() = "2" Then 'Inserta
@@ -6285,20 +6288,20 @@ Partial Class RH_Personal
- objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString().ToEntero, dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero, dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
+ objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString().ToEntero(), dRow("Nombre").ToString(), dRow("Domicilio").ToString(), dRow("Edad").ToString().ToEntero(), dRow("Ocupacion").ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString(), If(dRow("Observaciones").ToString().Trim = "", "-1", dRow("Observaciones").ToString().Trim), Beneficiario)
End If
- If dRow("CveParentesco").ToString().ToEntero = 1 Then
+ If dRow("CveParentesco").ToString().ToEntero() = 1 Then
ValPadre = True
End If
- If dRow("CveParentesco").ToString().ToEntero = 2 Then
+ If dRow("CveParentesco").ToString().ToEntero() = 2 Then
ValMadre = True
End If
If dRow("Accion").ToString() = "3" Then 'Borra
- objRH.PersonalFamiliaresRemove(dRow("CveFamiliar").ToString().ToEntero, -1)
+ objRH.PersonalFamiliaresRemove(dRow("CveFamiliar").ToString().ToEntero(), -1)
End If
Next
diff --git a/Scripts/custom.js b/Scripts/custom.js
index 21e28bd1b..780aa440e 100644
--- a/Scripts/custom.js
+++ b/Scripts/custom.js
@@ -1201,7 +1201,8 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
- cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca')
+ cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
+ esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor')
//Metodo: metodo
};
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb
index 2d19b88f7..675057491 100644
--- a/Ventas/PV.aspx.vb
+++ b/Ventas/PV.aspx.vb
@@ -6432,6 +6432,7 @@ Partial Class PV
CreaDTmpDTRecepcionUsados()
CreaDTmpDTPolizaVirtual()
DdlDistribuidor.setEsWebService(True)
+ DdlDistribuidor.ddlWS.Attributes.Add("data-esdistribuidor", "1")
DivChkAjuste.Visible = True
UpAjuste.Update()
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 6ad12601f..9ed1ee22f 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -1834,6 +1834,15 @@ Partial Class Ventas
ViewState("CveEstatus") = value
End Set
End Property
+
+ Private Property CveEstatusCotizacion As Integer
+ Get
+ Return (IfNull(ViewState("CveEstatusCotizacion"), "-1", ViewState("CveEstatusCotizacion"))).ToString().ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveEstatusCotizacion") = value
+ End Set
+ End Property
Private Property DiasCredito As Integer
Get
Return ViewState("DiasCredito").ToString().ToEntero()
@@ -2939,6 +2948,18 @@ Partial Class Ventas
End If
End If
+ If Request("CveCotizacion") IsNot Nothing AndAlso IfNull(Request("CveCotizacion"), 0).ToString().ToEntero() > 0 Then
+ If UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
+ 'VERIFICA SI NO ESTA AUTORIZADA
+ If CveEstatusCotizacion <> 8 Then
+ BtnEmitirImprimir.Enabled = False
+ BtnEmitirImprimir.Visible = False
+ Alert("La cotización no esta autorizada", TipoMensaje.MsgAdvertencia)
+ End If
+ End If
+
+ End If
+
End If
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
@@ -4431,6 +4452,8 @@ Partial Class Ventas
' BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
' BtnsFacturar.Visible = True
'End If
+ ElseIf DbRowVenta("TipoDocto").ToString() = "Cot" AndAlso CveCotizacion > 0 Then
+ CveEstatusCotizacion = DbRowVenta("CveEstatusFactura").ToString().ToEntero()
End If
@@ -8212,33 +8235,56 @@ Partial Class Ventas
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
End If
- End If
- 'MARCAR VENTA ANTERIOR
- If Not ObjInventario.ActualizarEsDevolucionVenta(CveDevolucion, 2) Then
- ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
- End If
-
- 'MARCA LO PENDIENTE A NIVEL DETALLE
- Dim DtMovDetalles As DataTable = Nothing
- If ObjInventario.GetSaldoVentaDetalle(CveDevolucion, UsuarioActual.CveEmpresa) Then
- DtMovDetalles = ObjInventario.DtResultados.Copy()
+ 'MARCAR VENTA ANTERIOR
+ If Not ObjInventario.ActualizarEsDevolucionVenta(CveDevolucion, 2) Then
+ ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
+ End If
Else
- ErrorList.Add("No se pudo verificar los movimientos de almacen de la factura")
- End If
+ 'MARCA LO PENDIENTE A NIVEL DETALLE
+ Dim DtMovDetalles As DataTable = Nothing
+ If ObjInventario.GetSaldoVentaDetalle(CveDevolucion, UsuarioActual.CveEmpresa) Then
+ DtMovDetalles = ObjInventario.DtResultados.Copy()
+ Else
+ ErrorList.Add("No se pudo verificar los movimientos de almacen de la factura")
+ End If
- If DtMovDetalles IsNot Nothing Then
- For Each Row As DataRow In DtMovDetalles.Rows
- Dim SaldoAlmacen As Decimal = Row("SaldoAlmacen").ToString().ToDecimal()
- If SaldoAlmacen < 0 Then
- If Not ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 1) Then
- ErrorList.Add("No se pudo actualizar el movimiento de almacen de la factura")
+ 'MARCAR VENTA ANTERIOR
+ If Not ObjInventario.ActualizarEsDevolucionVenta(CveDevolucion, 2) Then
+ ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
+ End If
+
+ If DtMovDetalles IsNot Nothing Then
+
+ Dim CantidadTotal As Decimal = 0
+ Dim TotalSalida As Decimal = 0
+
+ For Each Row As DataRow In DtMovDetalles.Rows
+ Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
+ Dim SaldoAlmacen As Decimal = Row("SaldoAlmacen").ToString().ToDecimal()
+ Cantidad += Cantidad
+
+ If SaldoAlmacen < 0 AndAlso Cantidad = Math.Abs(SaldoAlmacen) Then
+ TotalSalida += Math.Abs(SaldoAlmacen)
+ If Not ObjInventario.UpdateEstatusAlmacen(Row("CveVentaDetalleNueva").ToString().ToEntero(), 1) Then
+ ErrorList.Add("No se pudo actualizar el movimiento de almacen de la factura")
+ End If
+ End If
+ Next
+
+ 'SI SE VERIFICA QUE TODO ESTA SURTIDO, SE MARCA TODA LA FACTURA
+ If CantidadTotal = Total Then
+ If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
+ ErrorList.Add("No se pudo Cancelar el movimiento de almacen de la Factura")
End If
End If
- Next
+ End If
+
+ DtMovDetalles.Dispose()
+
End If
- DtMovDetalles.Dispose()
+
End If
End If
@@ -11605,7 +11651,7 @@ Partial Class Ventas
'INVENTARIOS
If ErrorList.Count = 0 Then
If Not EsNCAmortizacion AndAlso Not NCDescuento Then
- If GuardarVentaInventarios(ObjInventario, ObjConta, factura) Then
+ If GuardarVentaInventarios(ObjInventario, ObjVentas, ObjConta, factura) Then
ErrorList.Add("Ocurrio un error al Guardar Inventario")
End If
End If
@@ -13232,7 +13278,7 @@ Partial Class Ventas
End Try
End Function
- Private Function GuardarVentaInventarios(ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, factura As Modelos.Factura) As Boolean
+ Private Function GuardarVentaInventarios(ObjInventario As ClsInventarios, ObjVentas As ClsVentas, ObjConta As ClsContabilidad, factura As Modelos.Factura) As Boolean
Dim OcurrioError As Boolean = False
Try
@@ -13241,7 +13287,7 @@ Partial Class Ventas
If RemisionesLista.Count > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
For Each CveRemision As Integer In RemisionesLista
'El almacen general es el Primer Almacen de Material en la Sucursal
- If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then
+ If Not TraspasoAlmacen(ObjInventario, ObjVentas, CveRemision, ObjConta, True, 9) Then
OcurrioError = True
Exit For
End If
@@ -18072,8 +18118,12 @@ Partial Class Ventas
If Not UsuarioActual.TienePermisoProceso(60) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
- DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs"))
- DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Dev"))
+ If Not UsuarioActual.TienePermisoProceso(175) Then
+ DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Egs"))
+ End If
+ If Not UsuarioActual.TienePermisoProceso(264) Then
+ DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Dev"))
+ End If
End If
'Puede remisionar
@@ -18667,7 +18717,7 @@ Partial Class Ventas
gvr.FCDropDownList("DdlUnidadMedida").DataBind()
End Sub
- Private Function TraspasoAlmacen(ByRef ObjInventario As ClsInventarios, CveRemision As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
+ Private Function TraspasoAlmacen(ByRef ObjInventario As ClsInventarios, ByRef ObjVentas As ClsVentas, CveRemision As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
Dim OcurrioError As Boolean = False
Try
Dim DtMovimientos As DataTable
@@ -18749,9 +18799,9 @@ Partial Class Ventas
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
Else
If TieneMovimientosContrato Then
- MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"))
+ MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"))
Else
- MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
+ MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
End If
End If
@@ -18763,26 +18813,12 @@ Partial Class Ventas
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
Dim CveConceptoSalidaAlmacen As Integer = 3
Dim CveAlmacenParaSalida As Integer = CveAlmacenEntrada
+
'SALIDA DEFINITIVA DEL SISTEMA
If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then
CveConceptoSalidaAlmacen = 40
CveAlmacenParaSalida = CveAlmacenSalida
AplicaMovimientoDetalleEntrada = True
- ''Le damos salida normal
- 'If ConSalida Then
- ' GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 40, CveMoneda, CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
-
- ' If Not GeneroMovimientoAlmacen Then
- ' OcurrioError = True
- ' Exit For
- ' End If
-
- ' If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
- ' If Not GeneroMovimientoAlmacen Then
- ' OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
- ' End If
- ' End If
- 'End If
Else
'Le damos salida de apartado por traspaso
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada)
@@ -18822,19 +18858,10 @@ Partial Class Ventas
End If
End If
-
- Else
- OcurrioError = True
- Alert("Error traspaso almacen(sin Movtos. Detalle). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
End If
MovDetalle.Dispose()
- 'VERIFICA QUE SE HAYA GENERADO MOVIMIENTO DE ALMACEN
- If Not OcurrioError Then
- OcurrioError = Not GeneroMovimientoAlmacen
- End If
-
If OcurrioError Then
Exit For
End If
@@ -18843,12 +18870,6 @@ Partial Class Ventas
End If
- ElseIf ObjInventario.GetMovimientos(dr("CveMovimiento").ToString().ToEntero(), 3, -1, UsuarioActual.CveEmpresa) Then
- 'Esquema viejo, evitamos que aparezca por surtir
- If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
- OcurrioError = True
- Exit For
- End If
End If
If OcurrioError Then
@@ -18856,6 +18877,24 @@ Partial Class Ventas
End If
Next
+ 'VERIFICA QUE SE HAYA GENERADO MOVIMIENTO DE ALMACEN
+ If Not OcurrioError Then
+ OcurrioError = Not GeneroMovimientoAlmacen
+ End If
+
+ 'VERIFICA SI YA SE GENERARON LAS SALIDAS DE ALMACEN NECESARIAS
+ If Not OcurrioError AndAlso RemisionesLista.Count > 0 AndAlso DtRemConceptosSurtidos IsNot Nothing Then
+ If DtRemConceptosSurtidos.SUMD("Surtido") <> DtRemConceptosSurtidos.SUMD("Cantidad") Then
+ OcurrioError = True
+ End If
+ End If
+
+ If Not OcurrioError AndAlso ConSalida Then
+ 'Esquema viejo, evitamos que aparezca por surtir
+ If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 2) Then
+ OcurrioError = True
+ End If
+ End If
End If
@@ -18864,31 +18903,59 @@ Partial Class Ventas
OcurrioError = True
End If
+ 'LIMPIAR EL DT DE CONCEPTOS SURTIDOS
+ If DtRemConceptosSurtidos IsNot Nothing Then
+ DtRemConceptosSurtidos.Clear()
+ DtRemConceptosSurtidos = Nothing
+ End If
+
Catch ex As Exception
OcurrioError = True
OnError("Ocurrió un error al realizar el traspaso", ex)
End Try
Return Not OcurrioError
End Function
- Private Function CuadrarFacturaMovimientos(MovDetalle As DataTable) As DataTable
+ Private Function CuadrarFacturaMovimientos(ByRef ObjVentas As ClsVentas, CveRemision As Integer, MovDetalle As DataTable) As DataTable
Dim MovDTCuadrados As New DataTable
MovDTCuadrados = MovDetalle.Clone
MovDTCuadrados.Clear()
'Llenamos el DT solo si es primera llamada
If DtRemConceptosSurtidos Is Nothing Then
- DtRemConceptosSurtidos = New DataTable
- DtRemConceptosSurtidos.Columns.Add("CveVentaDetalle", GetType(Integer))
- DtRemConceptosSurtidos.Columns.Add("Cantidad", GetType(Decimal))
- DtRemConceptosSurtidos.Columns.Add("Surtido", GetType(Decimal))
+ Dim DtDetalleRemision As DataTable = Nothing
+ Dim StrCveVentasDetalle As New StringBuilder()
- For Each dr As DataRow In DtRemisionesTmpDT.Rows
- Dim dtr As DataRow = DtRemConceptosSurtidos.NewRow
- dtr("CveVentaDetalle") = dr("CveVentaDetalle")
- dtr("Cantidad") = dr("Cantidad")
- dtr("Surtido") = 0
- DtRemConceptosSurtidos.Rows.Add(dtr)
+ If ObjVentas.GetVentaDetalle(CveRemision) Then
+ DtDetalleRemision = ObjVentas.DtResultados.FiltraParametros("", DistinctColumns:={"CveVenta", "CveVentaDetalle"})
+ End If
+
+ For Each RowDetalle As DataRow In DtDetalleRemision.Rows
+ StrCveVentasDetalle.AppendFormat("{0},", RowDetalle("CveVentaDetalle"))
Next
+
+ If StrCveVentasDetalle.Length > 0 Then
+ StrCveVentasDetalle.Remove(StrCveVentasDetalle.Length - 1, 1)
+ End If
+
+ If DtDetalleRemision IsNot Nothing Then
+
+ DtRemConceptosSurtidos = New DataTable
+ DtRemConceptosSurtidos.Columns.Add("CveRemision", GetType(Integer))
+ DtRemConceptosSurtidos.Columns.Add("CveVentaDetalle", GetType(Integer))
+ DtRemConceptosSurtidos.Columns.Add("Cantidad", GetType(Decimal))
+ DtRemConceptosSurtidos.Columns.Add("Surtido", GetType(Decimal))
+
+ 'VERIFICA SOLO LOS QUE SON TIPO PRODUCTOS
+ For Each dr As DataRow In DtRemisionesTmpDT.FiltraParametros($"CveTipoPS = 2 AND CveVentaDetalle IN ({StrCveVentasDetalle.ToString()})").Rows
+ Dim dtr As DataRow = DtRemConceptosSurtidos.NewRow
+ dtr("CveRemision") = CveRemision
+ dtr("CveVentaDetalle") = dr("CveVentaDetalle")
+ dtr("Cantidad") = dr("Cantidad")
+ dtr("Surtido") = 0
+ DtRemConceptosSurtidos.Rows.Add(dtr)
+ Next
+ End If
+
End If
For Each dr As DataRow In MovDetalle.Rows
@@ -29635,6 +29702,9 @@ Partial Class Ventas
LbAgregar.Enabled = True
LnkAgregarPyME.Enabled = True
+ ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
+ ImgDescConcepto.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '1'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = ''; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
+ ImgDescTotal.Visible = False
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
TxtMotivoDescuento.Enabled = True
diff --git a/vwd.webinfo b/vwd.webinfo
index 22ce5468d..805171ec2 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -298,6 +298,14 @@
+
+
+
+
+
+
+
+