This commit is contained in:
rakcsle
2021-07-29 11:43:24 -07:00
6 changed files with 89 additions and 45 deletions

View File

@@ -17,7 +17,7 @@
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="row">
<div class="col-md-6">
<div class="portlet box blue-hoki">
@@ -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,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);

View File

@@ -344,12 +344,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());