Imports System
Imports System.ComponentModel

Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering

Imports DevExpress.ExpressApp.ConditionalAppearance
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports System.Linq
Imports System.Linq.Expressions

'---------------------- Bejövő megrendelés ----------------------
<DefaultClassOptions()> _
<NavigationItem("BusinessStocks")> _
Public Class OrderInParameters
    Inherits BaseObject
    Private _CustomersFrom As CustomersFrom ' -- Saját cég
    Private _ShortName As String ' -- Megnevezés
    Private _Description As String ' -- Leírás
    Private _NumberGenerator As NumberGenerator ' -- Sorszámgenerátor
    Private _NumberGeneratorAcknowledgement As NumberGenerator
    Private _ReportData As ReportData
    Private _ReportDataAcknowledgement As ReportData
    Private _CurrencyName As CurrencyName ' -- Elszámolás devizája
    Private _CurrencyName_Invoice As CurrencyName ' -- Számla devizája deviza
    Private _InvoiceType As InvoiceType 'Ha vevõi a szerzõdés akkor milyen a kimenõ számla tipusa
    Private _InvoiceTypeAdvanced As InvoiceType 'Ha vevõi a szerződés akkor milyen az előleg vagy foglaló számla tipusa
    Private _StorageMoveType As StorageMoveType
    Private _IsAPCSheet As Boolean = False 'Termeltetési szerződéssel kapcsolni kell ?
    Private _ExportMode As eExportMode 'Belföldi, küldöldi, EU belfüldi ÁFA stb.
    Private _QualityOption As QualityOption
    Private _ShipmentOption As ShipmentOption
    Private _PaymentOption As PaymentOption
    Private _BankInformation As BankInformation

    Private _NeedPermission As Boolean 'Engedélyköteles-e a megrendelés
    Private _NeedPermissionToDeliveryNote As Boolean 'Kiszállításhoz kell-e engedély
    Private _NeedPermissionVolumeByCustomersHUF As Double 'Mennyi az ügyfél össz netto HUF rendelési állománya, ami felett engedély kell!
    Private _NeedPersmissionPaymentDay As Long 'Mennyi a max fizetési határidő 
    Private _NeedPermissionHRPerson As HRPerson 'Ki engedélyezheti

    Private _Controlling_Rows_Default As Controlling 'Bejövő megrendelési sorok alapértelmezett kontrolling száma, ha nem előleg !
    Private _Controlling_RowsOther_Default As Controlling 'Bejövő megrendelési egyéb sorok alapértelmezett kontrolling száma, ha nem előleg !
    Private _Controlling_InvoiceAdvance_Default As Controlling 'Bejövő megrendelési egyéb sorok alapértelmezett kontrolling száma, ha előleg !

    Private _WorkflowSystem As WorkflowSystem

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()

    End Sub
    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(ByVal value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    <RuleRequiredField("OrderInParameters-ShortName", DefaultContexts.Save)> _
    Property ShortName() As String
        Get
            Return _ShortName
        End Get
        Set(ByVal value As String)
            SetPropertyValue("ShortName", _ShortName, value)
        End Set
    End Property
    Property Description() As String
        Get
            Return _Description
        End Get
        Set(ByVal value As String)
            SetPropertyValue("Description", _Description, value)
        End Set
    End Property
    <RuleRequiredField("OrderInParameters-NumberGenerator", DefaultContexts.Save)> _
    Property NumberGenerator() As NumberGenerator
        Get
            Return _NumberGenerator
        End Get
        Set(ByVal value As NumberGenerator)
            SetPropertyValue("NumberGenerator", _NumberGenerator, value)
        End Set
    End Property
    Property NumberGeneratorAcknowledgement As NumberGenerator
        Get
            Return _NumberGeneratorAcknowledgement
        End Get
        Set(value As NumberGenerator)
            SetPropertyValue("NumberGeneratorAcknowledgement", _NumberGeneratorAcknowledgement, value)
        End Set
    End Property
    Property ReportData As ReportData
        Get
            Return _ReportData
        End Get
        Set(ByVal value As ReportData)
            SetPropertyValue("ReportData", _ReportData, value)
        End Set
    End Property
    Property ReportDataAcknowledgement As ReportData
        Get
            Return _ReportDataAcknowledgement
        End Get
        Set(value As ReportData)
            SetPropertyValue("ReportDataAcknowledgement", _ReportDataAcknowledgement, value)
        End Set
    End Property
    Property CurrencyName As CurrencyName
        Get
            Return _CurrencyName
        End Get
        Set(ByVal value As CurrencyName)
            SetPropertyValue("CurrencyName", _CurrencyName, value)
        End Set
    End Property
    Property CurrencyName_Invoice As CurrencyName
        Get
            Return _CurrencyName_Invoice
        End Get
        Set(value As CurrencyName)
            SetPropertyValue("CurrencyName_Invoice", _CurrencyName_Invoice, value)
        End Set
    End Property
    Property InvoiceType As InvoiceType
        Get
            Return _InvoiceType
        End Get
        Set(value As InvoiceType)
            SetPropertyValue("InvoiceType", _InvoiceType, value)
        End Set
    End Property
    Property InvoiceTypeAdvanced As InvoiceType
        Get
            Return _InvoiceTypeAdvanced
        End Get
        Set(value As InvoiceType)
            SetPropertyValue("InvoiceTypeAdvanced", _InvoiceTypeAdvanced, value)
        End Set
    End Property
    Property StorageMoveType As StorageMoveType
        Get
            Return _StorageMoveType
        End Get
        Set(value As StorageMoveType)
            SetPropertyValue("StorageMoveType", _StorageMoveType, value)
        End Set
    End Property
    Property IsAPCSheet As Boolean
        Get
            Return _IsAPCSheet
        End Get
        Set(value As Boolean)
            SetPropertyValue("IsAPCSheet", _IsAPCSheet, value)
        End Set
    End Property
    Property ExportMode As eExportMode
        Get
            Return _ExportMode
        End Get
        Set(value As eExportMode)
            SetPropertyValue("ExportMode", _ExportMode, value)
        End Set
    End Property
    Property QualityOption As QualityOption
        Get
            Return _QualityOption
        End Get
        Set(value As QualityOption)
            SetPropertyValue("QualityOption", _QualityOption, value)
        End Set
    End Property
    Property ShipmentOption As ShipmentOption
        Get
            Return _ShipmentOption
        End Get
        Set(value As ShipmentOption)
            SetPropertyValue("ShipmentOption", _ShipmentOption, value)
        End Set
    End Property
    Property PaymentOption As PaymentOption
        Get
            Return _PaymentOption
        End Get
        Set(value As PaymentOption)
            SetPropertyValue("PaymentOption", _PaymentOption, value)
        End Set
    End Property
    Property BankInformation As BankInformation
        Get
            Return _BankInformation
        End Get
        Set(value As BankInformation)
            SetPropertyValue("BankInformation", _BankInformation, value)
        End Set
    End Property

    Property NeedPermission As Boolean
        Get
            Return _NeedPermission
        End Get
        Set(value As Boolean)
            SetPropertyValue("NeedPermission", _NeedPermission, value)
        End Set
    End Property
    Property NeedPermissionToDeliveryNote As Boolean
        Get
            Return _NeedPermissionToDeliveryNote
        End Get
        Set(value As Boolean)
            SetPropertyValue("NeedPermissionToDeliveryNote", _NeedPermissionToDeliveryNote, value)
        End Set
    End Property
    Property NeedPermissionVolumeByCustomersHUF As Double
        Get
            Return _NeedPermissionVolumeByCustomersHUF
        End Get
        Set(value As Double)
            SetPropertyValue("NeedPermissionVolumeByCustomersHUF", _NeedPermissionVolumeByCustomersHUF, value)
        End Set
    End Property
    Property NeedPersmissionPaymentDay As Long
        Get
            Return _NeedPersmissionPaymentDay
        End Get
        Set(value As Long)
            SetPropertyValue("NeedPersmissionPaymentDay", _NeedPersmissionPaymentDay, value)
        End Set
    End Property
    Property NeedPermissionHRPerson As HRPerson
        Get
            Return _NeedPermissionHRPerson
        End Get
        Set(value As HRPerson)
            SetPropertyValue("NeedPermissionHRPerson", _NeedPermissionHRPerson, value)
        End Set
    End Property

    Property Controlling_Rows_Default As Controlling
        Get
            Return _Controlling_Rows_Default
        End Get
        Set(value As Controlling)
            SetPropertyValue("Controlling_Rows_Default", _Controlling_Rows_Default, value)
        End Set
    End Property
    Property Controlling_OtherRows_Default As Controlling
        Get
            Return _Controlling_RowsOther_Default
        End Get
        Set(value As Controlling)
            SetPropertyValue("Controlling_RowsOther_Default", _Controlling_RowsOther_Default, value)
        End Set
    End Property
    Property Controlling_InvoiceAdvance_Default As Controlling
        Get
            Return _Controlling_InvoiceAdvance_Default
        End Get
        Set(value As Controlling)
            SetPropertyValue("Controlling_InvoiceAdvance_Default", _Controlling_InvoiceAdvance_Default, value)
        End Set
    End Property

    Property WorkflowSystem As WorkflowSystem
        Get
            Return _WorkflowSystem
        End Get
        Set(value As WorkflowSystem)
            SetPropertyValue("WorkflowSystem", _WorkflowSystem, value)
        End Set
    End Property
End Class
