Cambios de BDH
This commit is contained in:
@@ -2729,7 +2729,16 @@
|
||||
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescuento" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="100px" CssClass="form-control "></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:CustomValidator ID="CVDescuento" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVDescuento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtDescuento.ClientID.ToString()%>">Descuento:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" >
|
||||
<asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
|
||||
@@ -3115,15 +3124,27 @@
|
||||
|
||||
var Descuento = parseFloat($get("TxtPorDescP").value);
|
||||
$get("LblPrecioFinal").innerText = formato_numero(Monto - ((Monto * Descuento) / 100), 2, '.', ',');
|
||||
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
|
||||
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
|
||||
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
|
||||
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
|
||||
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
|
||||
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
|
||||
$get("TxtDescP").value = formato_numero(0, 2, '.', ',');
|
||||
$get("HdnDescuento").value = Total;
|
||||
if (TipoDescuento == 2) {
|
||||
$get("LblDescuentos").innerText = formato_numero(Total, 2, '.', ',');
|
||||
}
|
||||
}
|
||||
else if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
|
||||
else {
|
||||
$get("LblPrecioFinal").innerText = "0.00";
|
||||
$get("LblDescuento").innerText = "0.00";
|
||||
$get("HdnDescuento").value = "0.00";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CalculaDescuentoMonto() {
|
||||
|
||||
if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
|
||||
var Monto = 0;
|
||||
var TipoDescuento = $get("HdnTipoDescuento").value;
|
||||
|
||||
@@ -3141,11 +3162,12 @@
|
||||
}
|
||||
|
||||
var Descuento = parseFloat($get("TxtDescP").value);
|
||||
$get("TxtPorDescP").value = Descuento * 100 / Monto * 10
|
||||
$get("TxtPorDescP").value = formato_numero((Descuento * 100 / Monto), 2, '.', ',');
|
||||
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
|
||||
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
|
||||
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
|
||||
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
|
||||
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
|
||||
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
|
||||
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
|
||||
$get("HdnDescuento").value = Total;
|
||||
if (TipoDescuento == 2) {
|
||||
Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
|
||||
@@ -3156,7 +3178,6 @@
|
||||
$get("LblDescuento").innerText = "0.00";
|
||||
$get("HdnDescuento").value = "0.00";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function BorraDescuentos() {
|
||||
|
||||
Reference in New Issue
Block a user