-- corrección manejo de cuenta

This commit is contained in:
2023-12-20 06:22:43 -07:00
parent 023379c90d
commit 0276ac75b8

View File

@@ -13147,10 +13147,10 @@ Partial Class Ventas
End If End If
End If End If
If UsuarioActual.CveEmpresa.Contiene(186) AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then
If CveAlmacenAsignado <= 0 Then If CveAlmacenAsignado <= 0 Then
ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.") ErrorList.Add("Ocurrió un error al seleccionar el almacen de resguardo del cliente.")
Else Else
CveAlmacenTraspasoDestino = CveAlmacenAsignado CveAlmacenTraspasoDestino = CveAlmacenAsignado
End If End If
@@ -18120,7 +18120,8 @@ Partial Class Ventas
CvePrecioListaPS = Me.CvePrecioLista CvePrecioListaPS = Me.CvePrecioLista
PrecioListaPS = DdlPrecioLista.SelectedItem.Text PrecioListaPS = DdlPrecioLista.SelectedItem.Text
Else Else
Alert("La lista de precios del producto no coincide con la seleccionada", TipoMensaje.MsgAdvertencia) 'sino es la seleccionada se recalcula de nuevo
CargaPrecioLista(DdlPS.SelectedValue.ToEntero)
Exit Sub Exit Sub
End If End If
Else Else
@@ -35781,16 +35782,21 @@ Partial Class Ventas
Protected Sub DdlPrecioLista_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlPrecioLista_SelectedIndexChanged(sender As Object, e As EventArgs)
If DivPrecioLista.Visible AndAlso DdlPrecioLista.SelectedValue.ToEntero() > 0 Then If DivPrecioLista.Visible AndAlso DdlPrecioLista.SelectedValue.ToEntero() > 0 Then
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero()).FiltroPrimero("") CargaPrecioLista(DdlPS.SelectedValue.ToEntero)
End If
End Sub
Private Sub CargaPrecioLista(CvePS As Integer)
Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If drPS IsNot Nothing Then
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(drPS("CvePS").ToString().ToEntero(), drPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioLista.SelectedValue.ToEntero()) Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(drPS("CvePS").ToString().ToEntero(), drPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioLista.SelectedValue.ToEntero())
If ObjPrecioSugerido.PrecioSugerido > 0 Then If ObjPrecioSugerido.PrecioSugerido > 0 Then
TxtPrecio.Text = ObjPrecioSugerido.PrecioSugerido.ToString("#,###.####") TxtPrecio.Text = ObjPrecioSugerido.PrecioSugerido.ToString("#,###.####")
Else Else
Alert("No se encontro un precio para este producto en la lista de precios seleccionada") Alert("El Producto no tiene especificado precio en la lista de precio.")
End If End If
End If End If
End Sub End Sub