This commit is contained in:
2025-05-16 08:04:07 -07:00
14 changed files with 949 additions and 725 deletions

View File

@@ -42,58 +42,60 @@
outline: 0;
}
table.adssigscroll {
min-width: 100%;
background-color:#fff;
}
table.adssigscroll tbody,table.adssigscroll thead{
background-color:#fff;
}
table.adssigscroll tr{
background-color:inherit;
}
.divContainerads {
width: 100%;
max-height: calc(100vh - 260px);
overflow-y: auto;
}
table.adssigscroll tr:nth-child(1) {
position: sticky;
top: 0; /* Se mantiene pegado en la parte superior */
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) {
z-index: 5;
}
table.adssigscroll tr:nth-child(2) {
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) {
position: sticky;
left: 0;
z-index: 3;
}
table.adssigscroll tr td:nth-child(1), table.adssigscroll tr td:nth-child(2) {
background-color: inherit;
}
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) {
left: 21px;
table.adssigscroll {
min-width: 100%;
background-color: #fff;
}
table.adssigscroll tbody, table.adssigscroll thead {
background-color: #fff;
}
table.adssigscroll tr {
background-color: inherit;
}
.divContainerads {
width: 100%;
max-height: calc(100vh - 260px);
overflow-y: auto;
}
table.adssigscroll tr:nth-child(1) {
position: sticky;
top: 0; /* Se mantiene pegado en la parte superior */
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) {
z-index: 5;
}
table.adssigscroll tr:nth-child(2) {
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) {
position: sticky;
left: 0;
z-index: 3;
}
table.adssigscroll tr td:nth-child(1), table.adssigscroll tr td:nth-child(2) {
background-color: inherit;
}
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) {
left: 21px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -105,18 +107,18 @@
<li>
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="True" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Importar Listado</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UpExportarExcel" runat="server">
<ContentTemplate>
<li>
<asp:UpdatePanel ID="UpExportarExcel" runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExportarExcel" Text="" runat="server" OnClick="LnkExportarExcel_Click"> <i class='fa fa-file-excel-o'></i> Exportar Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportarExcel" />
</Triggers>
</asp:UpdatePanel>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportarExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
@@ -182,19 +184,19 @@
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlProveedor" Width="100%" data-metodo="getproveedores" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
</div>
</div>
</div>
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
<label id="Label1" class="col-md-1 v-center truncate" style="width: 90px;">Código Inicio:</label>
<label id="Label1" class="col-md-1 v-center truncate" style="width: 90px;">Código Inicio:</label>
<div class="col-md-2">
<asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px" Width="85px"></asp:TextBox>
</div>
<div class="col-md-1" style="max-width: 80px;">Código Fin:</div>
<div class="col-md-2">
<asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px" Width="85px"></asp:TextBox>
</div>
</div>
</div>
</div>
</div>
@@ -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>
@@ -253,19 +258,11 @@
<a class="btn btn-default" onclick="CambiaPrecio();">Aplicar Precio Min.</a>
</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="row">
<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>
</div>
</div>
</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,13 +296,13 @@
</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>
<asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
@@ -316,14 +313,14 @@
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UltimoCosto" ItemStyle-Width="5%" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="5%" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="UltimoCosto" ItemStyle-Width="5%" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="5%" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="UnidadMedida" NullDisplayText="N/A" ItemStyle-Width="2.5%" HeaderText="U.M." />
<asp:BoundField DataField="Moneda" NullDisplayText="N/A" ItemStyle-Width="2.5%" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="VentaMinima" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="E. Mínimo" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="Moneda" NullDisplayText="N/A" ItemStyle-Width="2.5%" HeaderText="Moneda" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="VentaMinima" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="E. Mínimo" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="ImporteAnterior" NullDisplayText="N/A" ItemStyle-Width="5%" HeaderText="Imp. Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="PrecioMinimoAnterior" NullDisplayText="N/A" ItemStyle-Width="5%" HeaderText="Precio Mínimo Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="PrecioMinimoAnterior" NullDisplayText="N/A" ItemStyle-Width="5%" HeaderText="Precio Mínimo Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" Visible="false" />
<asp:BoundField DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" ItemStyle-Width="10%" HeaderText="Fecha Modificación" />
<asp:BoundField DataField="UsuarioModifico" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Modificó" Visible="false" />
<asp:BoundField DataField="Porcentaje" NullDisplayText="N/A" ItemStyle-Width="10%" DataFormatString="%{0}" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="right" Visible="false" />
@@ -351,347 +348,349 @@
<div class="row">
<div class="col-md-12">
<div class="divContainerads">
<asp:GridView ID="GvMultiple" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
CssClass="table table-striped table-advance table-hover adssigscroll" data-cols="2" data-heightmenos="300" data-sort="true" EmptyDataText="No se encontraron registros"
OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Producto/Servicio
</HeaderTemplate>
<ItemTemplate>
<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">
<HeaderTemplate>
<asp:Label ID="LtlLista_1" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_1" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_2" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_2" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_3" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_3" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_4" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_4" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_5" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_5" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_6" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_6" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_7" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_7" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_8" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_8" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_9" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_9" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_10" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_10" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_11" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_11" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_12" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_12" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_13" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_13" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_14" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_14" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_15" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_15" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_16" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_16" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_17" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_17" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_18" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_18" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_19" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_19" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_20" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_20" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_21" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_21" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_22" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_22" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_23" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_23" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:GridView ID="GvMultiple" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
CssClass="table table-striped table-advance table-hover adssigscroll" data-cols="2" data-heightmenos="300" data-sort="true" EmptyDataText="No se encontraron registros"
OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Producto/Servicio
</HeaderTemplate>
<ItemTemplate>
<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">
<HeaderTemplate>
<asp:Label ID="LtlLista_24" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_24" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_25" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_25" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_26" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_26" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_27" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_27" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="LtlLista_1" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_1" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_28" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_28" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_29" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_29" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_30" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_30" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_31" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_31" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_32" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_32" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_33" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_33" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="LtlLista_2" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_2" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_34" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_34" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_35" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_35" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_36" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_36" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_37" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_37" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="LtlLista_3" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_3" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_38" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_38" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_39" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_39" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_40" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</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"/>
</Columns>
</asp:GridView>
<HeaderTemplate>
<asp:Label ID="LtlLista_4" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_4" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_5" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_5" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_6" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_6" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_7" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_7" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_8" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_8" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_9" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_9" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_10" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_10" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_11" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_11" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_12" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_12" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_13" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_13" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_14" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_14" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_15" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_15" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_16" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_16" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_17" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_17" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_18" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_18" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_19" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_19" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_20" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_20" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_21" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_21" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_22" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_22" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_23" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_23" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_24" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_24" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_25" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_25" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_26" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_26" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_27" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_27" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_28" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_28" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_29" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_29" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_30" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_30" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_31" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_31" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_32" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_32" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_33" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_33" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_34" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_34" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_35" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_35" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_36" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_36" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_37" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_37" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_38" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_38" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_39" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_39" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate>
<asp:Label ID="LtlLista_40" runat="server"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</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" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
@@ -899,12 +898,25 @@
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) {
$get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2);
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);
}
}
}

