First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,213 @@
Partial Class GLBaseVC
<System.Diagnostics.DebuggerNonUserCode()> _
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
MyClass.New()
'Required for Windows.Forms Class Composition Designer support
Container.Add(Me)
End Sub
'Component overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.aGLBaseOpenDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLRowsRepairYear = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aRepairNoDetails = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aDown_GLRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLBaseDivideRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aGLBaseOpenAttachments = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aPCICheck_GLRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aViewGLDetail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aReconfigureGLDetail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aDeleteGLRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLRowsNormalToPartner = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aUp_GLRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLBaseViewPCIDetail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aGLBaseOpenDocument
'
Me.aGLBaseOpenDocument.Caption = "View document"
Me.aGLBaseOpenDocument.Category = "View"
Me.aGLBaseOpenDocument.ConfirmationMessage = Nothing
Me.aGLBaseOpenDocument.Id = "aGLBaseOpenDocument"
Me.aGLBaseOpenDocument.ImageName = "Action_Open"
Me.aGLBaseOpenDocument.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLBaseOpenDocument.TargetViewId = ""
Me.aGLBaseOpenDocument.ToolTip = Nothing
'
'aGLRowsRepairYear
'
Me.aGLRowsRepairYear.Caption = "aGLRows Repair Year"
Me.aGLRowsRepairYear.ConfirmationMessage = Nothing
Me.aGLRowsRepairYear.Id = "aGLRowsRepairYear"
Me.aGLRowsRepairYear.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aGLRowsRepairYear.TargetViewId = "GLRows_ListView_Error"
Me.aGLRowsRepairYear.ToolTip = Nothing
'
'aRepairNoDetails
'
Me.aRepairNoDetails.Caption = "aRepair No Details"
Me.aRepairNoDetails.ConfirmationMessage = Nothing
Me.aRepairNoDetails.Id = "aRepairNoDetails"
Me.aRepairNoDetails.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aRepairNoDetails.TargetViewId = "GLRows_ListView_Error_NoDetails"
Me.aRepairNoDetails.ToolTip = Nothing
'
'aDown_GLRows
'
Me.aDown_GLRows.Caption = "Down"
Me.aDown_GLRows.Category = "RecordsNavigation"
Me.aDown_GLRows.ConfirmationMessage = Nothing
Me.aDown_GLRows.Id = "aDown_GLRows"
Me.aDown_GLRows.ImageName = "arrow_down_green"
Me.aDown_GLRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aDown_GLRows.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aDown_GLRows.TargetViewId = ""
Me.aDown_GLRows.TargetViewNesting = DevExpress.ExpressApp.Nesting.Nested
Me.aDown_GLRows.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aDown_GLRows.ToolTip = Nothing
Me.aDown_GLRows.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aGLBaseDivideRows
'
Me.aGLBaseDivideRows.AcceptButtonCaption = Nothing
Me.aGLBaseDivideRows.CancelButtonCaption = Nothing
Me.aGLBaseDivideRows.Caption = "Divide rows"
Me.aGLBaseDivideRows.Category = "Edit"
Me.aGLBaseDivideRows.ConfirmationMessage = Nothing
Me.aGLBaseDivideRows.Id = "aGLBaseDivideRows"
Me.aGLBaseDivideRows.ImageName = "row_add_after"
Me.aGLBaseDivideRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLBaseDivideRows.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aGLBaseDivideRows.TargetViewId = ""
Me.aGLBaseDivideRows.ToolTip = Nothing
'
'aGLBaseOpenAttachments
'
Me.aGLBaseOpenAttachments.Caption = "View document"
Me.aGLBaseOpenAttachments.Category = "View"
Me.aGLBaseOpenAttachments.ConfirmationMessage = Nothing
Me.aGLBaseOpenAttachments.Id = "aGLBaseOpenAttachments"
Me.aGLBaseOpenAttachments.ImageName = "Action_Open"
Me.aGLBaseOpenAttachments.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLBaseOpenAttachments.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aGLBaseOpenAttachments.TargetViewId = ""
Me.aGLBaseOpenAttachments.ToolTip = Nothing
'
'aPCICheck_GLRows
'
Me.aPCICheck_GLRows.Caption = "aPCICheck_GLRows"
Me.aPCICheck_GLRows.ConfirmationMessage = "Do you want to execute ?"
Me.aPCICheck_GLRows.Id = "aPCICheck_GLRows"
Me.aPCICheck_GLRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aPCICheck_GLRows.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aPCICheck_GLRows.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aPCICheck_GLRows.ToolTip = Nothing
Me.aPCICheck_GLRows.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aViewGLDetail
'
Me.aViewGLDetail.Caption = "aView GLDetail"
Me.aViewGLDetail.ConfirmationMessage = Nothing
Me.aViewGLDetail.Id = "aViewGLDetail"
Me.aViewGLDetail.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aViewGLDetail.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aViewGLDetail.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aViewGLDetail.ToolTip = Nothing
Me.aViewGLDetail.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aReconfigureGLDetail
'
Me.aReconfigureGLDetail.Caption = "aReconfigure GLDetail"
Me.aReconfigureGLDetail.ConfirmationMessage = "Are you sure ?"
Me.aReconfigureGLDetail.Id = "aReconfigureGLDetail"
Me.aReconfigureGLDetail.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aReconfigureGLDetail.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aReconfigureGLDetail.ToolTip = Nothing
Me.aReconfigureGLDetail.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aDeleteGLRows
'
Me.aDeleteGLRows.Caption = "aDelete GLRows"
Me.aDeleteGLRows.ConfirmationMessage = "Are you sure ?"
Me.aDeleteGLRows.Id = "aDeleteGLRows"
Me.aDeleteGLRows.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aDeleteGLRows.TargetViewNesting = DevExpress.ExpressApp.Nesting.Root
Me.aDeleteGLRows.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aDeleteGLRows.ToolTip = Nothing
Me.aDeleteGLRows.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aGLRowsNormalToPartner
'
Me.aGLRowsNormalToPartner.AcceptButtonCaption = Nothing
Me.aGLRowsNormalToPartner.CancelButtonCaption = Nothing
Me.aGLRowsNormalToPartner.Caption = "aGLRows Normal To Partner"
Me.aGLRowsNormalToPartner.ConfirmationMessage = Nothing
Me.aGLRowsNormalToPartner.Id = "aGLRowsNormalToPartner"
Me.aGLRowsNormalToPartner.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLRowsNormalToPartner.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aGLRowsNormalToPartner.ToolTip = Nothing
'
'aUp_GLRows
'
Me.aUp_GLRows.Caption = "Up"
Me.aUp_GLRows.Category = "RecordsNavigation"
Me.aUp_GLRows.ConfirmationMessage = Nothing
Me.aUp_GLRows.Id = "aUp_GLRows"
Me.aUp_GLRows.ImageName = "arrow_up_green"
Me.aUp_GLRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aUp_GLRows.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aUp_GLRows.TargetViewId = ""
Me.aUp_GLRows.TargetViewNesting = DevExpress.ExpressApp.Nesting.Nested
Me.aUp_GLRows.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aUp_GLRows.ToolTip = Nothing
Me.aUp_GLRows.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aGLBaseViewPCIDetail
'
Me.aGLBaseViewPCIDetail.Caption = "aGLBaseViewPCIDetail"
Me.aGLBaseViewPCIDetail.Category = "View"
Me.aGLBaseViewPCIDetail.ConfirmationMessage = Nothing
Me.aGLBaseViewPCIDetail.Id = "aGLBaseViewPCIDetail"
Me.aGLBaseViewPCIDetail.ImageName = ""
Me.aGLBaseViewPCIDetail.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLBaseViewPCIDetail.TargetObjectType = GetType(Nuvolar.[Module].GLRows)
Me.aGLBaseViewPCIDetail.TargetViewId = ""
Me.aGLBaseViewPCIDetail.TargetViewNesting = DevExpress.ExpressApp.Nesting.Root
Me.aGLBaseViewPCIDetail.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aGLBaseViewPCIDetail.ToolTip = Nothing
Me.aGLBaseViewPCIDetail.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aGLBaseDivideRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGLBaseOpenDocument As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGLBaseOpenAttachments As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPCICheck_GLRows As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aViewGLDetail As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aReconfigureGLDetail As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aDeleteGLRows As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGLRowsNormalToPartner As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGLRowsRepairYear As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aRepairNoDetails As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aUp_GLRows As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aDown_GLRows As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGLBaseViewPCIDetail As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="aGLBaseOpenDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aGLRowsRepairYear.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aRepairNoDetails.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aDown_GLRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="aGLBaseDivideRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 290</value>
</metadata>
<metadata name="aGLBaseOpenAttachments.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 329</value>
</metadata>
<metadata name="aPCICheck_GLRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 368</value>
</metadata>
<metadata name="aViewGLDetail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 446</value>
</metadata>
<metadata name="aReconfigureGLDetail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 407</value>
</metadata>
<metadata name="aDeleteGLRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aGLRowsNormalToPartner.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aUp_GLRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>302, 373</value>
</metadata>
<metadata name="aGLBaseViewPCIDetail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>147, 446</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,632 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.ExpressApp.SystemModule
Imports System.IO
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo.DB
Public Class GLBaseVC
Inherits DevExpress.ExpressApp.ViewController
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
Public Event DoWork()
Public Event FinalWork
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
'-- Sor módosító letiltása
Frame.GetController(Of GLBaseVC).aGLBaseDivideRows.Active.SetItemValue("", False)
Frame.GetController(Of GLBaseVC).aGLBaseOpenDocument.Active.SetItemValue("", False)
Frame.GetController(Of GLBaseVC).aGLBaseViewPCIDetail.Active.SetItemValue("", False)
Frame.GetController(Of GLBaseVC).aGLBaseDivideRows.TargetObjectType = GetType(Nuvolar.Module.GLRows)
Frame.GetController(Of GLBaseVC).aGLBaseDivideRows.TargetObjectsCriteria = "GLHeader.GLDocumentType='eGLBank' or GLHeader.GLDocumentType='eGLCassa' or GLHeader.GLDocumentType='eGLCompensation' or GLHeader.GLDocumentType='eGLMixed'"
Frame.GetController(Of GLBaseVC).aGLBaseOpenAttachments.Active.SetItemValue("", False)
If View.Id = "GLRows_ListView_Bank" Or _
View.Id = "GLRows_ListView_Cassa" Or _
View.Id = "GLRows_ListView_Mixed" Or _
View.Id = "GLRows_ListView_All" Or _
View.Id = "GLRows_ListView_Compensation" Then
Frame.GetController(Of GLBaseVC).aGLBaseDivideRows.Active.SetItemValue("", True)
Frame.GetController(Of GLBaseVC).aGLBaseOpenDocument.Active.SetItemValue("", True)
Frame.GetController(Of GLBaseVC).aGLBaseOpenAttachments.Active.SetItemValue("", True)
Frame.GetController(Of GLBaseVC).aGLBaseViewPCIDetail.Active.SetItemValue("", True)
End If
If View.Id Like "GLRows_ListView_*" Then
Frame.GetController(Of GLBaseVC).aGLBaseOpenDocument.Active.SetItemValue("", True)
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
'Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
End If
If View.Id = "GLRows_ListView_Error_NoDetails" Then
Dim _ListView As ListView = TryCast(View, ListView)
_ListView.CollectionSource.BeginUpdateCriteria()
_ListView.CollectionSource.Criteria("First") = CriteriaOperator.Parse(GetFilterforNoDetails())
_ListView.CollectionSource.EndUpdateCriteria()
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id Like "GLRows_ListView_*" Then
Frame.GetController(Of GLBaseVC).aGLBaseOpenDocument.Active.SetItemValue("", True)
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
End Sub
Private Sub aGLBaseDivideRows_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aGLBaseDivideRows.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _GLRowsDivideH As GLRowsDivideH = _onew.CreateObject(Of GLRowsDivideH)()
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
_GLRowsDivideH.GLRows_Oid = _GLRows.Oid
_GLRowsDivideH.row_Customers = _onew.GetObject(_GLRows.Customer)
_GLRowsDivideH.row_PartnerType = _GLRows.PartnerType
e.View = Application.CreateDetailView(_onew, "GLRowsDivideH_DetailView_ConnectionDivide", False, _GLRowsDivideH)
Else
_GLRowsDivideH.GLRows_Oid = _GLRows.Oid
_GLRowsDivideH.row_PartnerType = ePartnerType.eNotSet
e.View = Application.CreateDetailView(_onew, "GLRowsDivideH_DetailView", False, _GLRowsDivideH)
End If
End If
End Sub
Private Sub aGLBaseDivideRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aGLBaseDivideRows.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(e.PopupWindow.View.SelectedObjects(0), GLRowsDivideH)
If _GLRows IsNot Nothing Then
_GLRows.DivideRows(_ocur, _GLRows, _GLRowsDivideH, True)
End If
End Sub
Private Sub aGLBaseOpenDocument_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGLBaseOpenDocument.Execute
'-- Karton sorához tartozó eredeti dokumentum megnyitása
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, _onew.GetObject(_GLRows.GLHeader))
End If
End Sub
Private Sub aGLBaseOpenAttachments_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGLBaseOpenAttachments.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
If _GLRows.GLHeader IsNot Nothing Then
Select Case _GLRows.GLHeader.GLDocumentType
Case eGLDocumentType.eGLAccount
Dim _GLAccounts As GLAccounts = _ocur.GetObjectByKey(Of GLAccounts)(_GLRows.GLHeader.Oid)
If _GLAccounts IsNot Nothing Then
If _GLAccounts.ImportedRegistryHeader IsNot Nothing Then
Dim _RegistryHeader As RegistryHeader = _ocur.GetObjectByKey(Of RegistryHeader)(_GLAccounts.ImportedRegistryHeader.Oid)
If _RegistryHeader IsNot Nothing Then
If _RegistryHeader.DocumentFile IsNot Nothing Then
ProcessDocument(_RegistryHeader.DocumentFile)
End If
End If
End If
If _GLAccounts.ImportedInvoice IsNot Nothing Then
Dim _InvoiceHeader As InvoiceHeader = _ocur.GetObjectByKey(Of InvoiceHeader)(_GLAccounts.ImportedInvoice.Oid)
If _InvoiceHeader IsNot Nothing Then
If _InvoiceHeader.PDF_Copy IsNot Nothing Then
ProcessDocument(_InvoiceHeader.PDF_Copy)
End If
If _InvoiceHeader.PDF_Copy Is Nothing Then
ViewAttachments.ViewAttachments(_ocur, Frame, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, _InvoiceHeader.DocumentNumber, "")
End If
End If
End If
End If
Case eGLDocumentType.eGLBank
Dim _GLBank As GLBank = _ocur.GetObjectByKey(Of GLBank)(_GLRows.GLHeader.Oid)
Case eGLDocumentType.eGLCassa
Dim _GLCassa As GLCassa = _ocur.GetObjectByKey(Of GLCassa)(_GLRows.GLHeader.Oid)
_GLCassa.PrintCassaDocument(_GLCassa, _ocur, Frame)
Case (eGLDocumentType.eGLCompensation)
Dim _GLCompensation As GLCompensation = _ocur.GetObjectByKey(Of GLCompensation)(_GLRows.GLHeader.Oid)
Case eGLDocumentType.eGLMixed
Dim _GLMixed As GLMixed = _ocur.GetObjectByKey(Of GLMixed)(_GLRows.GLHeader.Oid)
If _GLMixed IsNot Nothing Then
If _GLMixed.DocumentFile IsNot Nothing Then
ProcessDocument(_GLMixed.DocumentFile)
End If
End If
End Select
End If
End If
End Sub
Private Sub ProcessDocument(_DocumentFile As FileData)
Dim _FilePath As String = Path.Combine(Path.GetTempPath(), _DocumentFile.FileName)
Dim _Stream As Stream = New FileStream(_FilePath, FileMode.Create)
_DocumentFile.SaveToStream(_Stream)
_Stream.Close()
Process.Start(_FilePath)
End Sub
Private Sub aPCICheck_GLRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPCICheck_GLRows.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
Dim _GLRows As GLRows
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
For Each _GLRows In View.SelectedObjects
If _GLRows.PartnerType <> ePartnerType.eNotSet Then
RaiseEvent DoWork()
ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
End If
Next
RaiseEvent FinalWork
End Sub
Private Sub aViewGLDetail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewGLDetail.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
Dim _CS As New CollectionSource(_onew, GetType(GLDetails))
_CS.BeginUpdateCriteria()
_CS.Criteria.Clear()
_CS.Criteria("First") = CriteriaOperator.Parse("GLRows.Oid=?", _GLRows.Oid)
_CS.EndUpdateCriteria()
e.ShowViewParameters.CreatedView = Application.CreateListView("GLDetails_ListView", _CS, False)
End If
End Sub
Private Sub aReconfigureGLDetail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aReconfigureGLDetail.Execute
'// Csak SysAdmin használhatja
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
Dim _CurrentUser As User = _ocur.Session.GetObjectByKey(Of User)(_ocur.Session.GetKeyValue(SecuritySystem.CurrentUser))
If _CurrentUser.UserName <> "SysAdmin" Then
Exit Sub
End If
Dim _GLDetail_Collection As New XPCollection(Of GLDetails)(_uow)
_uow.Delete(_GLDetail_Collection)
Dim _GLDetail As GLDetails
Dim _GLRows As GLRows
Dim _GLRows_Collection As New XPCollection(Of GLRows)(_uow)
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
For Each _GLRows In _GLRows_Collection
RaiseEvent DoWork()
_GLDetail = New GLDetails(_uow)
_GLDetail.GLRows = _GLRows
_GLDetail.AmountDEV = _GLRows.AmountDEV
_GLDetail.AmountHUF = _GLRows.AmountHUF
_GLDetail.Side = "T"
_GLDetail.ChartOfAccounts = _GLRows.DebitChartOfAccounts
_GLDetail = New GLDetails(_uow)
_GLDetail.GLRows = _GLRows
_GLDetail.AmountDEV = _GLRows.AmountDEV
_GLDetail.AmountHUF = _GLRows.AmountHUF
_GLDetail.Side = "K"
_GLDetail.ChartOfAccounts = _GLRows.CreditChartOfAccounts
_uow.CommitChanges()
Next
_uow.CommitChanges()
RaiseEvent FinalWork
End Sub
Private Sub aReconfigureRowsDateExecution_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs)
'Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
'Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
'Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
'Dim _InvoiceRows_Collection As New XPCollection(Of InvoiceRows)(_uow, CriteriaOperator.Parse("isnull(InvoiceHeader)=False and isnull(DateExecution)=True"))
'Dim _InvoiceRows As InvoiceRows
'RaiseEvent InitWork(1, 1, _InvoiceRows_Collection.Count)
'For Each _InvoiceRows In _InvoiceRows_Collection
' RaiseEvent DoWork()
' _InvoiceRows.DateExecution = _InvoiceRows.InvoiceHeader.DateExecution
'Next
'RaiseEvent FinalWork
'_uow.CommitChanges()
'Dim _RegistryRowsFinancialControlling_Collection As New XPCollection(Of RegistryRowsFinancialControlling)(_uow, CriteriaOperator.Parse("isnull(DateExecution)=True and isnull(RegistryHeader)=False and RegistryHeader.IsEditable=False and RegistryHeader.RegistryType.RegistryMainType in ('eAccount')"))
'Dim _RegistryRowsFinancialControlling As RegistryRowsFinancialControlling
'For Each _RegistryRowsFinancialControlling In _RegistryRowsFinancialControlling_Collection
' RaiseEvent DoWork()
' _RegistryRowsFinancialControlling.DateExecution = _RegistryRowsFinancialControlling.RegistryHeader.F_DateExecution
'Next
'RaiseEvent FinalWork
'_uow.CommitChanges()
'Dim _GLRows_Collection As New XPCollection(Of GLRows)(_uow, CriteriaOperator.Parse("isnull(GLHeader)=False and isnull(DateExecution)=True"))
'Dim _GLRows As GLRows
'RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
'For Each _GLRows In _GLRows_Collection
' RaiseEvent DoWork()
' _GLRows.DateExecution = _GLRows.GLHeader.DateExecution
'Next
'RaiseEvent FinalWork
'_uow.CommitChanges()
'Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
End Sub
Private Sub aDeleteGLRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aDeleteGLRows.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
Dim _GLRows As GLRows
Dim _CustomersFrom As CustomersFrom
Dim _Customers As Customers
Dim _PartnerType As ePartnerType
Dim _ConnectInfo As String
Dim _GLAccountsRevaluations As GLAccountsRevaluations
For Each _GLRows In View.SelectedObjects
_CustomersFrom = _GLRows.GLHeader.CustomersFrom
_Customers = _GLRows.Customer
_PartnerType = _GLRows.PartnerType
_ConnectInfo = _GLRows.ConnectInfo
_GLAccountsRevaluations = _ocur.FindObject(Of GLAccountsRevaluations)(CriteriaOperator.Parse("GLRows.Oid=?", _GLRows.Oid)
)
If _GLAccountsRevaluations IsNot Nothing Then
_ocur.Delete(_GLAccountsRevaluations)
End If
_ocur.Delete(_GLRows)
_ocur.CommitChanges()
GLFunctions.ReconfigurePCI(_uow, _CustomersFrom, _Customers, _PartnerType, _ConnectInfo)
_uow.CommitChanges()
Next
End Sub
Private Sub aGLRowsNormalToPartner_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aGLRowsNormalToPartner.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _GLRowsNormalToPartnerPopup As GLRowsNormalToPartnerPopup
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
_GLRowsNormalToPartnerPopup = _onew.CreateObject(Of GLRowsNormalToPartnerPopup)()
_GLRowsNormalToPartnerPopup.PartnerType = ePartnerType.eNotSet
_GLRowsNormalToPartnerPopup.Customers = _onew.GetObject(_GLRows.Customer)
_GLRowsNormalToPartnerPopup.ConnectInfo = _GLRows.ConnectInfo
e.View = Application.CreateDetailView(_onew, "GLRowsNormalToPartnerPopup_DetailView", True, _GLRowsNormalToPartnerPopup)
End If
End Sub
Private Sub aGLRowsNormalToPartner_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aGLRowsNormalToPartner.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRowsNormalToPartnerPopup = TryCast(e.PopupWindow.View.SelectedObjects(0), GLRowsNormalToPartnerPopup)
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
Dim _GLBank As GLBank = TryCast(_GLRows.GLHeader, GLBank)
Dim _GLCassa As GLCassa = TryCast(_GLRows.GLHeader, GLCassa)
Dim _GLCompensation As GLCompensation = TryCast(_GLRows.GLHeader, GLCompensation)
If _GLRows IsNot Nothing Then
_GLRows.PartnerType = _GLRowsNormalToPartnerPopup.PartnerType
_GLRows.Customer = _ocur.GetObject(_GLRowsNormalToPartnerPopup.Customers)
_GLRows.ConnectInfo = _GLRowsNormalToPartnerPopup.ConnectInfo
_GLRows.TransactionType = _GLRowsNormalToPartnerPopup.TransactionType
If _GLBank IsNot Nothing Then
If _GLRows.PartnerType = ePartnerType.eReceivables Then
If _GLRows.TransactionType = eTransactionType.ePartnerCredit Then
_GLRows.DebitChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
_GLRows.CreditChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eOut)
ElseIf _GLRows.TransactionType = eTransactionType.ePartnerDebit Then
_GLRows.DebitChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eOut)
_GLRows.CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
End If
Else
If _GLRows.TransactionType = eTransactionType.ePartnerCredit Then
_GLRows.DebitChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
_GLRows.CreditChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eIn)
ElseIf _GLRows.TransactionType = eTransactionType.ePartnerDebit Then
_GLRows.DebitChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eIn)
_GLRows.CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
End If
End If
End If
If _GLCassa IsNot Nothing Then
If _GLRows.PartnerType = ePartnerType.eReceivables Then
If _GLRows.TransactionType = eTransactionType.ePartnerCredit Then
_GLRows.DebitChartOfAccounts = _GLCassa.LiquidAssets_Cassa.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
_GLRows.CreditChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCassa.DateExecution.Year, eVATMode.eOut)
ElseIf _GLRows.TransactionType = eTransactionType.ePartnerDebit Then
_GLRows.DebitChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCassa.DateExecution.Year, eVATMode.eOut)
_GLRows.CreditChartOfAccounts = _GLCassa.LiquidAssets_Cassa.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
End If
Else
If _GLRows.TransactionType = eTransactionType.ePartnerCredit Then
_GLRows.DebitChartOfAccounts = _GLCassa.LiquidAssets_Cassa.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
_GLRows.CreditChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCassa.DateExecution.Year, eVATMode.eIn)
ElseIf _GLRows.TransactionType = eTransactionType.ePartnerDebit Then
_GLRows.DebitChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCassa.DateExecution.Year, eVATMode.eIn)
_GLRows.CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
End If
End If
End If
If _GLCompensation IsNot Nothing Then
If _GLRows.PartnerType = ePartnerType.eReceivables Then
If _GLRows.TransactionType = eTransactionType.ePartnerCredit Then
_GLRows.DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_GLRows.CreditChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eOut)
ElseIf _GLRows.TransactionType = eTransactionType.ePartnerDebit Then
_GLRows.DebitChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eOut)
_GLRows.CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
End If
Else
If _GLRows.TransactionType = eTransactionType.ePartnerCredit Then
_GLRows.DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_GLRows.CreditChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eIn)
ElseIf _GLRows.TransactionType = eTransactionType.ePartnerDebit Then
_GLRows.DebitChartOfAccounts = _GLRows.Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eIn)
_GLRows.CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
End If
End If
End If
_ocur.CommitChanges()
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
End If
End Sub
Private Sub aGLRowsRepairYear_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGLRowsRepairYear.Execute
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _GLRows As GLRows
Dim _ChartOfAccounts As ChartOfAccounts
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
For Each _GLRows In View.SelectedObjects
RaiseEvent DoWork()
_GLRows = _onew.GetObject(_GLRows)
If _GLRows.GLHeader IsNot Nothing Then
If _GLRows.GLHeader.DateExecution.Year <> _GLRows.DebitChartOfAccounts.AccountYear Then
_ChartOfAccounts = _onew.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=? and AccountYear=?", _GLRows.DebitChartOfAccounts.AccountNumber, _GLRows.GLHeader.DateExecution.Year))
If _ChartOfAccounts IsNot Nothing Then
_GLRows.DebitChartOfAccounts = _ChartOfAccounts
End If
End If
If _GLRows.GLHeader.DateExecution.Year <> _GLRows.CreditChartOfAccounts.AccountYear Then
_ChartOfAccounts = _onew.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountNumber=? and AccountYear=?", _GLRows.CreditChartOfAccounts.AccountNumber, _GLRows.GLHeader.DateExecution.Year))
If _ChartOfAccounts IsNot Nothing Then
_GLRows.CreditChartOfAccounts = _ChartOfAccounts
End If
End If
End If
Next
_onew.CommitChanges()
RaiseEvent FinalWork
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
End Sub
Private Function GetFilterforNoDetails() As String
Dim _SQL As String = ""
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
Dim _SelectStatementResultRow As SelectStatementResultRow
Dim _SelectedData As DevExpress.Xpo.DB.SelectedData = Nothing
Dim _return As String = ""
Select Case GLOBAL_SQLType
Case eSQLType.MySQL, eSQLType.MSSQL
_SQL = " SELECT t1.Oid,COUNT(t2.Oid)"
_SQL += " FROM GLRows t1 LEFT JOIN GLDetails t2 ON"
_SQL += " t1.Oid=t2.GLRows JOIN GLHeader t3 ON"
_SQL += " t1.GLHeader = t3.Oid"
_SQL += " WHERE t3.IsEditable = 0"
_SQL += " GROUP BY t1.Oid"
_SQL += " HAVING COUNT(t2.Oid) <> 2"
Case eSQLType.PostgreSQL
_SQL = " SELECT t1.""Oid"",COUNT(t2.""Oid"")"
_SQL += " FROM ""GLRows"" t1 LEFT JOIN ""GLDetails"" t2 ON"
_SQL += " t1.""Oid""=t2.""GLRows"" JOIN ""GLHeader"" t3 ON"
_SQL += " t1.""GLHeader"" = t3.""Oid"""
_SQL += " WHERE t3.""IsEditable"" = 0"
_SQL += " GROUP BY t1.""Oid"""
_SQL += " HAVING COUNT(t2.""Oid"") <> 2"
End Select
_SelectedData = _uow.ExecuteQuery(_SQL)
If _SelectedData.ResultSet.Length > 0 Then
For Each _SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
If _return = "" Then
_return = "'" & _SelectStatementResultRow.Values(0).ToString & "'"
Else
_return += ",'" & _SelectStatementResultRow.Values(0).ToString & "'"
End If
Next
End If
Return "Oid in (" & _return & ")"
End Function
Private Sub aRepairNoDetails_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aRepairNoDetails.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
Dim _GLRows As GLRows
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
For Each _GLRows In View.SelectedObjects
RaiseEvent DoWork()
Dim _GLDetail_Collection As New XPCollection(Of GLDetails)(_uow, CriteriaOperator.Parse("GLRows.Oid=?", _GLRows.Oid.ToString))
_uow.Delete(_GLDetail_Collection)
Dim _GLDetail As GLDetails
_GLDetail = New GLDetails(_uow)
_GLDetail.GLRows = _uow.GetObjectByKey(Of GLRows)(_GLRows.Oid)
_GLDetail.AmountDEV = _GLRows.AmountDEV
_GLDetail.AmountHUF = _GLRows.AmountHUF
_GLDetail.Side = "T"
_GLDetail.ChartOfAccounts = _uow.GetObjectByKey(Of ChartOfAccounts)(_GLRows.DebitChartOfAccounts.Oid)
_GLDetail = New GLDetails(_uow)
_GLDetail.GLRows = _uow.GetObjectByKey(Of GLRows)(_GLRows.Oid)
_GLDetail.AmountDEV = _GLRows.AmountDEV
_GLDetail.AmountHUF = _GLRows.AmountHUF
_GLDetail.Side = "K"
_GLDetail.ChartOfAccounts = _uow.GetObjectByKey(Of ChartOfAccounts)(_GLRows.CreditChartOfAccounts.Oid)
_uow.CommitChanges()
Next
RaiseEvent FinalWork
End Sub
#Region "ROW INDEX"
Private Sub aDown_GLRows_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aDown_GLRows.Execute
' A kiválaszott sort egy sorral lejebb helyezi
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLHeader As GLHeader = TryCast(View.CurrentObject, GLRows).GLHeader
Dim _GLRowsSelected As GLRows
Dim _GLRowsPlus As GLRows = Nothing
Dim _GLRows As GLRows
Me.ReorderRows(_ocur, _GLHeader)
Try
_GLRowsSelected = TryCast(View.SelectedObjects(0), GLRows) ' Kiveszi a kijelölt sorok közül az elsõt
Catch
' TESZT MIATT!!!! ----------------------------------------------------------------
Throw New Exception("*Nincs sor kiválasztva, vagy nem a sor kijelölése az aktív!")
End Try
If _GLRowsSelected.RowIndex < _GLHeader.GLRows.Count - 1 Then
For Each _GLRows In _GLHeader.GLRows
If _GLRows.RowIndex = _GLRowsSelected.RowIndex + 1 Then
_GLRowsPlus = _GLRows
Exit For
End If
Next
If _GLRowsPlus IsNot Nothing Then
_GLRowsSelected.RowIndex += 1
_GLRowsPlus.RowIndex -= 1
End If
_ocur.CommitChanges()
TryCast(View, ListView).CollectionSource.Reload()
End If
End Sub
Private Sub aUp_GLRows_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aUp_GLRows.Execute
' A kiválaszott sort egy sorral feljebb helyezi
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLHeader As GLHeader = TryCast(View.SelectedObjects(0), GLRows).GLHeader
Dim _GLRowsSelected As GLRows
Dim _GLRowsMinus As GLRows = Nothing
Dim _GLRows As GLRows
Me.ReorderRows(_ocur, _GLHeader)
Try
_GLRowsSelected = TryCast(View.SelectedObjects(0), GLRows) ' Az editor egy listview, kiveszi az elsõ kijelölt sorát
Catch
' TESZT MIATT!!!! ----------------------------------------------------------------
Throw New Exception("*Nincs sor kiválasztva, vagy nem a sor kijelölése az aktív!")
End Try
If _GLRowsSelected.RowIndex > 0 Then
For Each _GLRows In _GLHeader.GLRows
If _GLRows.RowIndex = _GLRowsSelected.RowIndex - 1 Then
_GLRowsMinus = _GLRows
Exit For
End If
Next
If _GLRowsMinus IsNot Nothing Then
_GLRowsSelected.RowIndex -= 1
_GLRowsMinus.RowIndex += 1
End If
_ocur.CommitChanges()
TryCast(View, ListView).CollectionSource.Reload()
End If
End Sub
Private Sub ReorderRows(_ocur As Xpo.XPObjectSpace, _GLHeader As GLHeader)
Dim _NoOrder As Boolean = False
Dim _RowIndex As Long = 0
Dim _GLRows As GLRows
'//------------------------------------------------------------------------------------------
_GLHeader.GLRows.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Descending))
For Each _GLRows In _GLHeader.GLRows
If _GLRows.RowIndex <= 0 Then
_NoOrder = True
Exit For
End If
Exit For
Next
_GLHeader.GLRows.Sorting.RemoveAt(_GLHeader.GLRows.Sorting.Count - 1)
If _NoOrder Then
For Each _GLRows In _GLHeader.GLRows
_GLRows.RowIndex = _RowIndex
_RowIndex += 1
Next
End If
_ocur.CommitChanges()
'----------------------------------------------------------------------------------------------
End Sub
#End Region
Private Sub aGLBaseViewPCIDetail_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGLBaseViewPCIDetail.Execute
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
ViewPDCI.ViewPDCIDetail(_onew, Application, e, _GLRows.GLHeader.CustomersFrom, _
_GLRows.Customer, _GLRows.PartnerType, _
_GLRows.ConnectInfo)
End If
End Sub
End Class
@@ -0,0 +1,124 @@
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.Persistent.Base.General
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Linq
Imports System.Linq.Expressions
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<DeferredDeletion(False)> _
Public Class GLDetails
Inherits BaseObject
Private _GLRows As GLRows
Private _Side As String
Private _AmountHUF As Double
Private _AmountDEV As Double
Private _ChartOfAccounts As ChartOfAccounts
Private _AmountHUF_Rolling As Double ' Göngyölt egyenleg !
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Property GLRows As GLRows
Get
Return _GLRows
End Get
Set(ByVal value As GLRows)
SetPropertyValue("GLRows", _GLRows, value)
End Set
End Property
Property Side As String
Get
Return _Side
End Get
Set(ByVal value As String)
SetPropertyValue("Side", _Side, value)
End Set
End Property
Property AmountHUF As Double
Get
Return _AmountHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountHUF", _AmountHUF, value)
End Set
End Property
Property AmountDEV As Double
Get
Return _AmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountDEV", _AmountDEV, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property ChartOfAccounts As ChartOfAccounts
Get
Return _ChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
End Set
End Property
ReadOnly Property ChartsOfAccounts_Contra As ChartOfAccounts
Get
If Side = "T" Then
Return GLRows.CreditChartOfAccounts
Else
Return GLRows.DebitChartOfAccounts
End If
End Get
End Property
ReadOnly Property AmountHUFSign As Double
Get
Select Case Side
Case "T"
Return AmountHUF
Case "K"
Return AmountHUF * -1
Case Else
End Select
End Get
End Property
ReadOnly Property AmountHUF_Debit As Double
Get
If Side = "T" Then
Return AmountHUF
Else
Return 0
End If
End Get
End Property
ReadOnly Property AmountHUF_Credit As Double
Get
If Side = "K" Then
Return AmountHUF
Else
Return 0
End If
End Get
End Property
ReadOnly Property AmountHUF_Ballance As Double
Get
Return AmountHUF_Debit - AmountHUF_Credit
End Get
End Property
<NonPersistent>
Property AmountHUF_Rolling As Double
Get
Return _AmountHUF_Rolling
End Get
Set(value As Double)
SetPropertyValue("AmountHUF_Rolling", _AmountHUF_Rolling, value)
End Set
End Property
End Class
@@ -0,0 +1,48 @@
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)> _
Public Class GLFileData
Inherits FileAttachmentBase
Private _GLHeader As GLHeader
Private _DocumentType As String
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("GLHeader-GLFileData", GetType(GLHeader))> _
Property GLHeader As GLHeader
Get
Return _GLHeader
End Get
Set(value As GLHeader)
SetPropertyValue("GLHeader", _GLHeader, value)
End Set
End Property
Property DocumentType As String
Get
Return _DocumentType
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentType", _DocumentType, value)
End Set
End Property
End Class
@@ -0,0 +1,810 @@
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.Persistent.Base.General
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Linq
Imports System.Linq.Expressions
Imports DevExpress.ExpressApp.ConditionalAppearance
Imports DevExpress.Xpo.DB
'<EditorStateRuleAttribute("Hide DEV properties when HUF is selected in GeneralLedger", "CurrencyRate; row_AmountDEV", EditorState.Hidden, "CurrencyName.ShortName = 'HUF' and GLDocumentType in (0,1,3,4,5)", ViewType.DetailView)> _
'<EditorStateRule("Hide CustomersFrom", "CustomersFrom", EditorState.Disabled, "(IsNull(CustomersFrom))=False", ViewType.DetailView)> _
<DefaultClassOptions()>
<NavigationItem(False), CreatableItem(False)>
<Appearance("Hide DEV properties when HUF is selected in GeneralLedger",
TargetItems:="CurrencyRate; row_AmountDEV",
Criteria:="CurrencyName.ShortName = 'HUF' and GLDocumentType in (0,1,3,4,5)",
Visibility:=Editors.ViewItemVisibility.Hide,
Context:="DetailView")>
<Appearance("Hide CustomersFrom",
TargetItems:="CustomersFrom",
Criteria:="(IsNull(CustomersFrom))=False",
Enabled:=False,
Context:="DetailView")>
<Appearance("Hide row_ info when IsEditable=False",
AppearanceItemType:="ViewItem",
Criteria:="IsEditable=False",
TargetItems:="row_GLHeader; row_DebitChartOfAccounts; row_CreditChartOfAccounts; row_AmountHUF; row_AmountDEV; row_LiquidAssets;" +
" row_Customer; row_DateVAT; row_VAT; row_NoteRows; row_UniqueObjects; row_Controlling; row_JobNumberObjects; " +
" row_CostPlace; row_CostHolder; row_ConnectInfo;",
Visibility:=Editors.ViewItemVisibility.Hide)>
<RuleCriteria("RuleCriteria GLHeader-row_VAT-GLCassa", "aToTable_GLCassa_Contexts", "row_VAT.InversState=False", "Fordított ÁFA nem választható ki !")>
<RuleCriteria("RuleCriteria GLHeader-row_Controlling", "aToTable_GLAccounts_Contexts",
"(row_Controlling.IsParent=False) or (Rule5DMatrix.RequireControlling=False and isnull(row_Controlling)=True)",
"Gyüjtő kontrollszám nem választható ki!", SkipNullOrEmptyValues:=False)>
<RuleCriteria("RuleCriteria GLHeader-row_DebitChartOfAccounts", "aToTable_GLMixed_Contexts", "row_DebitChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
<RuleCriteria("RuleCriteria GLHeader-row_CreditChartOfAccounts", "aToTable_GLMixed_Contexts", "row_CreditChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
<RuleCriteria("RuleCriteria GLHeader-ChartOfAccountsYearState-Save", "*",
"ChartOfAccountsYearState=False",
"Zárolt főkönyvi év, nem lehet bizonylatot rögzíteni, módosítani! ", SkipNullOrEmptyValues:=True)>
<DefaultProperty("DocumentNumber")>
Public Class GLHeader
Inherits BaseObject
Private _GLDocumentType As eGLDocumentType 'Bizonylat tipusa
Private _CustomersFrom As CustomersFrom 'Saját c g
Private _CurrencyName As CurrencyName ' devizanem
Private _CurrencyRate As Double = 1 'Deviza árfolyam
Private _DocumentNumber As String 'Bizonylatszám, számlaszám
Private _RegistryNumber As String 'Iktatószám
Private _DateCreated As Date 'Kiállítás dátuma
Private _DateExecution As Date 'Teljesítés dátuma
Private _DatePayment As Date 'Fizetési határidő
Private _NoteHeader As String 'Fejléc megjegyzés
Private _IsEditable As Boolean = True 'Szerkeszthető
Private _IsStorno As Boolean = False 'Stornó bizonylat
Private _ImportedInvoice As InvoiceHeader 'melyik vevõi számlából készült
Private _ImportedRegistryHeader As RegistryHeader 'Melyik szállítói iktatásból jött
Private _ImportedOther As Guid 'Egyéb importált azonosító
Private _HUNumberToText As String ' Azaz string !!!
Private _CashHandler As String ' Pénztárnál befizető vagy átvevő
Private _GLOpenCloseHeader As GLOpenCloseHeader 'Melyik év végi záráshoz tartozik !
' Beviteli mezők
Private _row_GLHeader As GLHeader
Private _row_DebitChartOfAccounts As ChartOfAccounts 'Tartozik számlaszám
Private _row_CreditChartOfAccounts As ChartOfAccounts ' Követel számlaszám
Private _row_AmountHUF As Double ' összeg forintban
Private _row_AmountDEV As Double ' összeg devizában
Private _row_LiquidAssets As LiquidAssets ' pénzeszköz
Private _row_Customer As Customers ' partner
Private _row_DateVAT As Date 'sor dátum
Private _row_VAT As VAT
Private _row_NoteRows As String
Private _row_UniqueObjects As UniqueObjects 'Egyedi azonosító
Private _row_Controlling As Controlling 'Kontrolling szám
Private _row_JobNumberObjects As JobNumberObjects 'Munkaszám
Private _row_CostPlace As CostPlace 'Költséghely
Private _row_CostHolder As CostHolder 'Költségviselõ
Private _row_ConnectInfo As String 'Folyószámla analitika kötési szám
Private _IsRegistryGLAccounts As Boolean 'Rögzítés után van automatikus iktatás
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
CurrencyName = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", "HUF"))
If Session.IsNewObject(Me) Then
Me.GLDocumentType = eGLDocumentType.eGLMixed
IsEditable = True
IsStorno = False
End If
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsObjectToDelete(Me) = False Then
If Me.GLRows.Count > 0 Then
ReorderRows()
End If
End If
End Sub
Private Sub ReorderRows()
Dim _GLRows As GLRows
Dim _GLRows_New As GLRows = Nothing
Dim _RowIndex As Long = 0
Dim _GLRows_Array As New ArrayList
'//------------------------------------------------------------------------------------------
Me.GLRows.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
For Each _GLRows In Me.GLRows
If Session.IsNewObject(_GLRows) Then
_GLRows_New = _GLRows
Else
_GLRows_Array.Add(_GLRows)
End If
Next
If _GLRows_New IsNot Nothing Then
_GLRows_Array.Add(_GLRows_New)
End If
For Each _GLRows In _GLRows_Array
If _GLRows.RowIndex <> _RowIndex Then
_GLRows.RowIndex = _RowIndex
_GLRows.Save()
End If
_RowIndex += 1
Next
End Sub
Private Sub RecalculateAmountHUF()
If Me.row_AmountDEV <> 0 Then
If GLDocumentType = 0 Or GLDocumentType = 1 Or GLDocumentType = 3 Or GLDocumentType = 4 Or GLDocumentType = 5 Then
Me.row_AmountHUF = Math.Round(Me.row_AmountDEV * CurrencyRate, 2, MidpointRounding.AwayFromZero)
End If
Else
Me.row_AmountHUF = 0
End If
End Sub
<VisibleInListView(False)>
<Association("GLHeader-GLFileData", GetType(GLFileData)), Aggregated(), ExpandObjectMembers(ExpandObjectMembers.Never)>
ReadOnly Property GLFileData As XPCollection(Of GLFileData)
Get
Return GetCollection(Of GLFileData)("GLFileData")
End Get
End Property
'<RuleValueComparison("", DefaultContexts.Save, ValueComparisonType.GreaterThan, "0")> _
ReadOnly Property GLRowsCount() As Long
Get
Return GLRows.Count
End Get
End Property
Property GLDocumentType() As eGLDocumentType
Get
Return _GLDocumentType
End Get
Set(ByVal value As eGLDocumentType)
SetPropertyValue("GLDocumentType", _GLDocumentType, value)
End Set
End Property
<RuleRequiredField("GLAccounts-CustomersFrom", "aFinal_GLAccount_Context")>
<RuleRequiredField("GLCassa-CustomersFrom", "aFinal_GLCassa_Context")>
<RuleRequiredField("GLCassa-CustomersFrom1", "aFinalAndNew_GLCassa_Context")>
<RuleRequiredField("GLMixed-CustomersFrom", "aFinal_GLMixed_Context")>
<ImmediatePostData()>
Property CustomersFrom() As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
<RuleRequiredField("GLHeader.DocumentNumber.GLAccounts", "aFinal_GLAccount_Context")>
<RuleRequiredField("GLHeader.DocumentNumber.GLBank.Final", "aFinal_GLBank_Context")>
<RuleRequiredField("GLHeader.DocumentNumber.GLBank.FinalAndNew", "aFinalAndNew_GLBank_Context")>
<ImmediatePostData(True)>
<NonCloneable()>
Overridable Property DocumentNumber() As String
Get
Return _DocumentNumber
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If Me.GLDocumentType = eGLDocumentType.eGLAccount Then
row_ConnectInfo = DocumentNumber
End If
End If
End Set
End Property
<NonCloneable()>
Property RegistryNumber() As String
Get
Return _RegistryNumber
End Get
Set(ByVal value As String)
SetPropertyValue("RegistryNumber", _RegistryNumber, value)
End Set
End Property
<RuleRequiredField("GLHeader.DateCreated", "aFinal_GLAccount_Context")>
Property DateCreated() As Date
Get
Return _DateCreated
End Get
Set(ByVal value As Date)
SetPropertyValue("DateCreated", _DateCreated, value)
End Set
End Property
<RuleRequiredField("GLHeader.DateExecution", "aFinal_GLAccount_Context")>
<RuleRequiredField("GLBank.DateExecution.Final", "aFinalAndNew_GLBank_Context")>
<RuleRequiredField("GLBank.DateExecution.FinalAndNew", "aFinal_GLBank_Context")>
<RuleRequiredField("GLMixed-DateExecution", "aFinal_GLMixed_Context")>
<RuleRequiredField("GLHeader.DateExecution.Defaultcontexts.Save", DefaultContexts.Save)>
Property DateExecution() As Date
Get
Return _DateExecution
End Get
Set(ByVal value As Date)
SetPropertyValue("DateExecution", _DateExecution, value)
If row_DateVAT = Nothing Then
row_DateVAT = value
End If
If TryCast(Me, GLBank) IsNot Nothing Then
If Me.row_LiquidAssets IsNot Nothing Then
TryCast(Me, GLBank).BallanceHUF = TryCast(Me, GLBank).GetBallanceHUF(Me.row_LiquidAssets, value)
TryCast(Me, GLBank).BallanceDEV = TryCast(Me, GLBank).GetBallanceDEV(Me.row_LiquidAssets, value)
End If
End If
End Set
End Property
ReadOnly Property DateExecutionYear As String
Get
Return DateExecution.Date.Year.ToString
End Get
End Property
ReadOnly Property DateExecutionQuarter As String
Get
Return AlignStr(DatePart(DateInterval.Quarter, DateExecution).ToString, eDirection.Left, " ", 2) & ". NÉ."
End Get
End Property
ReadOnly Property DateExecutionMonth As String
Get
Return String.Format("{0}. {1}", AlignStr(DateExecution.Date.Month.ToString, eDirection.Left, " ", 2), Format(DateExecution, "MMMM"))
End Get
End Property
ReadOnly Property DateExecutionWeekOfYear As String
Get
Return AlignStr(DatePart(DateInterval.WeekOfYear, DateExecution), eDirection.Left, " ", 2) & ". hét"
End Get
End Property
ReadOnly Property DateExecutionString As Date
Get
Return DateExecution.Date.ToString("d")
End Get
End Property
<RuleRequiredField("GLHeader.DatePayment", "aFinal_GLAccount_Context")>
Property DatePayment() As Date
Get
Return _DatePayment
End Get
Set(ByVal value As Date)
SetPropertyValue("DatePayment", _DatePayment, value)
End Set
End Property
<Size(-1)>
Property NoteHeader() As String
Get
Return _NoteHeader
End Get
Set(ByVal value As String)
SetPropertyValue("NoteHeader", _NoteHeader, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If String.IsNullOrEmpty(value) And String.IsNullOrEmpty(row_NoteRows) = True Then
row_NoteRows = value
End If
End If
End Set
End Property
<RuleRequiredField("GLHeader.CurrencyName", "aFinal_GLAccount_Context")>
Property CurrencyName() As CurrencyName
Get
Return _CurrencyName
End Get
Set(ByVal value As CurrencyName)
SetPropertyValue("CurrencyName", _CurrencyName, value)
End Set
End Property
<RuleRange("GLHeader.CurrencyName.ToTable", "aToTable_GLAccounts_Contexts", 2, 999999999999999999, TargetCriteria:="CurrencyName.ShortName != 'HUF'")>
<ImmediatePostData(True)>
Property CurrencyRate() As Double
Get
'If CurrencyName.ShortName = "HUF" Then
'Return 1
'Else
Return _CurrencyRate
'End If
End Get
Set(ByVal value As Double)
SetPropertyValue("CurrencyRate", _CurrencyRate, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Me.RecalculateAmountHUF()
End If
End Set
End Property
<NonCloneable()>
<ImmediatePostData()>
Property IsEditable() As Boolean
Get
Return _IsEditable
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
<NonCloneable()>
Property IsStorno() As Boolean
Get
Return _IsStorno
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsStorno", _IsStorno, value)
End Set
End Property
Property HUNumberToText As String
Get
Return _HUNumberToText
End Get
Set(ByVal value As String)
SetPropertyValue("HUNumberToText", _HUNumberToText, value)
End Set
End Property
<Size(-1)>
<RuleRequiredField("CashType-GLHeader", "aFinal_GLCassa_Context", TargetCriteria:="GLDocumentType=3")>
<RuleRequiredField("CashType-GLHeader-FN", "aFinalAndNew_GLCassa_Context", TargetCriteria:="GLDocumentType=3")>
Property CashHandler As String
Get
Return _CashHandler
End Get
Set(ByVal value As String)
SetPropertyValue("CashHandler", _CashHandler, value)
End Set
End Property
Property ImportedInvoice As InvoiceHeader
Get
Return _ImportedInvoice
End Get
Set(ByVal value As InvoiceHeader)
SetPropertyValue("ImportedInvoice", _ImportedInvoice, value)
End Set
End Property
Property ImportedRegistryHeader As RegistryHeader
Get
Return _ImportedRegistryHeader
End Get
Set(ByVal value As RegistryHeader)
SetPropertyValue("ImportedRegistryHeader", _ImportedRegistryHeader, value)
End Set
End Property
<Browsable(False)>
Property ImportedOther As Guid
Get
Return _ImportedOther
End Get
Set(ByVal value As Guid)
SetPropertyValue("ImportedOther", _ImportedOther, value)
End Set
End Property
<Browsable(False)>
Property GLOpenCloseHeader As GLOpenCloseHeader
Get
Return _GLOpenCloseHeader
End Get
Set(value As GLOpenCloseHeader)
SetPropertyValue("GLOpenCloseHeader", _GLOpenCloseHeader, value)
End Set
End Property
'Nonpersistent tulajdonságok a sorok rögzítéséhez
<NonPersistent()>
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.DateExecution')")>
<RuleRequiredField("GLMixed-row_DebitChartOfAccounts", "aToTable_GLMixed_Contexts")>
<VisibleInListView(False)>
Property row_DebitChartOfAccounts() As ChartOfAccounts
Get
Return _row_DebitChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("row_DebitChartOfAccounts", _row_DebitChartOfAccounts, value)
End Set
End Property
<NonPersistent()>
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.DateExecution')")>
<RuleRequiredField("GLMixed-row_CreditChartOfAccounts", "aToTable_GLMixed_Contexts")>
<VisibleInListView(False)>
Property row_CreditChartOfAccounts() As ChartOfAccounts
Get
Return _row_CreditChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("row_CreditChartOfAccounts", _row_CreditChartOfAccounts, value)
End Set
End Property
<NonPersistent()>
<RuleValueComparison("GLMixed-row_AmountHUF", "aToTable_GLMixed_Contexts", ValueComparisonType.NotEquals, 0)>
<RuleValueComparison("GLCassa-row_AmountHUF", "aToTable_GLCassa_Contexts", ValueComparisonType.GreaterThan, 0)>
<RuleValueComparison("GLBank-row_AmountHUF", "aToTable_GLBank_Contexts", ValueComparisonType.GreaterThan, 0)>
<RuleValueComparison("GLCompensation-row_AmountHUF", "aToTable_GLCompensation_Contexts", ValueComparisonType.GreaterThan, 0)>
<ImmediatePostData(True)>
<VisibleInListView(False)>
Overridable Property row_AmountHUF() As Double
Get
Return _row_AmountHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("row_AmountHUF", _row_AmountHUF, value)
End Set
End Property
<NonPersistent()>
<RuleValueComparison("GLMixed-row_AmountDEV", "aToTable_GLMixed_Contexts", ValueComparisonType.NotEquals, 0, TargetCriteria:="CurrencyName.ShortName != 'HUF'")>
<RuleValueComparison("GLCompensation-row_AmountDEV", "aToTable_GLCompensation_Contexts", ValueComparisonType.GreaterThan, 0, TargetCriteria:="CurrencyName.ShortName != 'HUF'")>
<ImmediatePostData(True)>
<VisibleInListView(False)>
Overridable Property row_AmountDEV() As Double
Get
Return _row_AmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("row_AmountDEV", _row_AmountDEV, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Me.RecalculateAmountHUF()
End If
End Set
End Property
'<ImmediatePostData(True), DataSourceCriteria("Iif('@this.GLDocumentType' = 2, True, False) == (LiquidAssetsType = 1)")> _
<NonPersistent()>
<VisibleInListView(False)>
Property row_LiquidAssets() As LiquidAssets
Get
Return _row_LiquidAssets
End Get
Set(ByVal value As LiquidAssets)
SetPropertyValue("row_LiquidAssets", _row_LiquidAssets, value)
End Set
End Property
<NonPersistent()>
<ImmediatePostData(True)>
<VisibleInListView(False)>
Overridable Property row_Customer() As Customers
Get
Return _row_Customer
End Get
Set(ByVal value As Customers)
SetPropertyValue("row_Customer", _row_Customer, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
If value IsNot Nothing Then
If CashHandler = "" Then CashHandler = value.Name
End If
End If
End Set
End Property
<NonPersistent()>
<RuleRequiredField("GLHeader.row_DateVAT", "aToTable_GLAccounts_Contexts")>
<VisibleInListView(False)>
Property row_DateVAT() As Date
Get
Return _row_DateVAT
End Get
Set(ByVal value As Date)
SetPropertyValue("row_DateVAT", _row_DateVAT, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
<RuleRequiredField("GLHeader.row_VAT.ToTable", "aToTable_GLAccounts_Contexts")>
Property row_VAT() As VAT
Get
Return _row_VAT
End Get
Set(ByVal value As VAT)
SetPropertyValue("row_VAT", _row_VAT, value)
End Set
End Property
<NonPersistent()>
<Size(-1)>
<VisibleInListView(False)>
Property row_NoteRows() As String
Get
Return _row_NoteRows
End Get
Set(ByVal value As String)
SetPropertyValue("row_NoteRows", _row_NoteRows, value)
End Set
End Property
'Rule5DMatrix ...
<NonPersistent()>
<VisibleInListView(False)>
<RuleRequiredField("GLHeader-row_Controlling-aToTable_GLAccounts_Contexts", "aToTable_GLAccounts_Contexts", TargetCriteria:="Rule5DMatrix.RequireControlling=True")>
Overridable Property row_Controlling() As Controlling
Get
Return _row_Controlling
End Get
Set(ByVal value As Controlling)
SetPropertyValue("row_Controlling", _row_Controlling, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
<RuleRequiredField("GLHeader-row_CostPlace-aToTable_GLAccounts_Contexts", "aToTable_GLAccounts_Contexts", TargetCriteria:="Rule5DMatrix.RequireCostPlace=True")>
Property row_CostPlace() As CostPlace
Get
Return _row_CostPlace
End Get
Set(ByVal value As CostPlace)
SetPropertyValue("row_CostPlace", _row_CostPlace, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
<RuleRequiredField("GLHeader-row_CostHolder-aToTable_GLAccounts_Contexts", "aToTable_GLAccounts_Contexts", TargetCriteria:="Rule5DMatrix.RequireCostHolder=True")>
Property row_CostHolder() As CostHolder
Get
Return _row_CostHolder
End Get
Set(ByVal value As CostHolder)
SetPropertyValue("_row_CostHolder", _row_CostHolder, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
<RuleRequiredField("GLHeader-row_UniqueObjects-aToTable_GLAccounts_Contexts", "aToTable_GLAccounts_Contexts", TargetCriteria:="Rule5DMatrix.RequireUniqueObjects=True")>
Property row_UniqueObjects() As UniqueObjects
Get
Return _row_UniqueObjects
End Get
Set(ByVal value As UniqueObjects)
SetPropertyValue("row_UniqueObjects", _row_UniqueObjects, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
<RuleRequiredField("GLHeader-row_JobNumberObjects-aToTable_GLAccounts_Contexts", "aToTable_GLAccounts_Contexts", TargetCriteria:="Rule5DMatrix.RequireJobNumberObjects=True")>
Property row_JobNumberObjects() As JobNumberObjects
Get
Return _row_JobNumberObjects
End Get
Set(ByVal value As JobNumberObjects)
SetPropertyValue("row_JobNumberObjects", _row_JobNumberObjects, value)
End Set
End Property
<Browsable(False)>
ReadOnly Property Rule5DMatrix As Rule5DMatrix
Get
Dim _Rule5DforGL As Rule5DforGL = Session.FindObject(Of Rule5DforGL)(CriteriaOperator.Parse("GLDocumentType=?", GLDocumentType))
If _Rule5DforGL IsNot Nothing Then
Return _Rule5DforGL.Rule5DMatrix
Else
Return Nothing
End If
End Get
End Property
<Browsable(False)>
Property IsRegistryGLAccounts As Boolean
Get
Return _IsRegistryGLAccounts
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsRegistryGLAccounts", _IsRegistryGLAccounts, value)
End Set
End Property
<NonPersistent()>
<RuleRequiredField("GLHeader.row_ConnectInfo", "aFinal_GLAccount_Context")>
<RuleRequiredField("GLHeader.row_ConnectInfo.GLCassa", "aToTable_GLCassa_Contexts", TargetCriteria:="row_PartnerType<>-1")>
<ImmediatePostData(True)>
<VisibleInListView(False)>
Overridable Property row_ConnectInfo() As String
Get
Return _row_ConnectInfo
End Get
Set(ByVal value As String)
SetPropertyValue("row_ConnectInfo", _row_ConnectInfo, value)
End Set
End Property
<VisibleInListView(False)> _
<Association("GLHeader", GetType(GLRows))> _
Public ReadOnly Property GLRows() As XPCollection(Of GLRows)
Get
Return GetCollection(Of GLRows)("GLRows")
End Get
End Property
Sub Reconfigure_GLDetail()
'-- Az eljárás újragenerálja a GLDetail sorokat a késõbbi DTR elemzéshez
End Sub
<Browsable(False)> _
ReadOnly Property ChartOfAccountsYearState As Boolean
Get
Dim _ChartOfAccountsYear As ChartOfAccountsYear = Session.FindObject(Of ChartOfAccountsYear)(CriteriaOperator.Parse("AccountYear=?", Me.DateExecution.Year))
If _ChartOfAccountsYear Is Nothing Then
Return False
Else
Return _ChartOfAccountsYear.IsClosed
End If
End Get
End Property
'-- Árfolyam veszteség, nyereség elszámolása
Sub Reconfigure_RateDiff(ByVal _p_ocur As Xpo.XPObjectSpace, ByVal _p_GLHeader As GLHeader)
Dim _GLHeader_Ratediff As GLMixed = Nothing
Dim _GLCassa As GLCassa
Dim _GLBank As GLBank
Dim _GLCompensation As GLCompensation
Dim _GLRows As GLRows
Dim _GLRows_RateDiff As GLRows
Dim _PCIDetail As PCIDetail
Dim _CurrencyRate_Account As Double
Dim _AmountHUF_RatedIff As Double
Dim _DebitChartOfAccounts As ChartOfAccounts
Dim _CreditChartOfAccounts As ChartOfAccounts
Dim _Controlling As Controlling
Dim _GLMixedNG As GLMixedNG
Dim _GLHeader_RateDiffParameter = _p_ocur.FindObject(Of GLHeader_RateDiffParameter)(CriteriaOperator.Parse("1=1"))
If _GLHeader_RateDiffParameter Is Nothing Then Exit Sub
Dim _ChartOfAccounts_RateDiff_Win As ChartOfAccounts = _GLHeader_RateDiffParameter.GetChartOfAccounts(_p_GLHeader.DateExecution.Year, eWinLoss.eRateDiffWin)
Dim _ChartOfAccounts_RateDiff_Loss As ChartOfAccounts = _GLHeader_RateDiffParameter.GetChartOfAccounts(_p_GLHeader.DateExecution.Year, eWinLoss.eRateDiffLoss)
Dim _Controlling_RateDiff_Win As Controlling = _GLHeader_RateDiffParameter.Controlling_RateDiff_Win
Dim _Controlling_RateDiff_Loss As Controlling = _GLHeader_RateDiffParameter.Controlling_RateDiff_Loss
Dim _InAmountHUF As Double = 0
Dim _OutAmountHUF As Double = 0
Select Case _p_GLHeader.GLDocumentType
Case eGLDocumentType.eGLBank
_GLHeader_Ratediff = TryCast(_p_GLHeader, GLBank).GLHeader_RateDiff
TryCast(_p_GLHeader, GLBank).GLHeader_RateDiff = Nothing
TryCast(_p_GLHeader, GLBank).Save()
Case eGLDocumentType.eGLCassa
_GLHeader_Ratediff = TryCast(_p_GLHeader, GLCassa).GLHeader_RateDiff
TryCast(_p_GLHeader, GLCassa).GLHeader_RateDiff = Nothing
TryCast(_p_GLHeader, GLCassa).Save()
Case eGLDocumentType.eGLCompensation
_GLHeader_Ratediff = TryCast(_p_GLHeader, GLCompensation).GLHeader_RateDiff
TryCast(_p_GLHeader, GLCompensation).GLHeader_RateDiff = Nothing
TryCast(_p_GLHeader, GLCompensation).Save()
End Select
If _GLHeader_Ratediff IsNot Nothing Then
_p_ocur.Delete(_GLHeader_Ratediff.GLRows)
_p_ocur.Delete(_GLHeader_Ratediff)
End If
For Each _GLRows In _p_GLHeader.GLRows
If _GLRows.CashType = eCashType.ePartner And _GLRows.Customer IsNot Nothing Then
_PCIDetail = _p_ocur.FindObject(Of PCIDetail) _
(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and PartnerType=? and ConnectInfo=? and MainType='01-Account' and CurrencyName.ShortName<>'HUF'", _
_p_GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo), True)
If _PCIDetail IsNot Nothing Then
If _PCIDetail.AmountDEV_Account <> 0 Then
_CurrencyRate_Account = Math.Round(_PCIDetail.AmountHUF_Account / _PCIDetail.AmountDEV_Account, 4, MidpointRounding.AwayFromZero)
If _GLRows.AmountDEV <> 0 Then
_AmountHUF_RatedIff = 0
_AmountHUF_RatedIff = (_GLRows.AmountDEV * _CurrencyRate_Account) - _GLRows.AmountHUF
Select Case _GLRows.PartnerType
Case ePartnerType.ePayabels
If _GLRows.OutAmountDEV > 0 Then 'Terhelés
If _AmountHUF_RatedIff < 0 Then 'Veszteség szállítóval szemben
_DebitChartOfAccounts = _ChartOfAccounts_RateDiff_Loss
_CreditChartOfAccounts = _GLRows.DebitChartOfAccounts
_InAmountHUF = Math.Abs(_AmountHUF_RatedIff)
_OutAmountHUF = 0
Else 'Nyereség szállítóval szemben
_DebitChartOfAccounts = _GLRows.DebitChartOfAccounts
_CreditChartOfAccounts = _ChartOfAccounts_RateDiff_Win
_InAmountHUF = 0
_OutAmountHUF = Math.Abs(_AmountHUF_RatedIff)
End If
ElseIf _GLRows.InAmountDEV > 0 Then 'Jóváírás
If _AmountHUF_RatedIff < 0 Then 'Veszteség szállítóval szemben
_DebitChartOfAccounts = _ChartOfAccounts_RateDiff_Loss
_CreditChartOfAccounts = _GLRows.CreditChartOfAccounts
_InAmountHUF = Math.Abs(_AmountHUF_RatedIff)
_OutAmountHUF = 0
Else 'Nyereség szállítóval szemben
_DebitChartOfAccounts = _GLRows.CreditChartOfAccounts
_CreditChartOfAccounts = _ChartOfAccounts_RateDiff_Win
_InAmountHUF = 0
_OutAmountHUF = Math.Abs(_AmountHUF_RatedIff)
End If
End If
Case ePartnerType.eReceivables
If _GLRows.OutAmountDEV > 0 Then 'Terhelés
If _AmountHUF_RatedIff > 0 Then 'Veszteség vevővel szemben
_DebitChartOfAccounts = _ChartOfAccounts_RateDiff_Loss
_CreditChartOfAccounts = _GLRows.DebitChartOfAccounts
_InAmountHUF = Math.Abs(_AmountHUF_RatedIff)
_OutAmountHUF = 0
Else 'Nyereség vevővel szemben
_DebitChartOfAccounts = _GLRows.DebitChartOfAccounts
_CreditChartOfAccounts = _ChartOfAccounts_RateDiff_Win
_InAmountHUF = 0
_OutAmountHUF = Math.Abs(_AmountHUF_RatedIff)
End If
ElseIf _GLRows.InAmountDEV > 0 Then 'Jóváírás
If _AmountHUF_RatedIff > 0 Then 'Veszteség vevővel szemben
_DebitChartOfAccounts = _ChartOfAccounts_RateDiff_Loss
_CreditChartOfAccounts = _GLRows.CreditChartOfAccounts
_InAmountHUF = Math.Abs(_AmountHUF_RatedIff)
_OutAmountHUF = 0
Else 'Nyereség vevő szemben
_DebitChartOfAccounts = _GLRows.CreditChartOfAccounts
_CreditChartOfAccounts = _ChartOfAccounts_RateDiff_Win
_InAmountHUF = 0
_OutAmountHUF = Math.Abs(_AmountHUF_RatedIff)
End If
End If
End Select
If _AmountHUF_RatedIff <> 0 Then
If _GLHeader_Ratediff Is Nothing Then
_GLHeader_Ratediff = _p_ocur.CreateObject(Of GLMixed)()
End If
_GLHeader_Ratediff.CustomersFrom = _p_GLHeader.CustomersFrom
_GLMixedNG = _p_ocur.FindObject(Of GLMixedNG)(CriteriaOperator.Parse("CustomersFrom=?", _GLHeader_Ratediff.CustomersFrom), True)
If _GLMixedNG IsNot Nothing Then
If _GLHeader_Ratediff.DocumentNumber = "" Then
_GLHeader_Ratediff.DocumentNumber = _GLMixedNG.NumberGenerator.GetNewNumber(_GLMixedNG.NumberGenerator)
End If
End If
_GLHeader_Ratediff.DateExecution = _p_GLHeader.DateExecution
_GLHeader_Ratediff.DateCreated = _p_GLHeader.DateCreated
_GLHeader_Ratediff.CurrencyRate = 1
_GLHeader_Ratediff.GLDocumentType = eGLDocumentType.eGLRateDiff
_GLHeader_Ratediff.IsEditable = False
_GLHeader_Ratediff.IsStorno = False
_GLHeader_Ratediff.CurrencyName = _p_ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
_GLHeader_Ratediff.Save()
_GLRows_RateDiff = _p_ocur.CreateObject(Of GLRows)()
_GLRows_RateDiff.InAmountHUF = _InAmountHUF
_GLRows_RateDiff.OutAmountHUF = _OutAmountHUF
_GLRows_RateDiff.GLHeader = _GLHeader_Ratediff
_GLRows_RateDiff.AddGLRows(_GLHeader_Ratediff, _DebitChartOfAccounts, _CreditChartOfAccounts, 0, Math.Abs(_AmountHUF_RatedIff), Nothing, _
_GLRows.Customer, Nothing, Nothing, "", Nothing, _Controlling, Nothing, Nothing, Nothing, _GLRows.ConnectInfo, _
eGLRowsTypeVAT.eNettoRow, Guid.NewGuid, _GLRows.TransactionType, eCashType.ePartner, _GLRows.PartnerType)
_GLRows_RateDiff.Save()
End If
End If
End If
End If
End If
Next
If _GLHeader_Ratediff IsNot Nothing Then
Select Case _p_GLHeader.GLDocumentType
Case eGLDocumentType.eGLBank
_GLBank = TryCast(_p_GLHeader, GLBank)
_GLBank.GLHeader_RateDiff = _GLHeader_Ratediff
_GLBank.Save()
Case eGLDocumentType.eGLCassa
_GLCassa = TryCast(_p_GLHeader, GLCassa)
_GLCassa.GLHeader_RateDiff = _GLHeader_Ratediff
_GLCassa.Save()
Case eGLDocumentType.eGLCompensation
_GLCompensation = TryCast(_p_GLHeader, GLCompensation)
_GLCompensation.GLHeader_RateDiff = _GLHeader_Ratediff
_GLCompensation.Save()
End Select
Else
Select Case _p_GLHeader.GLDocumentType
Case eGLDocumentType.eGLBank
_GLBank = TryCast(_p_GLHeader, GLBank)
_GLBank.GLHeader_RateDiff = Nothing
_GLBank.Save()
Case eGLDocumentType.eGLCassa
_GLCassa = TryCast(_p_GLHeader, GLCassa)
_GLCassa.GLHeader_RateDiff = Nothing
_GLCassa.Save()
Case eGLDocumentType.eGLCompensation
_GLCompensation = TryCast(_p_GLHeader, GLCompensation)
_GLCompensation.GLHeader_RateDiff = Nothing
_GLCompensation.Save()
End Select
End If
_p_ocur.CommitChanges()
End Sub
End Class
@@ -0,0 +1,304 @@
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
Public Enum eWinLoss
eRateDiffWin = 0
eRateDiffLoss = 1
eRoundingWin = 2
eRoundingLoss = 3
eRevaluationWin = 4
eRevaluationLoss = 5
End Enum
<DefaultClassOptions(), CreatableItem(False)> _
<NavigationItem("FinancialStock")> _
Public Class GLHeader_RateDiffParameter
Inherits BaseObject
Private _ChartOfAccounts_RateDiff_Win As ChartOfAccounts '(deb)
Private _ChartOfAccounts_RateDiff_Loss As ChartOfAccounts '(deb)
Private _Controlling_RateDiff_Win As Controlling
Private _Controlling_RateDiff_Loss As Controlling
Private _ChartOfAccounts_Rounding_Win As ChartOfAccounts '(deb)
Private _ChartOfAccounts_Rounding_Loss As ChartOfAccounts '(deb)
Private _Controlling_Rounding_Win As Controlling
Private _Controlling_Rounding_Loss As Controlling
Private _Controlling_Revaluation_Win As Controlling
Private _Controlling_Revaluation_Loss As Controlling
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
<Browsable(False)> _
Property ChartOfAccounts_RateDiff_Win As ChartOfAccounts
Get
Return _ChartOfAccounts_RateDiff_Win
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_RateDiff_Win", _ChartOfAccounts_RateDiff_Win, value)
End Set
End Property
<Browsable(False)> _
Property ChartOfAccounts_RateDiff_Loss As ChartOfAccounts
Get
Return _ChartOfAccounts_RateDiff_Loss
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_RateDiff_Loss", _ChartOfAccounts_RateDiff_Loss, value)
End Set
End Property
<RuleRequiredField("GLHeader_RateDiffParameter-Controlling_RateDiff_Win", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property Controlling_RateDiff_Win As Controlling
Get
Return _Controlling_RateDiff_Win
End Get
Set(value As Controlling)
SetPropertyValue("Controlling_RateDiff_Win", _Controlling_RateDiff_Win, value)
End Set
End Property
<RuleRequiredField("GLHeader_RateDiffParameter-Controlling_RateDiff_Loss", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property Controlling_RateDiff_Loss As Controlling
Get
Return _Controlling_RateDiff_Loss
End Get
Set(ByVal value As Controlling)
SetPropertyValue("Controlling_RateDiff_Loss", _Controlling_RateDiff_Loss, value)
End Set
End Property
<Browsable(False)>
Property ChartOfAccounts_Rounding_Win As ChartOfAccounts
Get
Return _ChartOfAccounts_Rounding_Win
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_Rounding_Win", _ChartOfAccounts_Rounding_Win, value)
End Set
End Property
<Browsable(False)>
Property ChartOfAccounts_Rounding_Loss As ChartOfAccounts
Get
Return _ChartOfAccounts_Rounding_Loss
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_Rounding_Loss", _ChartOfAccounts_Rounding_Loss, value)
End Set
End Property
<RuleRequiredField("GLHeader_RoundingParameter-Controlling_Rounding_Win", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property Controlling_Rounding_Win As Controlling
Get
Return _Controlling_Rounding_Win
End Get
Set(value As Controlling)
SetPropertyValue("Controlling_Rounding_Win", _Controlling_Rounding_Win, value)
End Set
End Property
<RuleRequiredField("GLHeader_RoundingParameter-Controlling_Rounding_Loss", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property Controlling_Rounding_Loss As Controlling
Get
Return _Controlling_Rounding_Loss
End Get
Set(ByVal value As Controlling)
SetPropertyValue("Controlling_Rounding_Loss", _Controlling_Rounding_Loss, value)
End Set
End Property
Property Controlling_Revaluation_Win As Controlling
Get
Return _Controlling_Revaluation_Win
End Get
Set(value As Controlling)
SetPropertyValue("Controlling_Revaluation_Win", _Controlling_Revaluation_Win, value)
End Set
End Property
Property Controlling_Revaluation_Loss As Controlling
Get
Return _Controlling_Revaluation_Loss
End Get
Set(value As Controlling)
SetPropertyValue("Controlling_Revaluation_Loss", _Controlling_Revaluation_Loss, value)
End Set
End Property
<Association("GLHeader_RateDiffParameter-GLHeader_RateDiffParameterYear", GetType(GLHeader_RateDiffParameterYear)), VisibleInListView(False), VisibleInLookupListView(False)>
ReadOnly Property GLHeader_RateDiffParameterYear As XPCollection(Of GLHeader_RateDiffParameterYear)
Get
Return GetCollection(Of GLHeader_RateDiffParameterYear)("GLHeader_RateDiffParameterYear")
End Get
End Property
Public Function GetChartOfAccounts(_AccountYear As Long, _WinLoss As eWinLoss) As ChartOfAccounts
Dim _ChartOfAccounts As ChartOfAccounts = Nothing
Dim _GLHeader_RateDiffParameterYear As GLHeader_RateDiffParameterYear
Select Case _WinLoss
Case eWinLoss.eRateDiffLoss
For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear
If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then
_ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_RateDiff_Loss
Exit For
End If
Next
Case eWinLoss.eRateDiffWin
For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear
If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then
_ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_RateDiff_Win
Exit For
End If
Next
Case eWinLoss.eRoundingLoss
For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear
If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then
_ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Rounding_Loss
Exit For
End If
Next
Case eWinLoss.eRoundingWin
For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear
If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then
_ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Rounding_Win
Exit For
End If
Next
Case eWinLoss.eRevaluationWin
For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear
If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then
_ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Revaluation_Win
Exit For
End If
Next
Case eWinLoss.eRevaluationLoss
For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear
If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then
_ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Revaluation_Loss
Exit For
End If
Next
End Select
Return _ChartOfAccounts
End Function
End Class
<DefaultClassOptions(), CreatableItem(False)>
<NavigationItem(False)>
<RuleCriteria("RuleCriteria GLHeader_RateDiffParameterYear-ChartOfAccounts_RateDiff_Win", DefaultContexts.Save, "ChartOfAccounts_RateDiff_Win.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
<RuleCriteria("RuleCriteria GLHeader_RateDiffParameterYear-ChartOfAccounts_RateDiff_Loss", DefaultContexts.Save, "ChartOfAccounts_RateDiff_Loss.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
<RuleCriteria("RuleCriteria GLHeader_RateDiffParameterYear-ChartOfAccounts_Rounding_Win", DefaultContexts.Save, "ChartOfAccounts_Rounding_Win.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
<RuleCriteria("RuleCriteria GLHeader_RateDiffParameterYear-ChartOfAccounts_Rounding_Loss", DefaultContexts.Save, "ChartOfAccounts_Rounding_Loss.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
Public Class GLHeader_RateDiffParameterYear
Inherits BaseObject
Private _GLHeader_RateDiffParameter As GLHeader_RateDiffParameter
Private _AccountYear As Long
Private _ChartOfAccounts_RateDiff_Win As ChartOfAccounts 'Árfolyam nyereség
Private _ChartOfAccounts_RateDiff_Loss As ChartOfAccounts 'Árfolyam veszteség
Private _ChartOfAccounts_Rounding_Win As ChartOfAccounts 'Elengedési nyereség
Private _ChartOfAccounts_Rounding_Loss As ChartOfAccounts 'Elengedési veszteség
Private _ChartOfAccounts_Revaluation_Win As ChartOfAccounts 'Átértékelési nyereség
Private _ChartOfAccounts_Revaluation_Loss As ChartOfAccounts 'Átértékelési veszteség
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
<Association("GLHeader_RateDiffParameter-GLHeader_RateDiffParameterYear", GetType(GLHeader_RateDiffParameter))>
Property GLHeader_RateDiffParameter As GLHeader_RateDiffParameter
Get
Return _GLHeader_RateDiffParameter
End Get
Set(value As GLHeader_RateDiffParameter)
SetPropertyValue("GLHeader_RateDiffParameter", _GLHeader_RateDiffParameter, value)
End Set
End Property
Property AccountYear As Long
Get
Return _AccountYear
End Get
Set(value As Long)
SetPropertyValue("AccountYear", _AccountYear, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
<RuleRequiredField("", DefaultContexts.Save)>
Property ChartOfAccounts_RateDiff_Win As ChartOfAccounts
Get
Return _ChartOfAccounts_RateDiff_Win
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_RateDiff_Win", _ChartOfAccounts_RateDiff_Win, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
<RuleRequiredField("", DefaultContexts.Save)>
Property ChartOfAccounts_RateDiff_Loss As ChartOfAccounts
Get
Return _ChartOfAccounts_RateDiff_Loss
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_RateDiff_Loss", _ChartOfAccounts_RateDiff_Loss, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
Property ChartOfAccounts_Rounding_Win As ChartOfAccounts
Get
Return _ChartOfAccounts_Rounding_Win
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_Rounding_Win", _ChartOfAccounts_Rounding_Win, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
Property ChartOfAccounts_Rounding_Loss As ChartOfAccounts
Get
Return _ChartOfAccounts_Rounding_Loss
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_Rounding_Loss", _ChartOfAccounts_Rounding_Loss, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
Property ChartOfAccounts_Revaluation_Win As ChartOfAccounts
Get
Return _ChartOfAccounts_Revaluation_Win
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_Revaluation_Win", _ChartOfAccounts_Revaluation_Win, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
Property ChartOfAccounts_Revaluation_Loss As ChartOfAccounts
Get
Return _ChartOfAccounts_Revaluation_Loss
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts_Revaluation_Loss", _ChartOfAccounts_Revaluation_Loss, value)
End Set
End Property
End Class
@@ -0,0 +1,716 @@
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.Persistent.Base.General
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Linq
Imports System.Linq.Expressions
<DefaultClassOptions()> _
<NavigationItem("FinancialTransactions")> _
<CreatableItem(False)> _
Public Class GLRows
Inherits BaseObject
Private _GLHeader As GLHeader
Private _GLAccounts As GLAccounts
Private _DebitChartOfAccounts As ChartOfAccounts 'Tartozik számlaszám
Private _CreditChartOfAccounts As ChartOfAccounts ' Követel számlaszám
Private _AmountHUF As Double ' könyvelt összeg forintban
Private _AmountDEV As Double ' könyvelt összeg devizában
Private _AmountDEVFIFO As Double = 0 'FIFO értékeléshez felhasznált deviza összege
Private _LiquidAssets As LiquidAssets ' pénzeszköz
Private _Customer As Customers ' partner
Private _DateVAT As Date 'ÁFA idõszak
Private _DateExecution As Date 'Teljesítési idõszak
Private _VAT As VAT 'ÁFA kód
Private _NoteRows As String 'Sor megjegyzés
Private _Controlling As Controlling 'Kontrolling szám
Private _CostPlace As CostPlace 'Költséghely
Private _CostHolder As CostHolder 'Költségviselõ
Private _JobNumberObjects As JobNumberObjects 'Munkaszám
Private _UniqueObjects As UniqueObjects 'Egyedi azonosító
Private _ConnectInfo As String = "" 'Analitikus kötési szám folyószámlához
Private _ConnectInfoAdvanced As String = "" 'Analitikus kötési szám az előlegek pontozásához
Private _PartnerType As ePartnerType
Private _DebitAmountHUF As Double = 0
Private _CreditAmountHUF As Double = 0
Private _DebitAmountDEV As Double = 0
Private _CreditAmountDEV As Double = 0
Private _GLRowsGUID As Guid
Private _GLRowsTypeVAT As eGLRowsTypeVAT
Private _InAmountHUF As Double = 0 'Pénztár miatt befizetés
Private _OutAmountHUF As Double = 0 'Pénztár miatt kifizetés
Private _InAmountDEV As Double = 0 'Pénztár miatt befizetés
Private _OutAmountDEV As Double = 0 'Pénztár miatt kifizetés
Private _ImportID As String = "" 'Külsõ rendszerbõl importált sor
Private _CashType As eCashType
Private _TransactionType As eTransactionType
Private _CurrencyRate2 As Double = 1
Private _InAmountDEV2 As Double = 0 'Másodlagos deviza !
Private _OutAmountDEV2 As Double = 0 'Másodlagos deviza
Private _CurrencyName2 As CurrencyName 'Másodlagos devizanem
Private _BankImportHeaderSumDetail As BankImportHeaderSumDetail
Private _GLRowsRateDiff As GLRows
Private _InvoiceRows As InvoiceRows
Private _RegistryRowsFinancialControlling As RegistryRowsFinancialControlling
Private _GLRowsType As eGLRowsType '0 normál 1 Nyitó, 2 Záró
Private _RowIndex As Long 'Sorrend
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
If Me.GLHeader IsNot Nothing Then
If Me.GLHeader.DateExecution = Nothing Then
Else
Me.DateExecution = Me.GLHeader.DateExecution
End If
End If
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Me.ConnectInfo Is Nothing Then
Me.ConnectInfo = ""
End If
Dim _GLDetail_Collection As New XPCollection(Of GLDetails)(Session, CriteriaOperator.Parse("GLRows.Oid=?", Me.Oid))
Session.Delete(_GLDetail_Collection)
Dim _GLDetail As GLDetails
If Session.IsObjectToDelete(Me) = False Then
_GLDetail = New GLDetails(Session)
_GLDetail.GLRows = Me
_GLDetail.AmountDEV = Me.AmountDEV
_GLDetail.AmountHUF = Me.AmountHUF
_GLDetail.Side = "T"
_GLDetail.ChartOfAccounts = Me.DebitChartOfAccounts
_GLDetail = New GLDetails(Session)
_GLDetail.GLRows = Me
_GLDetail.AmountDEV = Me.AmountDEV
_GLDetail.AmountHUF = Me.AmountHUF
_GLDetail.Side = "K"
_GLDetail.ChartOfAccounts = Me.CreditChartOfAccounts
GLRowsType = eGLRowsType.eNormal
If CreditChartOfAccounts IsNot Nothing AndAlso DebitChartOfAccounts IsNot Nothing Then
If CreditChartOfAccounts.AccountNumber Like "491*" Or DebitChartOfAccounts.AccountNumber Like "491*" Then
GLRowsType = eGLRowsType.eOpen
End If
If CreditChartOfAccounts.AccountNumber Like "492*" Or DebitChartOfAccounts.AccountNumber Like "492*" Then
GLRowsType = eGLRowsType.eClose
End If
End If
If Me.DateExecution = Nothing Then
If Me.GLHeader IsNot Nothing Then
Me.DateExecution = Me.GLHeader.DateExecution
End If
End If
' '// Sorrend beállítása
' If Session.IsNewObject(Me) Then
' Me.RowIndex = Me.GLHeader.GLRows.Count
' End If
End If
End Sub
Protected Overrides Sub OnDeleting()
MyBase.OnDeleting()
Dim _GLDetail_Collection As New XPCollection(Of GLDetails)(Session, CriteriaOperator.Parse("GLRows.Oid=?", Me.Oid))
Session.Delete(_GLDetail_Collection)
Dim _GLDetail As GLDetails
Dim _GLRowsRateDiff_Collection As New XPCollection(Of GLRows)(Session, CriteriaOperator.Parse("GLRowsRateDiff=?", Me))
For Each _GLRows As GLRows In _GLRowsRateDiff_Collection
_GLRows.GLRowsRateDiff = Nothing
_GLRows.Save()
Next
End Sub
Protected Overrides Sub OnDeleted()
MyBase.OnDeleted()
'// PARASZTLENGŐS ÚJRAPONTOZÁS TÖRLÉS ESETÉN !!!!
On Error Resume Next
If Me.PartnerType <> ePartnerType.eNotSet Then
'Dim _uow As New UnitOfWork(Session.DataLayer)
'Dim _CustomersFrom_Collection As New XPCollection(Of CustomersFrom)(_uow)
'For Each _CustomersFrom As CustomersFrom In _CustomersFrom_Collection
' GLFunctions.ReconfigurePCI(_uow, _CustomersFrom, Me.Customer, Me.PartnerType, Me.ConnectInfo)
' _uow.CommitChanges()
'Next
End If
'// Sorrend újraépítése !!!
End Sub
<Association("GLHeader", GetType(GLHeader))> _
Property GLHeader() As GLHeader
Get
Return _GLHeader
End Get
Set(ByVal value As GLHeader)
SetPropertyValue("GLHeader", _GLHeader, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("isnull(Children)=True")>
Property DebitChartOfAccounts() As ChartOfAccounts
Get
Return _DebitChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("DebitChartOfAccounts", _DebitChartOfAccounts, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)>
Property CreditChartOfAccounts() As ChartOfAccounts
Get
Return _CreditChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("CreditChartOfAccounts", _CreditChartOfAccounts, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)>
Property AmountHUF() As Double
Get
Return Math.Round(_AmountHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountHUF", _AmountHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property AmountDEV() As Double
Get
Return Math.Round(_AmountDEV, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountDEV", _AmountDEV, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
<VisibleInDetailView(False)>
Property AmountDEVFIFO As Double
Get
Return Math.Round(_AmountDEVFIFO, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("AmountDEVFIFO", _AmountDEVFIFO, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property LiquidAssets() As LiquidAssets
Get
Return _LiquidAssets
End Get
Set(ByVal value As LiquidAssets)
SetPropertyValue("LiquidAssets", _LiquidAssets, value)
End Set
End Property
Property Customer() As Customers
Get
Return _Customer
End Get
Set(ByVal value As Customers)
SetPropertyValue("Customer", _Customer, value)
End Set
End Property
Property DateVAT() As Date
Get
Return _DateVAT
End Get
Set(ByVal value As Date)
SetPropertyValue("DateCreated", _DateVAT, 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 VAT() As VAT
Get
Return _VAT
End Get
Set(ByVal value As VAT)
SetPropertyValue("VAT", _VAT, value)
End Set
End Property
<Size(-1)>
Property NoteRows() As String
Get
Return _NoteRows
End Get
Set(ByVal value As String)
SetPropertyValue("NoteRows", _NoteRows, value)
End Set
End Property
Property RowIndex As Long
Get
Return _RowIndex
End Get
Set(value As Long)
SetPropertyValue("RowIndex", _RowIndex, value)
End Set
End Property
'Rule5DMatrix ...
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
<RuleRequiredField("GLRows-Controlling", DefaultContexts.Save, TargetCriteria:="Rule5DMatrix.RequireControlling=True and Require5DValidation=True")> _
Property Controlling() As Controlling
Get
Return _Controlling
End Get
Set(ByVal value As Controlling)
SetPropertyValue("Controlling", _Controlling, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
End If
End Set
End Property
<RuleRequiredField("GLRows-JobNumberObjects", DefaultContexts.Save, TargetCriteria:="Rule5DMatrix.RequireJobNumberObjects=True and Require5DValidation=True")> _
Property JobNumberObjects() As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(ByVal value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
End Set
End Property
<RuleRequiredField("GLRows-UniqueObjects", DefaultContexts.Save, TargetCriteria:="Rule5DMatrix.RequireUniqueObjects=True and Require5DValidation=True")> _
Property UniqueObjects() As UniqueObjects
Get
Return _UniqueObjects
End Get
Set(ByVal value As UniqueObjects)
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
End Set
End Property
<RuleRequiredField("GLRows-CostPlace", DefaultContexts.Save, TargetCriteria:="Rule5DMatrix.RequireCostPlace=True and Require5DValidation=True")> _
Property CostPlace() As CostPlace
Get
Return _CostPlace
End Get
Set(ByVal value As CostPlace)
SetPropertyValue("CostPlace", _CostPlace, value)
End Set
End Property
<RuleRequiredField("GLRows-CostHolder", DefaultContexts.Save, TargetCriteria:="Rule5DMatrix.RequireCostHolder=True and Require5DValidation=True")> _
Property CostHolder() As CostHolder
Get
Return _CostHolder
End Get
Set(ByVal value As CostHolder)
SetPropertyValue("CostHolder", _CostHolder, value)
End Set
End Property
<Browsable(False)> _
ReadOnly Property Rule5DMatrix As Rule5DMatrix
Get
If GLHeader Is Nothing Then
Return Nothing
Else
Dim _Rule5DforGL As Rule5DforGL = Session.FindObject(Of Rule5DforGL)(CriteriaOperator.Parse("GLDocumentType=?", GLHeader.GLDocumentType))
If _Rule5DforGL IsNot Nothing Then
Return _Rule5DforGL.Rule5DMatrix
Else
Return Nothing
End If
End If
End Get
End Property
<Browsable(False)> _
ReadOnly Property Require5DValidation As Boolean
Get
Dim _Require5DValidation As Boolean = True
If _Require5DValidation Then
Select Case Me.CreditChartOfAccounts.AccountNumber
Case "599", "491", "492", "493"
_Require5DValidation = False
Case Else
_Require5DValidation = True
End Select
End If
If _Require5DValidation Then
Select Case Me.DebitChartOfAccounts.AccountNumber
Case "599", "491", "492", "493"
_Require5DValidation = False
Case Else
_Require5DValidation = True
End Select
End If
Return _Require5DValidation
End Get
End Property
Property ConnectInfo() As String
Get
Return _ConnectInfo
End Get
Set(ByVal value As String)
SetPropertyValue("ConnectInfo", _ConnectInfo, LTrim(RTrim(value)))
End Set
End Property
Property ConnectInfoAdvanced As String
Get
Return _ConnectInfoAdvanced
End Get
Set(value As String)
SetPropertyValue("ConnectInfoAdvanced", _ConnectInfoAdvanced, value)
End Set
End Property
Property PartnerType() As ePartnerType
Get
Return _PartnerType
End Get
Set(ByVal value As ePartnerType)
SetPropertyValue("PartnerType", _PartnerType, value)
End Set
End Property
Property DebitAmountHUF() As Double
Get
Return Math.Round(_DebitAmountHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("DebitAmountHUF", _DebitAmountHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property CreditAmountHUF() As Double
Get
Return Math.Round(_CreditAmountHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("CreditAmountHUF", _CreditAmountHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property DebitAmountDEV() As Double
Get
Return _DebitAmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("DebitAmountDEV", _DebitAmountDEV, value)
End Set
End Property
Property CreditAmountDEV() As Double
Get
Return _CreditAmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("CreditAmountDEV", _CreditAmountDEV, value)
End Set
End Property
Property GLRowsTypeVAT As eGLRowsTypeVAT
Get
Return _GLRowsTypeVAT
End Get
Set(ByVal value As eGLRowsTypeVAT)
SetPropertyValue("GLRowsTypeVAT", _GLRowsTypeVAT, value)
End Set
End Property
Property GLRowsGUID As Guid
Get
Return _GLRowsGUID
End Get
Set(ByVal value As Guid)
SetPropertyValue("GLRowsGUID", _GLRowsGUID, value)
End Set
End Property
'-- Összegek !!!
Property InAmountHUF As Double
Get
Return Math.Round(_InAmountHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("InAmountHUF", _InAmountHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property OutAmountHUF As Double
Get
Return Math.Round(_OutAmountHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("OutAmountHUF", _OutAmountHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property InAmountDEV As Double
Get
Return Math.Round(_InAmountDEV, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("InAmountDEV", _InAmountDEV, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property OutAmountDEV As Double
Get
Return Math.Round(_OutAmountDEV, 4, MidpointRounding.AwayFromZero)
End Get
Set(ByVal value As Double)
SetPropertyValue("OutAmountDEV", _OutAmountDEV, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property ImportID As String
Get
Return _ImportID
End Get
Set(ByVal value As String)
SetPropertyValue("ImportID", _ImportID, value)
End Set
End Property
Property CashType As eCashType
Get
Return _CashType
End Get
Set(ByVal value As eCashType)
SetPropertyValue("CashType", _CashType, value)
End Set
End Property
Property TransactionType As eTransactionType
Get
Return _TransactionType
End Get
Set(ByVal value As eTransactionType)
SetPropertyValue("TransactionType", _TransactionType, value)
End Set
End Property
Property CurrencyRate2 As Double
Get
Return _CurrencyRate2
End Get
Set(value As Double)
SetPropertyValue("CurrencyRate2", _CurrencyRate2, value)
End Set
End Property
Property InAmountDEV2 As Double
Get
Return Math.Round(_InAmountDEV2, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("InAmountDEV2", _InAmountDEV2, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property OutAmountDEV2 As Double
Get
Return Math.Round(_OutAmountDEV2, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("OutAmountDEV2", _OutAmountDEV2, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property GLRowsType As eGLRowsType
Get
Return _GLRowsType
End Get
Set(value As eGLRowsType)
SetPropertyValue("GLRowsType", _GLRowsType, value)
End Set
End Property
<VisibleInDetailView(False)> _
<VisibleInListView(False)> _
<VisibleInLookupListView(False)> _
Property GLRowsRateDiff As GLRows
Get
Return _GLRowsRateDiff
End Get
Set(value As GLRows)
SetPropertyValue("GLRowsRateDiff", _GLRowsRateDiff, value)
End Set
End Property
<VisibleInDetailView(False)> _
<VisibleInListView(False)> _
<VisibleInLookupListView(False)> _
Property InvoiceRows As InvoiceRows
Get
Return _InvoiceRows
End Get
Set(value As InvoiceRows)
SetPropertyValue("InvoiceRows", _InvoiceRows, value)
End Set
End Property
<VisibleInDetailView(False)> _
<VisibleInListView(False)> _
<VisibleInLookupListView(False)> _
Property RegistryRowsFinancialControlling As RegistryRowsFinancialControlling
Get
Return _RegistryRowsFinancialControlling
End Get
Set(value As RegistryRowsFinancialControlling)
SetPropertyValue("RegistryRowsFinancialControlling", _RegistryRowsFinancialControlling, value)
End Set
End Property
Property BankImportHeaderSumDetail As BankImportHeaderSumDetail
Get
Return _BankImportHeaderSumDetail
End Get
Set(value As BankImportHeaderSumDetail)
SetPropertyValue("BankImportHeaderSumDetail", _BankImportHeaderSumDetail, value)
End Set
End Property
ReadOnly Property CurrencyRate As Double
Get
If AmountDEV <> 0 Then
Return AmountHUF / AmountDEV
Else
Return 1
End If
End Get
End Property
Public Sub AddGLRows(ByVal p_GLHeader As GLHeader, ByVal p_DebitChartOfAccounts As ChartOfAccounts, ByVal p_CreditChartOfAccounts As ChartOfAccounts, _
ByVal p_AmountDEV As Double, ByVal p_AmountHUF As Double, ByVal p_LiquidAssets As LiquidAssets, _
ByVal p_Customer As Customers, ByVal p_DateVAT As Date, _
ByVal p_VAT As VAT, ByVal p_NoteRows As String, ByVal p_UniqueObjects As UniqueObjects, _
ByVal p_Controlling As Controlling, ByVal p_JobNumberOBjects As JobNumberObjects, _
ByVal p_CostPlace As CostPlace, ByVal p_CostHolder As CostHolder, ByVal p_ConnectInfo As String, _
ByVal p_GLRowsTypeVAT As eGLRowsTypeVAT, ByVal p_GLRowsGUID As Guid, Optional ByVal p_TransactionType As eTransactionType = eTransactionType.eNotSet, _
Optional ByVal p_CashType As eCashType = eCashType.eNormal, Optional ByVal p_PartnerType As ePartnerType = ePartnerType.eNotSet)
TransactionType = p_TransactionType
GLHeader = p_GLHeader
DebitChartOfAccounts = p_DebitChartOfAccounts
CreditChartOfAccounts = p_CreditChartOfAccounts
AmountDEV = p_AmountDEV
AmountHUF = p_AmountHUF
LiquidAssets = p_LiquidAssets
Customer = p_Customer
DateVAT = p_DateVAT
VAT = p_VAT
NoteRows = p_NoteRows
UniqueObjects = p_UniqueObjects
Controlling = p_Controlling
JobNumberObjects = p_JobNumberOBjects
CostPlace = p_CostPlace
CostHolder = p_CostHolder
ConnectInfo = p_ConnectInfo
GLRowsTypeVAT = p_GLRowsTypeVAT
GLRowsGUID = p_GLRowsGUID
CashType = p_CashType
PartnerType = p_PartnerType
End Sub
Public Sub DivideRows(_ocur As Xpo.XPObjectSpace, p_GLRowsBase As GLRows, p_GLRowsDivideH As GLRowsDivideH, Optional p_WithCommit As Boolean = False)
'-- Az eljárás megcsinálja a megfelelõ fõkönyvi sor sorbontását
Dim _GLRowsDivideR As GLRowsDivideR
Dim _GLHeader As GLHeader
Dim _GLBank As GLBank
Dim _GLCassa As GLCassa
Dim _GLCompensation As GLCompensation
Dim _GLRows As GLRows
Dim _DebitChartOfAccounts As ChartOfAccounts = Nothing
Dim _CreditChartOfAccounts As ChartOfAccounts = Nothing
Dim _LiquidAssets As LiquidAssets = Nothing
Dim _CustomersFrom_Base As CustomersFrom = Nothing
Dim _Customers_Base As Customers = Nothing
Dim _ConnectInfo_Base As String = ""
Dim _PartnerType_Base As ePartnerType = ePartnerType.eNotSet
If p_GLRowsBase IsNot Nothing Then
_GLHeader = p_GLRowsBase.GLHeader
If p_GLRowsBase.PartnerType = ePartnerType.ePayabels Or p_GLRowsBase.PartnerType = ePartnerType.eReceivables Then
_CustomersFrom_Base = p_GLRowsBase.GLHeader.CustomersFrom
_Customers_Base = p_GLRowsBase.Customer
_PartnerType_Base = p_GLRowsBase.PartnerType
_ConnectInfo_Base = p_GLRowsBase.ConnectInfo
End If
If p_GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLBank Or _
p_GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLCassa Or _
p_GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLCompensation Or _
p_GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLMixed Then ' Bank esetén mi a helyzet !
Select Case p_GLRowsBase.GLHeader.GLDocumentType
Case eGLDocumentType.eGLBank
_GLBank = _ocur.FindObject(Of GLBank)(CriteriaOperator.Parse("Oid=?", p_GLRowsBase.GLHeader.Oid), True)
_LiquidAssets = _GLBank.LiquidAssets_Main
Case eGLDocumentType.eGLCassa
_GLCassa = _ocur.FindObject(Of GLCassa)(CriteriaOperator.Parse("Oid=?", p_GLRowsBase.GLHeader.Oid), True)
_LiquidAssets = _GLCassa.LiquidAssets_Cassa
Case eGLDocumentType.eGLCompensation
_GLCompensation = _ocur.FindObject(Of GLCompensation)(CriteriaOperator.Parse("Oid=?", p_GLRowsBase.GLHeader.Oid), True)
_LiquidAssets = _GLCompensation.LiquidAssets_Main
End Select
For Each _GLRowsDivideR In p_GLRowsDivideH.GLRowsDivideR
_GLRows = _ocur.CreateObject(Of GLRows)()
_GLRows.GLHeader = _GLHeader
If p_GLRowsBase.GLHeader.GLDocumentType <> eGLDocumentType.eGLMixed Then
If _LiquidAssets.GetChartOfAccounts(_GLRows.GLHeader.DateExecution.Year, 0).AccountNumber = p_GLRowsBase.DebitChartOfAccounts.AccountNumber Then
'-- Bankba jóváírás érkezett
_DebitChartOfAccounts = _LiquidAssets.GetChartOfAccounts(_GLRows.GLHeader.DateExecution.Year, 0)
If _GLRowsDivideR.ChartOfAccounts IsNot Nothing Then
_CreditChartOfAccounts = _GLRowsDivideR.ChartOfAccounts
Else
_CreditChartOfAccounts = p_GLRowsDivideH.GLRowsBase.CreditChartOfAccounts
End If
_GLRows.InAmountDEV = _GLRowsDivideR.AmountDEV
_GLRows.InAmountHUF = _GLRowsDivideR.AmountHUF
ElseIf _LiquidAssets.GetChartOfAccounts(_GLRows.GLHeader.DateExecution.Year, 0).AccountNumber = p_GLRowsBase.CreditChartOfAccounts.AccountNumber Then
'-- Banki terhelés
_CreditChartOfAccounts = _LiquidAssets.GetChartOfAccounts(_GLRows.GLHeader.DateExecution.Year, 0)
If _GLRowsDivideR.ChartOfAccounts IsNot Nothing Then
_DebitChartOfAccounts = _GLRowsDivideR.ChartOfAccounts
Else
_DebitChartOfAccounts = p_GLRowsDivideH.GLRowsBase.DebitChartOfAccounts
End If
_GLRows.OutAmountDEV = _GLRowsDivideR.AmountDEV
_GLRows.OutAmountHUF = _GLRowsDivideR.AmountHUF
End If
End If
If p_GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLMixed Then
_DebitChartOfAccounts = _GLRowsDivideR.DebitChartOfAccounts
_CreditChartOfAccounts = _GLRowsDivideR.CreditChartOfAccounts
_GLRows.OutAmountDEV = _GLRowsDivideR.AmountDEV
_GLRows.OutAmountHUF = _GLRowsDivideR.AmountHUF
_LiquidAssets = Nothing
End If
_GLRows.AddGLRows(_GLHeader, _ocur.GetObject(_DebitChartOfAccounts), _ocur.GetObject(CreditChartOfAccounts), _GLRowsDivideR.AmountDEV, _GLRowsDivideR.AmountHUF, _
_LiquidAssets, _ocur.GetObject(_GLRowsDivideR.Customers), _GLHeader.DateExecution, Nothing, _ocur.GetObject(_GLRowsDivideR.NoteRows), _
_ocur.GetObject(_GLRowsDivideR.UniqueObjects), _ocur.GetObject(_GLRowsDivideR.Controlling), _ocur.GetObject(_GLRowsDivideR.JobNumberObjects), _ocur.GetObject(_GLRowsDivideR.CostPlace), _
_ocur.GetObject(_GLRowsDivideR.CostHolder), _GLRowsDivideR.ConnectInfo, eGLRowsTypeVAT.eNettoRow, p_GLRowsBase.GLRowsGUID, _
p_GLRowsBase.TransactionType, p_GLRowsBase.CashType, p_GLRowsBase.PartnerType)
If p_WithCommit Then
_ocur.CommitChanges()
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow, _GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
End If
End If
Next
_ocur.Delete(p_GLRowsBase)
End If
If p_WithCommit Then
_ocur.CommitChanges()
If _PartnerType_Base = ePartnerType.ePayabels Or _PartnerType_Base = ePartnerType.eReceivables Then
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow, _CustomersFrom_Base, _Customers_Base, _PartnerType_Base, _ConnectInfo_Base)
End If
End If
End If
End Sub
End Class
@@ -0,0 +1,70 @@
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)> _
<Browsable(False)> _
<CreatableItem(False)> _
Public Class GLRowsFIFO
Inherits BaseObject
Private _GLRowsIn As GLRows
Private _GLRowsOut As GLRows
Private _InAmountDEV As Double = 0
Private _OutAmountDEV As Double = 0
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
Property GLRowsIn As GLRows
Get
Return _GLRowsIn
End Get
Set(value As GLRows)
SetPropertyValue("GLRowsIn", _GLRowsIn, value)
End Set
End Property
Property GLRowsOut As GLRows
Get
Return _GLRowsOut
End Get
Set(value As GLRows)
SetPropertyValue("GLRowsOut", _GLRowsOut, value)
End Set
End Property
Property InAmountDEV As Double
Get
Return _InAmountDEV
End Get
Set(value As Double)
SetPropertyValue("InAmountDEV", _InAmountDEV, value)
End Set
End Property
Property OutAmountDEV As Double
Get
Return _OutAmountDEV
End Get
Set(value As Double)
SetPropertyValue("OutAmountDEV", _OutAmountDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,60 @@
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 GLRowsStatistics
Inherits BaseObject
Private _MasterKey As Guid
Private _RegistryHeader As RegistryHeader
Private _InvoiceHeader As InvoiceHeader
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
<Browsable(False)> _
Property MasterKey As Guid
Get
Return _MasterKey
End Get
Set(value As Guid)
SetPropertyValue("MasterKey", _MasterKey, value)
End Set
End Property
Property RegistryHeader As RegistryHeader
Get
Return _RegistryHeader
End Get
Set(value As RegistryHeader)
SetPropertyValue("RegistryHeader", _RegistryHeader, value)
End Set
End Property
Property InvoiceHeader As InvoiceHeader
Get
Return _InvoiceHeader
End Get
Set(value As InvoiceHeader)
SetPropertyValue("InvoiceHeader", _InvoiceHeader, value)
End Set
End Property
End Class
@@ -0,0 +1,51 @@
Imports Microsoft.VisualBasic
Imports System
Imports System.Linq
Imports System.Text
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp
Imports System.ComponentModel
Imports DevExpress.ExpressApp.DC
Imports DevExpress.Data.Filtering
Imports DevExpress.Persistent.Base
Imports System.Collections.Generic
Imports DevExpress.ExpressApp.Model
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
'<ImageName("BO_Contact")> _
'<DefaultProperty("DisplayMemberNameForLookupEditorsOfThisType")> _
'<DefaultListViewOptions(MasterDetailMode.ListViewOnly, False, NewItemRowPosition.None)> _
'<Persistent("DatabaseTableName")> _
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False), NonPersistent> _
Public Class GLBaseMainCheck ' Specify more UI options using a declarative approach (http://documentation.devexpress.com/#Xaf/CustomDocument2701).
Inherits BaseObject ' Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (http://documentation.devexpress.com/#Xaf/CustomDocument3146).
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place your initialization code here (http://documentation.devexpress.com/#Xaf/CustomDocument2834).
End Sub
Property AlertString As String
Property AlartCount As Long = 0
'Private _PersistentProperty As String
'<XafDisplayName("My display name"), ToolTip("My hint message")> _
'<ModelDefault("EditMask", "(000)-00"), Index(0), VisibleInListView(False)> _
'<Persistent("DatabaseColumnName"), RuleRequiredField(DefaultContexts.Save)> _
'Public Property PersistentProperty() As String
' Get
' Return _PersistentProperty
' End Get
' Set(ByVal value As String)
' SetPropertyValue("PersistentProperty", _PersistentProperty, value)
' End Set
'End Property
'<Action(Caption:="My UI Action", ConfirmationMessage:="Are you sure?", ImageName:="Attention", AutoCommit:=True)> _
'Public Sub ActionMethod()
' ' Trigger a custom business logic for the current record in the UI (http://documentation.devexpress.com/#Xaf/CustomDocument2619).
' Me.PersistentProperty = "Paid"
'End Sub
End Class
@@ -0,0 +1,363 @@
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)> _
<Appearance("GLRowsDivideH-row_AmountDEV disable", targetitems:="row_AmountDEV;AmountDiffDEV", criteria:="GLRowsBase.GLHeader.CurrencyName.ShortName='HUF'", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("GLRowsDivideH-row_CashType disable", targetitems:="row_ChartOfAccounts", criteria:="row_CashType=0", visibility:=Editors.ViewItemVisibility.Hide)> _
<RuleCriteria("RuleCriteria GLRowsDivideH-row_Controlling.IsParent=False", "aToTable_GLRowsDivide", "row_Controlling.IsParent=False", _
"Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False, targetcriteria:="row_PartnerType=-1")> _
<Appearance("GLRowsDivideH-hide if not GLMixed", "ViewItem", targetitems:="row_DebitChartOfAccounts;row_CreditChartOfAccounts", _
criteria:="GLRowsBase.GLHeader.GLDocumentType != 0", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("GLRowsDivideH-hide if GLMixed", "ViewItem", targetitems:="row_ChartOfAccounts", criteria:="GLRowsBase.GLHeader.GLDocumentType = 0", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("GLRowsDivideH-hide if not Partner ViewItem", "ViewItem", targetitems:="row_Customers;row_ConnectInfo", criteria:="row_PartnerType=-1", visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
<Appearance("GLRowsDivideH-hide if not Partner Action", AppearanceItemType:="Action", targetitems:="aFindPCI", criteria:="row_PartnerType=-1", visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
<RuleCriteria("RuleCriteria GLRowsDivideH-row_ChartOfAccounts", "aToTable_GLRowsDivide", "row_ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
<RuleCriteria("RuleCriteria GLRowsDivideH-row_DebitChartOfAccounts", "aToTable_GLRowsDivide", "row_DebitChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
<RuleCriteria("RuleCriteria GLRowsDivideH-row_CreditChartOfAccounts", "aToTable_GLRowsDivide", "row_CreditChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
Public Class GLRowsDivideH
Inherits BaseObject
Private _GLRows_Oid As Guid
Private _row_CashType As eCashType
Private _row_PartnerType As ePartnerType
Private _row_Customers As Customers
Private _row_ConnectInfo As String
Private _row_ChartOfAccounts As ChartOfAccounts
Private _row_DebitChartOfAccounts As ChartOfAccounts
Private _row_CreditChartOfAccounts As ChartOfAccounts
Private _row_Controlling As Controlling
Private _row_CostHolder As CostHolder
Private _row_CostPlace As CostPlace
Private _row_JobNumberObjects As JobNumberObjects
Private _row_UniqueObjects As UniqueObjects
Private _row_Cars As Cars 'Jármû
Private _row_HRPerson As HRPerson 'Ember
Private _row_Phones As Phones 'Telefon
Private _row_AmountHUF As Double
Private _row_AmountDEV As Double
Private _row_NoteRow As String
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()
End Sub
ReadOnly Property GLRowsBase As GLRows
Get
Dim _GLRows As GLRows
_GLRows = Session.FindObject(Of GLRows)(CriteriaOperator.Parse("Oid=?", Me.GLRows_Oid))
Return _GLRows
End Get
End Property
<RuleRange("GLRowsDivideH-AmountDiffHUF", "DialogOk_Contexts", 0, 0)> _
ReadOnly Property AmountDiffHUF As Double
Get
Dim _AmountHUF As Double = 0
Dim _GLRows As GLRows = Session.FindObject(Of GLRows)(CriteriaOperator.Parse("Oid=?", GLRows_Oid))
Dim _GLRowsDivideR As GLRowsDivideR
For Each _GLRowsDivideR In Me.GLRowsDivideR
_AmountHUF += _GLRowsDivideR.AmountHUF
Next
If _GLRows IsNot Nothing Then
Return _GLRows.AmountHUF - _AmountHUF
Else
Return -_AmountHUF
End If
End Get
End Property
<RuleRange("GLRowsDivideH-AmountDiffDEV", "DialogOk_Contexts", 0, 0)> _
ReadOnly Property AmountDiffDEV As Double
Get
Dim _AmountDEV As Double = 0
Dim _GLRows As GLRows = Session.FindObject(Of GLRows)(CriteriaOperator.Parse("Oid=?", GLRows_Oid))
Dim _GLRowsDivideR As GLRowsDivideR
For Each _GLRowsDivideR In Me.GLRowsDivideR
_AmountDEV += _GLRowsDivideR.AmountDEV
Next
If _GLRows IsNot Nothing Then
Return _GLRows.AmountDEV - _AmountDEV
Else
Return -_AmountDEV
End If
GLRowsBase.GLHeader.CurrencyName.ShortName = "HUF"
End Get
End Property
Property GLRows_Oid As Guid
Get
Return _GLRows_Oid
End Get
Set(ByVal value As Guid)
SetPropertyValue("GLRows_Oid", _GLRows_Oid, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If GLRowsBase IsNot Nothing Then
row_Controlling = GLRowsBase.Controlling
row_CostHolder = GLRowsBase.CostHolder
row_CostPlace = GLRowsBase.CostPlace
row_UniqueObjects = GLRowsBase.UniqueObjects
row_JobNumberObjects = GLRowsBase.JobNumberObjects
row_NoteRow = GLRowsBase.NoteRows
row_AmountDEV = GLRowsBase.AmountDEV
row_AmountHUF = GLRowsBase.AmountHUF
If GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLMixed Then
row_DebitChartOfAccounts = GLRowsBase.DebitChartOfAccounts
row_CreditChartOfAccounts = GLRowsBase.CreditChartOfAccounts
If GLRowsBase.PartnerType = ePartnerType.eNotSet Then
row_CashType = eCashType.eNormal
row_PartnerType = ePartnerType.eNotSet
Else
row_CashType = eCashType.ePartner
row_PartnerType = GLRowsBase.PartnerType
End If
End If
End If
End If
End Set
End Property
'--Nonpersistent propertyk
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_CashType As eCashType
Get
Return _row_CashType
End Get
Set(ByVal value As eCashType)
SetPropertyValue("row_CashType", _row_CashType, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_PartnerType As ePartnerType
Get
Return _row_PartnerType
End Get
Set(ByVal value As ePartnerType)
SetPropertyValue("row_PartnerType", _row_PartnerType, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<RuleRequiredField("GLRowsDivideH-row_Customers", "aToTable_GLRowsDivide", targetcriteria:="row_CashType=0")> _
<VisibleInListView(False)> _
Property row_Customers As Customers
Get
Return _row_Customers
End Get
Set(ByVal value As Customers)
SetPropertyValue("row_Customers", _row_Customers, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<RuleRequiredField("GLRowsDivideH-row_ConnectInfo", "aToTable_GLRowsDivide", targetcriteria:="row_CashType=0 and GLRowsBase.GLHeader.GLDocumentType != 0")> _
<VisibleInListView(False)> _
Property row_ConnectInfo As String
Get
Return _row_ConnectInfo
End Get
Set(ByVal value As String)
SetPropertyValue("row_ConnectInfo", _row_ConnectInfo, value)
End Set
End Property
<NonPersistent()>
<RuleRequiredField("GLRowsDivideH-row_CashType", "aToTable_GLRowsDivide", TargetCriteria:="row_CashType=1 and GLRowsBase.GLHeader.GLDocumentType != 0")>
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.GLRowsBase.GLHeader.DateExecution')")>
Property row_ChartOfAccounts As ChartOfAccounts
Get
Return _row_ChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("row_ChartOfAccounts", _row_ChartOfAccounts, value)
End Set
End Property
<NonPersistent()>
<RuleRequiredField("GLRowsDivideH-row_DebitChartOfAccounts", "aToTable_GLRowsDivide", TargetCriteria:="GLRowsBase.GLHeader.GLDocumentType = 0")>
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.GLRowsBase.GLHeader.DateExecution')")>
Property row_DebitChartOfAccounts As ChartOfAccounts
Get
Return _row_DebitChartOfAccounts
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("row_DebitChartOfAccounts", _row_DebitChartOfAccounts, value)
End Set
End Property
<NonPersistent()>
<RuleRequiredField("GLRowsDivideH-row_CreditChartOfAccounts", "aToTable_GLRowsDivide", TargetCriteria:="GLRowsBase.GLHeader.GLDocumentType = 0")>
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.GLRowsBase.GLHeader.DateExecution')")>
Property row_CreditChartOfAccounts As ChartOfAccounts
Get
Return _row_CreditChartOfAccounts
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("row_CreditChartOfAccounts", _row_CreditChartOfAccounts, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_Controlling As Controlling
Get
Return _row_Controlling
End Get
Set(ByVal value As Controlling)
SetPropertyValue("row_Controlling", _row_Controlling, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_CostHolder As CostHolder
Get
Return _row_CostHolder
End Get
Set(ByVal value As CostHolder)
SetPropertyValue("row_CostHolder", _row_CostHolder, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_CostPlace As CostPlace
Get
Return _row_CostPlace
End Get
Set(ByVal value As CostPlace)
SetPropertyValue("row_CostPlace", _row_CostPlace, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_JobNumberObjects As JobNumberObjects
Get
Return _row_JobNumberObjects
End Get
Set(ByVal value As JobNumberObjects)
SetPropertyValue("row_JobNumberObjects", _row_JobNumberObjects, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_UniqueObjects As UniqueObjects
Get
Return _row_UniqueObjects
End Get
Set(ByVal value As UniqueObjects)
SetPropertyValue("row_UniqueObjects", _row_UniqueObjects, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_Cars As Cars
Get
Return _row_Cars
End Get
Set(value As Cars)
SetPropertyValue("row_Cars", _row_Cars, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_HRPerson As HRPerson
Get
Return _row_HRPerson
End Get
Set(value As HRPerson)
SetPropertyValue("row_HRPerson", _row_HRPerson, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_Phones As Phones
Get
Return _row_Phones
End Get
Set(value As Phones)
SetPropertyValue("row_Phones", _row_Phones, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<RuleRange("GLRowsDivideH-row_AmountHUF", "aToTable_GLRowsDivide", 0, 999999999)> _
<VisibleInListView(False)> _
Property row_AmountHUF As Double
Get
Return _row_AmountHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("row_AmountHUF", _row_AmountHUF, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<RuleRange("GLRowsDivideH-row_AmountDEV", "aToTable_GLRowsDivide", 0, 999999999, targetcriteria:="GLRowsBase.GLHeader.CurrencyName.ShortName<>'HUF'")> _
<VisibleInListView(False)> _
Property row_AmountDEV As Double
Get
Return _row_AmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("row_AmountDEV", _row_AmountDEV, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
If Me.GLRowsBase.CurrencyRate <> 0 And GLRowsBase.GLHeader.CurrencyName.ShortName <> "HUF" Then
row_AmountHUF = value * Me.GLRowsBase.CurrencyRate
End If
End If
End Set
End Property
<Size(255)> _
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_NoteRow As String
Get
Return _row_NoteRow
End Get
Set(ByVal value As String)
SetPropertyValue("row_NoteRow", _row_NoteRow, value)
End Set
End Property
<VisibleInListView(False)> _
<Association("GLRowsDivideH-GLRowsDivideR", GetType(GLRowsDivideR))> _
ReadOnly Property GLRowsDivideR As XPCollection(Of GLRowsDivideR)
Get
Return GetCollection(Of GLRowsDivideR)("GLRowsDivideR")
End Get
End Property
<VisibleInListView(False)> _
ReadOnly Property GLRows As XPCollection(Of GLRows)
Get
Return New XPCollection(Of GLRows)(Session, CriteriaOperator.Parse("Oid=?", Me.GLRows_Oid))
End Get
End Property
End Class
@@ -0,0 +1,176 @@
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)> _
Public Class GLRowsDivideR
Inherits BaseObject
Private _GLRowsDivideH As GLRowsDivideH
Private _ChartOfAccounts As ChartOfAccounts
Private _CreditChartOfAccounts As ChartOfAccounts
Private _DebitChartOfAccounts As ChartOfAccounts
Private _CashType As eCashType
Private _PartnerType As ePartnerType
Private _Customers As Customers
Private _ConnectInfo As String
'Jelölõ adatok ...
Private _Controlling As Controlling
Private _CostHolder As CostHolder
Private _CostPlace As CostPlace
Private _UniqueObjects As UniqueObjects
Private _JobNumberObjects As JobNumberObjects
Private _NoteRows As String
Private _AmountHUF As Double
Private _AmountDEV As Double
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("GLRowsDivideH-GLRowsDivideR", GetType(GLRowsDivideH))> _
Property GLRowsDivideH As GLRowsDivideH
Get
Return _GLRowsDivideH
End Get
Set(value As GLRowsDivideH)
SetPropertyValue("GLRowsDivideH", _GLRowsDivideH, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property ChartOfAccounts As ChartOfAccounts
Get
Return _ChartOfAccounts
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
End Set
End Property
Property CreditChartOfAccounts As ChartOfAccounts
Get
Return _CreditChartOfAccounts
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("CreditChartOfAccounts", _CreditChartOfAccounts, value)
End Set
End Property
Property DebitChartOfAccounts As ChartOfAccounts
Get
Return _DebitChartOfAccounts
End Get
Set(value As ChartOfAccounts)
SetPropertyValue("DebitChartOfAccounts", _DebitChartOfAccounts, value)
End Set
End Property
Property CashType As eCashType
Get
Return _CashType
End Get
Set(value As eCashType)
SetPropertyValue("CashType", _CashType, 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 ConnectInfo As String
Get
Return _ConnectInfo
End Get
Set(value As String)
SetPropertyValue("ConnectInfo", _ConnectInfo, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
Property Controlling As Controlling
Get
Return _Controlling
End Get
Set(value As Controlling)
SetPropertyValue("Controlling", _Controlling, value)
End Set
End Property
Property CostHolder As CostHolder
Get
Return _CostHolder
End Get
Set(value As CostHolder)
SetPropertyValue("CostHolder", _CostHolder, value)
End Set
End Property
Property CostPlace As CostPlace
Get
Return _CostPlace
End Get
Set(value As CostPlace)
SetPropertyValue("CostPlace", _CostPlace, value)
End Set
End Property
Property UniqueObjects As UniqueObjects
Get
Return _UniqueObjects
End Get
Set(value As UniqueObjects)
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
End Set
End Property
Property JobNumberObjects As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
End Set
End Property
<Size(255)> _
Property NoteRows As String
Get
Return _NoteRows
End Get
Set(value As String)
SetPropertyValue("NoteRows", _NoteRows, value)
End Set
End Property
Property AmountHUF As Double
Get
Return _AmountHUF
End Get
Set(value As Double)
SetPropertyValue("AmountHUF", _AmountHUF, value)
End Set
End Property
Property AmountDEV As Double
Get
Return _AmountDEV
End Get
Set(value As Double)
SetPropertyValue("AmountDEV", _AmountDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,82 @@
Partial Class GLRowsDivideVC
<System.Diagnostics.DebuggerNonUserCode()> _
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
MyClass.New()
'Required for Windows.Forms Class Composition Designer support
Container.Add(Me)
End Sub
'Component overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.aToTable_GLRowsDivide = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTableD_GLRowsDivide = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aFindPCI = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aToTable_GLRowsDivide
'
Me.aToTable_GLRowsDivide.Caption = "Add row"
Me.aToTable_GLRowsDivide.Category = "aToTable_GLRowsDivide"
Me.aToTable_GLRowsDivide.ConfirmationMessage = Nothing
Me.aToTable_GLRowsDivide.Id = "aToTable_GLRowsDivide"
Me.aToTable_GLRowsDivide.ImageName = "table_add"
Me.aToTable_GLRowsDivide.Shortcut = Nothing
Me.aToTable_GLRowsDivide.Tag = Nothing
Me.aToTable_GLRowsDivide.TargetObjectsCriteria = Nothing
Me.aToTable_GLRowsDivide.TargetViewId = ""
Me.aToTable_GLRowsDivide.ToolTip = Nothing
Me.aToTable_GLRowsDivide.TypeOfView = Nothing
'
'aToTableD_GLRowsDivide
'
Me.aToTableD_GLRowsDivide.Caption = "Delete row"
Me.aToTableD_GLRowsDivide.Category = "aToTableD_GLRowsDivide"
Me.aToTableD_GLRowsDivide.ConfirmationMessage = Nothing
Me.aToTableD_GLRowsDivide.Id = "aToTableD_GLRowsDivide"
Me.aToTableD_GLRowsDivide.ImageName = "table_delete"
Me.aToTableD_GLRowsDivide.Shortcut = Nothing
Me.aToTableD_GLRowsDivide.Tag = Nothing
Me.aToTableD_GLRowsDivide.TargetObjectsCriteria = Nothing
Me.aToTableD_GLRowsDivide.TargetViewId = ""
Me.aToTableD_GLRowsDivide.ToolTip = Nothing
Me.aToTableD_GLRowsDivide.TypeOfView = Nothing
'
'aFindPCI
'
Me.aFindPCI.AcceptButtonCaption = Nothing
Me.aFindPCI.CancelButtonCaption = Nothing
Me.aFindPCI.Caption = "aFind PCI"
Me.aFindPCI.ConfirmationMessage = Nothing
Me.aFindPCI.Id = "aFindPCI"
Me.aFindPCI.ImageName = Nothing
Me.aFindPCI.Shortcut = Nothing
Me.aFindPCI.Tag = Nothing
Me.aFindPCI.TargetObjectsCriteria = Nothing
Me.aFindPCI.TargetViewId = ""
Me.aFindPCI.ToolTip = Nothing
Me.aFindPCI.TypeOfView = Nothing
End Sub
Friend WithEvents aToTable_GLRowsDivide As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTableD_GLRowsDivide As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFindPCI As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="aToTable_GLRowsDivide.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aToTableD_GLRowsDivide.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aFindPCI.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>393, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,227 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.Filtering
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.ExpressApp.CloneObject
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.SystemModule
Public Class GLRowsDivideVC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of GLRowsDivideVC).aFindPCI.Active.SetItemValue("", False)
Frame.GetController(Of GLRowsDivideVC).aToTable_GLRowsDivide.Active.SetItemValue("", False)
Frame.GetController(Of GLRowsDivideVC).aToTableD_GLRowsDivide.Active.SetItemValue("", False)
If View.Id Like "GLRowsDivideH_GLRows_ListView*" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id Like "GLRowsDivideH_GLRowsDivideR_ListView*" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id Like "GLRowsDivideH_DetailView*" Then
Frame.GetController(Of GLRowsDivideVC).aFindPCI.Active.SetItemValue("", True)
Frame.GetController(Of GLRowsDivideVC).aToTable_GLRowsDivide.Active.SetItemValue("", True)
Frame.GetController(Of GLRowsDivideVC).aToTableD_GLRowsDivide.Active.SetItemValue("", True)
AddHandler Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DialogController)().AcceptAction.Executing, AddressOf GLRowsDivideH_DetailView_AcceptAction_Executing
End If
If View.Id = "GLRowsDivideH_GLRows_ListView_ConnectionDivide" Then
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
End If
If View.Id = "GLRowsDivideH_GLRowsDivideR_ListView_ConnectionDivide" Then
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
End If
End Sub
Sub GLRowsDivideH_DetailView_AcceptAction_Executing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
Validator.RuleSet.ValidateAll(View.ObjectSpace, View.SelectedObjects, "DialogOk_Contexts")
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id Like "GLRowsDivideH_GLRows_ListView*" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id Like "GLRowsDivideH_GLRowsDivideR_ListView*" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id Like "GLRowsDivideH_DetailView*" Then
Frame.GetController(Of GLRowsDivideVC).aFindPCI.Active.SetItemValue("", False)
Frame.GetController(Of GLRowsDivideVC).aToTable_GLRowsDivide.Active.SetItemValue("", False)
Frame.GetController(Of GLRowsDivideVC).aToTableD_GLRowsDivide.Active.SetItemValue("", True)
RemoveHandler Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DialogController)().AcceptAction.Executing, AddressOf GLRowsDivideH_DetailView_AcceptAction_Executing
End If
End Sub
Protected Overrides Sub OnViewControlsCreated()
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
MyBase.OnViewControlsCreated()
If View.Id = "GLRowsDivideH_DetailView" Then
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(View.SelectedObjects(0), GLRowsDivideH)
If _GLRowsDivideH.GLRowsBase IsNot Nothing Then
If _GLRowsDivideH.GLRowsBase.Customer IsNot Nothing Then
_GLRowsDivideH.row_Customers = _ocur.FindObject(Of Customers)(CriteriaOperator.Parse("Oid=?", _GLRowsDivideH.GLRowsBase.Customer.Oid))
_GLRowsDivideH.row_CashType = _GLRowsDivideH.GLRowsBase.CashType
_GLRowsDivideH.row_PartnerType = _GLRowsDivideH.GLRowsBase.PartnerType
_GLRowsDivideH.row_ConnectInfo = _GLRowsDivideH.GLRowsBase.ConnectInfo
_GLRowsDivideH.row_Controlling = _GLRowsDivideH.GLRowsBase.Controlling
_GLRowsDivideH.row_CostHolder = _GLRowsDivideH.GLRowsBase.CostHolder
_GLRowsDivideH.row_CostPlace = _GLRowsDivideH.GLRowsBase.CostPlace
_GLRowsDivideH.row_UniqueObjects = _GLRowsDivideH.GLRowsBase.UniqueObjects
_GLRowsDivideH.row_JobNumberObjects = _GLRowsDivideH.GLRowsBase.JobNumberObjects
_GLRowsDivideH.row_NoteRow = _GLRowsDivideH.GLRowsBase.NoteRows
End If
End If
End If
End Sub
Private Sub aFindPCI_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aFindPCI.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(View.SelectedObjects(0), GLRowsDivideH)
Dim _CollectionSource As CollectionSource = New CollectionSource(_onew, GetType(PCIGroup))
If _GLRowsDivideH IsNot Nothing Then
If _GLRowsDivideH.row_Customers IsNot Nothing Then
_CollectionSource.Criteria.Clear()
_CollectionSource.BeginUpdateCriteria()
_CollectionSource.Criteria("1") = CriteriaOperator.Parse("Customers.Oid=?", _GLRowsDivideH.row_Customers.Oid)
_CollectionSource.Criteria("2") = CriteriaOperator.Parse("PartnerType=?", _GLRowsDivideH.row_PartnerType)
_CollectionSource.Criteria("3") = CriteriaOperator.Parse("CustomersFrom.Oid=?", _GLRowsDivideH.GLRowsBase.GLHeader.CustomersFrom.Oid)
_CollectionSource.Criteria("4") = CriteriaOperator.Parse("(BallanceHUF<>0 or BallanceDEV<>0)")
_CollectionSource.Criteria("5") = CriteriaOperator.Parse("(CurrencyName_Account.ShortName=? or CurrencyName_Account.ShortName='HUF')", _GLRowsDivideH.GLRowsBase.LiquidAssets.CurrencyName.ShortName)
_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("PCIGroup_ListView_Find", _CollectionSource, True)
Else
_CollectionSource.Criteria.Clear()
_CollectionSource.BeginUpdateCriteria()
_CollectionSource.Criteria("1") = CriteriaOperator.Parse("PartnerType=?", _GLRowsDivideH.row_PartnerType)
_CollectionSource.Criteria("2") = CriteriaOperator.Parse("CustomersFrom.Oid=?", _GLRowsDivideH.GLRowsBase.GLHeader.CustomersFrom.Oid)
_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("PCIGroup_ListView_Find", _CollectionSource, True)
End If
Else
'Ez - elméletileg - nem fordulhat elõ.
End If
End Sub
Private Sub aFindPCI_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aFindPCI.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _PCIGroup As PCIGroup
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(View.SelectedObjects(0), GLRowsDivideH)
Dim _GLRowsDivideR As GLRowsDivideR
For Each _PCIGroup In e.PopupWindow.View.SelectedObjects
_GLRowsDivideR = _ocur.CreateObject(Of GLRowsDivideR)()
_GLRowsDivideR.GLRowsDivideH = _GLRowsDivideH
_GLRowsDivideR.CashType = eCashType.ePartner
_GLRowsDivideR.ChartOfAccounts = Nothing
_GLRowsDivideR.Customers = _ocur.GetObject(_PCIGroup.Customers)
_GLRowsDivideR.ConnectInfo = _PCIGroup.ConnectInfo
_GLRowsDivideR.AmountDEV = Math.Abs(_PCIGroup.BallanceDEV)
_GLRowsDivideR.AmountHUF = Math.Abs(_PCIGroup.BallanceHUF)
_GLRowsDivideR.Save()
Next
_ocur.CommitChanges()
View.Refresh()
End Sub
Private Sub aToTable_GLRowsDivide_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTable_GLRowsDivide.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(View.SelectedObjects(0), GLRowsDivideH)
Dim _GLRowsDivideR As GLRowsDivideR
If _GLRowsDivideH IsNot Nothing Then
If _GLRowsDivideH.GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLMixed Then
If _GLRowsDivideH.row_CreditChartOfAccounts Is _GLRowsDivideH.row_DebitChartOfAccounts Then
Throw New Exception("*Nem lehet ugyan az a tartozik és a követel fõkönyvi szám !")
End If
End If
_GLRowsDivideR = _ocur.CreateObject(Of GLRowsDivideR)()
_GLRowsDivideR.GLRowsDivideH = _GLRowsDivideH
_GLRowsDivideR.CashType = _GLRowsDivideH.row_CashType
If _GLRowsDivideH.row_CashType = eCashType.eNormal Then
_GLRowsDivideR.ChartOfAccounts = _GLRowsDivideH.row_ChartOfAccounts
Else
_GLRowsDivideR.ChartOfAccounts = Nothing
End If
If _GLRowsDivideH.GLRowsBase.GLHeader.GLDocumentType = eGLDocumentType.eGLMixed Then
_GLRowsDivideR.DebitChartOfAccounts = _GLRowsDivideH.row_DebitChartOfAccounts
_GLRowsDivideR.CreditChartOfAccounts = _GLRowsDivideH.row_CreditChartOfAccounts
End If
_GLRowsDivideR.AmountHUF = _GLRowsDivideH.row_AmountHUF
_GLRowsDivideR.AmountDEV = _GLRowsDivideH.row_AmountDEV
_GLRowsDivideR.ConnectInfo = _GLRowsDivideH.row_ConnectInfo
_GLRowsDivideR.Customers = _GLRowsDivideH.row_Customers
_GLRowsDivideR.NoteRows = _GLRowsDivideH.row_NoteRow
'-- Jelölõ adatok
_GLRowsDivideR.Controlling = _GLRowsDivideH.row_Controlling
_GLRowsDivideR.CostHolder = _GLRowsDivideH.row_CostHolder
_GLRowsDivideR.CostPlace = _GLRowsDivideH.row_CostPlace
_GLRowsDivideR.JobNumberObjects = _GLRowsDivideH.row_JobNumberObjects
_GLRowsDivideR.UniqueObjects = _GLRowsDivideH.row_UniqueObjects
'--
_GLRowsDivideR.Save()
View.Refresh()
_GLRowsDivideH.row_AmountDEV = _GLRowsDivideH.AmountDiffDEV
_GLRowsDivideH.row_AmountHUF = _GLRowsDivideH.AmountDiffHUF
End If
End Sub
Private Sub aToTableD_GLRowsDivide_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTableD_GLRowsDivide.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(View.SelectedObjects(0), GLRowsDivideH)
'Törli a táblázatban lévõ sort
Dim _GLRowsDivideR_ListEditor As ListPropertyEditor
Dim _GLRowsDivideR As GLRowsDivideR
Dim i As Long
_GLRowsDivideR_ListEditor = TryCast(View, DetailView).FindItem("GLRowsDivideR")
_GLRowsDivideR = TryCast(_GLRowsDivideR_ListEditor.ListView.CurrentObject, GLRowsDivideR)
If _GLRowsDivideR IsNot Nothing Then
_GLRowsDivideR.Delete()
View.Refresh()
End If
End Sub
End Class
@@ -0,0 +1,35 @@
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), NonPersistent> _
Public Class GLRowsNormalToPartnerPopup
Inherits BaseObject
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
Property PartnerType As ePartnerType
Property Customers As Customers
Property ConnectInfo As String
Property TransactionType As eTransactionType
End Class