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