From 9d82abc7250b28af7a2db007171825276a37f25f Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 7 Sep 2023 15:46:50 -0700 Subject: [PATCH 1/2] Transferencias correcion folios tarjetas --- Bancos/Transferencias.aspx.vb | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb index b9e04594f..f06e666b9 100644 --- a/Bancos/Transferencias.aspx.vb +++ b/Bancos/Transferencias.aspx.vb @@ -2,6 +2,7 @@ Imports System.IO Imports Extensiones Imports System.Data Imports System.Data.SqlClient +Imports System.ComponentModel.Design Partial Class Bancos_Transferencias Inherits ClsPaginas @@ -363,6 +364,13 @@ Partial Class Bancos_Transferencias For Each row As GridViewRow In GvTC.Rows + FolioDestino = GetFolio(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TransaccioSQL:=ObjIE.IniciaTransacSQL()) + + If FolioDestino.Trim.Length = 0 Then + MsgError = "Ocurrio un error al obtener el folio destino." + Exit For + End If + CveIEDestino = ObjIE.AddBancos_IE(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, String.Format("Transferencia Cta: {0}", DdlCuentaOrigen.SelectedItem.Text), row.FCTextBox("TxtAbono").Text.ToDecimal, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal, 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", $"Transferencia entre cuentas {TxtObservaciones.Text}", @@ -372,7 +380,7 @@ Partial Class Bancos_Transferencias Exit For Else AlertaGlobal.AppendFormat("{1}
", CveIEDestino, FolioDestino) - FolioDestino = (FolioDestino.ToLong + 1).ToString + 'FolioDestino = (FolioDestino.ToLong + 1).ToString End If Next @@ -610,13 +618,25 @@ Partial Class Bancos_Transferencias TxtFolio.Text = GetFolio(CveCuenta, CveTipoTransaccion) End Sub - Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer) As String + Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer, Optional ByRef TransaccioSQL As SqlTransaction = Nothing) As String Dim Folio As String Dim Banco As ClsBancos - Banco = New ClsBancos + + If TransaccioSQL Is Nothing Then + Banco = New ClsBancos + Else + Banco = New ClsBancos(TransaccioSQL) + End If + Folio = Banco.GetNextFolio(CveCuenta, CveTipoTransaccion).ToString - Banco.Dispose() + + If TransaccioSQL Is Nothing Then + Banco.Dispose() + End If + + + Return Folio End Function From a71e9ed33b2b0a70e96edb2315c414a95fc02eea Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 7 Sep 2023 15:47:21 -0700 Subject: [PATCH 2/2] Transferencias correcion Folios tarjetas --- Bancos/Transferencias.aspx.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb index f06e666b9..3c9cabdea 100644 --- a/Bancos/Transferencias.aspx.vb +++ b/Bancos/Transferencias.aspx.vb @@ -636,7 +636,6 @@ Partial Class Bancos_Transferencias End If - Return Folio End Function