Validacion de autorizaciones, limitar remisiones de nota de credito
This commit is contained in:
@@ -6235,8 +6235,8 @@
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlVentaUsado" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="100%" CssClass="select2me" OnSelectedIndexChanged="DdlVentaUsado_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVVentaUsado" runat="server" InitialValue="-1" ControlToValidate="DdlVentaUsado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario, por favor ingréselo." ValidationGroup="VGAplicarRNC"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEVentaUsado" runat="server" HighlightCssClass="vco" TargetControlID="RFVVentaUsado" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVVentaUsado" runat="server" InitialValue="-1" ControlToValidate="DdlVentaUsado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Factura''</b> es necesario, por favor ingréselo." ValidationGroup="VGAplicarRNC"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEVentaUsado" runat="server" HighlightCssClass="vco" TargetControlID="RFVVentaUsado" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6293,14 +6293,14 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue" runat="server" Width="75px" />
|
||||
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" id="DivSMU" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<table border="0" rules="none" class="well TextTab" style="float: right;" runat="server">
|
||||
<tr align="right">
|
||||
|
||||
@@ -2160,6 +2160,7 @@ Partial Class Ventas
|
||||
'Carga Venta
|
||||
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero() > 0 Then
|
||||
ViewState("CveVenta") = Request("CveVenta")
|
||||
|
||||
If CargaVenta() Then
|
||||
|
||||
'DdlSucursal.Enabled = False
|
||||
@@ -2694,7 +2695,7 @@ Partial Class Ventas
|
||||
TrPedido.Visible = False
|
||||
' TrKilometrajeTxt.Visible = True
|
||||
End If
|
||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveVenta:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveVenta)
|
||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveVenta:{0}}});""> <i class=""fa fa-plus""></i> Tarea</a>", CveVenta)
|
||||
|
||||
End If
|
||||
|
||||
@@ -5415,7 +5416,7 @@ Partial Class Ventas
|
||||
|
||||
DdlVentaUsado.DataBind()
|
||||
|
||||
DdlVentaUsado.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlVentaUsado.Items.Insert(0, New ListItem("No Aplica", "-1"))
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
End If
|
||||
@@ -10190,7 +10191,7 @@ Partial Class Ventas
|
||||
|
||||
'PedidoA'
|
||||
If ObjVentas.CveVenta > 0 And CvePedidoA > 0 And DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
If Not ObjCliente.UpdateEstatusPedido(CvePedidoA, 18, -1, UsuarioActual.CveUsuario) Then
|
||||
If Not ObjCliente.UpdateEstatusPedido(CvePedidoA, 18, -1, UsuarioActual.CveUsuario, CveRemision:=factura.CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al actualizar el estatus del pedidoA")
|
||||
End If
|
||||
End If
|
||||
@@ -23116,13 +23117,19 @@ Partial Class Ventas
|
||||
GvRemisionesNCBon.DataBind()
|
||||
|
||||
If CveVentaUsado > 0 Then
|
||||
DivSMU.Visible = True
|
||||
Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
|
||||
LtlSMU.Text = String.Format("{0:N2}", FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal())
|
||||
Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
Else
|
||||
LtlSMU.Text = String.Format("{0:N2}", 0)
|
||||
DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
UpModalRemisionesNC.Update()
|
||||
UpDescNC.Update()
|
||||
End Sub
|
||||
Private Sub CargaDescRNC()
|
||||
Dim DtNC As DataTable = Nothing
|
||||
@@ -23318,8 +23325,8 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GvRemisionesNC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRemisionesNC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaTotalRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaCantidadRNCMasivo({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user