@@ -333,9 +333,10 @@
} else {
txt.value = "";
}
-
- $get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
-
+ let valor = FormatoNumero(SumaValores(), 2);
+ $('#hdnTotal').val(valor);
+ $get('TxtImporte').value = valor;
+
}
function FnCambia(chk, txt, saldo, op, text) {
@@ -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);
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index 017243297..7acb92737 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -345,12 +345,26 @@ 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)
{
- Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia);
- return;
+ 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());
ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL());