Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3732,18 +3732,31 @@ Partial Class Ventas
|
||||
UpPS.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaListasPreciosSubProyectos()
|
||||
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||
' DivPrecioLista.Visible = True
|
||||
' Using ObjVta As New ClsVentas
|
||||
' If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
' Dim Dt = ObjVta.DtResultados.Copy()
|
||||
' DdlPrecioLista.DataSource = Dt
|
||||
' DdlPrecioLista.SelectedValue = Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'")
|
||||
' End If
|
||||
' End Using
|
||||
' UpPS.Update()
|
||||
'End If
|
||||
Private Sub CargaListasPreciosSubProyectos(CvePS As Integer)
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DivPrecioLista.Visible = True
|
||||
|
||||
Using ObjVta As New ClsVentas
|
||||
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa) Then
|
||||
Dim Dt As DataTable = Nothing
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True'")
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True' AND Restringuida = 'False'")
|
||||
End If
|
||||
|
||||
DdlPrecioLista.DataSource = Dt
|
||||
If Dt IsNot Nothing Then
|
||||
DdlPrecioLista.SelectedValueExist(Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'"))
|
||||
End If
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlPrecioLista.DataBind()
|
||||
UpPS.Update()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BloqueaClasificaciones()
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
@@ -9132,7 +9145,7 @@ Partial Class Ventas
|
||||
Dim PrecioLista As String = ""
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
|
||||
CvePrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedValue.ToEntero()
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
|
||||
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text.Split("-"c)(0)
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero(), DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero(), DdlCla.SelectedItem.Text,
|
||||
@@ -17856,6 +17869,9 @@ Partial Class Ventas
|
||||
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
|
||||
If drPS IsNot Nothing Then
|
||||
|
||||
CargaListasPreciosSubProyectos(CvePSParametro)
|
||||
|
||||
'HdnUnidadMedida.Value = PS.Rows(0)("CveUnidadMedida").ToString()
|
||||
HdnPS.Value = drPS("PS").ToString()
|
||||
HdnCodigoPS.Value = drPS("PSCodigo").ToString()
|
||||
@@ -17916,6 +17932,19 @@ Partial Class Ventas
|
||||
|
||||
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||
|
||||
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
||||
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
||||
|
||||
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
||||
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
||||
@@ -18564,7 +18593,7 @@ Partial Class Ventas
|
||||
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||
End If
|
||||
|
||||
CargaListasPreciosSubProyectos()
|
||||
CargaListasPreciosSubProyectos(-1)
|
||||
|
||||
UpDetalle.Update()
|
||||
UpEmitirTransitorio.Update()
|
||||
@@ -19400,7 +19429,7 @@ Partial Class Ventas
|
||||
If DivPrecioLista.Visible Then
|
||||
If DdlPrecioLista.SelectedValue.ToEntero() > 0 AndAlso DdlPrecioLista.SelectedValue.ToEntero() = Me.CvePrecioLista Then
|
||||
CvePrecioListaPS = Me.CvePrecioLista
|
||||
PrecioListaPS = DdlPrecioLista.SelectedItem.Text
|
||||
PrecioListaPS = DdlPrecioLista.SelectedItem.Text.Split("-"c)(0)
|
||||
Else
|
||||
'sino es la seleccionada se recalcula de nuevo
|
||||
CargaPrecioLista(DdlPS.SelectedValue.ToEntero)
|
||||
|
||||
Reference in New Issue
Block a user