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

View File

@@ -848,13 +848,12 @@ Partial Class Bancos_PopIECompras
#Region "DDL'S CHANGED"
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
Select Case valor
Case 1
LblPagueseA.Text = "Páguese a"
Case 2
LblPagueseA.Text = "Beneficiario"
End Select
@@ -1723,17 +1722,20 @@ Partial Class Bancos_PopIECompras
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"
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
Calendario.EndDate = NowADS().AddDays(2)
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"
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).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(30)
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()

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