Transferencias correcion folios tarjetas
This commit is contained in:
@@ -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("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", 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
|
||||
|
||||
Reference in New Issue
Block a user