--FIX buscador RFC/Nombre
This commit is contained in:
@@ -9112,7 +9112,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'SI ESTA HABILITADO LA OPCION DE DESCUENTO, SE AGREGO UN DESCUENTO MANUAL Y NO TIENE PROMOCION
|
||||
If GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Enabled AndAlso (ObjDescuento.CvePromocionDetalle <= 0 AndAlso ObjDescuento.ImporteDescuento <= 0) AndAlso DescuentoManual > 0 Then
|
||||
If GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Enabled Then
|
||||
ObjDescuento.ImporteDescuento = DescuentoManual
|
||||
End If
|
||||
|
||||
@@ -25083,6 +25083,21 @@ Partial Class Ventas
|
||||
|
||||
CargaEstados()
|
||||
|
||||
TxtNombreCliente.Text = ""
|
||||
TxtRFCCliente.Text = ""
|
||||
TxtRegimenSociedad.Text = ""
|
||||
DdlEstadoSAT.SelectedValueExist("-1")
|
||||
TxtCiudadCliente.Text = ""
|
||||
TxtLocalidadCliente.Text = ""
|
||||
TxtColoniaCliente.Text = ""
|
||||
TxtCPCliente.Text = ""
|
||||
TxtDireccionCliente.Text = ""
|
||||
TxtNumExtCliente.Text = ""
|
||||
TxtNumIntCliente.Text = ""
|
||||
TxtCorreoCliente.Text = ""
|
||||
TxtTelefonoCliente.Text = ""
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
TxtRFCNombre.Text = ""
|
||||
|
||||
@@ -25135,7 +25150,16 @@ Partial Class Ventas
|
||||
DivValidaRFC.Visible = True
|
||||
DivValidaPorNombre.Visible = False
|
||||
DivBusquedaCliente.Visible = False
|
||||
TxtRFCCliente.Text = TxtRFCNombre.Text
|
||||
|
||||
'VERIFICAR SI EL TEXTO DE ENTRADA ES UN NOMBRE O UN RFC
|
||||
If TxtRFCNombre.Text.Length > 13 Then
|
||||
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
|
||||
ElseIf EsRFC(TxtRFCNombre.Text.Trim()) Then
|
||||
TxtRFCCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
|
||||
Else
|
||||
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
|
||||
End If
|
||||
|
||||
BtnValidarRFC_Click(Nothing, EventArgs.Empty)
|
||||
End If
|
||||
End If
|
||||
@@ -40034,9 +40058,21 @@ Partial Class Ventas
|
||||
DivValidaRFC.Visible = True
|
||||
DivValidaPorNombre.Visible = False
|
||||
DivBusquedaCliente.Visible = False
|
||||
TxtRFCCliente.Text = TxtRFCNombre.Text
|
||||
|
||||
'VERIFICAR SI EL TEXTO DE ENTRADA ES UN NOMBRE O UN RFC
|
||||
If TxtRFCNombre.Text.Length > 13 Then
|
||||
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
|
||||
ElseIf EsRFC(TxtRFCNombre.Text.Trim()) Then
|
||||
TxtRFCCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
|
||||
Else
|
||||
TxtNombreCliente.Text = TxtRFCNombre.Text.Trim().ToUpper()
|
||||
End If
|
||||
|
||||
BtnValidarRFC_Click(Nothing, EventArgs.Empty)
|
||||
End Sub
|
||||
|
||||
Private Function EsRFC(texto As String) As Boolean
|
||||
Return Regex.IsMatch(texto, "^[a-zñA-ZÑ.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$")
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user