-- limpieza de renglones
This commit is contained in:
@@ -977,12 +977,10 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
|
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
|
||||||
|
|
||||||
|
|
||||||
Dim Serie As String = "Pag"
|
Dim Serie As String = "Pag"
|
||||||
Dim Folio As Integer = -1
|
Dim Folio As Integer = -1
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Dim Estatus As Integer = 1
|
Dim Estatus As Integer = 1
|
||||||
|
|
||||||
Dim dttpagos As DataTable = Nothing
|
Dim dttpagos As DataTable = Nothing
|
||||||
Dim dttpagosimpuestos As DataTable = Nothing
|
Dim dttpagosimpuestos As DataTable = Nothing
|
||||||
Dim dr As Data.DataRow = Nothing
|
Dim dr As Data.DataRow = Nothing
|
||||||
@@ -996,7 +994,6 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
If FechaTimbrado = MinFecha Then
|
If FechaTimbrado = MinFecha Then
|
||||||
Dim RowFiltro As DataRow = Nothing
|
Dim RowFiltro As DataRow = Nothing
|
||||||
|
|
||||||
RowFiltro = dttpagos.FiltroPrimero("")
|
RowFiltro = dttpagos.FiltroPrimero("")
|
||||||
|
|
||||||
If RowFiltro IsNot Nothing Then
|
If RowFiltro IsNot Nothing Then
|
||||||
@@ -1018,10 +1015,8 @@ Public Class ClsBancos
|
|||||||
Else
|
Else
|
||||||
FechaTimbrado = ClsPaginas.NowADS()
|
FechaTimbrado = ClsPaginas.NowADS()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus)
|
Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus)
|
||||||
If tCveComplementoPago > 0 Then
|
If tCveComplementoPago > 0 Then
|
||||||
'Dim drr As Data.DataRow = dtt.Rows(0)
|
'Dim drr As Data.DataRow = dtt.Rows(0)
|
||||||
@@ -1042,7 +1037,6 @@ Public Class ClsBancos
|
|||||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(11, 18) Then
|
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(11, 18) Then
|
||||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 11, 18 caracteres."
|
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 11, 18 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||||
End If
|
End If
|
||||||
@@ -1058,7 +1052,6 @@ Public Class ClsBancos
|
|||||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
|
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
|
||||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
|
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||||
End If
|
End If
|
||||||
@@ -1067,7 +1060,6 @@ Public Class ClsBancos
|
|||||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 11, 15, 16, 18, 50) Then
|
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 11, 15, 16, 18, 50) Then
|
||||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||||
End If
|
End If
|
||||||
@@ -1075,13 +1067,11 @@ Public Class ClsBancos
|
|||||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10) Then
|
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10) Then
|
||||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10 caracteres."
|
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CuentaBeneficiario = ""
|
CuentaBeneficiario = ""
|
||||||
Case "28"
|
Case "28"
|
||||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
|
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
|
||||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
|
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||||
End If
|
End If
|
||||||
@@ -1089,13 +1079,10 @@ Public Class ClsBancos
|
|||||||
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(15, 16) Then
|
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(15, 16) Then
|
||||||
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 15, 16 caracteres."
|
Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 15, 16 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
|
||||||
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
|
|
||||||
CuentaBeneficiario = ""
|
CuentaBeneficiario = ""
|
||||||
Cuentapago = ""
|
Cuentapago = ""
|
||||||
'RFCCliente = ""
|
'RFCCliente = ""
|
||||||
@@ -1103,10 +1090,6 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
'If EsCancelacion AndAlso (CFDIRelacionado = "-1" OrElse CFDIRelacionado = "") Then
|
|
||||||
' Mensaje += " La cancelación debe de tener documento relacionado"
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If Not Mensaje.Length = 0 Then
|
If Not Mensaje.Length = 0 Then
|
||||||
GuardaLog(Mensaje)
|
GuardaLog(Mensaje)
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
Reference in New Issue
Block a user