Correcion de filtro por Año/Mes
This commit is contained in:
@@ -341,11 +341,39 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
If AnioMes.Trim.Length = 7 Then
|
If AnioMes.Trim.Length = 7 Then
|
||||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||||
FechaFtemporal = $"01/{AnioMes.Substring(5, 2).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
FechaFtemporal = $"01/{AnioMes.Substring(5, 2).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
||||||
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
|
||||||
|
If FechaF = "-1" Then
|
||||||
|
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
||||||
|
Else
|
||||||
|
Dim FechaFRef As DateTime = FechaF.ToDateTime
|
||||||
|
Dim FechaFMonth As DateTime = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day).ToDate()
|
||||||
|
|
||||||
|
If FechaFRef > FechaFMonth Then
|
||||||
|
txtFechaF.Text = FechaFMonth.ToString("dd/MM/yyyy")
|
||||||
|
Else
|
||||||
|
txtFechaF.Text = FechaFRef.ToString("dd/MM/yyyy")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||||
FechaFtemporal = $"01/{AnioMes.Substring(5, 1).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
FechaFtemporal = $"01/{AnioMes.Substring(5, 1).PadLeft(2, "0"c)}/{AnioMes.Substring(0, 4)}"
|
||||||
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
|
||||||
|
If FechaF = "-1" Then
|
||||||
|
txtFechaF.Text = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day)
|
||||||
|
Else
|
||||||
|
Dim FechaFRef As DateTime = FechaF.ToDateTime
|
||||||
|
Dim FechaFMonth As DateTime = String.Format("{2}/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4), FechaFtemporal.ToDate.LastDayOfMonth.Day).ToDate
|
||||||
|
|
||||||
|
If FechaFRef > FechaFMonth Then
|
||||||
|
txtFechaF.Text = FechaFMonth.ToString("dd/MM/yyyy")
|
||||||
|
Else
|
||||||
|
txtFechaF.Text = FechaFRef.ToString("dd/MM/yyyy")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user