From f664aaa1f9180ac07b34d467c36f29239f254a55 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 23 Jul 2024 09:16:23 -0700 Subject: [PATCH] -- registro de caja --- Bancos/DepositosCaja.aspx | 12 ++++++++---- Bancos/DepositosCaja.aspx.vb | 34 +++++++++++++--------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 1b258fe1f..1c2baa635 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -315,12 +315,16 @@ diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 0338bb999..1742628f5 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -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("Imprimir {1}

", 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