-- registro de caja

This commit is contained in:
2024-07-23 09:16:23 -07:00
parent a39ee91af0
commit f664aaa1f9
2 changed files with 21 additions and 25 deletions

View File

@@ -315,12 +315,16 @@
<asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" />
</div>
<div class="col-md-10 rowcheckCampos" id="DivRowCuenta2" style="display: none">
<div class="col-md-2" style="width: 205px;">
<div class="col-md-6" id="DivCuentaImporte" style="padding-left: 0px; padding-right: 0px;">
<div class="row">
<div class="col-md-2" id="DivCuentaImporte" style="padding-left: 0px; padding-right: 0px;">
<label>Importe:</label>
<asp:TextBox runat="server" ID="TxtCuentaRetorno" Class=" input-sm " Width="75px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass="Numeros"></asp:TextBox>
</div>
</div>
</div>
<div class="col-md-6" style="padding-left: 0px; padding-right: 0px;">
<label>Obs:</label>
<asp:TextBox runat="server" ID="TxtCuentaRetornoObs" Class=" input-sm " Width="250px" ></asp:TextBox>
</div>
</div>
</div>
</div>

View File

@@ -184,10 +184,10 @@ Partial Class Bancos_DepositosCaja
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
Next
If TotalImporte = 0 AndAlso CuentaRetorno <> 0 Then
Alert("Seleccione una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'If TotalImporte = 0 AndAlso CuentaRetorno <> 0 Then
' Alert("Seleccione una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
TotalImportePrePoliza = TotalImporte
If Comision <> 0 Then
@@ -243,14 +243,10 @@ Partial Class Bancos_DepositosCaja
Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim CveSubProyecto As Integer = DdlSubProyectos.SelectedValue.ToEntero
Dim CveClasificacion As Integer = -1
Dim CveSubProyectoComision As Integer
Dim CveClasificacionComision As Integer
Dim CveSubProyectoDescuento As Integer
Dim CveClasificacionDescuento As Integer
Dim imprimirFolios As String = ""
Dim CveSubProyectoIntermediario As Integer
Dim CveClasificacionIntermediario As Integer
@@ -294,7 +290,6 @@ Partial Class Bancos_DepositosCaja
OcurrioError = True
End If
End If
End If
Dim CveTransaccionBanco As Integer = DdlTipoDeposito.SelectedValue.ToEntero
@@ -329,6 +324,12 @@ Partial Class Bancos_DepositosCaja
Exit For
End If
Next
If CveSubProyecto <= 0 Then
'se saca de la cuenta de la caja chica
CveSubProyecto = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, Estatus:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto")
End If
End If
If FolioIE <= 0 Then
@@ -367,7 +368,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", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, "", "Retorno", CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, "Depósito Bancario", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
OcurrioError = True
End If
End If
@@ -415,11 +416,8 @@ Partial Class Bancos_DepositosCaja
End If
Next
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, "Depósito Bancario")
End If
If Not OcurrioError AndAlso ObjConta.ValidacionesPrePoliza(NuevaCvePrePoliza, UsuarioActual, Opcion:=1) Then
@@ -464,6 +462,8 @@ Partial Class Bancos_DepositosCaja
End If
Alert(documentos.ToString)
TxtCuentaRetorno.Text = ""
ChkCuentaRetorno.Checked = False
CargaDatos()
End If
@@ -489,8 +489,6 @@ Partial Class Bancos_DepositosCaja
Return Respuesta
End Function
Private Function ValidaCobranza() As Boolean
Dim Respuesta As Boolean = False
@@ -517,9 +515,7 @@ Partial Class Bancos_DepositosCaja
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
Respuesta = False
End If
ObjMovtos.Dispose()
Else
Respuesta = True
End If
@@ -527,7 +523,6 @@ Partial Class Bancos_DepositosCaja
Return Respuesta
End Function
Private Sub ObtenerTotalImporta()
Dim Total As Double = 0
@@ -577,7 +572,6 @@ Partial Class Bancos_DepositosCaja
If DdlTipoPago.SelectedValue.Contiene("11", "12", "-2") Then
e.Row.FCCheckBox("ChkFactura").Enabled = False
End If
End If
e.Row.FCCheckBox("ChkFactura").Attributes.Add("onclick", String.Format("FnSuma(this,{0});", e.Row.DBCampo("Importe")))
@@ -596,8 +590,6 @@ Partial Class Bancos_DepositosCaja
End Sub
Protected Sub DdlTipoPago_SelectedIndexChanged(sender As Object, e As EventArgs)
If DdlTipoPago.SelectedValue = "12" Then
DDlMesesSinIntereses.Visible = True