diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 8daf157f8..08500af56 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -621,46 +621,46 @@ Partial Class Ventas_ClientesAbonar
End If
End If
- Dim ValFechaDocumento As Boolean = False
+ If RblTipoPago.SelectedValue = "1" Then
+
+
+ Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago:
")
- For Each gvRowVal As GridViewRow In GvCxC.Rows
+ For Each gvRowVal As GridViewRow In GvCxC.Rows
- If gvRowVal.FCCheckBox("Chk").Checked Then
+ If gvRowVal.FCCheckBox("Chk").Checked Then
- Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate
- Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate
+ 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 AnioFactura As Integer = FechaFactura.Year
+ Dim MesFactura As Integer = FechaFactura.Month
- Dim AnioDocumento As Integer = FechaDocumento.Year
- Dim MesDocumento As Integer = FechaDocumento.Month
+ Dim AnioDocumento As Integer = FechaDocumento.Year
+ Dim MesDocumento As Integer = FechaDocumento.Month
+
+ If UsuarioActual.Empresa.UsaAC = False Then
+ If AnioFactura > AnioDocumento Then
+ FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
+ ValFechaDocumento = True
+ ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
+ FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
+ ValFechaDocumento = True
+ End If
- If UsuarioActual.Empresa.UsaAC = False Then
- If AnioFactura > AnioDocumento Then
- FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
- ValFechaDocumento = True
- ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
- FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
")
- ValFechaDocumento = True
End If
-
End If
+ Next
+
+ If ValFechaDocumento Then
+ Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
+ Exit Sub
End If
-
- Next
-
-
- If ValFechaDocumento Then
- Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
- Exit Sub
End If
-
-
If Not TxtImporte.Text.ToDecimal > 0 Then
Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia)
Exit Sub