View File

@@ -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,8 +683,8 @@ 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
Dim CvePS As Integer = GlobalDTPSSimplificado(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero

View File

@@ -3366,7 +3366,9 @@ Partial Class ProductosyServicios
CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero(),
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked
) > 0 Then
'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")))
Return True

View File

@@ -112,7 +112,11 @@
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%" DataKeyNames="CveCliente,CveMoneda,CveSubProyecto,FechaI,FechaF,FechaICorte,FechaFCorte,TipoCambio,TCEspecifico,ConSaldo">
<Columns>
<asp:BoundField DataField="NombreComercial" ItemStyle-Width="30%" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-Width="30%" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink runat="server" ID="HLFolio" Target="_blank" Text='<%# Eval("NombreComercial")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="TipoTexto" ItemStyle-Width="7%" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="AplicadoAnticipos" ItemStyle-Width="21%" HeaderText="Apl. Anticipo" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
<asp:BoundField DataField="AplicadoNC" ItemStyle-Width="21%" HeaderText="Apl. NC" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />

View File

@@ -210,6 +210,30 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas
}
}
if (e.Row.DBCampo("CveCliente").ToEntero() > 0)
{
if (e.Row.DBCampo("Tipo").ToEntero() == 0)
{
e.Row.CssClass = "SubTotales";
}
switch (e.Row.DBCampo("Tipo"))
{
case "0":
e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Ventas/Clientes.aspx?CveCliente={0}", e.Row.DBCampo("CveCliente").ToEntero());
break;
case "1":
e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("Id").ToEntero());
break;
case "2":
e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("Id").ToEntero());
break;
case "3":
e.Row.FCHyperLink("HLFolio").NavigateUrl = string.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("Id").ToEntero());
break;
}
}
}
}

