Cambio en deposito caja descuento descuenta del total
This commit is contained in:
@@ -415,7 +415,7 @@
|
|||||||
var txtdescuento = ToDouble($('#C_TxtDescuento').val());
|
var txtdescuento = ToDouble($('#C_TxtDescuento').val());
|
||||||
if (txtdescuento != 0) {
|
if (txtdescuento != 0) {
|
||||||
var DescuentoNegativa = 0;
|
var DescuentoNegativa = 0;
|
||||||
if (txtdescuento < 0) {
|
if (txtdescuento > 0) {
|
||||||
DescuentoNegativa = txtdescuento * -1;
|
DescuentoNegativa = txtdescuento * -1;
|
||||||
}
|
}
|
||||||
if (DescuentoNegativa > saldo) {
|
if (DescuentoNegativa > saldo) {
|
||||||
@@ -507,14 +507,11 @@
|
|||||||
function txtSumaDescuento(txt) {
|
function txtSumaDescuento(txt) {
|
||||||
var comision2 = ToDouble($('#C_TxtDescuento').val());
|
var comision2 = ToDouble($('#C_TxtDescuento').val());
|
||||||
var comisionNegativa = 0;
|
var comisionNegativa = 0;
|
||||||
if (comision2 < 0) {
|
if (comision2 > ValorTotalSeleccionado) {
|
||||||
comisionNegativa = comision2 * -1;
|
|
||||||
}
|
|
||||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
|
||||||
$('#C_TxtDescuento').val(descuento)
|
$('#C_TxtDescuento').val(descuento)
|
||||||
alert("No es posible poner un descuento superior a lo seleccionado")
|
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + comision2 + comision - IVA - ComisionIntermediario;
|
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
descuento = ToDouble($('#C_TxtDescuento').val())
|
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||||
}
|
}
|
||||||
@@ -528,7 +525,7 @@
|
|||||||
$('#C_TxtIVA').val(IVA)
|
$('#C_TxtIVA').val(IVA)
|
||||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - ComisionIntermediario;
|
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
IVA = ToDouble($('#C_TxtIVA').val())
|
IVA = ToDouble($('#C_TxtIVA').val())
|
||||||
}
|
}
|
||||||
@@ -541,7 +538,7 @@
|
|||||||
$('#C_TxtComisionIntermediario').val(ComisionIntermediario)
|
$('#C_TxtComisionIntermediario').val(ComisionIntermediario)
|
||||||
alert("No es posible poner un importe superior a lo seleccionado")
|
alert("No es posible poner un importe superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - IVA;
|
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val())
|
ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
TotalImportePrePoliza = TotalImporte
|
TotalImportePrePoliza = TotalImporte
|
||||||
If Comision <> 0 Then
|
If Comision <> 0 Then
|
||||||
TotalImporte = TotalImporte + Comision + Descuento
|
TotalImporte = TotalImporte + Comision - Descuento
|
||||||
'Comision = -(Comision) ' se inverte el valor, va cargada
|
'Comision = -(Comision) ' se inverte el valor, va cargada
|
||||||
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
||||||
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user