Files
Asegasa.NET/guia/Extensiones/conciliacionesbancarias.vb
2026-04-28 11:52:16 +02:00

59 lines
1.7 KiB
VB.net

Public Class conciliacionesbancarias
Public ReadOnly Property ImporteExtractosConciliados As Double
Get
Return Me.movimientosbancarios.Sum(Function(x) x.Importe)
End Get
End Property
Public ReadOnly Property ImporteApuntesConciliados As Double
Get
Return Me.apuntes.Sum(Function(x) x.Debe - x.Haber)
End Get
End Property
Dim _Año As Integer?
Public Property Año As Integer?
Get
If _Año.HasValue Then
Return _Año
Else
If FechaInicio = Date.MinValue Then
Return Nothing
Else
Return FechaInicio.Year
End If
End If
End Get
Set(value As Integer?)
_Año = value
If _Mes.HasValue Then
Me.FechaInicio = New Date(_Año, _Mes, 1)
Me.FechaFin = New Date(_Año, _Mes, Date.DaysInMonth(_Año, _Mes))
End If
Me.OnPropertyChanged("Año")
End Set
End Property
Dim _Mes As Integer?
Public Property Mes As Integer?
Get
If _Mes.HasValue Then
Return _Mes
Else
If FechaInicio = Date.MinValue Then
Return Nothing
Else
Return FechaInicio.Month
End If
End If
End Get
Set(value As Integer?)
_Mes = value
If _Año.HasValue Then
Me.FechaInicio = New Date(_Año, _Mes, 1)
Me.FechaFin = New Date(_Año, _Mes, Date.DaysInMonth(_Año, _Mes))
End If
Me.OnPropertyChanged("Mes")
End Set
End Property
End Class