.
This commit is contained in:
@@ -74,32 +74,32 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
DDlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
DDlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaPreciosLista()
|
Public Sub CargaPreciosLista()
|
||||||
|
|
||||||
DdlPrecioLista.Items.Clear()
|
DdlPrecioLista.Items.Clear()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'si manneja precios de lista
|
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'si manneja precios de lista
|
||||||
Dim ObjVta As New ClsVentas
|
Dim ObjVta As New ClsVentas
|
||||||
Dim primerItem As String = ""
|
Dim primerItem As String = ""
|
||||||
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||||
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
|
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
|
||||||
DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy()
|
DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy()
|
||||||
primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
|
primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
|
||||||
End If
|
End If
|
||||||
ObjVta.Dispose()
|
ObjVta.Dispose()
|
||||||
|
|
||||||
|
|
||||||
DdlPrecioLista.DataBind()
|
DdlPrecioLista.DataBind()
|
||||||
DdlPrecioListaCarga.DataBind()
|
DdlPrecioListaCarga.DataBind()
|
||||||
|
|
||||||
If (DdlPrecioLista.Items.Count = 1) Then
|
If (DdlPrecioLista.Items.Count = 1) Then
|
||||||
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
|
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||||
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaPS()
|
Public Sub CargaPS()
|
||||||
@@ -142,19 +142,19 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargarModelos()
|
Private Sub CargarModelos()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558).ToString = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(558).ToString = "1" Then
|
||||||
lblModelo.visible = True
|
lblModelo.visible = True
|
||||||
DdlModelo.Visible = True
|
DdlModelo.Visible = True
|
||||||
Dim ObjGeneral As New ClsGenerales
|
Dim ObjGeneral As New ClsGenerales
|
||||||
If ObjGeneral.GetModelos(UsuarioActual.CveEmpresa) Then
|
If ObjGeneral.GetModelos(UsuarioActual.CveEmpresa) Then
|
||||||
DdlModelo.DataSource = ObjGeneral.DtResultados
|
DdlModelo.DataSource = ObjGeneral.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjGeneral.Dispose()
|
ObjGeneral.Dispose()
|
||||||
DdlModelo.DataBind()
|
DdlModelo.DataBind()
|
||||||
End If
|
End If
|
||||||
DdlModelo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlModelo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
Dim objPS As New ClsProductosServicios
|
Dim objPS As New ClsProductosServicios
|
||||||
@@ -223,7 +223,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
BtnConsultar_Click(Nothing, Nothing)
|
BtnConsultar_Click(Nothing, Nothing)
|
||||||
RegistraScript("$('#divAgregar').modal('hide')")
|
RegistraScript("$('#divAgregar').modal('hide')")
|
||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtPrecio.Text = ""
|
TxtPrecio.Text = ""
|
||||||
TxtPorcentaje.Text = ""
|
TxtPorcentaje.Text = ""
|
||||||
@@ -410,26 +410,26 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Dim Correcto As Boolean = False
|
Dim Correcto As Boolean = False
|
||||||
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa))
|
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa))
|
||||||
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
||||||
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
||||||
Dim Porcentaje As Decimal = -1
|
Dim Porcentaje As Decimal = -1
|
||||||
|
|
||||||
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
||||||
|
|
||||||
|
|
||||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
RowsCargados += 1
|
RowsCargados += 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
||||||
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
RowsCargados += 1
|
RowsCargados += 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Correcto = False
|
Correcto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If Not Correcto Then
|
If Not Correcto Then
|
||||||
ProductosNoCargados.AppendFormat("{0},", row("Producto / Servicio").ToString())
|
ProductosNoCargados.AppendFormat("{0},", row("Producto / Servicio").ToString())
|
||||||
@@ -508,12 +508,12 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
End While
|
End While
|
||||||
|
|
||||||
Return dataTable
|
Return dataTable
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub gvSucursal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub gvSucursal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.FCTextBox("TxtPrecioMinimo").Attributes.Add("onKeyUp", String.Format("FncSeleccionaChk({0});", e.Row.FCCheckBox("chkSucursal").ClientID))
|
e.Row.FCTextBox("TxtPrecioMinimo").Attributes.Add("onKeyUp", String.Format("FncSeleccionaChk({0});", e.Row.FCCheckBox("chkSucursal").ClientID))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user