-- E140 - candado de información completa

This commit is contained in:
2025-04-11 08:02:27 -07:00
parent bf1c2e025f
commit 5027c91a50

View File

@@ -2582,29 +2582,48 @@ Partial Class Clientes
End If
Dim InformacionCompleta As Boolean = True
'validación de información completa
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If TxtRFC.Text.Trim() = "" Then
InformacionCompleta = False
If TxtRFC.Text.Trim() = "" Then InformacionCompleta = False
If ChkPermiteCredito.Checked Then
If TxtLimiteCredito.Text.ToDecimal = 0 OrElse TxtCobranzaContacto.Text.Trim = "" OrElse TxtCobranzaTelefono.Text.Trim = "" OrElse TxtDiasEspecifico.Text.Trim = "" OrElse TxtCobranzaCorreo.Text.Trim = "" Then
InformacionCompleta = False
End If
End If
If TxtContacto.Text.Trim() = "" Then InformacionCompleta = False
If TxtTelefono.Text.Trim() = "" Then InformacionCompleta = False
If TxtEmail.Text.Trim() = "" Then InformacionCompleta = False
If TxtRepresentanteLegal.Text.Trim() = "" Then InformacionCompleta = False
'si es el concepto de pagaré
Dim tPagare As Integer = 0
For Each dRow As GridViewRow In GvDocumentosCliente.Rows
Dim CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToEntero()
If CveDocumentacion = 265 Then tPagare = 1
Next
If tPagare = 0 Then InformacionCompleta = False
tPagare = 0 'valida que cuando menos tenga una cuenta
For Each dRow As GridViewRow In GvBancosCuentas.Rows
tPagare = 1
Next
If tPagare = 0 Then InformacionCompleta = False
If DivInfoCompleta.Visible Then
InformacionCompleta = ChkInformacionCompleta.Checked
End If
End If
'CargaSucursal()
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
'If DivInfoCompleta.Visible Then
' InformacionCompleta = ChkInformacionCompleta.Checked
'End If
End If
'CargaSucursal()
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
Dim ObjClientes As New ClsClientes()
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
Dim ObjVentas As New ClsVentas(ObjClientes.IniciaTransacSQL())
@@ -2647,8 +2666,6 @@ Partial Class Clientes
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
'If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
' CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
' If CvePrecioListaNuevo > 0 Then