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 Imports DevExpress.ExpressApp.Editors ' _ _ _ _ _ Public Class RegistryRowsFinancial '-- Iktatórendszer sorai, ha p.ü. kapcsolat van. Inherits BaseObject Private _RegistryHeader As RegistryHeader Private _BruttoAmount As Double 'Bruttó összeg Private _Note As String 'Megjegyzés Private _VAT As VAT 'ÁFA kód Private _DateVAT As Date Private _F_ReadyforBookEntryRows As Boolean Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() If Me.RegistryHeader IsNot Nothing Then End If F_ReadyforBookEntryRows = False End Sub _ Property RegistryHeader() As RegistryHeader Get Return _RegistryHeader 'Me.RegistryHeader.CurrentWorkflowSystemSteps.StepFinancialType = eStepFinancialType.eCheckVAT End Get Set(ByVal value As RegistryHeader) SetPropertyValue("RegistryHeader", _RegistryHeader, value) If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving And value IsNot Nothing Then If IsDate(Me.RegistryHeader.F_DateVAT) Then DateVAT = Me.RegistryHeader.F_DateExecution End If End If End Set End Property _ Property BruttoAmount As Double Get Return _BruttoAmount End Get Set(ByVal value As Double) SetPropertyValue("BruttoAmount", _BruttoAmount, value) End Set End Property _ Property Note As String Get Return _Note End Get Set(ByVal value As String) End Set End Property _ _ Property VAT As VAT Get Return _VAT End Get Set(ByVal value As VAT) SetPropertyValue("VAT", _VAT, value) End Set End Property ReadOnly Property VATAmount As Double Get If Me.VAT IsNot Nothing Then Dim _VATAmount As Double = Me.BruttoAmount / (100 + Me.VAT.KeyValuePercent) * Me.VAT.KeyValuePercent Return Math.Round(_VATAmount, 0, MidpointRounding.AwayFromZero) Else Return 0 End If End Get End Property ReadOnly Property NettoAmount As Double Get If Me.VAT IsNot Nothing Then Return Me.BruttoAmount - Me.VATAmount End If End Get End Property Property DateVAT As Date Get Return _DateVAT End Get Set(ByVal value As Date) SetPropertyValue("DateVAT", _DateVAT, value) If Not Session.IsObjectsSaving And Not Session.IsObjectsLoading And Me.RegistryHeader IsNot Nothing Then If Not Me.RegistryHeader.F_DateVAT = value Then Me.RegistryHeader.F_DateVAT = value ' Me.RegistryHeader.Save() End If End If End Set End Property Property F_ReadyforBookEntryRows As Boolean Get Return _F_ReadyforBookEntryRows End Get Set(value As Boolean) SetPropertyValue("F_ReadyforBookEntryRows", _F_ReadyforBookEntryRows, value) End Set End Property End Class