Cambios en descuento
This commit is contained in:
@@ -251,21 +251,22 @@
|
|||||||
|
|
||||||
var ValorTotalSeleccionado = 0
|
var ValorTotalSeleccionado = 0
|
||||||
var comision = 0;
|
var comision = 0;
|
||||||
|
var descuento = 0;
|
||||||
|
var saldo = 0;
|
||||||
|
|
||||||
function FnSuma(chk, cantidad) {
|
function FnSuma(chk, cantidad) {
|
||||||
var saldo = ToDouble($('#C_lblValorTotal').text());
|
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||||
if (chk.checked == false) {
|
if (chk.checked == false) {
|
||||||
cantidad = cantidad * -1;
|
cantidad = cantidad * -1;
|
||||||
}
|
}
|
||||||
saldo = saldo + cantidad;
|
saldoInicial = saldoInicial + cantidad;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldoInicial, 2));
|
||||||
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldoInicial, 2));
|
||||||
ValorTotalSeleccionado = saldo
|
ValorTotalSeleccionado = saldoInicial
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function txtSuma(txt) {
|
function txtSuma(txt) {
|
||||||
var saldo = ToDouble($('#C_lblValorTotal').text());
|
|
||||||
var comision2 = ToDouble($('#C_TxtComision').val());
|
var comision2 = ToDouble($('#C_TxtComision').val());
|
||||||
var comisionNegativa = 0;
|
var comisionNegativa = 0;
|
||||||
if (comision2 < 0) {
|
if (comision2 < 0) {
|
||||||
@@ -275,9 +276,28 @@
|
|||||||
$('#C_TxtComision').val(comision)
|
$('#C_TxtComision').val(comision)
|
||||||
alert("No es posible poner una comision superior a lo seleccionado")
|
alert("No es posible poner una comision superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + comision2;
|
saldo = ValorTotalSeleccionado + comision2 + descuento;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
comision = ToDouble($('#C_TxtComision').val())
|
comision = ToDouble($('#C_TxtComision').val())
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function txtSumaDescuento(txt) {
|
||||||
|
var comision2 = ToDouble($('#C_TxtDescuento').val());
|
||||||
|
var comisionNegativa = 0;
|
||||||
|
if (comision2 < 0) {
|
||||||
|
comisionNegativa = comision2 * -1
|
||||||
|
}
|
||||||
|
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||||
|
$('#C_TxtDescuento').val(descuento)
|
||||||
|
alert("No es posible poner una comision superior a lo seleccionado")
|
||||||
|
} else {
|
||||||
|
saldo = ValorTotalSeleccionado + comision2 + comision;
|
||||||
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
|
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||||
|
debugger;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -289,16 +309,12 @@
|
|||||||
$('#divSubProyecto').css("display", "block");
|
$('#divSubProyecto').css("display", "block");
|
||||||
$('#LblClasificacion').css("display", "block");
|
$('#LblClasificacion').css("display", "block");
|
||||||
$('#divClasificacion').css("display", "block");
|
$('#divClasificacion').css("display", "block");
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#DivComision').css("display", "none");
|
$('#DivComision').css("display", "none");
|
||||||
$('#divSubProyecto').css("display", "none");
|
$('#divSubProyecto').css("display", "none");
|
||||||
$('#divSubProyecto').css("display", "none");
|
$('#divSubProyecto').css("display", "none");
|
||||||
$('#LblClasificacion').css("display", "none");
|
$('#LblClasificacion').css("display", "none");
|
||||||
$('#divClasificacion').css("display", "none");
|
$('#divClasificacion').css("display", "none");
|
||||||
debugger;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,9 +325,6 @@
|
|||||||
$('#divSubProyectoDescuento').css("display", "block");
|
$('#divSubProyectoDescuento').css("display", "block");
|
||||||
$('#LblClasificacionDescuento').css("display", "block");
|
$('#LblClasificacionDescuento').css("display", "block");
|
||||||
$('#divClasificacionDescuento').css("display", "block");
|
$('#divClasificacionDescuento').css("display", "block");
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$('#DivDescuento').css("display", "none");
|
$('#DivDescuento').css("display", "none");
|
||||||
@@ -319,7 +332,6 @@
|
|||||||
$('#divSubProyectoDescuento').css("display", "none");
|
$('#divSubProyectoDescuento').css("display", "none");
|
||||||
$('#LblClasificacionDescuento').css("display", "none");
|
$('#LblClasificacionDescuento').css("display", "none");
|
||||||
$('#divClasificacionDescuento').css("display", "none");
|
$('#divClasificacionDescuento').css("display", "none");
|
||||||
debugger;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
|
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
|
||||||
txtFechaF.Text = Now.ToShortDateString
|
txtFechaF.Text = Now.ToShortDateString
|
||||||
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
||||||
TxtDescuento.Attributes.Add("onKeyUp", "txtSuma(event);")
|
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
||||||
|
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
||||||
|
|||||||
Reference in New Issue
Block a user