Efacturas Error agregar complemento fechas 1/1/1
This commit is contained in:
@@ -2842,16 +2842,24 @@ Partial Class Compras_eFacturas
|
||||
|
||||
Dim FechaDocumento As Date = GvRowF.DataKey("FechaPago").ToString.ToDate
|
||||
Dim FechaDoRecibo As Date = GvRowF.DataKey("Fecha").ToString.ToDate
|
||||
Dim CveIEDocumento As Integer = GvRowF.DataKey("CveIE").ToEntero
|
||||
|
||||
Dim FT1 As Date = FechaDocumento.AddDays(-6)
|
||||
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
||||
If CveIEDocumento > 0 And FechaDocumento > New Date(1, 1, 1) Then
|
||||
Dim FT1 As Date = FechaDocumento
|
||||
|
||||
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
|
||||
If FechaDocumento <> New Date(1, 1, 1) Then
|
||||
FT1 = FechaDocumento.AddDays(-6)
|
||||
End If
|
||||
|
||||
BtnVincularPago.Visible = False
|
||||
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
||||
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
||||
|
||||
Exit For
|
||||
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
|
||||
|
||||
BtnVincularPago.Visible = False
|
||||
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
||||
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user