diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index 39ccddd6f..b8664feb2 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -723,6 +723,42 @@
+
+
+
+
+
+
+ Lista de Precios
+
+
+
+
+
+
+
+
+
+
+
+ Precio
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2672,7 +2708,19 @@
}
//TERMINA: ECOMMERCE
-
+ function onlyNumberKey(evt) {
+
+ // Only ASCII character in that range allowed
+ var ASCIICode = (evt.which) ? evt.which : evt.keyCode
+ if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57)) {
+ if (ASCIICode == 46) {
+ return true
+ } else {
+ return false;
+ }
+ }
+ return true;
+ }
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index a1a86883c..bbbdfa257 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -141,6 +141,15 @@ Partial Class ProductosyServicios
ViewState("Imagen") = value
End Set
End Property
+
+ Private Property DtPreciosMultiple As DataTable
+ Get
+ Return If(IsNothing(ViewState("DtPreciosMultiple")), Nothing, CType(ViewState("DtPreciosMultiple"), DataTable))
+ End Get
+ Set(value As DataTable)
+ ViewState("DtPreciosMultiple") = value
+ End Set
+ End Property
#End Region
Private ReadOnly Property PermiteClasificacion2 As Boolean
@@ -273,6 +282,7 @@ Partial Class ProductosyServicios
'CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero)
CargaSucursaless()
CargaImpuestosLocales()
+ CargaListaPrecios()
If UsuarioActual.TienePermisoProceso(122) Then
BtnEliminar.Visible = False
@@ -1714,6 +1724,10 @@ Partial Class ProductosyServicios
Next
End If
+ If Not TieneError Then
+ GuardarListasPrecios(ObjProductosServicios)
+ End If
+
If ObjProductosServicios.CvePS > 0 And Not TieneError Then
TieneError = GuardaEcommerce()
End If
@@ -2967,6 +2981,58 @@ Partial Class ProductosyServicios
#End Region
+#Region "LISTA PRECIOS"
+
+ Private Sub CargaListaPrecios()
+
+ Dim objPS As New ClsProductosServicios
+ If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CveClasificacion:=-1, CvePS:=CvePS,
+ CveProveedor:=-1, Estado:=-1, Marcas:="-1", CveModelo:=-1) Then
+ DtPreciosMultiple = objPS.DtResultados.Copy()
+ GvMultiple.DataSource = DtPreciosMultiple
+ End If
+ objPS.Dispose()
+
+ GvMultiple.DataBind()
+ End Sub
+
+ Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+ Dim Valor As Decimal = DtPreciosMultiple.Rows(e.Row.RowIndex)(2).ToString().ToDecimal()
+
+ e.Row.FCTextBox("TxtPrecio").Text = Valor.FormatoNumero(2)
+
+ End If
+ End Sub
+
+ Private Sub GuardarListasPrecios(ObjPS As ClsProductosServicios)
+ Dim TieneError As Boolean = False
+
+ Try
+ For Each GvRow As GridViewRow In GvMultiple.Rows
+ Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
+ Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
+
+ TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
+
+ If TieneError Then
+ Exit For
+ End If
+ Next
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar precios", ex)
+ TieneError = True
+ End Try
+
+ If TieneError Then
+ Alert("Ocurrió un error al actualizar precios", TipoMensaje.MsgError)
+ End If
+
+ End Sub
+
+#End Region
+
#Region "EXISTENCIAS"
Protected Sub GVExistencias_RowDataBound(sender As Object, e As GridViewRowEventArgs)