-- condiciones de fecha máxima

+ chques 3meses
+ transf  3 semanas
This commit is contained in:
2024-06-19 08:27:40 -07:00
parent ab4946a268
commit 1521149562
3 changed files with 50 additions and 25 deletions

View File

@@ -1627,20 +1627,21 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub ValidaFechaDocumentoDiasPosteriores()
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual"
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
Calendario.EndDate = NowADS().AddDays(3)
Calendario.EndDate = NowADS().AddDays(2)
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(182).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(182).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
Calendario.EndDate = NowADS().AddDays(182)
If DdlTipoTransaccion.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual"
Calendario.EndDate = NowADS().AddMonths(3)
End If
If DdlTipoTransaccion.SelectedValue = "2" Then 'transfer, 3semanas
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual"
Calendario.EndDate = NowADS().AddDays(21)
End If
UpDatos.Update()