Al crear o editar un producto poder introducir el precio de lista de cada una
This commit is contained in:
@@ -723,6 +723,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" id="DivListaPrecios" runat="server" >
|
||||||
|
<div class="portlet xspadding light bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-briefcase font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Lista de Precios </span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body form">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GvMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false" DataKeyNames="CvePrecioLista,PrecioLista,Precio"
|
||||||
|
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" EmptyDataText="No se encontraron registros" OnRowDataBound="GvMultiple_RowDataBound">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:Label ID="LtlLista" runat="server">Precio</asp:Label>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtPrecio" runat="server" MaxLength="39" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -2672,7 +2708,19 @@
|
|||||||
}
|
}
|
||||||
//TERMINA: ECOMMERCE
|
//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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -141,6 +141,15 @@ Partial Class ProductosyServicios
|
|||||||
ViewState("Imagen") = value
|
ViewState("Imagen") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
#End Region
|
||||||
|
|
||||||
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||||
@@ -273,6 +282,7 @@ Partial Class ProductosyServicios
|
|||||||
'CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero)
|
'CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero)
|
||||||
CargaSucursaless()
|
CargaSucursaless()
|
||||||
CargaImpuestosLocales()
|
CargaImpuestosLocales()
|
||||||
|
CargaListaPrecios()
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(122) Then
|
If UsuarioActual.TienePermisoProceso(122) Then
|
||||||
BtnEliminar.Visible = False
|
BtnEliminar.Visible = False
|
||||||
@@ -1714,6 +1724,10 @@ Partial Class ProductosyServicios
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
GuardarListasPrecios(ObjProductosServicios)
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjProductosServicios.CvePS > 0 And Not TieneError Then
|
If ObjProductosServicios.CvePS > 0 And Not TieneError Then
|
||||||
TieneError = GuardaEcommerce()
|
TieneError = GuardaEcommerce()
|
||||||
End If
|
End If
|
||||||
@@ -2967,6 +2981,58 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
#End Region
|
#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"
|
#Region "EXISTENCIAS"
|
||||||
|
|
||||||
Protected Sub GVExistencias_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GVExistencias_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user