Validacion de autorizaciones, limitar remisiones de nota de credito
This commit is contained in:
@@ -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