validacion que sean iguales descuento via nomina y cantidad seleccionada

This commit is contained in:
Hector
2021-07-29 10:13:28 -07:00
parent e06e845d54
commit 21c1138afb
2 changed files with 26 additions and 9 deletions

View File

@@ -58,7 +58,7 @@
</asp:DropDownList>
</div>
</div>
<asp:TextBox ID="hdnTotal" runat="server" Style="text-align: right; display: none;" AutoComplete="off" Width="145px"></asp:TextBox>
<hr />
<div class="row" id="divTipoDevolucion" runat="server" visible="false" style="margin-top: -20px;">
<div class="col-md-12">
@@ -333,8 +333,9 @@
} else {
txt.value = "";
}
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
let valor = FormatoNumero(SumaValores(), 2);
$('#hdnTotal').val(valor);
$get('TxtImporte').value = valor;
}
@@ -353,7 +354,9 @@
}
}
var Suma = SumaValores();
$get('TxtImporte').value = FormatoNumero(Suma, 2);
let valor = FormatoNumero(SumaValores(), 2);
$('#C_hdnTotal').val(valor);
$get('TxtImporte').value = valor;
if ($get('TxtTotal') != null) {
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2);

View File

@@ -345,11 +345,25 @@ public partial class Bancos_Devoluciones : ClsPaginas
return;
}
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2 && TxtValor.Text == "")
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
{
if (TxtValor.Text == "")
{
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
return;
}
else
{
int valor = (TxtValor.Text.ToEntero() * TxtVecesAplicar.Text.ToEntero()).ToEntero();
int total = hdnTotal.Text.ToEntero();
if (valor <> total)
{
Alert("La cantidad total debe ser igual a lo seleccionado");
}
}
}
ClsBancos ObjIE = new ClsBancos();
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());