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

@@ -17,7 +17,7 @@
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="portlet box blue-hoki"> <div class="portlet box blue-hoki">
@@ -58,7 +58,7 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<asp:TextBox ID="hdnTotal" runat="server" Style="text-align: right; display: none;" AutoComplete="off" Width="145px"></asp:TextBox>
<hr /> <hr />
<div class="row" id="divTipoDevolucion" runat="server" visible="false" style="margin-top: -20px;"> <div class="row" id="divTipoDevolucion" runat="server" visible="false" style="margin-top: -20px;">
<div class="col-md-12"> <div class="col-md-12">
@@ -333,9 +333,10 @@
} else { } else {
txt.value = ""; txt.value = "";
} }
let valor = FormatoNumero(SumaValores(), 2);
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2); $('#hdnTotal').val(valor);
$get('TxtImporte').value = valor;
} }
function FnCambia(chk, txt, saldo, op, text) { function FnCambia(chk, txt, saldo, op, text) {
@@ -353,7 +354,9 @@
} }
} }
var Suma = SumaValores(); 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) { if ($get('TxtTotal') != null) {
$get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2); $get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2);

View File

@@ -345,12 +345,26 @@ public partial class Bancos_Devoluciones : ClsPaginas
return; return;
} }
if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2 && TxtValor.Text == "") if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2)
{ {
Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); if (TxtValor.Text == "")
return; {
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(); ClsBancos ObjIE = new ClsBancos();
ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL()); ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL());
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL()); ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());