-- cambios para BDH, poder dejar un importe para devolución sobre la misma cuenta
This commit is contained in:
@@ -120,7 +120,8 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="width: 100px;">SubProyecto:</label>
|
||||
<label class="col-md-1 truncate" style="width: 100px;">
|
||||
<asp:Label ID="LblSub" runat="server" Text="SubProyecto"></asp:Label>:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
@@ -218,16 +219,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row rowcheck truncate" id="DivDescuentocheck" style="margin-top: -25px;">
|
||||
<div class="col-md-1" runat="server" id="Div1" style="width: 155px">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox" />
|
||||
</div>
|
||||
<div class="col-md-10 rowcheckCampos" id="DivDescuento" style="display: none">
|
||||
|
||||
<div class="col-md-1" style="padding-right: 130px;">
|
||||
<label for="TxtDescuento">Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox>
|
||||
@@ -253,7 +250,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row rowcheck truncate" id="DivIntercheck" style="margin-top: -25px;">
|
||||
<div class="row rowcheck truncate" id="DivIntercheck" style="margin-top: -15px;">
|
||||
|
||||
<div class="col-md-1" runat="server" id="Div2" style="width: 155px">
|
||||
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox" />
|
||||
@@ -287,6 +284,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row rowcheck truncate" id="DivRowCuenta" style="margin-top: -15px;" runat="server" visible="false" >
|
||||
|
||||
<div class="col-md-1" runat="server" id="Div3" style="width: 155px">
|
||||
<asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Cuenta" CssClass="checkbox" />
|
||||
</div>
|
||||
<div class="col-md-10 rowcheckCampos" id="DivRowCuenta2" style="display: none">
|
||||
<div class="col-md-3" id="ddd" style="padding-right: 150px;">
|
||||
<label>Cuenta:</label>
|
||||
<asp:DropDownList ID="DdlCajaChicaRetorno" CssClassDdl="select2me" Width="150px" CssStyle="100%" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" style="width: 205px;">
|
||||
<div class="col-md-6" id="DivCuentaImporte" style="padding-left: 0px; padding-right: 0px;">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtCuentaRetorno" Class=" input-sm " Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -406,8 +421,7 @@
|
||||
var saldo = 0;
|
||||
var IVA = 0;
|
||||
var ComisionIntermediario = 0;
|
||||
|
||||
|
||||
var CuentaRetorno = 0;
|
||||
|
||||
function FnSuma(chk, cantidad) {
|
||||
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||
@@ -528,6 +542,30 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($('#C_ChkCuentaRetorno').attr('checked')) {
|
||||
var txtcuentaretorno = ToDouble($('#C_TxtCuentaRetorno').val());
|
||||
if (txtcuentaretorno != 0) {
|
||||
var DescuentoNegativa = 0;
|
||||
if (txtcuentaretorno > 0) {
|
||||
DescuentoNegativa = txtcuentaretorno * -1;
|
||||
}
|
||||
if (DescuentoNegativa > saldo) {
|
||||
$('#C_TxtCuentaRetorno').val(0);
|
||||
comision = 0;
|
||||
descuento = 0;
|
||||
txtdescuento = 0;
|
||||
alert("No es posible poner un descuento superior a lo seleccionado");
|
||||
saldo = 0;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||
} else {
|
||||
//saldo = ValorTotalSeleccionado + txtdescuento + comision;
|
||||
//$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
//descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
//debugger;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -559,13 +597,28 @@
|
||||
$('#C_TxtDescuento').val(descuento)
|
||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
|
||||
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario - CuentaRetorno;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function txtSumaCuentaRetorno(txt) {
|
||||
debugger;
|
||||
var comision2 = ToDouble($('#C_TxtCuentaRetorno').val());
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtCuentaRetorno').val(descuento)
|
||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
descuento = ToDouble($('#C_TxtCuentaRetorno').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function txtSumaIVA(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||
@@ -573,7 +626,7 @@
|
||||
$('#C_TxtIVA').val(IVA);
|
||||
alert("No es posible poner un IVA superior a lo seleccionado");
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - ComisionIntermediario;
|
||||
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - ComisionIntermediario - CuentaRetorno;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
IVA = ToDouble($('#C_TxtIVA').val());
|
||||
}
|
||||
@@ -586,7 +639,7 @@
|
||||
//$('#C_TxtComisionIntermediario').val(ComisionIntermediario);
|
||||
//alert("No es posible poner un importe superior a lo seleccionado");
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA;
|
||||
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA - CuentaRetorno;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
}
|
||||
@@ -638,9 +691,19 @@
|
||||
|
||||
Recalcular();
|
||||
$('#DivInter').css("display", "none");
|
||||
$('#DivIntercheck').addClass("truncate");
|
||||
|
||||
$('#DivIntercheck').addClass("truncate");
|
||||
}
|
||||
}
|
||||
function CheckRowCuenta(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivRowCuenta2').css("display", "block");
|
||||
$('#DivRowCuenta').removeClass("truncate");
|
||||
|
||||
} else {
|
||||
|
||||
Recalcular();
|
||||
$('#DivRowCuenta2').css("display", "none");
|
||||
$('#DivRowCuenta').addClass("truncate");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,8 +713,9 @@
|
||||
var Descuento = ToDouble($('#C_TxtDescuento').val());
|
||||
var IVA = ToDouble($('#C_TxtIVA').val());
|
||||
var ImporteInter = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
var ImporteCuentaRetorno= ToDouble($('#C_TxtCuentaRetorno').val());
|
||||
|
||||
var total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter
|
||||
var total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter - ImporteCuentaRetorno
|
||||
$('#C_lblValorTotal').text(FormatoNumero(total, 2));
|
||||
debugger;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user