--FIX cargas de precios
This commit is contained in:
@@ -18733,7 +18733,22 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlPSEdit_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
Protected Sub DdlPSEdit_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
|
||||||
|
Dim ActualizarPrecios As Boolean = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
ActualizarPrecios = true
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
ActualizarPrecios = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
ActualizarPrecios = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ActualizarPrecios Then
|
||||||
|
|
||||||
Dim EditarPrecio As Boolean = True
|
Dim EditarPrecio As Boolean = True
|
||||||
If DdlTipoComprobante.SelectedValue = "Ant" AndAlso UsuarioActual.CveEmpresa = 189 Then
|
If DdlTipoComprobante.SelectedValue = "Ant" AndAlso UsuarioActual.CveEmpresa = 189 Then
|
||||||
@@ -18747,6 +18762,16 @@ Partial Class Ventas
|
|||||||
If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then
|
If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then
|
||||||
Dim CvePSParametro = ddlPSEdit.SelectedValue.ToEntero()
|
Dim CvePSParametro = ddlPSEdit.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
Dim CveClasificacion As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimeroValor("CveClasificacion").ToEntero()
|
||||||
|
|
||||||
|
If CveClasificacion > 0 Then
|
||||||
|
Dim DdlCla As DropDownList = GvRow.FCDropDownList("DdlClasificacion")
|
||||||
|
DdlCla.SelectedValueExist(CveClasificacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CvePrecioListaSugerido As Integer = -1
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(360) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
Dim DdlPrecioListaEdit = GvRow.FCDropDownList("DdlPrecioListaEdit")
|
Dim DdlPrecioListaEdit = GvRow.FCDropDownList("DdlPrecioListaEdit")
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
@@ -18768,13 +18793,18 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CvePrecioListaSugerido = DdlPrecioListaEdit.SelectedValue.ToEntero()
|
||||||
|
Else
|
||||||
|
CvePrecioListaSugerido = GvRow.DataKey("CvePrecioLista").ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||||
If DrPS IsNot Nothing Then
|
If DrPS IsNot Nothing Then
|
||||||
'SUGIERE PRECIO
|
'SUGIERE PRECIO
|
||||||
Dim PrecioSugerido As Decimal = 0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
Dim tPrecioSugerido As Decimal = 0
|
Dim tPrecioSugerido As Decimal = 0
|
||||||
tPrecioSugerido = DrPS("Precio").ToString().ToDecimal
|
tPrecioSugerido = DrPS("Precio").ToString().ToDecimal
|
||||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, DrPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioListaEdit.SelectedValue.ToEntero())
|
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, DrPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=CvePrecioListaSugerido)
|
||||||
|
|
||||||
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user