-
This commit is contained in:
@@ -339,9 +339,12 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
Private Sub MuestraNoTimbradasCentroCosto()
|
||||
Dim ObjSub As New ClsSubProyectos
|
||||
If ObjSub.GetNoTimbradasCentroCosto(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
If ObjSub.GetNoTimbradasCentroCosto(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
If ObjSub.DtResultados.Rows.Count > 0 Then
|
||||
GvPendientesTimbrar.DataSource = ObjSub.DtResultados.FiltraParametros($"Fecha = '{Now.ToString("dd/MM/yyyy")}'")
|
||||
Dim miFecha As DateTime = Now
|
||||
Dim fechaSiguiente As DateTime = miFecha.AddDays(1)
|
||||
Dim filtro As String = String.Format("Fecha >= #{0}# AND Fecha < #{1}#", miFecha.ToString("MM/dd/yyyy"), fechaSiguiente.ToString("MM/dd/yyyy"))
|
||||
GvPendientesTimbrar.DataSource = ObjSub.DtResultados.FiltraParametros(filtro)
|
||||
End If
|
||||
End If
|
||||
ObjSub.Dispose()
|
||||
@@ -574,8 +577,12 @@ Partial Class Ventas_PVCobranza
|
||||
VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
|
||||
VentaActual.UsuarioActual = UsuarioActual
|
||||
VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
Dim CveVendedor As Integer = DbRowVenta("CveVendedor").ToString.ToEntero
|
||||
Dim ObservacionesAlmacen = DbRowVenta("ObservacionesAlmacen").ToString()
|
||||
Dim Observaciones = DbRowVenta("Observaciones").ToString()
|
||||
Dim PedidoContrato = DbRowVenta("PedidoContrato").ToString()
|
||||
Dim OrdenCompra = DbRowVenta("OrdenCompra").ToString()
|
||||
|
||||
If tCveCorte <= 0 AndAlso DbRowVenta("CveCorte").ToString.ToEntero > 0 Then tCveCorte = DbRowVenta("CveCorte").ToString.ToEntero
|
||||
|
||||
@@ -602,7 +609,7 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
CveVentaRemision = HdnCveVenta.Value.ToEntero
|
||||
|
||||
respFactura = GenerarFactura(CveVendedor, VentaActual, ObjVentas2, ObjClientes, ObservacionesAlmacen, VentaContado, PlazoCobranza)
|
||||
respFactura = GenerarFactura(CveVendedor, VentaActual, ObjVentas2, ObjClientes, ObservacionesAlmacen, VentaContado, PlazoCobranza, Observaciones, PedidoContrato, OrdenCompra)
|
||||
|
||||
If respFactura Is Nothing Then
|
||||
MsgError = "Ocurrió un error al generar la factura"
|
||||
@@ -751,7 +758,7 @@ Partial Class Ventas_PVCobranza
|
||||
Dim msBuild As New StringBuilder()
|
||||
Dim MsgTimbrado As String = ""
|
||||
|
||||
Dim DebeTimbrar As Boolean = False
|
||||
Dim DebeTimbrar As Boolean = True
|
||||
|
||||
'SI SE GENERO FACTURA DE INGRESO, TIMBRARLA DESPUES DE REALIZAR EL PAGO
|
||||
If DebeTimbrar AndAlso respFactura IsNot Nothing Then
|
||||
@@ -850,7 +857,7 @@ Partial Class Ventas_PVCobranza
|
||||
UpL.Update()
|
||||
End Sub
|
||||
|
||||
Private Function GenerarFactura(CveVendedor As Integer, ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes, ObservacionesAlmacen As String, VentaConta As Boolean, PlazoCobranza As Integer) As Modelos.Factura.MMensajeFactura
|
||||
Private Function GenerarFactura(CveVendedor As Integer, ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes, ObservacionesAlmacen As String, VentaConta As Boolean, PlazoCobranza As Integer, Observaciones As String, PedidoContrato As String, OrdenCompra As String) As Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Dim SbAlert As New StringBuilder()
|
||||
|
||||
@@ -893,6 +900,19 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
If TxtImporteEfectivo.Text.ToDecimal > 0 Then DtPagos.Rows.Add({1, TxtImporteEfectivo.Text.ToDecimal})
|
||||
|
||||
If TxtNCDev.Text.ToDecimal > 0 Then DtPagos.Rows.Add({21, TxtNCDev.Text.ToDecimal})
|
||||
|
||||
If TxtImporteOtrosContado.Text.ToDecimal() > 0 Then
|
||||
Select Case DdlOtroFormaPago.SelectedValue
|
||||
Case "1" 'Debito
|
||||
DtPagos.Rows.Add({18, TxtImporteOtrosContado.Text.ToDecimal})
|
||||
Case "2" 'Crédito
|
||||
DtPagos.Rows.Add({4, TxtImporteOtrosContado.Text.ToDecimal})
|
||||
Case "3" 'Transferencia
|
||||
DtPagos.Rows.Add({3, TxtImporteOtrosContado.Text.ToDecimal})
|
||||
End Select
|
||||
End If
|
||||
|
||||
Dim PagoMaximo = DtPagos.MAX("Importe")
|
||||
Dim CveFormaPago As Integer = DtPagos.FiltroPrimeroValor("CveFormaPago", $"Importe = {PagoMaximo}").ToEntero()
|
||||
If CveFormaPago > 0 Then
|
||||
@@ -966,7 +986,12 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
ObjFactura.CveVendedor = CveVendedor
|
||||
|
||||
Retorno = ObjFactura.EmitirFactura(True, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
|
||||
ObjFactura.ObservacionesAlmacen = ObservacionesAlmacen
|
||||
ObjFactura.Observaciones = Observaciones
|
||||
ObjFactura.PedidoContrato = PedidoContrato
|
||||
ObjFactura.OrdenCompra = OrdenCompra
|
||||
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
|
||||
Retorno.Factura = ObjFactura
|
||||
|
||||
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
||||
|
||||
@@ -69,18 +69,29 @@
|
||||
<td class="text-right"><b>Nombre del Cliente:</b></td>
|
||||
<td style="width: 250px;">
|
||||
<ADS:Dropdownlost ID="DdlNombre" runat="server" CssStyle="width: 95%;" DataTextField="NombreComercial" Onselectedindexchange="DdlNombre_selectedindexchange" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Class="table-group-action-input form-control input-inline input-sm select2me" Width="230px">
|
||||
<asp:ListItem Selected="True" Text=" - " Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:DropDownList ID="DdlNombre" runat="server" CssClass="select2me" DataTextField="CodigoNombre" AutoPostBack="true" DataValueField="CveCliente" Width="230px"></asp:DropDownList>--%>
|
||||
</td>
|
||||
|
||||
<td class="text-right"><b>Vendedor:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="228px" >
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
<td align="left" class="text-right"><b>
|
||||
|
||||
|
||||
<%--<td align="left" class="text-right"><b>
|
||||
<asp:Literal ID="LitSucursalCliente" runat="server" Visible="false">Sucursal del Cliente:</asp:Literal></b>
|
||||
<td style="width: 250px;">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Class="table-group-action-input form-control input-inline input-sm select2me" Width="230px">
|
||||
<asp:ListItem Selected="True" Text=" - " Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</td>
|
||||
</td>--%>
|
||||
|
||||
|
||||
<%-- <td class="text-right"><b>Código del Cliente:</b></td>
|
||||
@@ -165,12 +176,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" runat="server" id="TRVendedores" >
|
||||
<td class="text-right"><b>Vendedor:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="228px" >
|
||||
<asp:ListItem Selected="true" Text="Todos" Value="-1" ></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="text-right"></td>
|
||||
<td>
|
||||
|
||||
@@ -244,15 +244,15 @@ Partial Class PopUpBuscarFolio
|
||||
If ObjCliente.GetSucursales(DdlNombre.SelectedValue.ToEntero) Then
|
||||
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
LitSucursalCliente.Visible = True
|
||||
'LitSucursalCliente.Visible = True
|
||||
DdlSucursalCliente.Visible = True
|
||||
Else
|
||||
LitSucursalCliente.Visible = False
|
||||
'LitSucursalCliente.Visible = False
|
||||
DdlSucursalCliente.Visible = False
|
||||
End If
|
||||
Else
|
||||
DdlSucursalCliente.DataSource = Nothing
|
||||
LitSucursalCliente.Visible = False
|
||||
'LitSucursalCliente.Visible = False
|
||||
DdlSucursalCliente.Visible = False
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.DivBusquedaCliente > div > .ADScroller > .ADScroller-body {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.GvEst > tbody > tr > td:nth-child(2) {
|
||||
padding-left: 36px;
|
||||
}
|
||||
@@ -578,11 +582,9 @@
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtDescripcionVenta" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="300" CssClass="form-control input-sm" Enabled="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrCredito1" visible="false">
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrCredito1" visible="false">
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrVentasMedicas1" visible="false">
|
||||
<td><b>Médico:</b></td>
|
||||
<td>
|
||||
@@ -1477,7 +1479,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--18--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" >
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 85px;">
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GprGV" />
|
||||
@@ -8225,6 +8227,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<asp:Button ID="BtnValidarRFC" runat="server" CssClass="btn btn-success" Text="Validar" />
|
||||
<asp:LinkButton ID="BtnRegresarBusqueda" runat="server" CssClass="btn btn-danger" Text="<i class='fas fa-arrow-left'></i>" OnClick="BtnRegresarBusqueda_Click" Visible="false" />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
@@ -8233,11 +8236,11 @@
|
||||
<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" CausesValidation="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtRFCNombre" placeholder="Ingrese el RFC/Nombre" 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;">
|
||||
<asp:Button ID="BtnValidaPorNombre" runat="server" CssClass="btn btn-success" Text="Buscar"/>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3" style="display: flex;">
|
||||
<asp:Button ID="BtnValidaPorNombre" runat="server" CssClass="btn btn-success" Text="Buscar" />
|
||||
<asp:LinkButton ID="BtnCrearCliente" runat="server" CssClass="btn btn-primary" Text="<i class='fa fa-plus'></i>" OnClick="BtnCrearCliente_Click" />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
@@ -8256,32 +8259,29 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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 id="DivBusquedaCliente" runat="server" visible="false" class="DivBusquedaCliente">
|
||||
<asp:GridView ID="GvBusquedaCliente" runat="server" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="800" EmptyDataText="No se encontraron registros" GridLines="None" Style="overflow-x: hidden;">
|
||||
<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>
|
||||
@@ -8343,7 +8343,7 @@
|
||||
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:TextBox ID="TxtCorreoCliente" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarCliente"></asp:RegularExpressionValidator>
|
||||
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarCliente"></asp:RegularExpressionValidator>--%>
|
||||
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
@@ -8825,59 +8825,59 @@
|
||||
<h4 class="modal-title">Solicitar crédito</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="divModalidad2" runat="server" class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSolCreditoTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
||||
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
||||
<div id="divModalidad2" runat="server" class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSolCreditoTipoDocto" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
||||
<asp:ListItem Value="Ing" Selected="True" Text="Factura de Ingreso"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
||||
</div>
|
||||
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAut" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoAutorizacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
|
||||
</div>
|
||||
<div id="DivDiasVencidos" runat="server" visible="false" class="row">
|
||||
<label class="col-md-2 truncate">Días Vencidos:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtDiasVencidos" Text="" runat="server" />
|
||||
<ajax:FilteredTextBoxExtender ID="FTBDiasVencidos" runat="server" TargetControlID="TxtDiasVencidos" FilterType="Custom, Numbers" />
|
||||
<asp:RequiredFieldValidator ID="RFVDiasVencidos" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días Vencidos''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVDiasVencidos2" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" InitialValue="0" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Días Vencidos''</b> debe ser mayor a 0." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos2" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos2" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Importe"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Vencimiento"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAut" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlTipoAutorizacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTipoAutorizacion.ClientID.ToString()%>">Tipo Autorización:</label>
|
||||
</div>
|
||||
<div id="DivDiasVencidos" runat="server" visible="false" class="row">
|
||||
<label class="col-md-2 truncate">Días Vencidos:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtDiasVencidos" Text="" runat="server" />
|
||||
<ajax:FilteredTextBoxExtender ID="FTBDiasVencidos" runat="server" TargetControlID="TxtDiasVencidos" FilterType="Custom, Numbers" />
|
||||
<asp:RequiredFieldValidator ID="RFVDiasVencidos" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días Vencidos''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVDiasVencidos2" runat="server" ControlToValidate="TxtDiasVencidos" Display="None" InitialValue="0" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El valor del campo <b>''Días Vencidos''</b> debe ser mayor a 0." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDiasVencidos2" runat="server" HighlightCssClass="vco" TargetControlID="RFVDiasVencidos2" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div id="DivImporteSolicitud" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporteSolicitud" inputmode="numeric" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="VgmGuardarAut" Width="200px" CssClass="form-control "></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBImporteSolicitud" runat="server" TargetControlID="TxtImporteSolicitud" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVImporteSolicitud" runat="server" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CustomValidator ID="CVImporteSolcitud" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="VgmGuardarAut"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEImporteSolicitud" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteSolcitud" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtImporteSolicitud.ClientID.ToString()%>">Importe:</label>
|
||||
</div>
|
||||
<div id="DivMotivoAutorizacion" runat="server" visible="false" class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Motivo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivImporteSolicitud" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporteSolicitud" inputmode="numeric" runat="server" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="VgmGuardarAut" Width="200px" CssClass="form-control "></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBImporteSolicitud" runat="server" TargetControlID="TxtImporteSolicitud" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVImporteSolicitud" runat="server" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CustomValidator ID="CVImporteSolcitud" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtImporteSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="VgmGuardarAut"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEImporteSolicitud" runat="server" HighlightCssClass="vco" TargetControlID="CVImporteSolcitud" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtImporteSolicitud.ClientID.ToString()%>">Importe:</label>
|
||||
</div>
|
||||
<div id="DivMotivoAutorizacion" runat="server" visible="false" class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate" style="color: #888888; font-family: 'Open Sans', sans-serif; direction: ltr; font-size: 12px;">Motivo:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="TxtMotivoAutorizacion" CssClass="form-control input-sm" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMotivo" runat="server" ControlToValidate="TxtMotivoAutorizacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMotivo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="TxtMotivoAutorizacion" CssClass="form-control input-sm" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMotivo" runat="server" ControlToValidate="TxtMotivoAutorizacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo." ValidationGroup="VgmGuardarAut"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMotivo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMotivo" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="divModalidad3" runat="server" class="row" visible="false">
|
||||
<asp:CheckBox ID="ChkSolicitudAutorizacionCredito" runat="server" Text="Solicitar autorización crédito" />
|
||||
<div id="divModalidad3" runat="server" class="row" visible="false">
|
||||
<asp:CheckBox ID="ChkSolicitudAutorizacionCredito" runat="server" Text="Solicitar autorización crédito" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -2745,7 +2745,7 @@ Partial Class Ventas
|
||||
HdnCveCliente.Value = "-1"
|
||||
|
||||
'SI TIENE UN CLIENTE POR DEFECTO DEBE CARGARLO AL INICIAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso CveVenta <= 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso (Request("CveVenta") IsNot Nothing AndAlso Request("CveVenta").ToString().ToEntero() <= 0) Then
|
||||
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
|
||||
RBLPago.SelectedValue = "2"
|
||||
@@ -6892,7 +6892,7 @@ Partial Class Ventas
|
||||
LnkAgregarCliente.Visible = False
|
||||
|
||||
'SI EL CLIENTE ES DIFERENTE DEL PREDETERMINADO Y PERMITE CREDITO, REGRESAR EL METODO DE PAGO A CREDITO
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso CveCliente <> UsuarioActual.Empresa.Funcionalidad(714).ToEntero() AndAlso RBLPago.SelectedValue = "2" AndAlso Me.PermiteCredito AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
If (CveVenta <= 0 AndAlso Not EsCreaApartirDe) AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso CveCliente <> UsuarioActual.Empresa.Funcionalidad(714).ToEntero() AndAlso RBLPago.SelectedValue = "2" AndAlso Me.PermiteCredito AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
End If
|
||||
|
||||
@@ -7385,18 +7385,7 @@ Partial Class Ventas
|
||||
If (CveVenta <= 0 AndAlso CveCotizacion <= 0) Or EsCreaApartirDe Or NuevaFactura = 1 OrElse ModalidadEdicion Then
|
||||
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
'SI EL METODO DE PAGO ES PUE, SELECCIONA CONTADO
|
||||
If Me.CveMetodoPago33Cliente = 1 Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
ElseIf Me.CveMetodoPago33Cliente = 3 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
'SI ESTA BLOQUEADO EL CREDITO, DEJAR CONTADO
|
||||
If Not RBLPago.Items(0).Enabled Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
End If
|
||||
End If
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
VerificaFormaPago()
|
||||
Else
|
||||
DdlMetodoPago33.SelectedValueExist(Me.CveMetodoPago33Cliente)
|
||||
CambiaMetodoPago33()
|
||||
@@ -7471,6 +7460,29 @@ Partial Class Ventas
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerificaFormaPago()
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
'SI EL METODO DEL CLIENTE ES PUE, PERMITE CREDITO Y LO TIENE HABILITADO, EL METODO SE CAMBIARA A PPD
|
||||
If Me.CveMetodoPago33Cliente = 1 AndAlso Me.PermiteCredito AndAlso RBLPago.Items(0).Enabled AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||
Me.CveMetodoPago33Cliente = 3
|
||||
End If
|
||||
|
||||
'SI EL METODO DE PAGO ES PUE, SELECCIONA CONTADO
|
||||
If Me.CveMetodoPago33Cliente = 1 Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
ElseIf Me.CveMetodoPago33Cliente = 3 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
'SI ESTA BLOQUEADO EL CREDITO, DEJAR CONTADO
|
||||
If Not RBLPago.Items(0).Enabled Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
End If
|
||||
End If
|
||||
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HabilitarRemisionesPublicoGeneral()
|
||||
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
|
||||
'SI ESTA BLOQUEADO POR AUTORIZACION, HABILITAR LA OPCION DE REMISION PARA PUBLICO EN GENERAL
|
||||
@@ -7769,20 +7781,10 @@ Partial Class Ventas
|
||||
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
|
||||
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
'SI EL METODO DE PAGO ES PUE, SELECCIONA CONTADO
|
||||
If Me.CveMetodoPago33Cliente = 1 Then
|
||||
RBLPago.SelectedValue = "2"
|
||||
ElseIf Me.CveMetodoPago33Cliente = 3 Then
|
||||
RBLPago.SelectedValue = "1"
|
||||
End If
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
Else
|
||||
RBLPago.SelectedValue = "1"
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
End If
|
||||
|
||||
RBLPago.SelectedValue = "1"
|
||||
RBLPago_SelectedIndexChanged(RBLPago, Nothing)
|
||||
UPCondicionesPago.Update()
|
||||
|
||||
Dim CreditoDispo As Decimal = GetSaldoCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
|
||||
@@ -9139,7 +9141,7 @@ Partial Class Ventas
|
||||
|
||||
Dim DrProducto = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSNuevo).FiltroPrimero("")
|
||||
|
||||
If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSP.SelectedValue.ToEntero(), ObjDescuento) Then
|
||||
If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSP.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -19330,7 +19332,7 @@ Partial Class Ventas
|
||||
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
|
||||
AgregarPS()
|
||||
End Sub
|
||||
Private Function ValidaAgregarPS(Cantidad As Decimal, CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, CveClasificacion As Integer, CveSubProyecto As Integer, ObjDescuento As Modelos.VentaDescuentos, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "") As Boolean 'NO TOCAR - IPP
|
||||
Private Function ValidaAgregarPS(Cantidad As Decimal, CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, CveClasificacion As Integer, CveSubProyecto As Integer, ObjDescuento As Modelos.VentaDescuentos, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "", Optional CantidadOriginal As Decimal = 0D) As Boolean 'NO TOCAR - IPP
|
||||
|
||||
'VALIDA PARAMETROS
|
||||
If CvePS <= 0 Or CveUM <= 0 Then
|
||||
@@ -19474,6 +19476,13 @@ Partial Class Ventas
|
||||
|
||||
Dim ValidaExistencia As Boolean = (DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False) Or UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1
|
||||
|
||||
If CantidadOriginal > 0 Then
|
||||
'SI NO HAY CAMBIOS EN LAS CANTIDADES, NO VALIDAR EXISTENCIA
|
||||
If CantidadOriginal = Cantidad Then
|
||||
ValidaExistencia = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If ValidaExistencia Then
|
||||
|
||||
'VALIDA EXISTENCIA
|
||||
@@ -25078,6 +25087,11 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub LnkAgregarCliente_Click(sender As Object, e As EventArgs) Handles LnkAgregarCliente.Click
|
||||
LimpiarAgregarCliente()
|
||||
RegistraScript("showDivEC();")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarAgregarCliente()
|
||||
DivNombreCliente.Visible = False
|
||||
DivTipoPersona.Visible = False
|
||||
DivDireccionCliente.Visible = False
|
||||
@@ -25092,6 +25106,7 @@ Partial Class Ventas
|
||||
divRegimenCliente.Visible = False
|
||||
divGiro.Visible = False
|
||||
DivBusquedaCliente.Visible = False
|
||||
BtnRegresarBusqueda.Visible = False
|
||||
|
||||
CargaEstados()
|
||||
|
||||
@@ -25109,8 +25124,9 @@ Partial Class Ventas
|
||||
TxtCorreoCliente.Text = ""
|
||||
TxtTelefonoCliente.Text = ""
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
TxtRFCNombre.Text = ""
|
||||
BtnCrearCliente.Visible = True
|
||||
|
||||
DivValidaRFC.Visible = False
|
||||
DivValidaPorNombre.Visible = True
|
||||
@@ -25125,8 +25141,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
|
||||
RegistraScript("showDivEC();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvBusquedaCliente_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBusquedaCliente.RowDataBound
|
||||
@@ -25143,16 +25157,22 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub BtnValidaPorNombre_Click(sender As Object, e As EventArgs) Handles BtnValidaPorNombre.Click
|
||||
|
||||
If TxtRFCNombre.Text.Length <= 2 Then
|
||||
Alert("Debe escribir al menos 3 caracteres", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
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
|
||||
If ObjCliente.DtResultados.Rows.Count = 1 AndAlso Not TxtRFCNombre.Text.Trim().Contiene("XAXX010101000", "XEXX010101000") 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
|
||||
ElseIf ObjCliente.DtResultados.Rows.Count > 0 AndAlso Not TxtRFCNombre.Text.Trim().Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
DivBusquedaCliente.Visible = True
|
||||
GvBusquedaCliente.DataSource = ObjCliente.DtResultados
|
||||
GvBusquedaCliente.DataBind()
|
||||
@@ -25181,7 +25201,7 @@ Partial Class Ventas
|
||||
|
||||
Private Sub BtnValidarRFC_Click(sender As Object, e As EventArgs) Handles BtnValidarRFC.Click
|
||||
|
||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||
If TxtRFCCliente.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
DivNombreCliente.Visible = True
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
@@ -25212,29 +25232,45 @@ Partial Class Ventas
|
||||
DdlRegimenFiscalCliente.DataBind()
|
||||
CargaComboCFDICliente()
|
||||
Else
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.ValidaClienteRFC(TxtRFCCliente.Text, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
HdnCveCliente.Value = ObjCliente.DtResultados(0)("CveCliente").ToString()
|
||||
CargaCliente(CveCliente)
|
||||
UpCliente.Update()
|
||||
Else
|
||||
DivNombreCliente.Visible = True
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
'DivColoniaTelefonoCliente.Visible = True
|
||||
DivCiudadLocalidadCliente.Visible = True
|
||||
DivEstadoPaisCliente.Visible = True
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
DivBotonesAgregarCliente.Visible = True
|
||||
DivFormaCliente.Visible = True
|
||||
divRegimenCliente.Visible = True
|
||||
|
||||
If TxtRFCCliente.Text.Trim.Length > 2 Then
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.ValidaClienteRFC(TxtRFCCliente.Text, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
HdnCveCliente.Value = ObjCliente.DtResultados(0)("CveCliente").ToString()
|
||||
CargaCliente(CveCliente)
|
||||
UpCliente.Update()
|
||||
Else
|
||||
DivNombreCliente.Visible = True
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
'DivColoniaTelefonoCliente.Visible = True
|
||||
DivCiudadLocalidadCliente.Visible = True
|
||||
DivEstadoPaisCliente.Visible = True
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
DivBotonesAgregarCliente.Visible = True
|
||||
DivFormaCliente.Visible = True
|
||||
divRegimenCliente.Visible = True
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
Else
|
||||
DivNombreCliente.Visible = True
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
'DivColoniaTelefonoCliente.Visible = True
|
||||
DivCiudadLocalidadCliente.Visible = True
|
||||
DivEstadoPaisCliente.Visible = True
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
DivBotonesAgregarCliente.Visible = True
|
||||
DivFormaCliente.Visible = True
|
||||
divRegimenCliente.Visible = True
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
|
||||
|
||||
RFVDireccionC.Visible = True
|
||||
RFVNoEC.Visible = True
|
||||
@@ -25268,6 +25304,8 @@ Partial Class Ventas
|
||||
TxtDireccionCliente.Text = DrSP("Calle").ToString()
|
||||
TxtNumExtCliente.Text = DrSP("NoExt").ToString()
|
||||
TxtNumIntCliente.Text = DrSP("NoInt").ToString()
|
||||
TxtCorreoCliente.Text = DrSP("Correo").ToString()
|
||||
TxtTelefonoCliente.Text = DrSP("Telefono").ToString()
|
||||
|
||||
End If
|
||||
|
||||
@@ -25297,6 +25335,12 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
DdlUsoCFDICliente.SelectedValueExist("3")
|
||||
|
||||
BtnCrearCliente.Visible = False
|
||||
BtnValidarRFC.Visible = False
|
||||
BtnRegresarBusqueda.Visible = True
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -25346,6 +25390,21 @@ Partial Class Ventas
|
||||
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().Length < 12 Then
|
||||
Alert("El RFC no es valido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlUsoCFDICliente.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("El 'Uso CFDI' es requerido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("El 'Régimen Fiscal' es requerido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
|
||||
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -26749,16 +26808,16 @@ Partial Class Ventas
|
||||
|
||||
Dim CancelacionPagos = OpcionesCancelacionPagos.SinPagos
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
If (UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1") AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
CancelacionPagos = OpcionesCancelacionPagos.ConPagos_CancelarIE
|
||||
End If
|
||||
|
||||
'PARA GENERAR LA DEVOLUCION DE ALMACEN SIN ESPERAR LA ACEPTACION DEL SAT
|
||||
Dim GenerarDevolucionAnticipada As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion AndAlso ObjFacturaCancelacion.Pagado > 0 Then
|
||||
' CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion Then
|
||||
|
||||
@@ -37491,9 +37550,26 @@ Partial Class Ventas
|
||||
|
||||
DdlRegimenFiscalCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'DdlUsoCFDICliente.Items.Clear()
|
||||
'DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CargaComboCFDICliente()
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
'PERSONA MORAL
|
||||
If RdTipoPersona.SelectedValue = "1" Then
|
||||
DdlRegimenFiscalCliente.SelectedValueExist("1")
|
||||
DdlRegimenFiscalCliente_SelectedIndexChanged(Nothing, EventArgs.Empty)
|
||||
'PERSONA FISICA
|
||||
Else
|
||||
If TxtRFCCliente.Text.Trim() = "XAXX010101000" Then
|
||||
DdlRegimenFiscalCliente.SelectedValueExist("11")
|
||||
Else
|
||||
DdlRegimenFiscalCliente.SelectedValueExist("9")
|
||||
End If
|
||||
|
||||
DdlRegimenFiscalCliente_SelectedIndexChanged(Nothing, EventArgs.Empty)
|
||||
End If
|
||||
|
||||
DdlUsoCFDICliente.SelectedValueExist("3")
|
||||
Else
|
||||
CargaComboCFDICliente()
|
||||
End If
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
End Sub
|
||||
@@ -40125,5 +40201,9 @@ Partial Class Ventas
|
||||
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
|
||||
|
||||
Protected Sub BtnRegresarBusqueda_Click(sender As Object, e As EventArgs)
|
||||
LimpiarAgregarCliente()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user