--Cambios en depositos caja

This commit is contained in:
2025-01-22 20:59:37 -07:00
parent 9d67927778
commit 2beee510c8
2 changed files with 91 additions and 97 deletions

View File

@@ -326,7 +326,8 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class=" form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
<label for="<%= DdlClasificacionIntermediario.ClientID.ToString()%>"><label id="LblClasificacion3">Gasto:</label></label>
<label for="<%= DdlClasificacionIntermediario.ClientID.ToString()%>">
<label id="LblClasificacion3">Gasto:</label></label>
</div>
@@ -335,14 +336,14 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me">
</asp:DropDownList>
<label for="<%= DdlSubProyectoIntermediario.ClientID.ToString()%>"><label id="LblSubproyectoIntermediario">SubProyecto:</label></label>
<label for="<%= DdlSubProyectoIntermediario.ClientID.ToString()%>">
<label id="LblSubproyectoIntermediario">SubProyecto:</label></label>
</div>
</div>
</div>
</div>
<div class="row rowcheck truncate" id="DivRowCuenta" style="padding: 0px!important; margin: 0px!important" runat="server" visible="false">
<div class="col-md-1" runat="server" id="Div3" style="width: 155px">
<asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" />
</div>
@@ -358,8 +359,6 @@
<label for="<%= TxtCuentaRetornoObs.ClientID.ToString()%>">Obs:</label>
</div>
</div>
</div>
</ContentTemplate>
@@ -664,21 +663,13 @@
}
function txtSumaCuentaRetorno(txt) {
debugger;
var comision2 = ToDouble($('#C_TxtCuentaRetorno').val());
//if (comision2 > ValorTotalSeleccionado) {
// $('#C_TxtCuentaRetorno').val(descuento)
// alert("No es posible poner un IVA superior a lo seleccionado")
//} else {
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario;
saldo = ValorTotalSeleccionado + comision2 + comision - IVA - ComisionIntermediario;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
descuento = ToDouble($('#C_TxtCuentaRetorno').val())
//}
}
function txtSumaIVA(txt) {
var comision2 = ToDouble($('#C_TxtIVA').val());
if (comision2 > ValorTotalSeleccionado) {
@@ -689,7 +680,6 @@
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
IVA = ToDouble($('#C_TxtIVA').val());
}
}
function txtSumaTntermediario(txt) {
@@ -759,7 +749,7 @@
$('#DivRowCuenta').removeClass("truncate");
} else {
$('#C_TxtCuentaRetorno').val(0);
Recalcular();
$('.DivRowCuenta2').css("display", "none");
$('#DivRowCuenta').addClass("truncate");
@@ -767,17 +757,20 @@
}
function Recalcular() {
debugger;
var Comision = ToDouble($('#C_TxtComision').val());
var Descuento = ToDouble($('#C_TxtDescuento').val());
var IVA = ToDouble($('#C_TxtIVA').val());
var ImporteInter = ToDouble($('#C_TxtComisionIntermediario').val());
var ImporteCuentaRetorno= ToDouble($('#C_TxtCuentaRetorno').val());
let Comision = ToDouble($('#C_TxtComision').val());
let Descuento = 0;
let ImporteInter = 0;
let IVA = 0;
var total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter - ImporteCuentaRetorno
if ('<%= If(UsuarioActual.CveEmpresa = 189, "0", "1") %>' == '1') {
Descuento = ToDouble($('#C_TxtDescuento').val());
ImporteInter = ToDouble($('#C_TxtComisionIntermediario').val());
IVA = ToDouble($('#C_TxtIVA').val());
}
let ImporteCuentaRetorno = ToDouble($('#C_TxtCuentaRetorno').val());
let total = ValorTotalSeleccionado + Comision - Descuento - IVA - ImporteInter + ImporteCuentaRetorno;
$('#C_lblValorTotal').text(FormatoNumero(total, 2));
debugger;
}
function Depositar() {

View File

@@ -34,6 +34,7 @@ Partial Class Bancos_DepositosCaja
End If
CargaCuentas()
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);")
@@ -222,7 +223,7 @@ Partial Class Bancos_DepositosCaja
End If
If CuentaRetorno <> 0 Then
TotalImporte = TotalImporte - CuentaRetorno
TotalImporte = TotalImporte + CuentaRetorno
'Descuento = -(Descuento) ' se inverte el valor, va cargada
'If DdlSubProyectoDescuento.SelectedValue.ToEntero = -1 Or DdlClasificacionDescuento.SelectedValue.ToEntero = -1 Then
' Alert("Debes Seleccionar un Subproyecto y una Clasificación de descuento", TipoMensaje.MsgAdvertencia)
@@ -364,7 +365,7 @@ Partial Class Bancos_DepositosCaja
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
If Comision <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, $"Depósito Bancario - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, $"Depósito Bancario - FALTANTE/SOBRANTE - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
OcurrioError = True
End If
End If
@@ -387,7 +388,7 @@ Partial Class Bancos_DepositosCaja
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco)
Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Retorno Depósito Bancario - {tSubProyectoDeposito}", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, $"Depósito Bancario - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, CuentaRetorno, CuentaRetorno * TipoCambio, 30, $"Depósito Bancario - CAJA - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
OcurrioError = True
End If
End If