Validaciones fecha pago
This commit is contained in:
@@ -1390,12 +1390,25 @@ Partial Class Bancos_PopIEVentas
|
||||
|
||||
|
||||
|
||||
If FechaVenta.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
|
||||
Alert($"La fecha de venta no puede ser mayor que la fecha de pago <br/> Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
|
||||
Dim FechaFactura As Date = FechaVenta
|
||||
Dim FechaDocumentoPago As Date = TxtFechaDocumento.Text.ToDate
|
||||
|
||||
Dim AnioFactura As Integer = FechaFactura.Year
|
||||
Dim MesFactura As Integer = FechaFactura.Month
|
||||
|
||||
Dim AnioDocumento As Integer = FechaDocumentoPago.Year
|
||||
Dim MesDocumento As Integer = FechaDocumentoPago.Month
|
||||
|
||||
If AnioFactura > AnioDocumento Then
|
||||
Alert($"El mes de la fecha de venta no puede ser mayor al mes de la la fecha de pago <br/> Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
|
||||
Alert($"El mes de la fecha de venta no puede ser mayor al mes de la la fecha de pago <br/> Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA
|
||||
If Not Page.IsValid Then
|
||||
Exit Sub
|
||||
|
||||
Reference in New Issue
Block a user