Correciones en ventas
This commit is contained in:
@@ -7616,53 +7616,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
||||
<asp:TextBox ID="TxtRFCCliente" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="^[a-zñA-ZÑ.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
||||
<asp:TextBox ID="TxtRFCCliente" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="^[a-zñA-ZÑ.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label>
|
||||
</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" />
|
||||
</div>
|
||||
</div>
|
||||
</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" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<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:ListItem Value="0">Física</asp:ListItem>
|
||||
<asp:ListItem Value="1">Moral</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<label for="<%= RdTipoPersona.ClientID.ToString()%>">Tipo Persona:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<%--<div id="DivNombreCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreCliente" CssClass="form-control " runat="server" MaxLength="150" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreCliente" runat="server" ControlToValidate="TxtNombreCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombreCliente.ClientID.ToString()%>">Razón Social:</label>
|
||||
</div>--%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" runat="server" id="DivRazonSocial2">
|
||||
<div id="DivNombreCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
@@ -7701,12 +7680,30 @@
|
||||
<label for="<%= TxtNumIntCliente.ClientID.ToString()%>">Número Interior:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivColoniaTelefonoCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<div id="DivCiudadLocalidadCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtColoniaCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVColoniaC" runat="server" ControlToValidate="TxtColoniaCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtColoniaCliente.ClientID.ToString()%>">Colonia:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCiudadC" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-4">
|
||||
<asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLocalidadC" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTelefonoCliente" runat="server" ControlToValidate="TxtTelefonoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
@@ -7714,18 +7711,6 @@
|
||||
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivCiudadLocalidadCliente" 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="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCiudadC" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLocalidadC" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
@@ -7747,26 +7732,16 @@
|
||||
<label for="<%= DdlEstadoSAT.ClientID.ToString()%>">Estado:</label>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="200px">
|
||||
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="200px">
|
||||
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
@@ -7774,12 +7749,25 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="divRegimenCliente" runat="server" visible="false" style="padding-left: 16px;">
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlRegimenFiscalCliente" AutoPostBack="true" OnSelectedIndexChanged="DdlRegimenFiscalCliente_SelectedIndexChanged" DataTextField="CodigoRegimenFiscalTexto" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRegimenFiscal" runat="server" InitialValue="-1" ControlToValidate="DdlRegimenFiscalCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Regimen Fiscal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlRegimenFiscalCliente.ClientID.ToString()%>">Régimen Fiscal:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:DropDownList ID="DdlUsoCFDICliente" Width="100%" DataTextField="UsoCFDIDescripcion" DataValueField="CveUsoCFDI" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" InitialValue="-1" ControlToValidate="DdlUsoCFDICliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Uso CFDi''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlUsoCFDICliente.ClientID.ToString()%>">Uso CFDi:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivBotonesAgregarCliente" runat="server" visible="false" class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarCliente" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarCliente" />
|
||||
<button id="BtnCancelarCliente" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
@@ -2314,6 +2314,7 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
If IfNull(Request("Opcionx"), "").ToString = "Saldar" And UsuarioActual.CveUsuario = 100 Then
|
||||
@@ -3165,6 +3166,10 @@ Partial Class Ventas
|
||||
BrSubProyecto.Visible = DdlProyecto.Visible
|
||||
divProyectoPyME.Visible = DdlProyecto.Visible
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
||||
LnkAddVenta.Visible = True
|
||||
End If
|
||||
|
||||
'MOSTRAR LA OPCION DE AGREGAR PS EN BDH
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta <= 0 Then
|
||||
ImgOtrosConceptos.Visible = False
|
||||
@@ -7685,33 +7690,36 @@ Partial Class Ventas
|
||||
e.Row.FCTextBox("TxtDescuento").Enabled = False
|
||||
End If
|
||||
|
||||
'Si es una devolucion
|
||||
If NuevaFactura = 0 Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
e.Row.FCDropDownList("DdlProyecto").Enabled = False
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Enabled = False
|
||||
e.Row.FCTextBox("TxtPrecio").Enabled = False
|
||||
ElseIf NuevaFactura = 1 Or CveContrato > 0 Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
e.Row.FCTextBox("TxtPrecio").Enabled = False
|
||||
e.Row.FCTextBox("TxtDescuento").Enabled = False
|
||||
|
||||
If TieneAlmacen Then e.Row.FCLinkButton("imgD").Visible = False
|
||||
If Not EsCreaApartirDe Then
|
||||
'Si es una devolucion
|
||||
If NuevaFactura = 0 Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
e.Row.FCDropDownList("DdlProyecto").Enabled = False
|
||||
e.Row.FCDropDownList("DdlSubProyecto").Enabled = False
|
||||
e.Row.FCTextBox("TxtPrecio").Enabled = False
|
||||
ElseIf NuevaFactura = 1 Or CveContrato > 0 Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = False
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
e.Row.FCTextBox("TxtPrecio").Enabled = False
|
||||
e.Row.FCTextBox("TxtDescuento").Enabled = False
|
||||
|
||||
If TieneAlmacen Then e.Row.FCLinkButton("imgD").Visible = False
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(222) Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = True
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = True
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = True
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = True
|
||||
e.Row.FCTextBox("TxtPrecio").Enabled = True
|
||||
e.Row.FCTextBox("TxtDescuento").Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(222) Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = True
|
||||
e.Row.FCDropDownList("DdlClasificacion").Enabled = True
|
||||
e.Row.FCDropDownLost("DdlPS").Enabled = True
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = True
|
||||
e.Row.FCTextBox("TxtPrecio").Enabled = True
|
||||
e.Row.FCTextBox("TxtDescuento").Enabled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Si es facturacion de OC o Contrato
|
||||
@@ -19832,7 +19840,7 @@ Partial Class Ventas
|
||||
If TieneMovimientosContrato Then
|
||||
MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"))
|
||||
Else
|
||||
MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
|
||||
MovDetalle = CuadrarFacturaMovimientos(ObjVentas, CveRemision, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (SaldoAlmacen > 0 AND CantidadDisponible > 0)"))
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -21466,9 +21474,14 @@ Partial Class Ventas
|
||||
'REGENERAR EL PDF
|
||||
If Not OcurrioError Then
|
||||
Try
|
||||
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||
|
||||
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() RegenerarPDF(CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, strURLHOST))
|
||||
Hilo.Start()
|
||||
RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||
'
|
||||
'Dim Hilo As New System.Threading.Thread(Sub() )
|
||||
'Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||
End Try
|
||||
@@ -22483,12 +22496,13 @@ Partial Class Ventas
|
||||
DivDireccionCliente.Visible = False
|
||||
|
||||
DivNumeroCPCliente.Visible = False
|
||||
DivColoniaTelefonoCliente.Visible = False
|
||||
'DivColoniaTelefonoCliente.Visible = False
|
||||
DivCiudadLocalidadCliente.Visible = False
|
||||
DivEstadoPaisCliente.Visible = False
|
||||
DivCorreoCuentaCliente.Visible = False
|
||||
DivBotonesAgregarCliente.Visible = False
|
||||
DivFormaCliente.Visible = False
|
||||
divRegimenCliente.Visible = False
|
||||
UpAgregarCliente.Update()
|
||||
CargaEstados()
|
||||
|
||||
@@ -22502,7 +22516,7 @@ Partial Class Ventas
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
DivColoniaTelefonoCliente.Visible = True
|
||||
'DivColoniaTelefonoCliente.Visible = True
|
||||
DivCiudadLocalidadCliente.Visible = True
|
||||
DivEstadoPaisCliente.Visible = True
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
@@ -22515,9 +22529,16 @@ Partial Class Ventas
|
||||
RFVCiudadC.Visible = False
|
||||
RFVLocalidadC.Visible = False
|
||||
RFVSATPais.Visible = False
|
||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
||||
|
||||
RdTipoPersona.SelectedValue = "0"
|
||||
|
||||
DdlMetodoCliente.SelectedValueExist(1)
|
||||
DdlFormaCliente.SelectedValueExist(1)
|
||||
|
||||
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11")
|
||||
DdlRegimenFiscalCliente.DataBind()
|
||||
CargaComboCFDICliente()
|
||||
Else
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.ValidaClienteRFC(TxtRFCCliente.Text, UsuarioActual.CveEmpresa) Then
|
||||
@@ -22532,12 +22553,13 @@ Partial Class Ventas
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
DivColoniaTelefonoCliente.Visible = True
|
||||
'DivColoniaTelefonoCliente.Visible = True
|
||||
DivCiudadLocalidadCliente.Visible = True
|
||||
DivEstadoPaisCliente.Visible = True
|
||||
DivCorreoCuentaCliente.Visible = True
|
||||
DivBotonesAgregarCliente.Visible = True
|
||||
DivFormaCliente.Visible = True
|
||||
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
@@ -22552,12 +22574,54 @@ Partial Class Ventas
|
||||
DdlMetodoCliente.SelectedValueExist(-1)
|
||||
DdlFormaCliente.SelectedValueExist(-1)
|
||||
|
||||
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales()
|
||||
DdlRegimenFiscalCliente.DataBind()
|
||||
CargaComboCFDICliente()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaComboCFDICliente()
|
||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI().FiltraParametros("CveUsoCFDI = 23")
|
||||
DdlUsoCFDICliente.DataBind()
|
||||
Else
|
||||
Dim RegimenFiscalCliente = DdlRegimenFiscalCliente.SelectedValue.ToString()
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
RegimenFiscalCliente = "-1"
|
||||
End If
|
||||
|
||||
DdlUsoCFDICliente.Items.Clear()
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
Else
|
||||
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
End If
|
||||
|
||||
DdlUsoCFDICliente.DataBind()
|
||||
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlRegimenFiscalCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaComboCFDICliente()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
|
||||
Dim CvePrecioLista As Integer = -1
|
||||
Dim CveRegimenFiscal As Integer = -1
|
||||
Dim CveUsoCFDI As Integer = 3
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
|
||||
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
@@ -22575,7 +22639,7 @@ Partial Class Ventas
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona) Then
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI) Then
|
||||
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
@@ -22747,6 +22811,10 @@ Partial Class Ventas
|
||||
LBAplicaDevolucion.Visible = False
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Dev" AndAlso VentaSaldoAlmacen <> 0 Then
|
||||
LiDevolucionAlmacen.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UpnTools.Update()
|
||||
@@ -33481,9 +33549,13 @@ Partial Class Ventas
|
||||
|
||||
'REGENERAR EL PDF
|
||||
Try
|
||||
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||
|
||||
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() RegenerarPDF(CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, strURLHOST))
|
||||
Hilo.Start()
|
||||
RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||
'Dim Hilo As New System.Threading.Thread(Sub() )
|
||||
'Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||
End Try
|
||||
@@ -34447,6 +34519,28 @@ Partial Class Ventas
|
||||
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
||||
DVRegimenSociedad.Visible = True
|
||||
|
||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||
DdlRegimenFiscalCliente.DataSource = GlobalDTRegimenesFiscales().FiltraParametros("CveRegimenFiscal = 11")
|
||||
DdlRegimenFiscalCliente.DataBind()
|
||||
Else
|
||||
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
||||
Dim Val As String
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
'verifico que sino existe el valor. lo limpie
|
||||
Val = dt.FiltroPrimeroValor("CveRegimenFiscal", "CveRegimenFiscal = " & DdlRegimenFiscalCliente.SelectedValue)
|
||||
If Val = "" Then 'sino encuentra valor, lo limpia
|
||||
DdlRegimenFiscalCliente.Items.Clear()
|
||||
DdlRegimenFiscalCliente.SelectedValue = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlRegimenFiscalCliente.DataSource = dt
|
||||
DdlRegimenFiscalCliente.DataBind()
|
||||
DdlRegimenFiscalCliente.SelectedValueExist(Val)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UpAgregarCliente.Update()
|
||||
|
||||
Reference in New Issue
Block a user