Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,354 @@
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
'<EditorStateRule("GLCompensation-Partner-hide", "row_ChartOfAccounts", EditorState.Hidden, "row_TransactionType in (0,1)", ViewType.DetailView)> _
'<EditorStateRule("GLCompensation-Partnerconnection-hide", "row_PCIGroup;row_PartnerType", EditorState.Hidden, "row_TransactionType in (2,3) OR IsEditable=False", ViewType.DetailView)> _
'<EditorStateRule("GLCompensation-Hide GLCompensation-LiquidAssets", "LiquidAssets_Main", EditorState.Disabled, "(IsNull(LiquidAssets_Main))=False", ViewType.DetailView)> _
'<EditorStateRule("Hide row_CurrencyRate2 in GLCompensation", "row_CurrencyRate2", EditorState.Hidden, "LiquidAssets_Main.CurrencyName.ShortName = row_CurrencyName2.ShortName", ViewType.DetailView)> _
'<EditorStateRule("Hide row_CurrencyRate2 in GLCompensation and HUF", "row_CurrencyRate2", EditorState.Hidden, "LiquidAssets_Main.CurrencyName.ShortName ='HUF' or row_CurrencyName2.ShortName='HUF'", ViewType.DetailView)> _
'<EditorStateRule("GLCompensation-Hide DEV info in HUF", "TotalInAmountDEV;TotalOutAmountDEV;BallanceDEV;CloseDEV", EditorState.Hidden, "CurrencyName.ShortName='HUF'", ViewType.DetailView)> _
'<EditorStateRule("GLCompensation-Hide HUF info in DEV", "TotalInAmountHUF;TotalOutAmountHUF;BallanceHUF;CloseHUF", EditorState.Hidden, "CurrencyName.ShortName!='HUF'", ViewType.DetailView)> _
'<EditorStateRule("Disable GLCompensation.row_AmountHUF when DEV != HUF", "row_AmountHUF", EditorState.Disabled, "LiquidAssets_Main.CurrencyName.ShortName != 'HUF'", ViewType.DetailView)> _
<Appearance("GLCompensation-Hide GLCompensation-LiquidAssets", TargetItems:="LiquidAssets_Main", Criteria:="(IsNull(LiquidAssets_Main))=False", Enabled:=False, Context:="DetailView")> _
<Appearance("Disable GLCompensation.row_AmountHUF when DEV != HUF", TargetItems:="row_AmountHUF", Criteria:="LiquidAssets_Main.CurrencyName.ShortName != 'HUF'", Enabled:=False, Context:="DetailView")> _
<DefaultClassOptions()> _
<NavigationItem("FinancialTransactions")> _
<Appearance("GLCompensation-Partner-hide", TargetItems:="row_ChartOfAccounts", Criteria:="row_TransactionType in (0,1)", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("GLCompensation-Partnerconnection-hide", TargetItems:="row_PCIGroup;row_PartnerType", Criteria:="row_TransactionType in (2,3) OR IsEditable=False", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("Hide row_CurrencyRate2 in GLCompensation", TargetItems:="row_CurrencyRate2", Criteria:="LiquidAssets_Main.CurrencyName.ShortName = row_CurrencyName2.ShortName", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("Hide row_CurrencyRate2 in GLCompensation and HUF", TargetItems:="row_CurrencyRate2", Criteria:="LiquidAssets_Main.CurrencyName.ShortName ='HUF' or row_CurrencyName2.ShortName='HUF'", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("GLCompensation-Hide DEV info in HUF", TargetItems:="TotalInAmountDEV;TotalOutAmountDEV;BallanceDEV;CloseDEV", Criteria:="CurrencyName.ShortName='HUF'", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("GLCompensation-Hide HUF info in DEV", TargetItems:="TotalInAmountHUF;TotalOutAmountHUF;BallanceHUF;CloseHUF", Criteria:="CurrencyName.ShortName!='HUF'", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("Hide in GLCompensation row_Amount2 when CurrencyName2=CurrencyName", AppearanceItemType.ViewItem, "row_CurrencyName2.ShortName=LiquidAssets_Main.CurrencyName.ShortName", TargetItems:="row_CurrencyRate2;row_AmountDEV2", visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide row_ info when IsEditable=False", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="row_PartnerType; row_TransactionType; row_ChartOfAccounts;" _
& "row_PCIGroup;", visibility:=Editors.ViewItemVisibility.Hide)> _
<RuleCriteria("RuleCriteria GLCompensation-row_ChartOfAccounts", "aToTable_GLCompensation_Contexts", "row_ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
Public Class GLCompensation
Inherits GLHeader
Private _PartnerType As ePartnerType
Private _TransactionType As eTransactionType
Private _ChartOfAccounts As ChartOfAccounts
Private _TotalInAmountHUF As Double = 0
Private _TotalOutAmountHUF As Double = 0
Private _TotalInAmountDEV As Double = 0
Private _TotalOutAmountDEV As Double = 0
Private _LiquidAssets As LiquidAssets
Private _BallanceHUF As Double
Private _BallanceDEV As Double
Private _PCIGroup As PCIGroup
Private _GLHeader_RateDiff As GLHeader 'Kapcsolódó árf. kül. elszámolási vegyes bizonylat
'-- A másodlagos
Private _row_AmountDEV2 As Double = 0
Private _row_CurrencyRate2 As Double = 1
Private _row_CurrencyName2 As CurrencyName
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
If Session.IsNewObject(Me) Then Me.GLDocumentType = eGLDocumentType.eGLCompensation
End Sub
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_PartnerType() As ePartnerType
Get
Return _PartnerType
End Get
Set(ByVal value As ePartnerType)
SetPropertyValue("row_PartnerType", _PartnerType, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_TransactionType() As eTransactionType
Get
Return _TransactionType
End Get
Set(ByVal value As eTransactionType)
SetPropertyValue("row_TransactionType", _TransactionType, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Select Case value
Case eTransactionType.eNormalCredit, eTransactionType.eNormalDebit, eTransactionType.eNotSet
row_CurrencyName2 = LiquidAssets_Main.CurrencyName
End Select
Select Case value
Case eTransactionType.eNormalCredit, eTransactionType.eNormalDebit, eTransactionType.eNotSet
Me.row_PartnerType = ePartnerType.eNotSet
End Select
End If
End Set
End Property
<NonPersistent()> _
<DataSourceCriteria("AccountYear=GetYear('@This.DateExecution')")> _
<RuleRequiredField("GLCompensation-row_ChartOfAccounts", "aToTable_GLCompensation_Contexts", TargetCriteria:="row_TransactionType in (2,3,4)")> _
<VisibleInListView(False)> _
Property row_ChartOfAccounts() As ChartOfAccounts
Get
Return _ChartOfAccounts
End Get
Set(ByVal value As ChartOfAccounts)
SetPropertyValue("row_ChartOfAccounts", _ChartOfAccounts, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<DataSourceCriteria("CustomersFrom='@This.CustomersFrom' and PartnerType='@This.row_PartnerType' and BallanceState=0 and isnull(CurrencyName_Account)=False ")> _
<VisibleInListView(False)> _
Property row_PCIGroup() As PCIGroup
Get
Return _PCIGroup
End Get
Set(ByVal value As PCIGroup)
SetPropertyValue("row_PCIGroup", _PCIGroup, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If value IsNot Nothing Then
row_ConnectInfo = value.ConnectInfo
row_Customer = value.Customers
row_PartnerType = value.PartnerType
If value.CurrencyName_Account.ShortName = "HUF" Then
If Me.CurrencyName.ShortName = "HUF" Then
Me.row_AmountHUF = Math.Abs(value.BallanceHUF)
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
Else
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
End If
Else
If Me.CurrencyName.ShortName = value.CurrencyName_Account.ShortName Then
Me.row_AmountDEV = Math.Abs(value.BallanceDEV)
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", value.CurrencyName_Account.ShortName))
Else
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", value.CurrencyName_Account.ShortName))
End If
End If
End If
End If
End Set
End Property
<ImmediatePostData(True)> _
<DataSourceCriteria("LiquidAssetsType=3 and CustomerFrom='@This.CustomersFrom'")> _
<RuleRequiredField("GLCompensation-LiquidAssets_Main", "aFinal_GLBank_Context")> _
<RuleRequiredField("GLCompensation-LiquidAssets_Main_2", "aFinalAndNew_GLBank_Context")> _
<VisibleInListView(False)> _
Property LiquidAssets_Main() As LiquidAssets
Get
Return _LiquidAssets
End Get
Set(ByVal value As LiquidAssets)
SetPropertyValue("LiquidAssets_Main", _LiquidAssets, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
row_LiquidAssets = value
If value IsNot Nothing Then
CurrencyName = value.CurrencyName
Me.row_CurrencyName2 = CurrencyName
BallanceHUF = GetBallanceHUF(value, Now)
BallanceDEV = GetBallanceDEV(value, Now)
If Me.CustomersFrom IsNot Nothing Then
If Me.DocumentNumber Is Nothing Then
If value.NumberGeneratorIn IsNot Nothing Then
Me.DocumentNumber = value.NumberGeneratorIn.GetNewNumber(value.NumberGeneratorIn)
Me.Save()
Session.CommitTransaction()
End If
End If
End If
End If
End If
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_AmountDEV2 As Double
Get
Return _row_AmountDEV2
End Get
Set(value As Double)
SetPropertyValue("row_AmountDEV2", _row_AmountDEV2, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
<RuleRange("GLCompensation.CurrencyName.ToTable", "aToTable_GLCompensation_Contexts", 0.01, 9999999, _
TargetCriteria:="LiquidAssets_Main.CurrencyName.ShortName != row_CurrencyName2.ShortName and row_CurrencyName2.ShortName !='HUF' and LiquidAssets_Main.CurrencyName.ShortName !='HUF'")> _
Property row_CurrencyRate2 As Double
Get
Return _row_CurrencyRate2
End Get
Set(ByVal value As Double)
SetPropertyValue("row_CurrencyRate2", _row_CurrencyRate2, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Main.CurrencyName
If LiquidAssets_Main.CurrencyName.ShortName = "HUF" Then
If LiquidAssets_Main.CurrencyName.ShortName = row_CurrencyName2.ShortName Then
Else
row_AmountDEV2 = row_AmountHUF * Math.Round(row_CurrencyRate2, 2, MidpointRounding.AwayFromZero)
End If
Else
If LiquidAssets_Main.CurrencyName.ShortName = row_CurrencyName2.ShortName Then
Else
row_AmountDEV2 = row_AmountDEV * Math.Round(row_CurrencyRate2, 2, MidpointRounding.AwayFromZero)
End If
End If
End If
End Set
End Property
<NonPersistent()> _
<ImmediatePostData(True)> _
<VisibleInListView(False)> _
Property row_CurrencyName2 As SISBusiness.Module.CurrencyName
Get
Return _row_CurrencyName2
End Get
Set(value As SISBusiness.Module.CurrencyName)
SetPropertyValue("row_CurrencyName2", _row_CurrencyName2, value)
End Set
End Property
Property TotalInAmountHUF As Double
Get
Return _TotalInAmountHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("TotalInAmountHUF", _TotalInAmountHUF, value)
End Set
End Property
Property TotalOutAmountHUF As Double
Get
Return _TotalOutAmountHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("TotalOutAmountHUF", _TotalOutAmountHUF, value)
End Set
End Property
Property TotalInAmountDEV As Double
Get
Return _TotalInAmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("TotalInAmountDEV", _TotalInAmountDEV, value)
End Set
End Property
Property TotalOutAmountDEV As Double
Get
Return _TotalOutAmountDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("TotalOutAmountDEV", _TotalOutAmountDEV, value)
End Set
End Property
Property BallanceHUF As Double
Get
Return _BallanceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("BallanceHUF", _BallanceHUF, value)
End Set
End Property
Property BallanceDEV As Double
Get
Return _BallanceDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("BallanceDEV", _BallanceDEV, value)
End Set
End Property
Property GLHeader_RateDiff As GLHeader
Get
Return _GLHeader_RateDiff
End Get
Set(value As GLHeader)
SetPropertyValue("GLHeader_RateDiff", _GLHeader_RateDiff, value)
End Set
End Property
Sub RecalculateTotal()
Dim _GLRows As GLRows
TotalInAmountHUF = 0
TotalOutAmountHUF = 0
TotalInAmountDEV = 0
TotalOutAmountDEV = 0
For Each _GLRows In Me.GLRows
TotalInAmountHUF += _GLRows.InAmountHUF
TotalOutAmountHUF += _GLRows.OutAmountHUF
TotalInAmountDEV += _GLRows.InAmountDEV
TotalOutAmountDEV += _GLRows.OutAmountDEV
Next
BallanceHUF = TotalInAmountHUF - TotalOutAmountHUF
BallanceDEV = TotalInAmountDEV - _TotalOutAmountDEV
End Sub
Function GetBallanceHUF(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
Dim _GLCompensation_Collection As New XPCollection(Of GLCompensation)(Session, _
CriteriaOperator.Parse("LiquidAssets_Main=? and DateExecution<=? and IsEditable=False", _LiquidAssets, _ToDate))
Dim _GLCompensation As GLCompensation
Dim _GLRows As GLRows
Dim _InAmountHUF As Double = 0
Dim _OutAmountHUF As Double = 0
For Each _GLCompensation In _GLCompensation_Collection
For Each _GLRows In _GLCompensation.GLRows
_InAmountHUF += _GLRows.InAmountHUF
_OutAmountHUF += _GLRows.OutAmountHUF
Next
Next
Return _InAmountHUF - _OutAmountHUF
End Function
Function GetBallanceDEV(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
Dim _GLCompensation_Collection As New XPCollection(Of GLCompensation)(Session, _
CriteriaOperator.Parse("LiquidAssets_Main=? and DateExecution<=? and IsEditable=False", _LiquidAssets, _ToDate))
Dim _GLBank As GLCompensation
Dim _GLRows As GLRows
Dim _InAmountDEV As Double = 0
Dim _OutAmountDEV As Double = 0
For Each _GLBank In _GLCompensation_Collection
For Each _GLRows In _GLBank.GLRows
_InAmountDEV += _GLRows.InAmountDEV
_OutAmountDEV += _GLRows.OutAmountDEV
Next
Next
Return _InAmountDEV - _OutAmountDEV
End Function
<RuleRange("Zero for GLCompensation HUF", "aFinal_GLCompensation_Context", 0, 0, targetcriteria:="LiquidAssets_Main.CurrencyName.ShortName = 'HUF'")> _
ReadOnly Property CloseHUF As Double
Get
Return Math.Round(TotalInAmountHUF, 2, MidpointRounding.AwayFromZero) - Math.Round(TotalOutAmountHUF, 2, MidpointRounding.AwayFromZero)
End Get
End Property
<RuleRange("Zero for GLCompensation DEV", "aFinal_GLCompensation_Context", 0, 0, targetcriteria:="LiquidAssets_Main.CurrencyName.ShortName != 'HUF'")> _
ReadOnly Property CloseDEV As Double
Get
Return Math.Round(TotalInAmountDEV, 2, MidpointRounding.AwayFromZero) - Math.Round(TotalOutAmountDEV, 2, MidpointRounding.AwayFromZero)
End Get
End Property
Overrides Property row_Controlling As Controlling
Get
Return MyBase.row_Controlling
End Get
Set(value As Controlling)
MyBase.row_Controlling = value
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
If value.ChartOfAccounts IsNot Nothing Then
row_ChartOfAccounts = value.GetChartOfAccounts(Me.DateExecution.Year, False)
End If
End If
End Set
End Property
End Class
@@ -0,0 +1,208 @@
Partial Class GLCompensationVC
<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.aMakeEditable_GLCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTableD_GLCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aBackToRowEdit_GLCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTable_GLCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aFinal_GLCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aFinalAndNew_GLCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aPrintCompensation = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLCompensationDivideRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aGenerateGLCompensationRateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aImportPCIGroupCompensation = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aMakeEditable_GLCompensation
'
Me.aMakeEditable_GLCompensation.Caption = "aMakeEditable_GLCompensation"
Me.aMakeEditable_GLCompensation.Category = "RecordEdit"
Me.aMakeEditable_GLCompensation.ConfirmationMessage = Nothing
Me.aMakeEditable_GLCompensation.Id = "aMakeEditable_GLCompensation"
Me.aMakeEditable_GLCompensation.ImageName = "Images.replace2.png"
Me.aMakeEditable_GLCompensation.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aMakeEditable_GLCompensation.Shortcut = Nothing
Me.aMakeEditable_GLCompensation.Tag = Nothing
Me.aMakeEditable_GLCompensation.TargetObjectsCriteria = "IsEditable=False and IsStorno=False"
Me.aMakeEditable_GLCompensation.TargetViewId = Nothing
Me.aMakeEditable_GLCompensation.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aMakeEditable_GLCompensation.ToolTip = Nothing
Me.aMakeEditable_GLCompensation.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aToTableD_GLCompensation
'
Me.aToTableD_GLCompensation.Caption = "Delete row"
Me.aToTableD_GLCompensation.Category = ""
Me.aToTableD_GLCompensation.ConfirmationMessage = Nothing
Me.aToTableD_GLCompensation.Id = "aToTableD_GLCompensation"
Me.aToTableD_GLCompensation.ImageName = Nothing
Me.aToTableD_GLCompensation.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aToTableD_GLCompensation.Shortcut = Nothing
Me.aToTableD_GLCompensation.Tag = Nothing
Me.aToTableD_GLCompensation.TargetObjectsCriteria = Nothing
Me.aToTableD_GLCompensation.TargetViewId = "GLCompensation_DetailView"
Me.aToTableD_GLCompensation.ToolTip = Nothing
Me.aToTableD_GLCompensation.TypeOfView = Nothing
'
'aBackToRowEdit_GLCompensation
'
Me.aBackToRowEdit_GLCompensation.Caption = "Edit row"
Me.aBackToRowEdit_GLCompensation.Category = ""
Me.aBackToRowEdit_GLCompensation.ConfirmationMessage = Nothing
Me.aBackToRowEdit_GLCompensation.Id = "aBackToRowEdit_GLCompensation"
Me.aBackToRowEdit_GLCompensation.ImageName = Nothing
Me.aBackToRowEdit_GLCompensation.Shortcut = Nothing
Me.aBackToRowEdit_GLCompensation.Tag = Nothing
Me.aBackToRowEdit_GLCompensation.TargetObjectsCriteria = Nothing
Me.aBackToRowEdit_GLCompensation.TargetViewId = "GLCompensation_DetailView"
Me.aBackToRowEdit_GLCompensation.ToolTip = Nothing
Me.aBackToRowEdit_GLCompensation.TypeOfView = Nothing
'
'aToTable_GLCompensation
'
Me.aToTable_GLCompensation.Caption = "aToTable"
Me.aToTable_GLCompensation.Category = ""
Me.aToTable_GLCompensation.ConfirmationMessage = Nothing
Me.aToTable_GLCompensation.Id = "aToTable_GLCompensation"
Me.aToTable_GLCompensation.ImageName = Nothing
Me.aToTable_GLCompensation.Shortcut = Nothing
Me.aToTable_GLCompensation.Tag = Nothing
Me.aToTable_GLCompensation.TargetObjectsCriteria = Nothing
Me.aToTable_GLCompensation.TargetObjectType = GetType(SISBusiness.[Module].GLCompensation)
Me.aToTable_GLCompensation.TargetViewId = ""
Me.aToTable_GLCompensation.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aToTable_GLCompensation.ToolTip = Nothing
Me.aToTable_GLCompensation.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aFinal_GLCompensation
'
Me.aFinal_GLCompensation.Caption = "aFinal_GLCompensation"
Me.aFinal_GLCompensation.Category = "ObjectsCreation"
Me.aFinal_GLCompensation.ConfirmationMessage = Nothing
Me.aFinal_GLCompensation.Id = "aFinal_GLCompensation"
Me.aFinal_GLCompensation.ImageName = "MenuBar_SaveAndClose"
Me.aFinal_GLCompensation.Shortcut = Nothing
Me.aFinal_GLCompensation.Tag = Nothing
Me.aFinal_GLCompensation.TargetObjectsCriteria = Nothing
Me.aFinal_GLCompensation.TargetObjectType = GetType(SISBusiness.[Module].GLCompensation)
Me.aFinal_GLCompensation.TargetViewId = Nothing
Me.aFinal_GLCompensation.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aFinal_GLCompensation.ToolTip = Nothing
Me.aFinal_GLCompensation.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aFinalAndNew_GLCompensation
'
Me.aFinalAndNew_GLCompensation.Caption = "aFinalAndNew_GLCompensation"
Me.aFinalAndNew_GLCompensation.Category = "ObjectsCreation"
Me.aFinalAndNew_GLCompensation.ConfirmationMessage = Nothing
Me.aFinalAndNew_GLCompensation.Id = "aFinalAndNew_GLCompensation"
Me.aFinalAndNew_GLCompensation.ImageName = "MenuBar_SaveAndNew"
Me.aFinalAndNew_GLCompensation.Shortcut = Nothing
Me.aFinalAndNew_GLCompensation.Tag = Nothing
Me.aFinalAndNew_GLCompensation.TargetObjectsCriteria = Nothing
Me.aFinalAndNew_GLCompensation.TargetObjectType = GetType(SISBusiness.[Module].GLCompensation)
Me.aFinalAndNew_GLCompensation.TargetViewId = Nothing
Me.aFinalAndNew_GLCompensation.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aFinalAndNew_GLCompensation.ToolTip = Nothing
Me.aFinalAndNew_GLCompensation.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aPrintCompensation
'
Me.aPrintCompensation.Caption = "Print document"
Me.aPrintCompensation.Category = "View"
Me.aPrintCompensation.ConfirmationMessage = Nothing
Me.aPrintCompensation.Id = "aPrintCompensation"
Me.aPrintCompensation.ImageName = "Action_Printing_Print"
Me.aPrintCompensation.Shortcut = Nothing
Me.aPrintCompensation.Tag = Nothing
Me.aPrintCompensation.TargetObjectsCriteria = Nothing
Me.aPrintCompensation.TargetViewId = "GLCompensation_ListView"
Me.aPrintCompensation.ToolTip = Nothing
Me.aPrintCompensation.TypeOfView = Nothing
'
'aGLCompensationDivideRows
'
Me.aGLCompensationDivideRows.AcceptButtonCaption = Nothing
Me.aGLCompensationDivideRows.CancelButtonCaption = Nothing
Me.aGLCompensationDivideRows.Caption = "Divide rows"
Me.aGLCompensationDivideRows.ConfirmationMessage = Nothing
Me.aGLCompensationDivideRows.Id = "aGLCompensationDivideRows"
Me.aGLCompensationDivideRows.ImageName = "row_add_after"
Me.aGLCompensationDivideRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLCompensationDivideRows.Shortcut = Nothing
Me.aGLCompensationDivideRows.Tag = Nothing
Me.aGLCompensationDivideRows.TargetObjectsCriteria = Nothing
Me.aGLCompensationDivideRows.TargetViewId = "GLHeader_GLRows_ListView_Compensation"
Me.aGLCompensationDivideRows.ToolTip = Nothing
Me.aGLCompensationDivideRows.TypeOfView = Nothing
'
'aGenerateGLCompensationRateDiff
'
Me.aGenerateGLCompensationRateDiff.Caption = "Generate rate diff"
Me.aGenerateGLCompensationRateDiff.Category = "ObjectsCreation"
Me.aGenerateGLCompensationRateDiff.ConfirmationMessage = "Do you want to execute command ?"
Me.aGenerateGLCompensationRateDiff.Id = "aGenerateGLCompensationRateDiff"
Me.aGenerateGLCompensationRateDiff.ImageName = "money"
Me.aGenerateGLCompensationRateDiff.Shortcut = Nothing
Me.aGenerateGLCompensationRateDiff.Tag = Nothing
Me.aGenerateGLCompensationRateDiff.TargetObjectsCriteria = Nothing
Me.aGenerateGLCompensationRateDiff.TargetViewId = "GLCompensation_ListView"
Me.aGenerateGLCompensationRateDiff.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aGenerateGLCompensationRateDiff.ToolTip = Nothing
Me.aGenerateGLCompensationRateDiff.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aImportPCIGroupCompensation
'
Me.aImportPCIGroupCompensation.AcceptButtonCaption = Nothing
Me.aImportPCIGroupCompensation.CancelButtonCaption = Nothing
Me.aImportPCIGroupCompensation.Caption = "Get exported "
Me.aImportPCIGroupCompensation.Category = "aImportPCIGroupCompensation"
Me.aImportPCIGroupCompensation.ConfirmationMessage = Nothing
Me.aImportPCIGroupCompensation.Id = "aImportPCIGroupCompensation"
Me.aImportPCIGroupCompensation.ImageName = Nothing
Me.aImportPCIGroupCompensation.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aImportPCIGroupCompensation.Shortcut = Nothing
Me.aImportPCIGroupCompensation.Tag = Nothing
Me.aImportPCIGroupCompensation.TargetObjectsCriteria = Nothing
Me.aImportPCIGroupCompensation.TargetViewId = "GLCompensation_DetailView"
Me.aImportPCIGroupCompensation.ToolTip = Nothing
Me.aImportPCIGroupCompensation.TypeOfView = Nothing
End Sub
Friend WithEvents aToTable_GLCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aMakeEditable_GLCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFinal_GLCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFinalAndNew_GLCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTableD_GLCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aBackToRowEdit_GLCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPrintCompensation As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGLCompensationDivideRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGenerateGLCompensationRateDiff As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aImportPCIGroupCompensation As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,153 @@
<?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="aMakeEditable_GLCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aToTableD_GLCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aBackToRowEdit_GLCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aToTable_GLCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aFinal_GLCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="aFinalAndNew_GLCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 290</value>
</metadata>
<metadata name="aPrintCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aGLCompensationDivideRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 329</value>
</metadata>
<metadata name="aGenerateGLCompensationRateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>10, 367</value>
</metadata>
<metadata name="aImportPCIGroupCompensation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>255, 367</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,589 @@
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 DevExpress.ExpressApp.Editors
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.ExpressApp.Model
Public Class GLCompensationVC
Inherits DevExpress.ExpressApp.ViewController
Protected selection As ArrayList
Public Sub New()
MyBase.New()
selection = New ArrayList()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of GLCompensationVC).aMakeEditable_GLCompensation.Active.SetItemValue("", False)
If View.Id = "GLCompensation_DetailView" Then
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Dim _GLCompensation As GLCompensation = TryCast(View.CurrentObject, GLCompensation)
If _GLCompensation Is Nothing Then
Else
If _GLCompensation.IsEditable = False Then
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aFinal_GLCompensation.Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aFinalAndNew_GLCompensation.Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aFinalAndNew_GLCompensation.Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aToTable_GLCompensation.Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aToTableD_GLCompensation.Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aBackToRowEdit_GLCompensation.Active.SetItemValue("", False)
End If
If _GLCompensation.IsStorno = True Then
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of GLCompensationVC).aMakeEditable_GLCompensation.Active.SetItemValue("", False)
End If
If _GLCompensation.IsEditable = True And _GLCompensation.IsStorno = False Then
End If
End If
End If
If View.Id = "GLCompensation_ListView" Then
Frame.GetController(Of GLCompensationVC).aMakeEditable_GLCompensation.Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
End If
If View.Id = "GLCompensation_ListView_Editable" Then
AddHandler Frame.GetController(Of DeleteObjectsViewController).DeleteAction.Executed, AddressOf GLCompensation_DeleteAction_Executed
End If
If View.Id Like "GLHeader_GLRows_ListView_Compensation" 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 DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
Dim nv As ListView = CType(View, ListView)
Dim cs As PropertyCollectionSource = CType(nv.CollectionSource, PropertyCollectionSource)
AddHandler cs.MasterObjectChanged, AddressOf cs_MasterObjectChanged
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "GLCompensation_DetailView" Then
Frame.GetController(Of GLCompensationVC).aFinalAndNew_GLCompensation.Active.SetItemValue("", True)
Frame.GetController(Of GLCompensationVC).aFinalAndNew_GLCompensation.Active.SetItemValue("", True)
Frame.GetController(Of GLCompensationVC).aToTable_GLCompensation.Active.SetItemValue("", True)
Frame.GetController(Of GLCompensationVC).aToTableD_GLCompensation.Active.SetItemValue("", True)
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
End Sub
Private Sub aToTable_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTable_GLCompensation.Execute
Dim _GLCompensation As GLCompensation = TryCast(View.SelectedObjects(0), GLCompensation)
Dim _GLHeader As GLHeader = TryCast(_GLCompensation, GLHeader)
Dim _GLRows As GLRows
Dim _GUID As Guid = Guid.NewGuid()
Dim _CashType As eCashType
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
_GLRows = _ocur.CreateObject(Of GLRows)()
If _GLCompensation.row_TransactionType = eTransactionType.ePartnerCredit Or _GLCompensation.row_TransactionType = eTransactionType.ePartnerDebit Then
_CashType = eCashType.ePartner
If _GLCompensation.row_PartnerType = ePartnerType.eReceivables Then
If _GLCompensation.row_TransactionType = eTransactionType.ePartnerCredit Then
_GLHeader.row_DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_GLHeader.row_CreditChartOfAccounts = _GLCompensation.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eOut)
ElseIf _GLCompensation.row_TransactionType = eTransactionType.ePartnerDebit Then
_GLHeader.row_DebitChartOfAccounts = _GLCompensation.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eOut)
_GLHeader.row_CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
End If
Else
If _GLCompensation.row_TransactionType = eTransactionType.ePartnerCredit Then
_GLHeader.row_DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_GLHeader.row_CreditChartOfAccounts = _GLCompensation.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eIn)
ElseIf _GLCompensation.row_TransactionType = eTransactionType.ePartnerDebit Then
_GLHeader.row_DebitChartOfAccounts = _GLCompensation.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eIn)
_GLHeader.row_CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
End If
End If
Else
_CashType = eCashType.eNormal
If _GLCompensation.row_TransactionType = eTransactionType.eNormalCredit Then
_GLHeader.row_DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_GLHeader.row_CreditChartOfAccounts = _GLCompensation.row_ChartOfAccounts
Else
_GLHeader.row_DebitChartOfAccounts = _GLCompensation.row_ChartOfAccounts
_GLHeader.row_CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
End If
End If
Select Case _GLCompensation.row_TransactionType
Case eTransactionType.eNormalCredit, eTransactionType.ePartnerCredit
_GLRows.CreditAmountHUF = _GLHeader.row_AmountHUF
_GLRows.CreditAmountDEV = _GLHeader.row_AmountDEV
_GLRows.InAmountHUF = _GLHeader.row_AmountHUF
_GLRows.InAmountDEV = _GLHeader.row_AmountDEV
Case eTransactionType.eNormalDebit, eTransactionType.ePartnerDebit
_GLRows.DebitAmountHUF = _GLHeader.row_AmountHUF
_GLRows.DebitAmountDEV = _GLHeader.row_AmountDEV
_GLRows.OutAmountHUF = _GLHeader.row_AmountHUF
_GLRows.OutAmountDEV = _GLHeader.row_AmountDEV
End Select
_GLRows.PartnerType = _GLCompensation.row_PartnerType
_GLRows.AddGLRows(_GLHeader, _GLHeader.row_DebitChartOfAccounts, _GLHeader.row_CreditChartOfAccounts, _
_GLHeader.row_AmountDEV, _GLHeader.row_AmountHUF, _GLCompensation.LiquidAssets_Main, _
_GLHeader.row_Customer, _GLHeader.row_DateVAT, _GLHeader.row_VAT, _
_GLHeader.row_NoteRows, _GLHeader.row_UniqueObjects, _GLHeader.row_Controlling, _
_GLHeader.row_JobNumberObjects, _GLHeader.row_CostPlace, _GLHeader.row_CostHolder, _
_GLHeader.row_ConnectInfo, eGLRowsTypeVAT.eNettoRow, _GUID, _
_GLCompensation.row_TransactionType, _CashType, _GLCompensation.row_PartnerType)
_GLCompensation.RecalculateTotal()
_ocur.CommitChanges()
'--- Pontozás ellenőrzése !!!! ----------------------------------------------------------------------------------------------------------------
Select Case _GLCompensation.row_TransactionType
Case eTransactionType.ePartnerCredit, eTransactionType.ePartnerDebit
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow_pci, _GLCompensation.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
End Select
'----------------------------------------------------------------------------------------------------------------------------------------------
_GLCompensation.row_NoteRows = ""
_GLCompensation.row_AmountDEV = 0
_GLCompensation.row_AmountHUF = 0
_GLCompensation.row_PCIGroup = Nothing
_GLCompensation.row_Customer = Nothing
_GLCompensation.row_ConnectInfo = ""
_GLCompensation.row_ChartOfAccounts = Nothing
'// Fókusz beállítása !!!!!!!!!!!!!!!!!!!!!!----------------------------------------------------------------
Dim _Action As IModelAction
Dim _IModelActionExtender As IModelActionExtender
For Each _Action In Application.Model.ActionDesign.Actions
If _Action.Id = e.Action.Id Then
_IModelActionExtender = TryCast(_Action, IModelActionExtender)
If _IModelActionExtender IsNot Nothing Then
If String.IsNullOrEmpty(_IModelActionExtender.FocusItem) = False Then
Dim ItemToFocus As ViewItem = TryCast(View, DetailView).FindItem(_IModelActionExtender.FocusItem)
If ItemToFocus IsNot Nothing Then
Dim ItemControl As Object
ItemControl = ItemToFocus.Control
ItemControl.Focus()
End If
End If
End If
Exit For
End If
Next
'--------------------------------------------------------------------------------------------------------
View.Refresh()
End Sub
Private Sub aFinal_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinal_GLCompensation.Execute
GLCompensation_Final(e)
View.Close(False)
End Sub
Private Sub cs_MasterObjectChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim _GLCompensation As GLCompensation = TryCast((CType(sender, PropertyCollectionSource)).MasterObject, GLCompensation)
If _GLCompensation.IsEditable = False Then
Frame.GetController(Of GLCompensationVC).aToTable_GLCompensation.Active.SetItemValue("", False)
End If
End Sub
Private Sub aMakeEditable_GLCompensation_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aMakeEditable_GLCompensation.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLCompensation As GLCompensation = TryCast(View.SelectedObjects(0), GLCompensation)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
If _GLCompensation IsNot Nothing Then
_GLCompensation.IsEditable = True
_ocur.CommitChanges()
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "GLCompensation_DetailView", True, _onew.GetObject(_GLCompensation))
End If
End Sub
Private Sub aFinalAndNew_GLCompensation_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalAndNew_GLCompensation.Execute
GLCompensation_Final(e)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _GLCompensation As GLCompensation = _onew.CreateObject(Of GLCompensation)()
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, TryCast(View.Model, Model.IModelDetailView).Id, True, _GLCompensation)
e.ShowViewParameters.TargetWindow = TargetWindow.Current
End Sub
#Region "SIS"
Private Sub GLCompensation_Final(ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRows As GLRows
If View.SelectedObjects.Count > 0 Then
Dim _GLCompensation As GLCompensation = TryCast(e.SelectedObjects(0), GLCompensation)
For Each _GLCompensation In e.SelectedObjects
If _GLCompensation.GLRows.Count <= 0 Then
_ocur.Rollback()
Throw New Exception("*Nincs rögzített sor !")
End If
For Each _GLRows In _GLCompensation.GLRows
_GLRows.LiquidAssets = _GLCompensation.LiquidAssets_Main
Next
_GLCompensation.IsEditable = False
If _GLCompensation.DocumentNumber Is Nothing Or _GLCompensation.DocumentNumber = "" Then
Dim _NumberGenerator As NumberGenerator = TryCast(_GLCompensation.LiquidAssets_Main.NumberGeneratorIn, NumberGenerator)
_GLCompensation.DocumentNumber = _NumberGenerator.GetNewNumber(_NumberGenerator).ToString
End If
_GLCompensation.Save()
_ocur.CommitChanges()
'// Az összes sorra vonatkozó pontozás újragenerálása, mert változhat a dátum !
For Each _GLRows In _GLCompensation.GLRows
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
Next
Next
End If
End Sub
#End Region
Private Sub aToTableD_GLCompensation_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTableD_GLCompensation.Execute
'Törli a táblázatban lévő sort
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GUID As Guid
Dim _GLCompensation As GLCompensation = TryCast(View.SelectedObjects(0), GLCompensation)
Dim _GLRows_ListEditor As ListPropertyEditor
Dim _GLRows As GLRows
Dim i As Long
Dim _CustomersFrom As CustomersFrom
Dim _Customers As Customers
Dim _PartnerType As ePartnerType
Dim _ConnectInfo As String
_GLRows_ListEditor = TryCast(View, DetailView).FindItem("GLRows")
_GLRows = TryCast(_GLRows_ListEditor.ListView.CurrentObject, GLRows)
If _GLRows.GLRowsRateDiff IsNot Nothing Then
Throw New Exception("*Nem lehet a sort törölni mert van árfolyam elszámolás !")
Exit Sub
End If
If _GLRows IsNot Nothing Then
_GUID = _GLRows.GLRowsGUID
selection.Clear()
For Each _GLRows In _GLCompensation.GLRows
If _GLRows.GLRowsGUID = _GUID Then
selection.Add(_GLRows)
End If
Next
For i = 0 To selection.Count - 1
_GLRows = TryCast(selection(i), GLRows)
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
_CustomersFrom = _GLCompensation.CustomersFrom
_Customers = _GLRows.Customer
_ConnectInfo = _GLRows.ConnectInfo
_PartnerType = _GLRows.PartnerType
End If
_GLRows.Delete()
_ocur.CommitChanges()
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow_pci, _CustomersFrom, _Customers, _PartnerType, _ConnectInfo)
Next
_GLCompensation.RecalculateTotal()
View.Refresh()
End If
End Sub
Private Sub aBackToRowEdit_GLCompensation_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aBackToRowEdit_GLCompensation.Execute
'Visszatölti a sort editáláshoz
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLCompensation As GLCompensation = TryCast(View.SelectedObjects(0), GLCompensation)
Dim _GLRows_ListEditor As ListPropertyEditor
Dim _GLRows As GLRows
Dim _PCIGroup As PCIGroup
Dim _CustomersFrom As CustomersFrom
Dim _Customers As Customers
Dim _PartnerType As ePartnerType
Dim _ConnectInfo As String
_GLRows_ListEditor = TryCast(View, DetailView).FindItem("GLRows")
_GLRows = TryCast(_GLRows_ListEditor.ListView.CurrentObject, GLRows)
If _GLRows IsNot Nothing Then
If _GLRows.GLRowsRateDiff IsNot Nothing Then
Throw New Exception("*Nem lehet a sort törölni mert van árfolyam elszámolás !")
Exit Sub
End If
_GLCompensation.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _GLCompensation.CurrencyName.ShortName))
_PCIGroup = _ocur.FindObject(Of PCIGroup) _
(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and PartnerType=? and ConnectInfo=? ", _GLRows.GLHeader.CustomersFrom, _
_GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo), True)
If _PCIGroup IsNot Nothing Then
_GLCompensation.row_PCIGroup = _PCIGroup
_GLCompensation.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _PCIGroup.CurrencyName_Account.ShortName))
If _GLCompensation.row_CurrencyName2 Is Nothing Then
_GLCompensation.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _GLCompensation.CurrencyName.ShortName))
End If
End If
_GLCompensation.row_Customer = _GLRows.Customer
_GLCompensation.row_ConnectInfo = _GLRows.ConnectInfo
_GLCompensation.CurrencyName = _GLRows.GLHeader.CurrencyName
_GLCompensation.CurrencyRate = _GLRows.GLHeader.CurrencyRate
_GLCompensation.row_NoteRows = _GLRows.NoteRows
_GLCompensation.CurrencyRate = _GLRows.GLHeader.CurrencyRate
_GLCompensation.row_PartnerType = _GLRows.PartnerType
_GLCompensation.row_TransactionType = _GLRows.TransactionType
_GLCompensation.row_CurrencyRate2 = _GLRows.CurrencyRate2
If _GLRows.InAmountHUF > 0 Then
_GLCompensation.row_ChartOfAccounts = _GLRows.CreditChartOfAccounts
_GLCompensation.row_AmountDEV2 = _GLRows.InAmountDEV2
Else
_GLCompensation.row_ChartOfAccounts = _GLRows.DebitChartOfAccounts
_GLCompensation.row_AmountDEV2 = _GLRows.OutAmountDEV2
End If
Dim _GLRows_GUID_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, CriteriaOperator.Parse("GLRowsGUID=?", _GLRows.GLRowsGUID))
Dim _AmountDEV As Double = 0
Dim _AmountHUF As Double = 0
For Each _GLRows In _GLRows_GUID_Collection
_AmountDEV += _GLRows.AmountDEV
_AmountHUF += _GLRows.AmountHUF
selection.Add(_GLRows)
Next
_GLCompensation.row_AmountDEV = _AmountDEV
_GLCompensation.row_AmountHUF = _AmountHUF
For i = 0 To selection.Count - 1
_GLRows = TryCast(selection(i), GLRows)
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
_CustomersFrom = _GLCompensation.CustomersFrom
_Customers = _GLRows.Customer
_ConnectInfo = _GLRows.ConnectInfo
_PartnerType = _GLRows.PartnerType
End If
_GLRows.Delete()
_ocur.CommitChanges()
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow_pci, _CustomersFrom, _Customers, _PartnerType, _ConnectInfo)
Next
End If
View.Refresh()
End Sub
Private Sub aPrintCompensation_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPrintCompensation.Execute
Dim _GLCompensation As GLCompensation
Try
If e.SelectedObjects.Count > 0 Then
_GLCompensation = TryCast(e.SelectedObjects.Item(0), GLCompensation)
PrintCompensationDocument(_GLCompensation, TryCast(View.ObjectSpace, Xpo.XPObjectSpace))
End If
Catch
End Try
End Sub
Sub PrintCompensationDocument(ByVal _GLCompensation As GLCompensation, ByVal _ocur As Xpo.XPObjectSpace)
Dim _ReportData As ReportData
Dim _GLHeader As GLHeader
If _GLCompensation IsNot Nothing Then
_GLHeader = TryCast(_GLCompensation, GLHeader)
_ReportData = _GLCompensation.LiquidAssets_Main.ReportData
If _ReportData IsNot Nothing Or _GLCompensation Is Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("GLHeader=?", _GLHeader), True)
End If
End If
End Sub
Private Sub aGLCompensationDivideRows_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aGLCompensationDivideRows.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
e.View = Application.CreateDetailView(_onew, "GLRowsDivideH_DetailView", False, _GLRowsDivideH)
End If
End If
End Sub
Private Sub aGLCompensationDivideRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aGLCompensationDivideRows.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(e.PopupWindow.View.SelectedObjects(0), GLRowsDivideH)
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
If _GLRows IsNot Nothing Then
_GLRows.DivideRows(_ocur, _GLRows, _GLRowsDivideH, True)
End If
End Sub
Private Sub aGenerateGLCompensationRateDiff_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGenerateGLCompensationRateDiff.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _GLCompensation As GLCompensation = TryCast(e.SelectedObjects(0), GLCompensation)
For Each _GLCompensation In e.SelectedObjects
If Not _GLCompensation.CurrencyName.ShortName = "HUF" Then
_GLCompensation.Reconfigure_RateDiff(_ocur, _GLCompensation)
End If
Next
_ocur.CommitChanges()
View.Refresh()
End Sub
Private Sub GLCompensation_DeleteAction_Executed(sender As Object, e As ActionBaseEventArgs)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
Dim _GLCompensation As GLCompensation
Dim _GLRows As GLRows
Dim _GLRows_Collection As XPCollection(Of GLRows)
For Each _GLCompensation In TryCast(e, SimpleActionExecuteEventArgs).SelectedObjects
_GLRows_Collection = New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, CriteriaOperator.Parse("PartnerType<>'eNotSet' and GLHeader.Oid=?", _GLCompensation.Oid), True)
For Each _GLRows In _GLRows_Collection
GLFunctions.ReconfigurePCI(_uow, _GLCompensation.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
Next
Next
End Sub
Private Sub aImportPCIGroupCompensation_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aImportPCIGroupCompensation.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _GLCompensation As GLCompensation = TryCast(View.SelectedObjects(0), GLCompensation)
Dim _CollectionSource As CollectionSource = New CollectionSource(_onew, GetType(PCIGroup))
Dim _P As PCIGroup
If _GLCompensation IsNot Nothing Then
_CollectionSource.Criteria.Clear()
_CollectionSource.BeginUpdateCriteria()
_CollectionSource.Criteria("1") = CriteriaOperator.Parse("CurrencyName_Account.ShortName=?", _GLCompensation.LiquidAssets_Main.CurrencyName.ShortName)
_CollectionSource.Criteria("2") = CriteriaOperator.Parse("PartnerType=?", _GLCompensation.row_PartnerType)
_CollectionSource.Criteria("3") = CriteriaOperator.Parse("CustomersFrom.Oid=?", _GLCompensation.CustomersFrom.Oid)
If _GLCompensation.LiquidAssets_Main.CurrencyName.ShortName = "HUF" Then
_CollectionSource.Criteria("4") = CriteriaOperator.Parse("BallanceHUF<>0")
Else
_CollectionSource.Criteria("4") = CriteriaOperator.Parse("BallanceDEV<>0")
End If
_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("PCIGroup_ListView_Find", _CollectionSource, True)
End If
End Sub
Private Sub aImportPCIGroupCompensation_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aImportPCIGroupCompensation.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _PCIGroup As PCIGroup
Dim _PCIGroup_P As PCIGroup
Dim _GLCompensation As GLCompensation = TryCast(View.SelectedObjects(0), GLCompensation)
Dim _GLHeader As GLHeader = TryCast(_GLCompensation, GLHeader)
Dim _GLRows As GLRows
Dim _GUID As Guid
Dim _CashType As eCashType
Dim _DebitChartOfAccounts As ChartOfAccounts
Dim _CreditChartOfAccounts As ChartOfAccounts
Dim _TransactionType As eTransactionType
If _GLCompensation Is Nothing Then Exit Sub
For Each _PCIGroup_P In e.PopupWindow.View.SelectedObjects
_PCIGroup = _ocur.GetObject(_PCIGroup_P)
_GLRows = _ocur.CreateObject(Of GLRows)()
_GUID = Guid.NewGuid()
_CashType = eCashType.ePartner
If _PCIGroup.PartnerType = ePartnerType.eReceivables Then
If _PCIGroup.BallanceHUF > 0 Or _PCIGroup.BallanceDEV > 0 Then
_DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_CreditChartOfAccounts = _PCIGroup.Customers.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eOut)
_TransactionType = eTransactionType.ePartnerCredit
_GLRows.CreditAmountHUF = _PCIGroup.BallanceHUF
_GLRows.CreditAmountDEV = _PCIGroup.BallanceDEV
_GLRows.DebitAmountHUF = 0
_GLRows.DebitAmountDEV = 0
_GLRows.InAmountHUF = _PCIGroup.BallanceHUF
_GLRows.InAmountDEV = _PCIGroup.BallanceDEV
Else
_CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_DebitChartOfAccounts = _PCIGroup.Customers.CustomersGLParameters.GetChartOfAccounts(_GLCompensation.DateExecution.Year, eVATMode.eOut)
_TransactionType = eTransactionType.ePartnerDebit
_GLRows.DebitAmountHUF = _PCIGroup.BallanceHUF
_GLRows.DebitAmountDEV = _PCIGroup.BallanceDEV
_GLRows.CreditAmountHUF = 0
_GLRows.CreditAmountDEV = 0
_GLRows.OutAmountHUF = Math.Abs(_PCIGroup.BallanceHUF)
_GLRows.OutAmountDEV = Math.Abs(_PCIGroup.BallanceDEV)
End If
Else
If _PCIGroup.BallanceHUF > 0 Or _PCIGroup.BallanceDEV > 0 Then
_DebitChartOfAccounts = _PCIGroup.Customers.CustomersGLParameters.GetChartOfAccounts(_PCIGroup.DateExecution_Account.Year, eVATMode.eIn)
_CreditChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_TransactionType = eTransactionType.ePartnerDebit
_GLRows.DebitAmountHUF = _PCIGroup.BallanceHUF
_GLRows.DebitAmountDEV = _PCIGroup.BallanceDEV
_GLRows.CreditAmountDEV = 0
_GLRows.CreditAmountDEV = 0
_GLRows.OutAmountHUF = _PCIGroup.BallanceHUF
_GLRows.OutAmountDEV = _PCIGroup.BallanceDEV
Else
_CreditChartOfAccounts = _PCIGroup.Customers.CustomersGLParameters.GetChartOfAccounts(_PCIGroup.DateExecution_Account.Year, eVATMode.eIn)
_DebitChartOfAccounts = _GLCompensation.LiquidAssets_Main.GetChartOfAccounts(_GLCompensation.DateExecution.Year, 0)
_TransactionType = eTransactionType.ePartnerCredit
_GLRows.CreditAmountHUF = _PCIGroup.BallanceHUF
_GLRows.CreditAmountDEV = _PCIGroup.BallanceDEV
_GLRows.DebitAmountHUF = 0
_GLRows.DebitAmountDEV = 0
_GLRows.InAmountHUF = Math.Abs(_PCIGroup.BallanceHUF)
_GLRows.InAmountDEV = Math.Abs(_PCIGroup.BallanceDEV)
End If
End If
_GLRows.PartnerType = _PCIGroup.PartnerType
_GLRows.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, _
Math.Abs(_PCIGroup.BallanceDEV), Math.Abs(_PCIGroup.BallanceHUF), _GLCompensation.LiquidAssets_Main, _
_PCIGroup.Customers, _GLHeader.row_DateVAT, _GLHeader.row_VAT, _
_GLHeader.row_NoteRows, _GLHeader.row_UniqueObjects, _GLHeader.row_Controlling, _
_GLHeader.row_JobNumberObjects, _GLHeader.row_CostPlace, _GLHeader.row_CostHolder, _
_PCIGroup.ConnectInfo, eGLRowsTypeVAT.eNettoRow, _GUID, _
_TransactionType, _CashType, _PCIGroup.PartnerType)
_GLCompensation.RecalculateTotal()
_GLCompensation.GetBallanceDEV(_GLCompensation.row_LiquidAssets, _GLCompensation.DateExecution)
_GLCompensation.GetBallanceHUF(_GLCompensation.row_LiquidAssets, _GLCompensation.DateExecution)
_ocur.CommitChanges()
'--- Pontozás ellenőrzése !!!! ----------------------------------------------------------------------------------------------------------------
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
GLFunctions.ReconfigurePCI(_uow_pci, _GLCompensation.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
Next
End Sub
End Class