View File

@@ -1127,8 +1127,8 @@
</th>
<th id="thPredial1" runat="server" visible="false">Predial
</th>
<th id="thCantConversion1" runat="server" visible="false">Ed. Med
</th>
<th id="thCantConversion1" runat="server" visible="false">Ed. Med
</th>
<th id="thEncIVA1" runat="server" visible="true">IVA
</th>
<th id="thEncIEPS1" runat="server" visible="false">IEPS
@@ -1262,8 +1262,7 @@
<th id="thPredial2" runat="server" visible="false">
<asp:TextBox ID="TxtCuentaPredial" runat="server" Width="75px" CssClass="form-control input-sm" type="number"></asp:TextBox>
</th>
<th id="thCantConversion2" runat="server" visible="false">
</th>
<th id="thCantConversion2" runat="server" visible="false"></th>
<th id="thEncIVA2" runat="server" visible="true"></th>
<th id="thEncIEPS2" runat="server" visible="false"></th>
<th id="thPoliza2" runat="server" visible="false">
@@ -4726,6 +4725,54 @@
</asp:Panel>
</div>
<div id="ModalDescuentoGlobal" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Descuento global</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpDescuentoGlobal" UpdateMode="Conditional">
<ContentTemplate>
<table>
<tr>
<td>Por Porcentaje</td>
<td>
<asp:TextBox ID="TxtPorDescGlobal" runat="server" CausesValidation="true" ClientIDMode="Static" MaxLength="12" Text="0" ValidationGroup="GrpDescuentoGlobal" Width="72px"></asp:TextBox>
<asp:CompareValidator ID="CVPorDescGlobal" runat="server" ControlToValidate="TxtPorDescGlobal" Display="None" ErrorMessage="El campo <b>''Descuento por Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpDescuentoGlobal"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCEPorDescGlobal" runat="server" HighlightCssClass="vco" TargetControlID="CVPorDescGlobal" Width="300px"></ajax:ValidatorCalloutExtender>
&nbsp;(%)
</td>
</tr>
<tr>
<td>Por Monto</td>
<td>
<asp:TextBox ID="TxtMontoDescGlobal" runat="server" CausesValidation="true" ClientIDMode="Static" MaxLength="12" Text="0" ValidationGroup="GrpDescuentoGlobal" Width="72px"></asp:TextBox>
<asp:CompareValidator ID="CVMontoDescGlobal" runat="server" ControlToValidate="TxtMontoDescGlobal" Display="None" ErrorMessage="El campo <b>''Descuento por Monto''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpDescuentoGlobal"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender27" runat="server" HighlightCssClass="vco" TargetControlID="CVMontoDescGlobal" Width="300px"></ajax:ValidatorCalloutExtender>
&nbsp;($)
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnAplicarDescGlobal" runat="server" ClientIDMode="Static" Text="Aplicar" ValidationGroup="GrpDescuentoGlobal" CssClass="btn btn-primary" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
@@ -7380,7 +7427,7 @@
Tipo Venta:
</div>
<div class="col-md-8">
<asp:Label runat="server" ID="LblTipoVentaAsignado" ></asp:Label>
<asp:Label runat="server" ID="LblTipoVentaAsignado"></asp:Label>
</div>
</div>
<div class="row form-group">

View File

