-- 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

@@ -1448,11 +1448,33 @@ Partial Class Bancos_IE
'RecargaCuentas
CargaCuenta(CveMoneda)
RecargaCuentasDepositos()
ValidaFechaDocumentoDiasPosteriores()
UpDatos.Update()
BtnGuardar.Enabled = True
End Sub
Private Sub ValidaFechaDocumentoDiasPosteriores()
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
Calendario.EndDate = NowADS().AddDays(3)
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"
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()
UpGuardar.Update()
End Sub
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
'si solo es de egreso el movimiento debe de generar el siguiente folio.