Imports Microsoft.VisualBasic

<Serializable>
Public Class CalculetteDeductionNOSP2
    Private _editionRG As Boolean = True
    Private _editionProrata As Boolean = True
    Private _editionPenalite As Boolean = True
    Private _editionAutre As Boolean = True

    Private _rg As Decimal
    Public Property RG As Decimal
        Get
            Return _rg
        End Get
        Set(value As Decimal)
            _rg = value
        End Set
    End Property

    Public Property EditionRg As Boolean
        Get
            Return _editionRG
        End Get
        Private Set(value As Boolean)
            _editionRG = value
        End Set
    End Property

    Private _prorata As Decimal
    Public Property Prorata As Decimal
        Get
            Return _prorata
        End Get
        Set(value As Decimal)
            _prorata = value
        End Set
    End Property

    Public Property EditionProrata As Boolean
        Get
            Return _editionProrata
        End Get
        Private Set(value As Boolean)
            _editionProrata = value
        End Set
    End Property

    Private _penalite As Decimal
    Public Property Penalite As Decimal
        Get
            Return _penalite
        End Get
        Set(value As Decimal)
            _penalite = value
        End Set
    End Property

    Public Property EditionPenalite As Boolean
        Get
            Return _editionPenalite
        End Get
        Private Set(value As Boolean)
            _editionPenalite = value
        End Set
    End Property

    Private _autre As Decimal
    Public Property Autre As Decimal
        Get
            Return _autre
        End Get
        Set(value As Decimal)
            _autre = value
        End Set
    End Property

    Public Property EditionAutre As Boolean
        Get
            Return _editionAutre
        End Get
        Private Set(value As Boolean)
            _editionAutre = value
        End Set
    End Property

    Public ReadOnly Property Total As Decimal
        Get
            Return RG + Prorata + Penalite + Autre
        End Get
    End Property

    Public Sub DesactivationEditionRG()
        EditionRg = False
    End Sub

    Public Sub DesactivationEditionProrata()
        EditionProrata = False
    End Sub

    Public Sub DesactivationEditionPenalite()
        EditionPenalite = False
    End Sub

    Public Sub DesactivationEditionAutre()
        EditionAutre = False
    End Sub

    Public Sub AutoCalcul(montant As Decimal)
        If Not EditionRg Then
            RG = montant * 0.05D
        End If
    End Sub

#Region "Constructors"

    Public Sub New()

    End Sub

#End Region
End Class
