Manejo de público general. alta rápida de cliente, en Ventas.aspx, tomando en cuenta los datos de la sucursal cuando es rfc genérico. y búscar RFC/Nombre, y si hay una sola coincidencia, cerrar modal, si hay varias seleccionar el cliente, sino hay ninguna poner la opción de crear nuevo, (sugiriendo datos de la sucursal)
This commit is contained in:
@@ -1094,8 +1094,8 @@
|
|||||||
<asp:Label runat="server" ID="LblProyectoHeader" Text="" />
|
<asp:Label runat="server" ID="LblProyectoHeader" Text="" />
|
||||||
<asp:Label runat="server" ID="LblSubProyecto" Text="" /></th>
|
<asp:Label runat="server" ID="LblSubProyecto" Text="" /></th>
|
||||||
<th>P.U. <asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" Visible="false" /></th>
|
<th>P.U. <asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" Visible="false" /></th>
|
||||||
<th runat="server" visible="false" id="thCosto2">
|
<th runat="server" visible="false" id="thCosto2">Costo
|
||||||
Costo <br />
|
<br />
|
||||||
Utilidad
|
Utilidad
|
||||||
</th>
|
</th>
|
||||||
<th id="thEncDesc1" runat="server" visible="true">Desc
|
<th id="thEncDesc1" runat="server" visible="true">Desc
|
||||||
@@ -1413,7 +1413,7 @@
|
|||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--10--%>
|
<%--10--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="20px" >
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="20px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblCosto" runat="server"></asp:Label><br />
|
<asp:Label ID="LblCosto" runat="server"></asp:Label><br />
|
||||||
<asp:Label ID="LblCostoPorcentaje" runat="server"></asp:Label>
|
<asp:Label ID="LblCostoPorcentaje" runat="server"></asp:Label>
|
||||||
@@ -1971,7 +1971,7 @@
|
|||||||
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Serie" visible="false">
|
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSerie" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
<asp:Literal ID="LtlSerie" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
||||||
<asp:TextBox ID="TxtSerie" AutoPostBack="false" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
<asp:TextBox ID="TxtSerie" AutoPostBack="false" Text='<%# Eval("Serie") %>' Visible="false" runat="server" />
|
||||||
@@ -1979,15 +1979,15 @@
|
|||||||
<asp:HiddenField runat="server" Value='<%# Eval("Serie") %>' ID="HdnSerie" />
|
<asp:HiddenField runat="server" Value='<%# Eval("Serie") %>' ID="HdnSerie" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Lote" HeaderText="Lote" Visible="False" />
|
<asp:BoundField DataField="Lote" HeaderText="Lote" Visible="False" />
|
||||||
<asp:BoundField DataField="FechaCaducidad" HeaderText="F. Caducidad" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="FechaCaducidad" HeaderText="F. Caducidad" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:TemplateField HeaderText="Lote/Caducidad" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="270px">
|
<asp:TemplateField HeaderText="Lote/Caducidad" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="270px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="100%" runat="server" Visible="false" CausesValidation="true" >
|
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="100%" runat="server" Visible="false" CausesValidation="true">
|
||||||
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -8207,7 +8207,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row" style="padding-left: 16px;">
|
<div class="row" style="padding-left: 16px;">
|
||||||
<div class="col-md-8">
|
<div id="DivValidaRFC" runat="server" visible="false" class="col-md-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Panel ID="PnlRFCCliente" runat="server" DefaultButton="BtnValidarRFC">
|
<asp:Panel ID="PnlRFCCliente" runat="server" DefaultButton="BtnValidarRFC">
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
||||||
@@ -8221,6 +8221,46 @@
|
|||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivValidaPorNombre" runat="server" visible="false" class="col-md-8">
|
||||||
|
<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>
|
||||||
|
<label for="<%= TxtRFCNombre.ClientID.ToString()%>">RFC / Nombre:</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||||
|
<asp:Button ID="BtnValidaPorNombre" runat="server" CssClass="btn btn-success" Text="Consultar" />
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="DivBusquedaCliente" runat="server" visible="false" >
|
||||||
|
<div style="overflow-y: auto; width: 100%; height: 250px;">
|
||||||
|
<asp:GridView ID="GvBusquedaCliente" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
||||||
|
CssClass="ScrollAD table table-smallpadding Widthall" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-Width="15%">
|
||||||
|
<HeaderTemplate>Código</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCodigo" runat="server"></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="truncate" ItemStyle-Width="55%">
|
||||||
|
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="30%">
|
||||||
|
<HeaderTemplate>RFC</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlRFC" runat="server"></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div runat="server" id="DivTipoPersona" visible="false" class="form-group form-md-line-input input-iconright">
|
<div runat="server" id="DivTipoPersona" visible="false" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
|
<asp:RadioButtonList runat="server" ID="RdTipoPersona" RepeatDirection="Horizontal" OnSelectedIndexChanged="RdTipoPersona_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control">
|
||||||
|
|||||||
@@ -25204,17 +25204,71 @@ Partial Class Ventas
|
|||||||
DivFormaCliente.Visible = False
|
DivFormaCliente.Visible = False
|
||||||
divRegimenCliente.Visible = False
|
divRegimenCliente.Visible = False
|
||||||
divGiro.Visible = False
|
divGiro.Visible = False
|
||||||
UpAgregarCliente.Update()
|
DivBusquedaCliente.Visible = False
|
||||||
|
|
||||||
CargaEstados()
|
CargaEstados()
|
||||||
TxtRFCCliente.Focus()
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
|
TxtRFCNombre.Text = ""
|
||||||
|
|
||||||
|
DivValidaRFC.Visible = False
|
||||||
|
DivValidaPorNombre.Visible = True
|
||||||
CargaGiro()
|
CargaGiro()
|
||||||
|
|
||||||
|
TxtRFCNombre.Focus()
|
||||||
|
Else
|
||||||
|
DivValidaRFC.Visible = True
|
||||||
|
DivValidaPorNombre.Visible = False
|
||||||
|
|
||||||
|
TxtRFCCliente.Focus()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
UpAgregarCliente.Update()
|
||||||
|
|
||||||
RegistraScript("showDivEC();")
|
RegistraScript("showDivEC();")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvBusquedaCliente_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBusquedaCliente.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
|
Dim Liga As String = String.Format("<a href='javascript:CargaCliente(""{0}"");$(""#divAgregarCliente"").modal(""hide""); '>", e.Row.DBCampo("CveCliente"))
|
||||||
|
|
||||||
|
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<div class='truncate'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Codigo"))
|
||||||
|
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))
|
||||||
|
e.Row.FCLiteral("LtlRFC").Text = String.Format("<div class='truncate'>{0}{1}</a></div>", Liga, e.Row.DBCampo("RFC"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnValidaPorNombre_Click(sender As Object, e As EventArgs) Handles BtnValidaPorNombre.Click
|
||||||
|
Dim ObjCliente As New ClsClientes
|
||||||
|
If ObjCliente.BuscarClienteRFCNombre(TxtRFCNombre.Text, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjCliente.DtResultados.Rows.Count = 1 AndAlso TxtRFCNombre.Text.Trim() <> "XAXX010101000" Then
|
||||||
|
RegistraScript("hideDivEC();")
|
||||||
|
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||||
|
HdnCveCliente.Value = ObjCliente.DtResultados(0)("CveCliente").ToString()
|
||||||
|
CargaCliente(CveCliente)
|
||||||
|
UpCliente.Update()
|
||||||
|
|
||||||
|
ElseIf ObjCliente.DtResultados.Rows.Count > 0 AndAlso TxtRFCNombre.Text.Trim() <> "XAXX010101000" Then
|
||||||
|
DivBusquedaCliente.Visible = True
|
||||||
|
GvBusquedaCliente.DataSource = ObjCliente.DtResultados
|
||||||
|
GvBusquedaCliente.DataBind()
|
||||||
|
|
||||||
|
Else
|
||||||
|
DivValidaRFC.Visible = True
|
||||||
|
DivValidaPorNombre.Visible = False
|
||||||
|
DivBusquedaCliente.Visible = False
|
||||||
|
TxtRFCCliente.Text = TxtRFCNombre.Text
|
||||||
|
BtnValidarRFC_Click(Nothing, EventArgs.Empty)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
UpAgregarCliente.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub BtnValidarRFC_Click(sender As Object, e As EventArgs) Handles BtnValidarRFC.Click
|
Private Sub BtnValidarRFC_Click(sender As Object, e As EventArgs) Handles BtnValidarRFC.Click
|
||||||
|
|
||||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||||
@@ -25291,6 +25345,21 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
divGiro.Visible = True
|
divGiro.Visible = True
|
||||||
|
|
||||||
|
Dim DrSP As DataRow = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, DdlSubProyectoDatos.SelectedValue.ToEntero()).FiltroPrimero("")
|
||||||
|
If DrSP IsNot Nothing Then
|
||||||
|
|
||||||
|
DdlEstadoSAT.SelectedValueExist(DrSP("CveEstado").ToString())
|
||||||
|
TxtCiudadCliente.Text = DrSP("Municipio").ToString()
|
||||||
|
TxtLocalidadCliente.Text = DrSP("Localidad").ToString()
|
||||||
|
TxtColoniaCliente.Text = DrSP("Colonia").ToString()
|
||||||
|
TxtCPCliente.Text = DrSP("CP").ToString()
|
||||||
|
TxtDireccionCliente.Text = DrSP("Calle").ToString()
|
||||||
|
TxtNumExtCliente.Text = DrSP("NoExt").ToString()
|
||||||
|
TxtNumIntCliente.Text = DrSP("NoInt").ToString()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user