--FIX buscador RFC/Nombre

This commit is contained in:
2024-12-30 11:47:55 -07:00
parent b2b4d3b48e
commit ecb88c7dc7
2 changed files with 40 additions and 4 deletions

View File

@@ -8228,7 +8228,7 @@
<div class="row">
<asp:Panel ID="PnlValidaNombre" runat="server" DefaultButton="BtnValidaPorNombre">
<div class="form-group form-md-line-input input-iconright col-xs-9">
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
<asp:TextBox ID="TxtRFCNombre" Style="text-transform: uppercase;" placeholder="Ingrese el RFC/Nombre para su validación" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtRFCNombre.ClientID.ToString()%>">RFC / Nombre:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3" style="display:flex;">

View File

@@ -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