From 246e49e4f0359cb9df06d4555837b3b612a85bf4 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 31 Aug 2023 22:10:24 -0700 Subject: [PATCH] validacionesprepolizas --- Bancos/DepositosCaja.aspx.vb | 2 +- Bancos/PolizaCheque.aspx.vb | 2 +- Bancos/PopIEVentas.aspx.vb | 2 +- Bancos/PopUpBuscarIE.aspx.vb | 2 +- Bancos/ProductosFinancieros.aspx.vb | 20 ++++++++++---------- Bancos/RegistroPagoIntermediario.aspx.vb | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index dd24c514d..7d6dee36a 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -347,7 +347,7 @@ Partial Class Bancos_DepositosCaja End If - If Not OcurrioError AndAlso ObjConta.ValidacionPrePolizaCuadre(NuevaCvePrePoliza, 1) Then + If Not OcurrioError AndAlso ObjConta.ValidacionesPrePoliza(NuevaCvePrePoliza, UsuarioActual, Opcion:=1) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Bancos/DepositoCaja | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{NuevaCvePrePoliza}", "LogPrePolizas") OcurrioError = True diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 4b76b3cca..b1ff1319a 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -852,7 +852,7 @@ Partial Class Bancos_PolizaCheque End Try If MsgError = "" Then - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then + If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"PolizaCheque/Guardar Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 12c5e546d..ffc69a6d8 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1320,7 +1320,7 @@ Partial Class Bancos_PopIEVentas If MsgError = "" Then - If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then + If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then If ObjMov.ValorPolizaDescuadre > 0 Then MsgError = ObjMov.MensajePolizaDescuadre End If diff --git a/Bancos/PopUpBuscarIE.aspx.vb b/Bancos/PopUpBuscarIE.aspx.vb index 90953e356..52515e79c 100644 --- a/Bancos/PopUpBuscarIE.aspx.vb +++ b/Bancos/PopUpBuscarIE.aspx.vb @@ -74,7 +74,7 @@ Partial Class Bancos_PopUpBuscarIE Dim ObjBancosIE As New ClsBancos If ObjBancosIE.GetBancosRepIE(-1, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate, - MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then + MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados) Else Alert("Ocurrió un error al consultar bancos", TipoMensaje.MsgError) diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb index a4ec195f6..0be160c8b 100644 --- a/Bancos/ProductosFinancieros.aspx.vb +++ b/Bancos/ProductosFinancieros.aspx.vb @@ -296,14 +296,14 @@ Partial Class Bancos_ProductosFinancieros 'Variables de controles Dim Importe As Double = TxtImporte.Text.ToDouble Dim CveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuentas.SelectedValue))("CveMoneda").ToString.ToEntero() - Dim Fecha = TxtFecha.Text.ToDate + Dim Fecha As Date = TxtFecha.Text.ToDate 'Variables de error - Dim ErrorTransaccion = False - Dim ErrorAC = False + Dim ErrorTransaccion As Boolean = False + Dim ErrorAC As Boolean = False - Dim CvePrePoliza = -1 - Dim IdPoliza = -1 + Dim CvePrePoliza As Integer = -1 + Dim IdPoliza As Integer = -1 Dim FolioPoliza As Integer = -1 Dim CveIE As Integer = -1 @@ -313,8 +313,8 @@ Partial Class Bancos_ProductosFinancieros End If 'OBTIENE LA CUENTA CONTABLE DEL BANCO - Dim DtCuentas = GlobalDTBancosCuentas(-1, DdlCuentas.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveCuenta", "IdCtaContable"}) - Dim CtaCuenta = -1 + Dim DtCuentas As DataTable = GlobalDTBancosCuentas(-1, DdlCuentas.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveCuenta", "IdCtaContable"}) + Dim CtaCuenta As Integer = -1 If DtCuentas.Rows.Count = 1 Then CtaCuenta = DtCuentas.Rows(0)("Id0CtaContable").ToString.ToEntero @@ -324,7 +324,7 @@ Partial Class Bancos_ProductosFinancieros If CveIE > 0 OrElse (DdlTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0) Then - Dim CvePlantilaPoliza = DdlTipoMovimiento.SelectedValue.ToString.ToEntero + Dim CvePlantilaPoliza As Integer = DdlTipoMovimiento.SelectedValue.ToString.ToEntero Dim idCuentaContabilizacion As Long = 1 Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

" Dim CuentasContablesInvalidas As New StringBuilder @@ -332,7 +332,7 @@ Partial Class Bancos_ProductosFinancieros If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantilaPoliza) Then For Each Row As DataRow In ObjMov.DtResultados.Rows - Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero + Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) Dim importeMovimiento As Decimal = 0 Dim FechaMovimiento As Date = Now @@ -363,7 +363,7 @@ Partial Class Bancos_ProductosFinancieros Next - If Not ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then + If Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4) Then ErrorTransaccion = True End If diff --git a/Bancos/RegistroPagoIntermediario.aspx.vb b/Bancos/RegistroPagoIntermediario.aspx.vb index 150429bea..939ade0a5 100644 --- a/Bancos/RegistroPagoIntermediario.aspx.vb +++ b/Bancos/RegistroPagoIntermediario.aspx.vb @@ -177,7 +177,7 @@ Partial Class Bancos_PagosIntermediarios MsgError = "No se pudo insertar la póliza" End If - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then + If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then If ObjMov.ValorPolizaDescuadre > 0 Then MsgError = "La suma de los importes no coinciden" End If