Validaciones fecha pago
This commit is contained in:
@@ -657,18 +657,32 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim ValFechaDocumento As Boolean = False
|
||||
Dim FoliosFechasValFechaDocumento As New StringBuilder
|
||||
|
||||
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago: <br/>")
|
||||
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: <br/>")
|
||||
|
||||
For Each gvRowVal As GridViewRow In GvCxC.Rows
|
||||
|
||||
If gvRowVal.FCCheckBox("Chk").Checked Then
|
||||
If gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
|
||||
|
||||
Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate
|
||||
Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate
|
||||
|
||||
Dim AnioFactura As Integer = FechaFactura.Year
|
||||
Dim MesFactura As Integer = FechaFactura.Month
|
||||
|
||||
Dim AnioDocumento As Integer = FechaDocumento.Year
|
||||
Dim MesDocumento As Integer = FechaDocumento.Month
|
||||
|
||||
If AnioFactura > AnioDocumento Then
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
ValFechaDocumento = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If ValFechaDocumento Then
|
||||
|
||||
Reference in New Issue
Block a user