Correccion en carga de lineas adicionales

This commit is contained in:
2022-09-26 18:39:14 -07:00
parent 17b28af00b
commit e29acbcfb8

View File

@@ -2258,6 +2258,15 @@ Partial Class Ventas
End Set
End Property
Private Property CveMonedaLineaAdicional As Integer
Get
Return IfNull(ViewState("CveMonedaLineaAdicional"), "-1", ViewState("CveMonedaLineaAdicional")).ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("CveMonedaLineaAdicional") = value
End Set
End Property
#End Region
'#Region "AuxiliarConta"
@@ -6681,6 +6690,11 @@ Partial Class Ventas
BloqueaCondiconesPago()
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
If CveVenta <= 0 Then
CalculaLineasAdicionales()
End If
'If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
' Using ObjVentas As New ClsVentas
' If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, DdlMoneda.SelectedValue.ToEntero(), MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa) Then
@@ -8845,6 +8859,12 @@ Partial Class Ventas
Exit Sub
End If
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then
Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
If Me.SaldoLineaAdicional <= TxtTotal.Text.ToDecimal() Then
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
@@ -18034,8 +18054,6 @@ Partial Class Ventas
ListaDescuentos.Add(ObjDescuento)
End If
CalculaLineasAdicionales()
CalculaTotalesVenta()
LimpiaAgregar()
@@ -21665,6 +21683,11 @@ Partial Class Ventas
If CveCliente > 0 Then
CargaAnticipos(CveCliente)
End If
If CveVenta <= 0 Then
CalculaLineasAdicionales()
End If
End Sub
Private Sub btnBuscarPrecio_Click(sender As Object, e As EventArgs) Handles btnBuscarPrecio.Click
Dim Codigo, CodigoBarras As String
@@ -35280,6 +35303,7 @@ Partial Class Ventas
TxtFechaPago.Text = ObjVentas.DtResultados.Rows(0)("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
Me.SaldoLineaAdicional = ObjVentas.DtResultados.Rows(0)("Saldo").ToString().ToDecimal()
Me.CveClasificacionLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveClasificacionPS").ToString().ToEntero()
Me.CveMonedaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveMoneda").ToString().ToEntero()
End If
End If
End Using
@@ -35313,6 +35337,12 @@ Partial Class Ventas
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then
Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Using ObjVentas As New ClsVentas