@@ -3667,11 +3667,22 @@ Partial Class Ventas
InicializaDevolucionAlmacen()
HabilitarDescuentoGlobal()
End If
End Sub
Private Sub HabilitarDescuentoGlobal()
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.CveEmpresa.Contiene(181, 182, 183) AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe) Then
ImgDescTotal.Visible = True
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuentoGlobal').modal();")
End If
End Sub
#Region "Bloqueo Pantalla"
Private Sub ValidaUsuarioAcceso()
'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA
If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then
@@ -17539,9 +17550,9 @@ Partial Class Ventas
saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio).TruncateDecimal
Else
saldo = e.Row.DataKey("Saldo").ToDecimal
End If
Else
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
End If
Else
saldo = e.Row.DataKey("Saldo").ToString().ToDecimal
If CveVenta <= 0 Then
If DdlTipoAmortizacionAnticipo.SelectedValue.Contiene("2") Then 'cuando es por NC, debe de tomar el total de su saldo respectivo
@@ -18592,6 +18603,25 @@ Partial Class Ventas
RegistraScript("$('#ModalDescuento').modal('hide')", "hidemodal")
UpPS.Update()
End Sub
Protected Sub BtnAplicarDescGlobal_Click(sender As Object, e As System.EventArgs) Handles BtnAplicarDescGlobal.Click
Dim DescuentoManual As Decimal = TxtMontoDescGlobal.Text.ToDecimal()
Dim PorcentajeDescuento As Decimal = TxtPorDescGlobal.Text.ToDecimal()
If DescuentoManual <> 0 AndAlso PorcentajeDescuento <> 0 Then
Alert("Debe elegir un solo tipo de descuento", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If PorcentajeDescuento > 100 Then
Alert("El porcentaje no puede ser mayor a 100", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
RecalculaPrecios(False, False, AplicarDescuentoGlobal:=True)
RegistraScript("$('#ModalDescuentoGlobal').modal('hide')", "hidemodal")
UpPS.Update()
End Sub
Private Sub BtnAplicarOtrosConceptos_Click(sender As Object, e As EventArgs) Handles BtnAplicarOtrosConceptos.Click
TotalOtrosConceptos = 0
@@ -40796,9 +40826,16 @@ Partial Class Ventas
RegistraScript("MuestraAnticipos();", "AE")
End Sub
Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False)
Private Sub RecalculaPrecios(ByRef RecalculoPromociones As Boolean, Optional AplicarPromociones As Boolean = False, Optional AplicarDescuentoGlobal As Boolean = False)
Dim PuedeRecalcular As Boolean = False
Dim DescuentoManual As Decimal = 0, DescuentoPorcentaje As Decimal = 0
If AplicarDescuentoGlobal Then
DescuentoManual = TxtMontoDescGlobal.Text.ToDecimal()
DescuentoPorcentaje = TxtPorDescGlobal.Text.ToDecimal()
End If
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse (ModalidadEdicion AndAlso Not DdlTipoComprobante.SelectedValue = "Cot") Then
PuedeRecalcular = True
End If
@@ -40812,19 +40849,25 @@ Partial Class Ventas
PuedeRecalcular = True
End If
If AplicarDescuentoGlobal Then
PuedeRecalcular = True
End If
If TmpDT IsNot Nothing AndAlso PuedeRecalcular Then
For Each Row As DataRow In TmpDT.Rows
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
Dim CvePS As Integer = Row("CvePS").ToString().ToEntero
Dim CodigoPS As String = Row("CodigoPS").ToString()
Dim PUOriginal As Decimal = Row("PU").ToString().ToDecimal()
Dim CvePrecioListaSugerido As Integer = -1
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = Nothing
If AplicarPromociones Then
If AplicarPromociones OrElse AplicarDescuentoGlobal Then
ObjPrecioSugerido = New Modelos.MPrecioSugerido()
ObjPrecioSugerido.PrecioSugerido = Row("PU").ToString().ToDecimal()
ObjPrecioSugerido.PrecioSugerido = PUOriginal
ObjPrecioSugerido.CvePrecioLista = Row("CvePrecioLista").ToString().ToEntero()
Else
ObjPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
@@ -40834,8 +40877,30 @@ Partial Class Ventas
Dim PU As Decimal = ObjPrecioSugerido.PrecioSugerido.RoundSQL(6)
Dim ObjDescuento As Modelos.VentaDescuentos = CalcularDescuentos(CvePS, Cantidad, PU)
If ObjDescuento.EsPUModificado Then
PU = ObjDescuento.PU
If AplicarDescuentoGlobal Then
If DescuentoManual > 0 Then
ObjDescuento.EsPUModificado = False
ObjDescuento.ImporteDescuento = DescuentoManual
ObjDescuento.ImporteProntoPago = 0
If ObjDescuento.ImporteDescuento > (Cantidad * PU) Then
Alert($"El producto y/o servicio '{CodigoPS}' no puede tener un descuento mayor al total", TipoMensaje.MsgAdvertencia)
Continue For
End If
End If
If DescuentoPorcentaje > 0 Then
ObjDescuento.EsPUModificado = False
ObjDescuento.ImporteDescuento = (Cantidad * PU) * (DescuentoPorcentaje / 100D)
ObjDescuento.ImporteProntoPago = 0
End If
Else
If ObjDescuento.EsPUModificado Then
PU = ObjDescuento.PU
End If
End If
'SI NO TIENE PROMOCION, NO MODIFICAR NADA