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

<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<DeferredDeletion(False)> _
Public Class ABRQueryRowsDetail
    Inherits BaseObject
    Private _ABRQueryHeader As ABRQueryHeader
    Private _GLCardsHeader As GLCardsHeader
    Private _CustomersFrom As CustomersFrom 'Saját cég
    Private _Customers As Customers 'Partner
    Private _PartnerType As ePartnerType 'Partner tipusa
    Private _ConnectInfo As String 'Pontozási azonosító
    Private _DocumentNumber As String 'A számla száma
    Private _RegistryNumber As String 'A számla iktatószáma (ha vevő akkor megegyezik a számla számával)
    Private _DateExecution As Date 'A számla teljeítési dátuma
    Private _DatePayment As Date 'A számla fizetési határideje
    Private _CurrencyName_Account As CurrencyName 'A számla devizaneme
    Private _AmountHUF As Double = 0 'A számla összege HUF
    Private _AmountDEV As Double = 0 'Aszámla összege DEV
    Private _BallanceHUF As Double = 0 'A számla egyenlege HUF
    Private _BallanceDEV As Double = 0 'A számla devizanemében lévő egyenlege

    Private _D00_OpenLiquidHUF As Double = 0
    Private _D00_OpenLiquidDEV As Double = 0
    Private _D01_NotExpiredHUF As Double = 0 'Nem lejárt
    Private _D01_NotExpiredDEV As Double = 0
    Private _D02_001_015HUF As Double = 0 '1-15 napon belül
    Private _D02_001_015DEV As Double = 0
    Private _D03_016_030HUF As Double = 0
    Private _D03_016_030DEV As Double = 0
    Private _D04_031_060HUF As Double = 0
    Private _D04_031_060DEV As Double = 0
    Private _D05_061_090HUF As Double = 0
    Private _D05_061_090DEV As Double = 0
    Private _D06_091_150HUF As Double = 0
    Private _D06_091_150DEV As Double = 0
    Private _D07_151_365HUF As Double = 0
    Private _D07_151_365DEV As Double = 0
    Private _D08_OverOneYearHUF As Double = 0
    Private _D08_OverOneYearDEV As Double = 0

    Private _DelayedDay As Long

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
        ' This constructor is used when an object is loaded from a persistent storage.
        ' Do not place any code here or place it only when the IsLoading property is false:
        ' if (!IsLoading){
        '   It is now OK to place your initialization code here.
        ' }
        ' or as an alternative, move your initialization code into the AfterConstruction method.
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place here your initialization code.
    End Sub

    <Association("ABRQueryHeader-ABRQueryRowsDetail", GetType(ABRQueryHeader))> _
    Property ABRQueryHeader As ABRQueryHeader
        Get
            Return _ABRQueryHeader
        End Get
        Set(value As ABRQueryHeader)
            SetPropertyValue("ABRQueryHeader", _ABRQueryHeader, value)
        End Set
    End Property
    <Browsable(False)> _
    Property GLCardsHeader As GLCardsHeader
        Get
            Return _GLCardsHeader
        End Get
        Set(value As GLCardsHeader)
            SetPropertyValue("GLCardsHeader", _GLCardsHeader, value)
        End Set
    End Property
    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    Property Customers As Customers
        Get
            Return _Customers
        End Get
        Set(value As Customers)
            SetPropertyValue("Customers", _Customers, value)
        End Set
    End Property
    Property PartnerType As ePartnerType
        Get
            Return _PartnerType
        End Get
        Set(value As ePartnerType)
            SetPropertyValue("PartnerType", _PartnerType, value)
        End Set
    End Property
    Property ConnectInfo As String
        Get
            Return _ConnectInfo
        End Get
        Set(value As String)
            SetPropertyValue("ConnectInfo", _ConnectInfo, value)
        End Set
    End Property
    Property DocumentNumber As String
        Get
            Return _DocumentNumber
        End Get
        Set(value As String)
            SetPropertyValue("DocumentNumber", _DocumentNumber, value)
        End Set
    End Property
    Property RegistryNumber As String
        Get
            Return _RegistryNumber
        End Get
        Set(value As String)
            SetPropertyValue("RegistryNumber", _RegistryNumber, value)
        End Set
    End Property
    Property DateExecution As Date
        Get
            Return _DateExecution
        End Get
        Set(value As Date)
            SetPropertyValue("DateExecution", _DateExecution, value)
        End Set
    End Property
    Property DatePayment As Date
        Get
            Return _DatePayment
        End Get
        Set(value As Date)
            SetPropertyValue("DatePayment", _DatePayment, value)
        End Set
    End Property
    Property CurrencyName_Account As CurrencyName
        Get
            Return _CurrencyName_Account
        End Get
        Set(value As CurrencyName)
            SetPropertyValue("CurrencyName_Account", _CurrencyName_Account, value)
        End Set
    End Property
    Property AmountHUF As Double
        Get
            Return _AmountHUF
        End Get
        Set(value As Double)
            SetPropertyValue("AmountHUF", _AmountHUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property AmountDEV As Double
        Get
            Return _AmountDEV
        End Get
        Set(value As Double)
            SetPropertyValue("AmountDEV", _AmountDEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property BallanceHUF As Double
        Get
            Return _BallanceHUF
        End Get
        Set(value As Double)
            SetPropertyValue("BallanceHUF", _BallanceHUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property BallanceDEV As Double
        Get
            Return _BallanceDEV
        End Get
        Set(value As Double)
            SetPropertyValue("BallanceDEV", _BallanceDEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property

    Property D00_OpenLiquidHUF As Double
        Get
            Return _D00_OpenLiquidHUF
        End Get
        Set(value As Double)
            SetPropertyValue("D00_OpenLiquidHUF", _D00_OpenLiquidHUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D00_OpenLiquidDEV As Double
        Get
            Return _D00_OpenLiquidDEV
        End Get
        Set(value As Double)
            SetPropertyValue("D00_OpenLiquidDEV", _D00_OpenLiquidDEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D01_NotExpiredHUF As Double
        Get
            Return _D01_NotExpiredHUF
        End Get
        Set(value As Double)
            SetPropertyValue("D01_NotExpiredHUF", _D01_NotExpiredHUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D01_NotExpiredDEV As Double
        Get
            Return _D01_NotExpiredDEV
        End Get
        Set(value As Double)
            SetPropertyValue("D01_NotExpiredDEV", _D01_NotExpiredDEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D02_001_015HUF As Double
        Get
            Return _D02_001_015HUF
        End Get
        Set(value As Double)
            SetPropertyValue("D02_001_015HUF", _D02_001_015HUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D02_001_015DEV As Double
        Get
            Return _D02_001_015DEV
        End Get
        Set(value As Double)
            SetPropertyValue("D02_001_015DEV", _D02_001_015DEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D03_016_030HUF As Double
        Get
            Return _D03_016_030HUF
        End Get
        Set(value As Double)
            SetPropertyValue("D03_016_030HUF", _D03_016_030HUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D03_016_030DEV As Double
        Get
            Return _D03_016_030DEV
        End Get
        Set(value As Double)
            SetPropertyValue("D03_016_030DEV", _D03_016_030DEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D04_031_060HUF As Double
        Get
            Return _D04_031_060HUF
        End Get
        Set(value As Double)
            SetPropertyValue("D04_031_060HUF", _D04_031_060HUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D04_031_060DEV As Double
        Get
            Return _D04_031_060DEV
        End Get
        Set(value As Double)
            SetPropertyValue("D04_031_060DEV", _D04_031_060DEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D05_061_090HUF As Double
        Get
            Return _D05_061_090HUF
        End Get
        Set(value As Double)
            SetPropertyValue("D05_061_090HUF", _D05_061_090HUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D05_061_090DEV As Double
        Get
            Return _D05_061_090DEV
        End Get
        Set(value As Double)
            SetPropertyValue("D05_061_090DEV", _D05_061_090DEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D06_091_150HUF As Double
        Get
            Return _D06_091_150HUF
        End Get
        Set(value As Double)
            SetPropertyValue("D06_091_150HUF", _D06_091_150HUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D06_091_150DEV As Double
        Get
            Return _D06_091_150DEV
        End Get
        Set(value As Double)
            SetPropertyValue("D06_091_150DEV", _D06_091_150DEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D07_151_365HUF As Double
        Get
            Return _D07_151_365HUF
        End Get
        Set(value As Double)
            SetPropertyValue("D07_151_365HUF", _D07_151_365HUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D07_151_365DEV As Double
        Get
            Return _D07_151_365DEV
        End Get
        Set(value As Double)
            SetPropertyValue("D07_151_365DEV", _D07_151_365DEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D08_OverOneYearHUF As Double
        Get
            Return _D08_OverOneYearHUF
        End Get
        Set(value As Double)
            SetPropertyValue("D08_OverOneYearHUF", _D08_OverOneYearHUF, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property D08_OverOneYearDEV As Double
        Get
            Return _D08_OverOneYearDEV
        End Get
        Set(value As Double)
            SetPropertyValue("D08_OverOneYearDEV", _D08_OverOneYearDEV, Math.Round(value, 2, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property DelayedDay As Long
        Get
            Return _DelayedDay
        End Get
        Set(ByVal value As Long)
            SetPropertyValue("DelayedDay", _DelayedDay, value)
        End Set
    End Property

End Class
