--Cambios en clientes abonar
This commit is contained in:
@@ -44,14 +44,15 @@
|
||||
|
||||
table.adssigscroll {
|
||||
min-width: 100%;
|
||||
background-color:#fff;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
table.adssigscroll tbody,table.adssigscroll thead{
|
||||
background-color:#fff;
|
||||
table.adssigscroll tbody, table.adssigscroll thead {
|
||||
background-color: #fff;
|
||||
}
|
||||
table.adssigscroll tr{
|
||||
background-color:inherit;
|
||||
|
||||
table.adssigscroll tr {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +68,8 @@
|
||||
background-color: inherit; /* Para que no se superponga con otros elementos */
|
||||
z-index: 4; /* Asegura que esté sobre otros elementos */
|
||||
}
|
||||
table.adssigscroll tr:nth-child(1) th:nth-child(1),table.adssigscroll tr:nth-child(1) th:nth-child(2) {
|
||||
|
||||
table.adssigscroll tr:nth-child(1) th:nth-child(1), table.adssigscroll tr:nth-child(1) th:nth-child(2) {
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
@@ -75,8 +77,8 @@
|
||||
top: 26.14px;
|
||||
}
|
||||
|
||||
table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1),
|
||||
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
|
||||
table.adssigscroll tr td:nth-child(1), table.adssigscroll tr th:nth-child(1),
|
||||
table.adssigscroll tr td:nth-child(2), table.adssigscroll tr th:nth-child(2) {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
@@ -86,12 +88,12 @@
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1) {
|
||||
table.adssigscroll tr td:nth-child(1), table.adssigscroll tr th:nth-child(1) {
|
||||
width: 21px;
|
||||
max-width: 21px;
|
||||
}
|
||||
|
||||
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
|
||||
table.adssigscroll tr td:nth-child(2), table.adssigscroll tr th:nth-child(2) {
|
||||
left: 21px;
|
||||
}
|
||||
</style>
|
||||
@@ -225,22 +227,25 @@
|
||||
<asp:ListItem Selected="true" Value="Imp" Text="Importe Fijo" />
|
||||
<asp:ListItem Value="Por" Text="Porcentaje" />
|
||||
</asp:RadioButtonList>
|
||||
<asp:HiddenField ID="HdnTipo" runat="server" ClientIDMode="Static" Value="1" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div runat="Server" id="ImporteFijo" class="form-group form-md-line-input input-iconright" style="width: 50%">
|
||||
<div class="col-md-3">
|
||||
<div runat="Server" id="ImporteFijo" class="form-group form-md-line-input input-iconright" style="width: 100%">
|
||||
<asp:TextBox ID="TxtImporte" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporte" FilterType="Numbers, Custom" ValidChars="." />
|
||||
<label for="<%= TxtImporte.ClientID.ToString()%>">Importe Nuevo:</label>
|
||||
<i>$</i>
|
||||
<label for="<%= TxtImporte.ClientID.ToString()%>">
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text="Precio nuevo:"></asp:Literal></label>
|
||||
<i>
|
||||
<asp:Literal ID="LtlSimbolo" runat="server" Text="$"></asp:Literal></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<a class="btn btn-default" onclick="CambiaImporte();">Aplicar Importe</a>
|
||||
<a class="btn btn-default" onclick="CambiaImporte();">Aplicar</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" style="display: none;">
|
||||
<div class="col-md-6">
|
||||
<div runat="Server" id="Div1" class="form-group form-md-line-input input-iconright" style="width: 50%">
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
@@ -254,15 +259,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
|
||||
<asp:TextBox ID="TxtPorcentaje" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBSerie" runat="server" TargetControlID="TxtPorcentaje" FilterType="Numbers, Custom" ValidChars=".,-" />
|
||||
<label for="<%= TxtPorcentaje.ClientID.ToString()%>">Porcentaje Nuevo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="col-md-12" style="display: flex; justify-content: center;">
|
||||
<asp:LinkButton ID="BtnGuardar" runat="server" AlternateText="Actualizar" CausesValidation="True" CssClass="btn btn-primary" Text="Actualizar Seleccionadas" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,7 +278,7 @@
|
||||
</div>
|
||||
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,NumeroParte,Porcentaje,CodigoPS,ProductoExhibicion"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros"
|
||||
OnRowDataBound="GVPrecios_RowDataBound" >
|
||||
OnRowDataBound="GVPrecios_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
|
||||
<ItemTemplate>
|
||||
@@ -289,7 +286,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Codigo" ItemStyle-Width="5%" HeaderText="Código" />
|
||||
<asp:TemplateField ItemStyle-Width="5%" Visible="false" >
|
||||
<asp:TemplateField ItemStyle-Width="5%" Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal ID="LtlNumeroParte" runat="server" Text='<%# If(UsuarioActual.Empresa.Funcionalidad(531) = "1", "Código CPK", "Número parte") %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
@@ -299,11 +296,11 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PS" HeaderText="Producto/Servicio" />
|
||||
<asp:BoundField DataField="Clasificacion" ItemStyle-Width="15%" HeaderText="Clasificación" />
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right" >
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.00####}")%>' style="text-align:right;" CssClass="CssCamviaPrecio" MaxLength="39" Width="90px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.00####}")%>' Style="text-align: right;" CssClass="CssCamviaPrecio" MaxLength="39" Width="90px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
|
||||
<br />
|
||||
<asp:Label ID="LtlPrecio" runat="server" Text='<%# Eval("PrecioLista", "$ {0:#,##0.00####}")%>' Font-Italic="true" Font-Size="8pt" ></asp:Label>
|
||||
<asp:Label ID="LtlPrecio" runat="server" Text='<%# Eval("PrecioLista", "$ {0:#,##0.00####}")%>' Font-Italic="true" Font-Size="8pt"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" Visible="false">
|
||||
@@ -365,7 +362,9 @@
|
||||
Producto/Servicio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="width:350px"><asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>' ></asp:Label></div>
|
||||
<div style="width: 350px">
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -689,7 +688,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="UltimoCosto" ItemStyle-Width="75px" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="75px" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="75px" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -899,14 +898,27 @@
|
||||
|
||||
for (var i = 0; i < checks.length; i++) {
|
||||
if (checks[i].type == "checkbox") {
|
||||
debugger;
|
||||
|
||||
if (checks[i].checked) {
|
||||
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
|
||||
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '');
|
||||
if ($get('C_GVPrecios_TxtPrecio_' + idd) != null) {
|
||||
let tipo = $get('HdnTipo').value;
|
||||
|
||||
//ASIGNAR PRECIO NUEVO
|
||||
if (tipo == '1') {
|
||||
$get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2);
|
||||
}
|
||||
|
||||
//AUMENTAR PRECIO POR PORCENTAJE
|
||||
if (tipo == '2') {
|
||||
let precioActual = ToDouble($get('C_GVPrecios_LtlPrecio_' + idd).innerText.replace(" ", "").replace("$", "").replace(",",""));
|
||||
|
||||
let precioNuevo = ToDouble(((valor / 100) * precioActual) + precioActual)
|
||||
$get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(precioNuevo, 2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,21 +333,25 @@ Partial Class Ventas_ActualizarPrecios
|
||||
End Sub
|
||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If RblTipo.SelectedValue = "Imp" Then
|
||||
ImporteFijo.Visible = True
|
||||
LtlImporte.Text = "Precio nuevo:"
|
||||
LtlSimbolo.Text = "$"
|
||||
HdnTipo.Value = "1"
|
||||
Else
|
||||
ImporteFijo.Visible = False
|
||||
LtlImporte.Text = "Porcentaje a incrementar:"
|
||||
LtlSimbolo.Text = "%"
|
||||
HdnTipo.Value = "2"
|
||||
End If
|
||||
UPPrecioLista.Update()
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
If RblTipo.SelectedIndex = 1 And TxtPorcentaje.Text.ToDecimal = 0 Then
|
||||
Alert("Se debe de especificar un porcentaje.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'If RblTipo.SelectedIndex = 1 And TxtPorcentaje.Text.ToDecimal = 0 Then
|
||||
' Alert("Se debe de especificar un porcentaje.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
'Dim Importe As Decimal = If(TxtImporte.Text = "", -1, TxtImporte.Text.ToDecimal)
|
||||
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||
Dim Porcentaje As Decimal = -1 ' If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
Dim sbProductos As New StringBuilder
|
||||
|
||||
@@ -356,7 +360,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Try
|
||||
For Each row As GridViewRow In GVPrecios.Rows
|
||||
If row.FCCheckBox("chkPS").Checked Then
|
||||
TieneError = Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||
TieneError = Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), True, PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||
If CBool(row.DataKey("ProductoExhibicion")) Then
|
||||
sbProductos.AppendFormat("{0},", row.DataKey("CvePS").ToEntero)
|
||||
End If
|
||||
@@ -396,7 +400,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
RegistraScript("$('#divAgregar').modal('hide')")
|
||||
TxtImporte.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtPorcentaje.Text = ""
|
||||
'TxtPorcentaje.Text = ""
|
||||
End Sub
|
||||
|
||||
#Region "MODAL PRECIOS MINIMOS"
|
||||
@@ -679,7 +683,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Dim StrMsgError As New StringBuilder
|
||||
If FranquiciasStr <> "" Then
|
||||
Dim Franquicias As String() = FranquiciasStr.Split(","c)
|
||||
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||
Dim Porcentaje As Decimal = -1 ' If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||
|
||||
For Each Franquicia As String In Franquicias
|
||||
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
||||
|
||||
Reference in New Issue
Block a user