Imports System
Imports System.ComponentModel

Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering

Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation

Imports DevExpress.ExpressApp.ConditionalAppearance
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<NonPersistent()> _
Public Class RegistryRowsFinancialControlling_ReInvoicePopupWindow
    Inherits BaseObject
    Private _RegistryRowsFinancialControlling As RegistryRowsFinancialControlling 'Egy példány a kiválasztott számlázandó tételek közül, hogy megkapjuk a hozzá tartozó iktatás adatait
    Private _Contracts As Contracts 'Melyik szerződéshez készüljön el a sor
    Private _DateExecution As Date 'Szerződési sor teljesítési dátuma
    Private _SumAmountOfSelectedItems As Double 'A kiválasztott továbbszámlázandó tételek összege
    Private _FinalAmount As Double 'A szerződési sor végösszege árréssel együtt
    Private _VAT As VAT 'Mi legyen a szerződési sor áfája
    Private _JobNumberObjects As JobNumberObjects
    Private _CostHolder As CostHolder
    Private _CostPlace As CostPlace
    Private _UniqueObjects As UniqueObjects
    Private _Description As String
    Private _ShortName As String
    Private _PaymentOption As PaymentOption
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.RegistryRowsFinancialControlling", "Reinvoice_ok")> _
    Property RegistryRowsFinancialControlling As RegistryRowsFinancialControlling
        Get
            Return _RegistryRowsFinancialControlling
        End Get
        Set(ByVal value As RegistryRowsFinancialControlling)
            SetPropertyValue("RegistryRowsFinancialControlling", _RegistryRowsFinancialControlling, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.Contracts", "Reinvoice_ok")> _
    <DataSourceCriteria("Customers='@This.RegistryRowsFinancialControlling.ReInvoice_Customers' And CustomersFrom = '@This.RegistryRowsFinancialControlling.RegistryHeader.CustomersFrom' And ContractTemplate.PartnerType=0")> _
    Property Contracts As Contracts
        Get
            Return _Contracts
        End Get
        Set(ByVal value As Contracts)
            SetPropertyValue("Contracts", _Contracts, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.DateExecution", "Reinvoice_ok")> _
    Property DateExecution As Date
        Get
            Return _DateExecution
        End Get
        Set(ByVal value As Date)
            SetPropertyValue("DateExecution", _DateExecution, value)
        End Set
    End Property
    Property SumAmountOfSelectedItems As Double
        Get
            Return _SumAmountOfSelectedItems
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("SumAmountOfSelectedItems", _SumAmountOfSelectedItems, value)
        End Set
    End Property
    Property FinalAmount As Double
        Get
            Return _FinalAmount
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("FinalAmount", _FinalAmount, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.vat", "Reinvoice_ok")> _
    Property VAT As VAT
        Get
            Return _VAT
        End Get
        Set(ByVal value As VAT)
            SetPropertyValue("VAT", _VAT, value)
        End Set
    End Property

    'Rule5DMatrix ...
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.Controlling", "Reinvoice_ok", TargetCriteria:="ContractTemplate.Rule5DMatrix.RequireControlling=True")> _
    ReadOnly Property ReInvoiceReason As Controlling
        Get
            Return Me.RegistryRowsFinancialControlling.ReInvoiceReason
        End Get
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.CostHolder", "Reinvoice_ok", TargetCriteria:="ContractTemplate.Rule5DMatrix.RequireCostHolder=True")> _
    Property CostHolder As CostHolder
        Get
            Return _CostHolder
        End Get
        Set(ByVal value As CostHolder)
            SetPropertyValue("CostHolder", _CostHolder, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.CostPlace", "Reinvoice_ok", TargetCriteria:="ContractTemplate.Rule5DMatrix.RequireCostPlace=True")> _
    Property CostPlace As CostPlace
        Get
            Return _CostPlace
        End Get
        Set(value As CostPlace)
            SetPropertyValue("CostPlace", _CostPlace, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.JobNumberObjects", "Reinvoice_ok", TargetCriteria:="ContractTemplate.Rule5DMatrix.RequireJobNumberObjects=True")> _
    Property JobNumberObjects As JobNumberObjects
        Get
            Return _JobNumberObjects
        End Get
        Set(ByVal value As JobNumberObjects)
            SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.UniqueObjects", "Reinvoice_ok", TargetCriteria:="ContractTemplate.Rule5DMatrix.RequireUniqueObjects=True")> _
    Property UniqueObjects As UniqueObjects
        Get
            Return _UniqueObjects
        End Get
        Set(ByVal value As UniqueObjects)
            SetPropertyValue("UniqueObjects", _UniqueObjects, value)
        End Set
    End Property

    <Size(-1)> _
    Property Description As String
        Get
            Return _Description
        End Get
        Set(ByVal value As String)
            SetPropertyValue("Description", _Description, value)
        End Set
    End Property
    <Size(-1)> _
    Property ShortName As String
        Get
            Return _ShortName
        End Get
        Set(ByVal value As String)
            SetPropertyValue("ShortName", _ShortName, value)
        End Set
    End Property
    <RuleRequiredField("RegistryRowsFinancialControlling_ReInvoicePopupWindow.PaymentOption", "Reinvoice_ok")> _
    Property PaymentOption As PaymentOption
        Get
            Return _PaymentOption
        End Get
        Set(ByVal value As PaymentOption)
            SetPropertyValue("PaymentOption", _PaymentOption, value)
        End Set
    End Property
End Class

