From 58c126ad98c4ecee420a52d0cfd2551677b0edd5 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 Jul 2023 09:58:22 -0700 Subject: [PATCH] -- cambio en clase a clsbancos --- Bancos/Creditos.aspx.vb | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 2881e1602..0daef0a88 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -1,6 +1,7 @@ Option Strict On Option Explicit On +Imports System.Activities.Expressions Imports System.Data Imports System.Windows.Forms.VisualStyles.VisualStyleElement Imports Extensiones @@ -361,7 +362,7 @@ Partial Class Bancos_Creditos End Sub Private Sub CargaCreditoComplejo() Dim ObjCreditos As New ClsBancos - Dim ObjPrepoliza As New ClsContabilidad + 'Dim ObjPrepoliza As New ClsContabilidad If ObjCreditos.GetCreditos(CveCredito, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then If ObjCreditos.DtResultados.Rows.Count > 0 Then @@ -424,9 +425,9 @@ Partial Class Bancos_Creditos HLSaldoPrePoliza.NavigateUrl = $"/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={ObjCreditos.CvePrePoliza}" LbSaldo.Text = $"Saldo Acreedor " - If ObjPrepoliza.GetPrePolizasDetalle(ObjCreditos.CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjPrepoliza.DtResultados.Rows.Count > 0 Then - LbSaldoAcreedor.Text = ObjPrepoliza.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 42").FormatoNumero - LbSaldoDocxPagar.Text = ObjPrepoliza.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 50").FormatoNumero + If ObjCreditos.GetBancosIEMovimientos(dr("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) AndAlso ObjCreditos.DtResultados.Rows.Count > 0 Then + LbSaldoAcreedor.Text = ObjCreditos.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 42").FormatoNumero + LbSaldoDocxPagar.Text = ObjCreditos.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 50").FormatoNumero End If Else @@ -471,12 +472,12 @@ Partial Class Bancos_Creditos End If 'CARGA ANTICIPOS - If dr("CveIE").ToString.ToEntero > 0 AndAlso ObjPrepoliza.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=dr("CveIE").ToString.ToEntero) Then - If ObjPrepoliza.DtResultados.Rows.Count > 0 Then - TxtVehiculoAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 53").Rows(0)("Importe").ToString.FormatoNumero - TxtComisionAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 54").Rows(0)("Importe").ToString.FormatoNumero - TxtSeguroAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 55").Rows(0)("Importe").ToString.FormatoNumero - Dim dtt As DataTable = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 58") + If dr("CveIE").ToString.ToEntero > 0 AndAlso ObjCreditos.GetBancosIEMovimientos(dr("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjCreditos.DtResultados.Rows.Count > 0 Then + TxtVehiculoAnticipo.Text = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 53").Rows(0)("Importe").ToString.FormatoNumero + TxtComisionAnticipo.Text = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 54").Rows(0)("Importe").ToString.FormatoNumero + TxtSeguroAnticipo.Text = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 55").Rows(0)("Importe").ToString.FormatoNumero + Dim dtt As DataTable = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 58") If dtt.Rows.Count > 0 Then TxtFondoGarantia.Text = dtt.Rows(0)("Importe").ToString.FormatoNumero End If @@ -516,7 +517,6 @@ Partial Class Bancos_Creditos End If ObjCreditos.Dispose() - ObjPrepoliza.Dispose() End Sub #End Region @@ -1577,21 +1577,21 @@ Partial Class Bancos_Creditos Dim importeMovimiento = 0.0D - Dim ConceptoContable = 0 - Dim TipoMovimiento = False - Dim IdCtaContable = 0 - Dim Concepto = "" - Dim Referencia = $"Crédito: {TxtReferencia.Text}" - Dim FechaMovimiento = Now.ToDate - Dim MsgError As String = "" + Dim ConceptoContable = 0 + Dim TipoMovimiento = False + Dim IdCtaContable = 0 + Dim Concepto = "" + Dim Referencia = $"Crédito: {TxtReferencia.Text}" + Dim FechaMovimiento = Now.ToDate + Dim MsgError As String = "" - CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - Dim ImporteDocXPagar = TxtTotalCredito.Text.ToDecimal - Dim CveProveedor = -1 + CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim ImporteDocXPagar = TxtTotalCredito.Text.ToDecimal + Dim CveProveedor = -1 Dim CveCreditoPrePoliza = -1 If CvePrePoliza > 0 Then - importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.todecimal 'importe financiado + importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.ToDecimal 'importe financiado Concepto = $"Crédito: {TxtReferencia.Text}" Dim Pago As New CompraPago Pago.Fecha = Now