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 FechaDocumento As Date = GvRowF.DataKey("FechaPago").ToString.ToDate
|
||||||
Dim FechaDoRecibo As Date = GvRowF.DataKey("Fecha").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)
|
If CveIEDocumento > 0 And FechaDocumento > New Date(1, 1, 1) Then
|
||||||
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
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
|
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
||||||
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
|
||||||
|
|
||||||
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
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user