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,725 @@
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 System.Drawing
Imports DevExpress.ExpressApp.Utils
Imports DevExpress.Xpo.DB
'<EditorStateRule("Hide DateExecution in GLCassa", "DateExecution", EditorState.Disabled, "DocumentNumber !=''", ViewType.DetailView)> _
'<EditorStateRule("Partnerconnection-hide-Cassa", "row_PCIGroup", EditorState.Hidden, "row_CashType=1 OR IsEditable=False", ViewType.DetailView)> _
'<EditorStateRule("Partner-hide-Cassa", "row_ChartOfAccounts;row_VAT;row_Controlling;row_CostHolder;row_JobNumberObjects;row_UniqueObjects;row_CostPlace", EditorState.Hidden, "row_CashType=0 OR IsEditable=False", ViewType.DetailView)> _
'<EditorStateRule("Hide LiquidAssets", "LiquidAssets_Cassa", EditorState.Disabled, "IsNull(LiquidAssets_Cassa)=False OR IsEditable=False", ViewType.DetailView)> _
'<EditorStateRule("Hide row_CurrencyRate2 in GLCassa", "row_CurrencyRate2", EditorState.Hidden, "LiquidAssets_Cassa.CurrencyName.ShortName = row_CurrencyName2.ShortName", ViewType.DetailView)> _
'<EditorStateRule("Hide row_CurrencyRate2 in GLCassa and HUF", "row_CurrencyRate2", EditorState.Hidden, "LiquidAssets_Cassa.CurrencyName.ShortName ='HUF' or row_CurrencyName2.ShortName='HUF' and IsEditable=True", ViewType.DetailView)> _
'<EditorStateRule("Disable CashMoveType", "CashMoveType", EditorState.Disabled, "CashMoveType!=2", ViewType.DetailView)> _
'<EditorStateRule("Disable AmountHUF when CurrencyName<>HUF", "row_AmountHUF", EditorState.Disabled, "CurrencyName.ShortName<>'HUF'", ViewType.DetailView)> _
'<EditorStateRule("Disable GLCassa.row_AmountHUF when DEV != HUF", "row_AmountHUF", EditorState.Disabled, "LiquidAssets_Cassa.CurrencyName.ShortName != 'HUF'", ViewType.DetailView)> _
<DefaultClassOptions()>
<NavigationItem("FinancialTransactions")>
<Appearance("Hide row_ info when IsEditable=False",
AppearanceItemType:="ViewItem",
Criteria:="IsEditable=False",
TargetItems:="row_CashType; row_Customer;row_PartnerType;row_PCIGroup;" +
"row_ConnectInfo; row_ChartOfAccounts; row_AmountHUF;row_AmountDEV;" +
"row_VAT;row_Controlling;row_CostHolder;row_JobNumberObjects;" +
"row_UniqueObjects;row_CostPlace;row_CurrencyName2;" +
"row_CurrencyRate;row_CurrencyRate2;row_AmountDEV2;row_NoteRows",
Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("Hide Cassa row_Amount2 when CurrencyName2=CurrencyName",
AppearanceItemType:="ViewItem",
Criteria:="row_CurrencyName2.ShortName=LiquidAssets_Cassa.CurrencyName.ShortName",
TargetItems:="row_CurrencyRate2;row_AmountDEV2",
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
<Appearance("Hide Cassa row_Amount2 when PartnerType is not set",
AppearanceItemType:="ViewItem",
Criteria:="row_CashType=1",
TargetItems:="row_CurrencyName2;row_CurrencyRate2;row_AmountDEV2",
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
<Appearance("Hide row_CurrencyRate in GLCassa",
AppearanceItemType:="ViewItem",
Criteria:="LiquidAssets_Cassa.CurrencyName.ShortName = 'HUF' and row_CurrencyName2.ShortName='HUF' and IsEditable=True",
TargetItems:="row_CurrencyRate",
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
<Appearance("Hide DateExecution in GLCassa",
AppearanceItemType:="ViewItem",
TargetItems:="DateExecution",
Criteria:="DocumentNumber !=''",
Enabled:=False, Context:="DetailView")>
<Appearance("Partnerconnection-hide-Cassa",
AppearanceItemType:="ViewItem",
TargetItems:="row_PCIGroup",
Criteria:="row_CashType=1 OR IsEditable=False",
Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("Partner-hide-Cassa",
AppearanceItemType:="ViewItem",
TargetItems:="row_ChartOfAccounts;row_VAT;row_Controlling;row_CostHolder;row_JobNumberObjects;row_UniqueObjects;row_CostPlace",
Criteria:="row_CashType=0 OR IsEditable=False",
Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("Hide LiquidAssets when LiquidAssets is selected",
AppearanceItemType:="ViewItem",
TargetItems:="LiquidAssets_Cassa",
Criteria:="IsNull(LiquidAssets_Cassa)=False OR IsEditable=False",
Enabled:=False,
Context:="DetailView")>
<Appearance("Hide row_CurrencyRate2 in GLCassa",
AppearanceItemType:="ViewItem",
TargetItems:="row_CurrencyRate2",
Criteria:="LiquidAssets_Cassa.CurrencyName.ShortName = row_CurrencyName2.ShortName",
Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("Hide row_CurrencyRate2 in GLCassa and HUF",
AppearanceItemType:="ViewItem",
TargetItems:="row_CurrencyRate2",
Criteria:="LiquidAssets_Cassa.CurrencyName.ShortName ='HUF' or row_CurrencyName2.ShortName='HUF' and IsEditable=True",
Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("Disable CashMoveType",
AppearanceItemType:="ViewItem",
TargetItems:="CashMoveType",
Criteria:="CashMoveType!=2",
Enabled:=False,
Context:="DetailView")>
<Appearance("Disable AmountHUF when CurrencyName<>HUF",
AppearanceItemType:="ViewItem",
TargetItems:="row_AmountHUF",
Criteria:="CurrencyName.ShortName<>'HUF' and row_CashType !=2",
Enabled:=False, Context:="DetailView")>
<Appearance("Disable GLCassa.row_AmountHUF when DEV != HUF",
AppearanceItemType:="ViewItem",
TargetItems:="row_AmountHUF",
Criteria:="LiquidAssets_Cassa.CurrencyName.ShortName != 'HUF' and row_CashType !=2",
Enabled:=False,
Context:="DetailView")>
<RuleCriteria("RuleCriteria GLCassa-row_ChartOfAccounts", "aToTable_GLCassa_Contexts", "row_ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)>
<Appearance("Hide aGetCurrencyRateCassa",
AppearanceItemType:="Action",
TargetItems:="aGetCurrencyRateBank",
Criteria:="LiquidAssets_Cassa.CurrencyName.ShortName='HUF'",
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
<Appearance("Hide properties if Correction",
AppearanceItemType:="ViewItem",
TargetItems:="row_AmountDEV;row_CurrencyRate2;row_CurrencyRate;row_CurrencyName2;row_AmountDEV2;row_VAT",
Criteria:="row_CashType in (2)",
Visibility:=Editors.ViewItemVisibility.Hide)>
Public Class GLCassa
Inherits GLHeader
Private _CashMoveType As eCashMoveType = eCashMoveType.eNotSet
Private _CashType As eCashType
Private _ChartOfAccounts As ChartOfAccounts
Private _PCIGroup As PCIGroup
Private _PartnerType As ePartnerType
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 _GLHeader_RateDiff As GLHeader 'Kapcsolódó árf. kül. elszámolási vegyes bizonylat
Private _GLClosingTime As GLClosingTime
'-- A másodlagos
Private _row_CurrencyRate As Double
Private _row_AmountDEV2 As Double = 0
Private _row_CurrencyRate2 As Double = 0
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.eGLCassa
Me.DateExecution = GetSQLTime(Session)
Me.DocumentNumber = ""
Me.IsEditable = False
Me.IsStorno = False
Me.DocumentNumber = ""
Me.row_CashType = eCashType.eNormal
End If
End Sub
<RuleValueComparison("RuleValue-CashMoveType", "aFinal_GLCassa_Context", ValueComparisonType.NotEquals, eCashMoveType.eNotSet)>
<RuleValueComparison("RuleValue-CashMoveType2", "aFinalAndNew_GLCassa_Context", ValueComparisonType.NotEquals, eCashMoveType.eNotSet)>
<RuleValueComparison("RuleValue-CashMoveType3", "aToTable_GLCassa_Contexts", ValueComparisonType.NotEquals, eCashMoveType.eNotSet)>
Property CashMoveType() As eCashMoveType
Get
Return _CashMoveType
End Get
Set(ByVal value As eCashMoveType)
SetPropertyValue("CashMoveType", _CashMoveType, value)
End Set
End Property
<Size(-1)>
<NonPersistent()>
<ImmediatePostData(True)>
<VisibleInListView(False)>
Property row_CashType() As eCashType
Get
Return _CashType
End Get
Set(ByVal value As eCashType)
SetPropertyValue("row_CashType", _CashType, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If value = eCashType.eNormal Or value = eCashType.eCorrectionHUF Then
If LiquidAssets_Cassa IsNot Nothing Then row_CurrencyName2 = LiquidAssets_Cassa.CurrencyName
row_PartnerType = ePartnerType.eNotSet
End If
End If
End Set
End Property
<NonPersistent()>
<RuleRequiredField("GLCassa-row_ChartOfAccounts", "aToTable_GLCassa_Contexts", TargetCriteria:="row_CashType=1")>
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.DateExecution')")>
<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.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
If value IsNot Nothing Then
row_ConnectInfo = value.ConnectInfo
row_Customer = value.Customers
row_PartnerType = value.PartnerType
If value.CurrencyName_Account IsNot Nothing Then
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 If
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
<RuleValueComparison("GLCassa-row_PartnerType", "aToTable_GLCassa_Contexts", ValueComparisonType.NotEquals, ePartnerType.eNotSet, TargetCriteria:="row_CashType in (0)")>
Property row_PartnerType() As ePartnerType
Get
Return _PartnerType
End Get
Set(ByVal value As ePartnerType)
SetPropertyValue("row_PartnerType", _PartnerType, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("LiquidAssetsType in (0,2,4) AND CustomerFrom='@This.CustomersFrom'")>
<RuleRequiredField("GLCassa-LiquidAssets_Cassa", "aFinal_GLCassa_Context")>
<RuleRequiredField("GLCassa-LiquidAssets_Cassa2", "aFinalAndNew_GLCassa_Context")>
<VisibleInListView(False)>
Property LiquidAssets_Cassa As LiquidAssets
Get
Return _LiquidAssets
End Get
Set(ByVal value As LiquidAssets)
SetPropertyValue("LiquidAssets_Cassa", _LiquidAssets, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
BallanceHUF = Me.GetBallanceHUF(value, Now)
BallanceDEV = Me.GetBallanceDEV(value, Now)
CurrencyName = value.CurrencyName
row_CurrencyName2 = value.CurrencyName
End If
End Set
End Property
<NonPersistent()>
<ImmediatePostData(True)>
<VisibleInListView(False)>
<RuleRange("GLCassa-row_CurrencyRate", "aToTable_GLCassa_Contexts", 1.1, 999999, TargetCriteria:="LiquidAssets_Cassa.CurrencyName.ShortName != 'HUF' and row_CashType !=2")>
Property row_CurrencyRate As Double
Get
Return _row_CurrencyRate
End Get
Set(value As Double)
SetPropertyValue("row_CurrencyRate", _row_CurrencyRate, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Cassa.CurrencyName
If LiquidAssets_Cassa.CurrencyName.ShortName = "HUF" And row_CurrencyName2.ShortName <> "HUF" Then
If row_CurrencyRate <> 0 Then row_AmountDEV2 = Math.Round(row_AmountHUF / row_CurrencyRate, 2, MidpointRounding.AwayFromZero)
End If
If LiquidAssets_Cassa.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName = "HUF" Then
row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero)
row_AmountDEV2 = row_AmountHUF
End If
If LiquidAssets_Cassa.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName <> "HUF" Then
row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero)
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)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Cassa.CurrencyName
If LiquidAssets_Cassa.CurrencyName.ShortName <> "HUF" And
row_CurrencyName2.ShortName <> "HUF" And
LiquidAssets_Cassa.CurrencyName.ShortName <> row_CurrencyName2.ShortName Then
If row_AmountDEV <> 0 Then
row_CurrencyRate2 = Math.Round(row_AmountDEV2 / row_AmountDEV, 4, MidpointRounding.AwayFromZero)
End If
End If
End If
End Set
End Property
<NonPersistent()>
<ImmediatePostData(True)>
<VisibleInListView(False)>
<RuleRange("GLCassa.CurrencyName.ToTable", "aToTable_GLCassa_Contexts", 0.01, 999999,
TargetCriteria:="LiquidAssets_Cassa.CurrencyName.ShortName != row_CurrencyName2.ShortName and LiquidAssets_Cassa.CurrencyName.ShortName !='HUF' and row_CurrencyName2.ShortName !='HUF' and row_CashType !=2")>
Property row_CurrencyRate2 As Double
Get
Return _row_CurrencyRate2
End Get
Set(value As Double)
SetPropertyValue("row_CurrencyRate2", _row_CurrencyRate2, value)
End Set
End Property
<NonPersistent()>
<ImmediatePostData(True)>
<VisibleInListView(False)>
Property row_CurrencyName2 As CurrencyName
Get
Return _row_CurrencyName2
End Get
Set(value As 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
<NonPersistent()>
Property BallanceHUF As Double
Get
Return _BallanceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("BallanceHUF", _BallanceHUF, value)
End Set
End Property
<NonPersistent()>
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
<Browsable(False)>
Property GLClosingTime As GLClosingTime
Get
Return _GLClosingTime
End Get
Set(value As GLClosingTime)
SetPropertyValue("GLClosingTime", _GLClosingTime, value)
End Set
End Property
Sub RecalculateTotal(ByVal _GLCassa As GLCassa, ByVal _ocur As Xpo.XPObjectSpace, ByVal _WidthCommit As Boolean)
Dim _GLRows As GLRows
_GLCassa.TotalInAmountHUF = 0
_GLCassa.TotalOutAmountHUF = 0
_GLCassa.TotalInAmountDEV = 0
_GLCassa.TotalOutAmountDEV = 0
For Each _GLRows In _GLCassa.GLRows
_GLCassa.TotalInAmountHUF += _GLRows.InAmountHUF
_GLCassa.TotalOutAmountHUF += _GLRows.OutAmountHUF
_GLCassa.TotalInAmountDEV += _GLRows.InAmountDEV
_GLCassa.TotalOutAmountDEV += _GLRows.OutAmountDEV
Next
If _GLCassa.TotalInAmountDEV > 0 Or _GLCassa.TotalInAmountHUF > 0 Then
If _GLCassa.CurrencyName.ShortName = "HUF" Then
_GLCassa.HUNumberToText = GetHUNumberToText(_GLCassa.TotalInAmountHUF)
Else
_GLCassa.HUNumberToText = GetHUNumberToText(_GLCassa.TotalInAmountDEV)
End If
Else
If _GLCassa.CurrencyName.ShortName = "HUF" Then
_GLCassa.HUNumberToText = GetHUNumberToText(_GLCassa.TotalOutAmountHUF)
Else
_GLCassa.HUNumberToText = GetHUNumberToText(_GLCassa.TotalOutAmountDEV)
End If
End If
If _WidthCommit = True Then _ocur.CommitChanges()
End Sub
Sub CreateRoundingRow(ByVal _GLCassa As GLCassa, ByVal _ocur As Xpo.XPObjectSpace)
Dim _GLRows As GLRows
Dim _GLRows_New As GLRows
Dim _GLHeader As GLHeader = TryCast(_GLCassa, GLHeader)
Dim _InAmountHUF As Double = 0
Dim _OutAmountHUF As Double = 0
Dim _DebitChartOfAccounts As ChartOfAccounts
Dim _CreditChartOfAccounts As ChartOfAccounts
If _GLCassa IsNot Nothing Then
For Each _GLRows In _GLCassa.GLRows
If _GLRows.LiquidAssets.IsRounding = True Then
'-- Törölni kell a kerekítési sort ! -------------------------------------------------------------------------------------------------------
'-------------------------------------------------------------------------------------------------------------------------------------------
Dim _GUID As Guid = Guid.NewGuid
If _GLCassa.TotalInAmountHUF > 0 Then 'Befizetés
_InAmountHUF = _GLCassa.TotalInAmountHUF Mod 5
Select Case _InAmountHUF
Case 1, 2 'Lefele kerekítés
_CreditChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
_DebitChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 1)
_GLRows_New = _ocur.CreateObject(Of GLRows)()
_GLRows_New.InAmountHUF = _InAmountHUF * -1
_GLRows_New.CreditAmountHUF = _InAmountHUF
_GLRows_New.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, 0, _InAmountHUF,
_GLRows.LiquidAssets, Nothing, _GLCassa.DateExecution, Nothing, "Kerekítési különbözet", Nothing, Nothing,
Nothing, Nothing, Nothing, "", eGLRowsTypeVAT.eRoundingRow, _GUID, eTransactionType.eNormalDebit, eCashType.eNormal,
ePartnerType.eNotSet)
_ocur.CommitChanges()
Case 3, 4 'fölfele kerekítés
_CreditChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 2)
_DebitChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
_GLRows_New = _ocur.CreateObject(Of GLRows)()
_GLRows_New.InAmountHUF = 5 - _InAmountHUF
_GLRows_New.DebitAmountHUF = 5 - _InAmountHUF
_GLRows_New.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, 0, 5 - _InAmountHUF,
_GLRows.LiquidAssets, Nothing, _GLCassa.DateExecution, Nothing, "Kerekítési különbözet", Nothing, Nothing,
Nothing, Nothing, Nothing, "", eGLRowsTypeVAT.eRoundingRow, _GUID, eTransactionType.eNormalDebit, eCashType.eNormal,
ePartnerType.eNotSet)
_ocur.CommitChanges()
End Select
Else 'Kifizetés
_OutAmountHUF = _GLCassa.TotalOutAmountHUF Mod 5
Select Case _OutAmountHUF
Case 1, 2 'Lefele kerekítés
_CreditChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 2)
_DebitChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
_GLRows_New = _ocur.CreateObject(Of GLRows)()
_GLRows_New.OutAmountHUF = _OutAmountHUF * -1
_GLRows_New.DebitAmountHUF = _OutAmountHUF
_GLRows_New.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, 0, _OutAmountHUF,
_GLRows.LiquidAssets, Nothing, _GLCassa.DateExecution, Nothing, "Kerekítési különbözet", Nothing, Nothing,
Nothing, Nothing, Nothing, "", eGLRowsTypeVAT.eRoundingRow, _GUID, eTransactionType.eNormalCredit, eCashType.eNormal,
ePartnerType.eNotSet)
_ocur.CommitChanges()
Case 3, 4 'fölfele kerekítés
_CreditChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 0)
_DebitChartOfAccounts = _GLRows.LiquidAssets.GetChartOfAccounts(_GLCassa.DateExecution.Year, 1)
_GLRows_New = _ocur.CreateObject(Of GLRows)()
_GLRows_New.OutAmountHUF = (5 - _OutAmountHUF)
_GLRows_New.CreditAmountHUF = 5 - _OutAmountHUF
_GLRows_New.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, 0, (5 - _OutAmountHUF),
_GLRows.LiquidAssets, Nothing, _GLCassa.DateExecution, Nothing, "Kerekítési különbözet", Nothing, Nothing,
Nothing, Nothing, Nothing, "", eGLRowsTypeVAT.eRoundingRow, _GUID, eTransactionType.eNormalCredit, eCashType.eNormal,
ePartnerType.eNotSet)
_ocur.CommitChanges()
End Select
End If
End If
Exit For
Next
End If
End Sub
Function CheckIsNegative(ByVal _ocur As Xpo.XPObjectSpace, ByVal _p_LiquidAssets As LiquidAssets, ByVal _p_GLCassa As GLCassa) As Date
Dim _TotalHUF As Double = 0
Dim _TotalDEV As Double = 0
Dim _GLCassa As GLCassa
Dim _GLRows As GLRows
Dim _IsNegative As Boolean = False
Dim _IsNegativeDate As Date = Nothing
Dim _GLCassa_Collection As New XPCollection(Of GLCassa)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session,
CriteriaOperator.Parse("(LiquidAssets_Cassa=? and IsStorno=False and DocumentNumber<>'') or Oid=?", _p_LiquidAssets, _p_GLCassa.Oid))
_GLCassa_Collection.Sorting.Add(New SortProperty("DateExecution", DB.SortingDirection.Ascending))
_IsNegativeDate = #1/1/1980#
For Each _GLCassa In _GLCassa_Collection
For Each _GLRows In _GLCassa.GLRows
_TotalHUF += _GLRows.InAmountHUF - _GLRows.OutAmountHUF
_TotalDEV += _GLRows.InAmountDEV - _GLRows.OutAmountDEV
Next
If LiquidAssets_Cassa.CurrencyName.ShortName = "HUF" Then
If _TotalHUF < 0 Then
_IsNegative = True
_IsNegativeDate = _GLCassa.DateExecution
Exit For
End If
Else
If _TotalDEV < 0 Then
_IsNegative = True
_IsNegativeDate = _GLCassa.DateExecution
Exit For
End If
End If
Next
Return _IsNegativeDate
End Function
Function CheckIsNegativeifStorno(ByVal _ocur As Xpo.XPObjectSpace, ByVal _GLCassaifStorno As GLCassa) As Date
Dim _TotalHUF As Double = 0
Dim _TotalDEV As Double = 0
Dim _GLCassa As GLCassa
Dim _GLRows As GLRows
Dim _IsNegative As Boolean = False
Dim _IsNegativeDate As Date = Nothing
Dim _GLCassa_Collection As New XPCollection(Of GLCassa)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session,
CriteriaOperator.Parse("LiquidAssets_Cassa=? and IsStorno=False and Oid<>?", _GLCassaifStorno.LiquidAssets_Cassa, _GLCassaifStorno.Oid))
_GLCassa_Collection.Sorting.Add(New SortProperty("DateExecution", DB.SortingDirection.Ascending))
_IsNegativeDate = #1/1/1980#
For Each _GLCassa In _GLCassa_Collection
For Each _GLRows In _GLCassa.GLRows
_TotalHUF += _GLRows.InAmountHUF - _GLRows.OutAmountHUF
_TotalDEV += _GLRows.InAmountDEV - _GLRows.OutAmountDEV
Next
If LiquidAssets_Cassa.CurrencyName.ShortName = "HUF" Then
If _TotalHUF < 0 Then
_IsNegative = True
_IsNegativeDate = _GLCassa.DateExecution
Exit For
End If
Else
If _TotalDEV < 0 Then
_IsNegative = True
_IsNegativeDate = _GLCassa.DateExecution
Exit For
End If
End If
Next
Return _IsNegativeDate
End Function
Public Sub PrintCassaDocument(ByVal _GLCassa As GLCassa, ByVal _ocur As Xpo.XPObjectSpace, ByVal _Frame As Frame)
Dim _ReportData As ReportData
Dim _GLHeader As GLHeader
If _GLCassa IsNot Nothing Then
_GLHeader = TryCast(_GLCassa, GLHeader)
_ReportData = _GLCassa.LiquidAssets_Cassa.ReportData
If _ReportData IsNot Nothing Or _GLCassa Is Nothing Then
_Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("GLHeader=?", _GLHeader), True)
End If
End If
End Sub
Function CheckIfPartnerCashFlowsInMonthGreaterThan1500000(ByVal _ocur As Xpo.XPObjectSpace, ByVal _p_GLCassa As GLCassa,
ByVal _p_Customers As Customers, ByVal _p_DateExecution As Date,
_p_CurrentInAmountHUF As Double, _p_CurrentOutAmountHUF As Double) As Boolean
Dim _Valid As Boolean = True
Dim _SumInAmountHUF As Double = _p_CurrentInAmountHUF
Dim _SumOutAmountHUF As Double = _p_CurrentOutAmountHUF
Dim _GLRows_Collection As New XPCollection(Of GLRows)(_ocur.Session, CriteriaOperator.Parse("GetYear(GLHeader.DateExecution)=? and GetMonth(GLHeader.DateExecution)=? and GLHeader.IsEditable=False",
_p_GLCassa.DateExecution.Year, _p_GLCassa.DateExecution.Month))
Dim _GLRows As GLRows
For Each _GLRows In _GLRows_Collection
If TryCast(_GLRows.GLHeader, GLCassa) Is _p_GLCassa Then
_SumInAmountHUF += _GLRows.InAmountHUF
_SumOutAmountHUF = _GLRows.OutAmountHUF
End If
Next
If _SumInAmountHUF >= 1500000 Or _SumOutAmountHUF > 1500000 Then
_Valid = False
End If
Return _Valid
End Function
<VisibleInDetailView(False)>
ReadOnly Property Image1 As Image
Get
If Me.GLClosingTime IsNot Nothing Then
Return ImageLoader.Instance.GetImageInfo("lock_warning").Image
Else
If IsStorno Then
Return ImageLoader.Instance.GetImageInfo("document_delete").Image
Else
Return ImageLoader.Instance.GetImageInfo("edit").Image
End If
End If
End Get
End Property
'-- Overrides property
<RuleValueComparison("GLCassa-row_AmountDEV", "aToTable_GLCassa_Contexts", ValueComparisonType.GreaterThan, 0, TargetCriteria:="CurrencyName.ShortName != 'HUF' and row_CashType !=2 ")>
Overrides Property row_AmountDEV As Double
Get
Return MyBase.row_AmountDEV
End Get
Set(value As Double)
MyBase.row_AmountDEV = value
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Cassa.CurrencyName
If Me.row_CurrencyRate > 0 Then
Me.row_AmountHUF = value * Me.row_CurrencyRate
End If
If LiquidAssets_Cassa.CurrencyName.ShortName <> "HUF" Then
If LiquidAssets_Cassa.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
Overrides Property row_AmountHUF As Double
Get
Return MyBase.row_AmountHUF
End Get
Set(value As Double)
MyBase.row_AmountHUF = value
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Cassa.CurrencyName
If LiquidAssets_Cassa.CurrencyName.ShortName = "HUF" Then
If LiquidAssets_Cassa.CurrencyName.ShortName = row_CurrencyName2.ShortName Then
Else
row_AmountDEV2 = row_AmountHUF * Math.Round(row_CurrencyRate2, 2, MidpointRounding.AwayFromZero)
End If
End If
End If
End Set
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 IsNot Nothing Then
row_ChartOfAccounts = value.GetChartOfAccounts(Me.DateExecution.Year, False)
End If
End If
End Set
End Property
<RuleRequiredField("GLHeader.row_Customer.GLCassa", "aToTable_GLCassa_Contexts", TargetCriteria:="row_PartnerType<>-1")>
Public Overrides Property row_Customer As Customers
Get
Return MyBase.row_Customer
End Get
Set(value As Customers)
MyBase.row_Customer = value
End Set
End Property
Function GetBallanceHUF(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
Dim _SQL As String
Dim _SelectedData As SelectedData = Nothing
Dim _BallanceHUF As Double = 0
_SQL = " SELECT t1.LiquidAssets_Cassa AS LiquidAssets,"
_SQL += " SUM(t3.InAmountHUF)-SUM(t3.OutAmountHUF) As BallanceHUF,"
_SQL += " SUM(t3.InAmountDEV)-SUM(t3.OutAmountDEV) As BallanceDEV"
_SQL += " FROM GLCassa t1 JOIN GLHeader t2 ON"
_SQL += " t1.Oid=t2.Oid JOIN GLRows t3 On"
_SQL += " t2.Oid=t3.GLHeader"
_SQL += " WHERE t2.DocumentNumber<>'' AND t2.GCRecord IS NULL AND t3.GCRecord IS NULL AND t1.LiquidAssets_Cassa=@Cassa AND "
_SQL += " DATE(t2.DateExecution)<=@Date"
Dim _stringparam() As String = New String() {"@Cassa", "@Date"}
Dim _objectparam() As Object = New Object() {_LiquidAssets.Oid, _ToDate.Date}
_SelectedData = Session.ExecuteQuery(_SQL, _stringparam, _objectparam)
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
_BallanceHUF = row.Values(1)
Next row
Return _BallanceHUF
End Function
Function GetBallanceDEV(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
Dim _SQL As String
Dim _SelectedData As SelectedData = Nothing
Dim _BallanceDEV As Double = 0
_SQL = " SELECT t1.LiquidAssets_Cassa AS LiquidAssets,"
_SQL += " SUM(t3.InAmountHUF)-SUM(t3.OutAmountHUF) As BallanceHUF,"
_SQL += " SUM(t3.InAmountDEV)-SUM(t3.OutAmountDEV) As BallanceDEV"
_SQL += " FROM GLCassa t1 JOIN GLHeader t2 ON"
_SQL += " t1.Oid=t2.Oid JOIN GLRows t3 On"
_SQL += " t2.Oid=t3.GLHeader"
_SQL += " WHERE t2.DocumentNumber<>'' AND t2.GCRecord IS NULL AND t3.GCRecord IS NULL AND t1.LiquidAssets_Cassa=@Cassa AND "
_SQL += " DATE(t2.DateExecution)<=@Date"
Dim _stringparam() As String = New String() {"@Cassa", "@Date"}
Dim _objectparam() As Object = New Object() {_LiquidAssets.Oid, _ToDate.Date}
_SelectedData = Session.ExecuteQuery(_SQL, _stringparam, _objectparam)
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
_BallanceDEV = row.Values(2)
Next row
Return _BallanceDEV
End Function
End Class
@@ -0,0 +1,215 @@
Partial Class GLCassaVC
<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_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aPrintCassaDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aRecalculateSelectedGLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTable_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aBackToRowEdit_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTableD_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLCassaDivideRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aGenerateGLCassRateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aImportPCIGroupCassa = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aFinal_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aStorno_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aFinalAndNew_GLCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGetCurrencyRateCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGLCassaGenerateDocumentNumber = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aMakeEditable_GLCassa
'
Me.aMakeEditable_GLCassa.Caption = "aMakeEditable_GLCassa"
Me.aMakeEditable_GLCassa.Category = "ObjectsCreation"
Me.aMakeEditable_GLCassa.ConfirmationMessage = Nothing
Me.aMakeEditable_GLCassa.Id = "aMakeEditable_GLCassa"
Me.aMakeEditable_GLCassa.ImageName = "edit"
Me.aMakeEditable_GLCassa.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aMakeEditable_GLCassa.TargetObjectsCriteria = "IsEditable=False and IsStorno=False and isnull(GLClosingTime)=True"
Me.aMakeEditable_GLCassa.ToolTip = Nothing
'
'aPrintCassaDocument
'
Me.aPrintCassaDocument.Caption = "Print document"
Me.aPrintCassaDocument.Category = "View"
Me.aPrintCassaDocument.ConfirmationMessage = Nothing
Me.aPrintCassaDocument.Id = "aPrintCassaDocument"
Me.aPrintCassaDocument.ToolTip = Nothing
'
'aRecalculateSelectedGLCassa
'
Me.aRecalculateSelectedGLCassa.Caption = "aRecalculate Selected GLCassa"
Me.aRecalculateSelectedGLCassa.Category = "ObjectsCreation"
Me.aRecalculateSelectedGLCassa.ConfirmationMessage = Nothing
Me.aRecalculateSelectedGLCassa.Id = "aRecalculateSelectedGLCassa"
Me.aRecalculateSelectedGLCassa.TargetObjectsCriteria = "isnull(GLClosingTime)=True"
Me.aRecalculateSelectedGLCassa.ToolTip = Nothing
'
'aToTable_GLCassa
'
Me.aToTable_GLCassa.Caption = "Add row"
Me.aToTable_GLCassa.Category = "aToTable_GLCassa"
Me.aToTable_GLCassa.ConfirmationMessage = Nothing
Me.aToTable_GLCassa.Id = "aToTable_GLCassa"
Me.aToTable_GLCassa.TargetViewId = "GLCassa_DetailView"
Me.aToTable_GLCassa.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aToTable_GLCassa.ToolTip = Nothing
Me.aToTable_GLCassa.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aBackToRowEdit_GLCassa
'
Me.aBackToRowEdit_GLCassa.Caption = "Edit row"
Me.aBackToRowEdit_GLCassa.Category = "aBackToRowEdit_GLCassa"
Me.aBackToRowEdit_GLCassa.ConfirmationMessage = Nothing
Me.aBackToRowEdit_GLCassa.Id = "aBackToRowEdit_GLCassa"
Me.aBackToRowEdit_GLCassa.TargetViewId = "GLCassa_DetailView"
Me.aBackToRowEdit_GLCassa.ToolTip = Nothing
'
'aToTableD_GLCassa
'
Me.aToTableD_GLCassa.Caption = "Delete row"
Me.aToTableD_GLCassa.Category = "aToTableD_GLCassa"
Me.aToTableD_GLCassa.ConfirmationMessage = Nothing
Me.aToTableD_GLCassa.Id = "aToTableD_GLCassa"
Me.aToTableD_GLCassa.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aToTableD_GLCassa.TargetViewId = "GLCassa_DetailView"
Me.aToTableD_GLCassa.ToolTip = Nothing
'
'aGLCassaDivideRows
'
Me.aGLCassaDivideRows.AcceptButtonCaption = Nothing
Me.aGLCassaDivideRows.CancelButtonCaption = Nothing
Me.aGLCassaDivideRows.Caption = "Divide rows"
Me.aGLCassaDivideRows.ConfirmationMessage = Nothing
Me.aGLCassaDivideRows.Id = "aGLCassaDivideRows"
Me.aGLCassaDivideRows.ImageName = "row_add_after"
Me.aGLCassaDivideRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGLCassaDivideRows.TargetViewId = "GLHeader_GLRows_ListView_Cassa"
Me.aGLCassaDivideRows.ToolTip = Nothing
'
'aGenerateGLCassRateDiff
'
Me.aGenerateGLCassRateDiff.Caption = "Generate rate diff"
Me.aGenerateGLCassRateDiff.Category = "ObjectsCreation"
Me.aGenerateGLCassRateDiff.ConfirmationMessage = "Do you want to execute command ?"
Me.aGenerateGLCassRateDiff.Id = "aGenerateGLCassaRateDiff"
Me.aGenerateGLCassRateDiff.ImageName = "money"
Me.aGenerateGLCassRateDiff.TargetViewId = "GLCassa_ListView"
Me.aGenerateGLCassRateDiff.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aGenerateGLCassRateDiff.ToolTip = Nothing
Me.aGenerateGLCassRateDiff.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aImportPCIGroupCassa
'
Me.aImportPCIGroupCassa.AcceptButtonCaption = Nothing
Me.aImportPCIGroupCassa.CancelButtonCaption = Nothing
Me.aImportPCIGroupCassa.Caption = "Get exported "
Me.aImportPCIGroupCassa.Category = "aImportPCIGroupCassa"
Me.aImportPCIGroupCassa.ConfirmationMessage = Nothing
Me.aImportPCIGroupCassa.Id = "aImportPCIGroupCassa"
Me.aImportPCIGroupCassa.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aImportPCIGroupCassa.TargetViewId = "GLCassa_DetailView"
Me.aImportPCIGroupCassa.ToolTip = Nothing
'
'aFinal_GLCassa
'
Me.aFinal_GLCassa.Caption = "aFinal_GLCassa"
Me.aFinal_GLCassa.Category = "ObjectsCreation"
Me.aFinal_GLCassa.ConfirmationMessage = Nothing
Me.aFinal_GLCassa.Id = "aFinal_GLCassa"
Me.aFinal_GLCassa.ImageName = "MenuBar_SaveAndClose"
Me.aFinal_GLCassa.TargetObjectsCriteria = "isnull(GLClosingTime)=True"
Me.aFinal_GLCassa.TargetObjectType = GetType(Nuvolar.[Module].GLCassa)
Me.aFinal_GLCassa.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aFinal_GLCassa.ToolTip = Nothing
Me.aFinal_GLCassa.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aStorno_GLCassa
'
Me.aStorno_GLCassa.Caption = "aStorno_GLCassa"
Me.aStorno_GLCassa.Category = "ObjectsCreation"
Me.aStorno_GLCassa.ConfirmationMessage = "Do you want to execute command ?"
Me.aStorno_GLCassa.Id = "aStorno_GLCassa"
Me.aStorno_GLCassa.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aStorno_GLCassa.TargetObjectsCriteria = "IsStorno=False and IsEditable=False and isnull(GLClosingTime)=True"
Me.aStorno_GLCassa.TargetObjectType = GetType(Nuvolar.[Module].GLCassa)
Me.aStorno_GLCassa.TargetViewId = ""
Me.aStorno_GLCassa.ToolTip = Nothing
Me.aStorno_GLCassa.TypeOfView = GetType(DevExpress.ExpressApp.View)
'
'aFinalAndNew_GLCassa
'
Me.aFinalAndNew_GLCassa.Caption = "aFinalAndNew_GLCassa"
Me.aFinalAndNew_GLCassa.Category = "ObjectsCreation"
Me.aFinalAndNew_GLCassa.ConfirmationMessage = Nothing
Me.aFinalAndNew_GLCassa.Id = "aFinalAndNew_GLCassa"
Me.aFinalAndNew_GLCassa.ImageName = "MenuBar_SaveAndNew"
Me.aFinalAndNew_GLCassa.TargetObjectType = GetType(Nuvolar.[Module].GLCassa)
Me.aFinalAndNew_GLCassa.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aFinalAndNew_GLCassa.ToolTip = Nothing
Me.aFinalAndNew_GLCassa.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aGetCurrencyRateCassa
'
Me.aGetCurrencyRateCassa.Caption = "aGet Currency Rate Cassa"
Me.aGetCurrencyRateCassa.Category = "aGetCurrencyRateCassa"
Me.aGetCurrencyRateCassa.ConfirmationMessage = Nothing
Me.aGetCurrencyRateCassa.Id = "aGetCurrencyRateCassa"
Me.aGetCurrencyRateCassa.TargetObjectType = GetType(Nuvolar.[Module].GLCassa)
Me.aGetCurrencyRateCassa.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aGetCurrencyRateCassa.ToolTip = Nothing
Me.aGetCurrencyRateCassa.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aGLCassaGenerateDocumentNumber
'
Me.aGLCassaGenerateDocumentNumber.Caption = "aGLCassa Generate Document Number"
Me.aGLCassaGenerateDocumentNumber.ConfirmationMessage = Nothing
Me.aGLCassaGenerateDocumentNumber.Id = "aGLCassaGenerateDocumentNumber"
Me.aGLCassaGenerateDocumentNumber.TargetObjectsCriteria = ""
Me.aGLCassaGenerateDocumentNumber.TargetObjectType = GetType(Nuvolar.[Module].GLCassa)
Me.aGLCassaGenerateDocumentNumber.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aGLCassaGenerateDocumentNumber.ToolTip = Nothing
Me.aGLCassaGenerateDocumentNumber.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aToTable_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFinal_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aStorno_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFinalAndNew_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aMakeEditable_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPrintCassaDocument As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aRecalculateSelectedGLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aBackToRowEdit_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTableD_GLCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGLCassaDivideRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGenerateGLCassRateDiff As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aImportPCIGroupCassa As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGetCurrencyRateCassa As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGLCassaGenerateDocumentNumber As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,165 @@
<?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_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="aPrintCassaDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1188, 212</value>
</metadata>
<metadata name="aRecalculateSelectedGLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>978, 212</value>
</metadata>
<metadata name="aToTable_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>827, 212</value>
</metadata>
<metadata name="aBackToRowEdit_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>636, 212</value>
</metadata>
<metadata name="aToTableD_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aGLCassaDivideRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>470, 212</value>
</metadata>
<metadata name="aGenerateGLCassRateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>280, 212</value>
</metadata>
<metadata name="aImportPCIGroupCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aFinal_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aStorno_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aFinalAndNew_GLCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aGetCurrencyRateCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>476, 56</value>
</metadata>
<metadata name="aGLCassaGenerateDocumentNumber.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>427, 115</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,77 @@
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 GLCassaOpenClose
Inherits BaseObject
Private _LiquidAssets As LiquidAssets
Private _DateFrom As Date
Private _DateTo As Date
Private _ObjectCreated As Date
Private _UserCreated As User
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
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
Property DateFrom As Date
Get
Return _DateFrom
End Get
Set(value As Date)
SetPropertyValue("DateFrom", _DateFrom, value)
End Set
End Property
Property DateTo As Date
Get
Return _DateTo
End Get
Set(value As Date)
SetPropertyValue("DateTo", _DateTo, value)
End Set
End Property
<NonCloneable> _
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
End Set
End Property
<NonCloneable> _
Property UserCreated As User
Get
Return _UserCreated
End Get
Set(value As User)
SetPropertyValue("UserCreated", _UserCreated, value)
End Set
End Property
End Class