Reconfigure for GIT
This commit is contained in:
+614
@@ -0,0 +1,614 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Text
|
||||
Imports System.Data
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Xpo.DB
|
||||
Imports DevExpress.Xpo.Helpers
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports System.Drawing
|
||||
Imports DevExpress.Xpo.Metadata
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
Public Enum eLiquidAssetsType
|
||||
NormalCheckout = 0
|
||||
NormalBank = 1
|
||||
DepositCheckout = 2
|
||||
Compensatory = 3
|
||||
CurrencyCheckout = 4
|
||||
SpecialTransaction = 5
|
||||
TechnicalTransaction = 6
|
||||
SimpleReceipt = 7
|
||||
Virtual = 8
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("FinancialStock")> _
|
||||
<Appearance("HIDE if BANK", AppearanceItemType.ViewItem, "LiquidAssetsType=1", TargetItems:="NumberGeneratorOut;NumberGeneratorIn;ReportData", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("HIDE IsRounding", AppearanceItemType.ViewItem, "LiquidAssetsType in (1,3,4,5,6,7,8)", TargetItems:="IsRounding;ChartOfAccountsPlus;ChartOfAccountsMinus", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("HIDE IsRounding ChartsOfAccounts", AppearanceItemType.ViewItem, "IsRounding != 'True'", TargetItems:="ChartOfAccountsPlus;ChartOfAccountsMinus", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class LiquidAssets '-- Pénzeszközök
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _LiquidAssetsType As eLiquidAssetsType = eLiquidAssetsType.NormalCheckout
|
||||
Private _Description As String
|
||||
Private _CustomerFrom As CustomersFrom
|
||||
Private _NumberGeneratorOut As NumberGenerator
|
||||
Private _NumberGeneratorIn As NumberGenerator
|
||||
Private _Active As Boolean = True
|
||||
Private _ImagePicture As Image
|
||||
Private _ChartOfAccounts As ChartOfAccounts
|
||||
Private _CurrencyName As CurrencyName
|
||||
Private _ReportData As ReportData
|
||||
Private _ReportData_Return As ReportData
|
||||
Private _IsRounding As Boolean = False
|
||||
Private _ChartOfAccountsPlus As ChartOfAccounts
|
||||
Private _ChartOfAccountsMinus As ChartOfAccounts
|
||||
Private _NoPrint As Boolean 'Nincs bizonylat nyomtatás
|
||||
Private _NoDocumentNumber As Boolean 'Ne legyen sorszám automatikusa
|
||||
Private _NoTimeCheck As Boolean 'Nincs dátum és sorszám ellenőrzés
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
NoPrint = False
|
||||
NoDocumentNumber = False
|
||||
NoTimeCheck = False
|
||||
End Sub
|
||||
|
||||
<RuleRequiredField("LiquidAssets-ShortName", DefaultContexts.Save)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-LiquidAssetsType", DefaultContexts.Save)> _
|
||||
<ImmediatePostData(True)> _
|
||||
Property LiquidAssetsType As eLiquidAssetsType
|
||||
Get
|
||||
Return _LiquidAssetsType
|
||||
End Get
|
||||
Set(ByVal value As eLiquidAssetsType)
|
||||
SetPropertyValue("LiquidAssetsType", _LiquidAssetsType, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-Description", DefaultContexts.Save)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-CustomersFrom", DefaultContexts.Save)> _
|
||||
Property CustomerFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomerFrom
|
||||
End Get
|
||||
Set(ByVal value As CustomersFrom)
|
||||
SetPropertyValue("CustomerFrom", _CustomerFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-NumberGeneratorOut", DefaultContexts.Save, TargetCriteria:="LiquidAssetsType !=1")> _
|
||||
Property NumberGeneratorOut As NumberGenerator
|
||||
Get
|
||||
Return _NumberGeneratorOut
|
||||
End Get
|
||||
Set(ByVal value As NumberGenerator)
|
||||
SetPropertyValue("NumberGeneratorOut", _NumberGeneratorOut, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-NumberGeneratorIn", DefaultContexts.Save, TargetCriteria:="LiquidAssetsType !=1")> _
|
||||
Property NumberGeneratorIn As NumberGenerator
|
||||
Get
|
||||
Return _NumberGeneratorIn
|
||||
End Get
|
||||
Set(ByVal value As NumberGenerator)
|
||||
SetPropertyValue("NumberGeneratorIn", _NumberGeneratorIn, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Active As Boolean
|
||||
Get
|
||||
Return _Active
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("Active", _Active, value)
|
||||
End Set
|
||||
End Property
|
||||
<ValueConverter(GetType(DevExpress.Xpo.Metadata.ImageValueConverter))> _
|
||||
<Browsable(False)> _
|
||||
Property ImagePicture As Image
|
||||
Get
|
||||
Return _ImagePicture
|
||||
End Get
|
||||
Set(ByVal Value As System.Drawing.Image)
|
||||
If Value Is _ImagePicture Then Exit Property
|
||||
_ImagePicture = Value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
<Browsable(False)>
|
||||
Property ChartOfAccounts() As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccounts
|
||||
End Get
|
||||
Set(ByVal value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-CurrencyName", DefaultContexts.Save)> _
|
||||
Property CurrencyName() As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(ByVal value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-ReportData", DefaultContexts.Save, TargetCriteria:="LiquidAssetsType !=1")> _
|
||||
Property ReportData As ReportData
|
||||
Get
|
||||
Return _ReportData
|
||||
End Get
|
||||
Set(ByVal value As ReportData)
|
||||
SetPropertyValue("ReportData", _ReportData, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ReportData_Return As ReportData
|
||||
Get
|
||||
Return _ReportData_Return
|
||||
End Get
|
||||
Set(ByVal value As ReportData)
|
||||
SetPropertyValue("ReportData_Return", _ReportData_Return, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("LiquidAssets-IsRounding", DefaultContexts.Save, TargetCriteria:="LiquidAssetsType in (0,2)")> _
|
||||
<ImmediatePostData(True)> _
|
||||
Property IsRounding As Boolean
|
||||
Get
|
||||
Return _IsRounding
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsRounding", _IsRounding, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
Property ChartOfAccountsPlus As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsPlus
|
||||
End Get
|
||||
Set(ByVal value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsPlus", _ChartOfAccountsPlus, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
Property ChartOfAccountsMinus As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsMinus
|
||||
End Get
|
||||
Set(ByVal value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsMinus", _ChartOfAccountsMinus, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property NoPrint As Boolean
|
||||
Get
|
||||
Return _NoPrint
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("NoPrint", _NoPrint, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NoDocumentNumber As Boolean
|
||||
Get
|
||||
Return _NoDocumentNumber
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("NoDocumentNumber", _NoDocumentNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NoTimeCheck As Boolean
|
||||
Get
|
||||
Return _NoTimeCheck
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("NoTimeCheck", _NoTimeCheck, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Structure GLRowsToModify_AmountDEVFIFO
|
||||
Dim Oid As Guid
|
||||
Dim AmountDEVFIFO As Double
|
||||
End Structure
|
||||
|
||||
Function GetCurrencyRateFIFO(_uow As Session, _LiquidAssets As LiquidAssets, _AmountDEV As Double, _DateClose As Date, _GLRows_Out As Guid) As Double
|
||||
'// Adott záródátumra kiszámolja a FIFO árfolyamot
|
||||
Dim _SumAmountDev As Double = 0
|
||||
Dim _SumAmountHUF As Double = 0
|
||||
Dim _NewFifo As Double = 0
|
||||
Dim _GLRowsToModify_ArrayList As ArrayList = New ArrayList
|
||||
Dim _GLRowsToModify As GLRowsToModify_AmountDEVFIFO = New GLRowsToModify_AmountDEVFIFO
|
||||
Dim _GLRows As GLRows
|
||||
Dim _GLRowsFIFO As GLRowsFIFO
|
||||
Dim _AmountDEVTotal As Double = _AmountDEV
|
||||
Dim _GLRowsFIFOOut As GLRows = _uow.GetObjectByKey(Of GLRows)(_GLRows_Out)
|
||||
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, _
|
||||
CriteriaOperator.Parse("LiquidAssets.Oid=? And GLHeader.IsEditable=False And InAmountDEV>0 And InAmountDEV>AmountDEVFIFO And GetDate(GLHeader.DateExecution)<?", _
|
||||
_LiquidAssets.Oid, _DateClose))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GLHeader.DateExecution", DB.SortingDirection.Ascending))
|
||||
|
||||
Dim _GLRowsFIFO_Collection As New XPCollection(Of GLRowsFIFO)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, CriteriaOperator.Parse("GLRowsOut.Oid=?", _GLRows_Out))
|
||||
_uow.Delete(_GLRowsFIFO_Collection)
|
||||
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
_GLRowsToModify = Nothing
|
||||
|
||||
If (_GLRows.InAmountDEV - _GLRows.AmountDEVFIFO) >= _AmountDEV Then
|
||||
|
||||
'_NewFifo = _GLRows.AmountDEVFIFO + _AmountDEV
|
||||
_NewFifo = _AmountDEV
|
||||
|
||||
_GLRowsToModify.Oid = _GLRows.Oid
|
||||
_GLRowsToModify.AmountDEVFIFO = _GLRowsToModify.AmountDEVFIFO + _NewFifo
|
||||
_GLRowsToModify_ArrayList.Add(_GLRowsToModify)
|
||||
|
||||
_SumAmountDev = _SumAmountDev + _AmountDEV
|
||||
_SumAmountHUF = _SumAmountHUF + _AmountDEV * _GLRows.CurrencyRate
|
||||
|
||||
_AmountDEV = 0
|
||||
Else
|
||||
|
||||
_NewFifo = _GLRows.InAmountDEV - _GLRows.AmountDEVFIFO
|
||||
|
||||
_GLRowsToModify.Oid = _GLRows.Oid
|
||||
_GLRowsToModify.AmountDEVFIFO = _GLRowsToModify.AmountDEVFIFO + _NewFifo
|
||||
_GLRowsToModify_ArrayList.Add(_GLRowsToModify)
|
||||
|
||||
_SumAmountDev = _SumAmountDev + _NewFifo
|
||||
_SumAmountHUF = _SumAmountHUF + _NewFifo * _GLRows.CurrencyRate
|
||||
|
||||
_AmountDEV = _AmountDEV - _NewFifo
|
||||
End If
|
||||
|
||||
_GLRowsFIFO = New GLRowsFIFO(_uow)
|
||||
_GLRowsFIFO.GLRowsIn = _GLRows
|
||||
_GLRowsFIFO.GLRowsOut = _GLRowsFIFOOut
|
||||
_GLRowsFIFO.OutAmountDEV = _AmountDEVTotal
|
||||
_GLRowsFIFO.InAmountDEV = _NewFifo
|
||||
_GLRowsFIFO.Save()
|
||||
|
||||
If _AmountDEV = 0 Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
For Each _GLRowsToModify In _GLRowsToModify_ArrayList
|
||||
_GLRows = _uow.GetObjectByKey(Of GLRows)(_GLRowsToModify.Oid)
|
||||
_GLRows.AmountDEVFIFO = _GLRows.AmountDEVFIFO + _GLRowsToModify.AmountDEVFIFO
|
||||
_GLRows.Save()
|
||||
Next
|
||||
|
||||
If _SumAmountDev = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return _SumAmountHUF / _SumAmountDev
|
||||
End If
|
||||
|
||||
End Function
|
||||
Function GetCurrencyRateAverage(_uow As Session, _LiquidAssets As LiquidAssets, _DateClose As Date) As Double
|
||||
'// Adott záródátumra kiszámolja a Átlagár árfolyamot
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, _
|
||||
CriteriaOperator.Parse("LiquidAssets.Oid=? And GLHeader.IsEditable=False And GetDate(GLHeader.DateExecution)<=? and GetDate(GLHeader.DateExecution)>=? and InAmountDEV>0", _
|
||||
_LiquidAssets.Oid, _DateClose, FirstDayOfYear(_DateClose)))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GLHeader.DateExecution", DB.SortingDirection.Ascending))
|
||||
Dim _SumAmountDev As Double = 0
|
||||
Dim _SumAmountHUF As Double = 0
|
||||
|
||||
Dim _LiquidAssetsRate As LiquidAssetsRate = _uow.FindObject(Of LiquidAssetsRate)(CriteriaOperator.Parse("LiquidAssets.oid=? and GetYear(DateExecution)=?", _LiquidAssets.Oid, _DateClose.Year))
|
||||
If _LiquidAssetsRate IsNot Nothing Then
|
||||
_SumAmountDev = _LiquidAssetsRate.AmountDEV
|
||||
_SumAmountHUF = _LiquidAssetsRate.AmountHUF
|
||||
End If
|
||||
|
||||
For Each _GLRows As GLRows In _GLRows_Collection
|
||||
Dim _GLRowsFIFO_Collection As New XPCollection(Of GLRowsFIFO)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, CriteriaOperator.Parse("GLRowsOut.Oid=?", _GLRows.Oid))
|
||||
_uow.Delete(_GLRowsFIFO_Collection)
|
||||
|
||||
If _GLRows.OutAmountDEV <> 0 Then
|
||||
_SumAmountDev = _SumAmountDev + _GLRows.OutAmountDEV
|
||||
_SumAmountHUF = _SumAmountHUF + _GLRows.OutAmountHUF
|
||||
Else
|
||||
_SumAmountDev = _SumAmountDev + _GLRows.InAmountDEV
|
||||
_SumAmountHUF = _SumAmountHUF + _GLRows.InAmountHUF
|
||||
End If
|
||||
Next
|
||||
|
||||
If _SumAmountDev = 0 Then
|
||||
Return 0
|
||||
Else
|
||||
Return _SumAmountHUF / _SumAmountDev
|
||||
End If
|
||||
|
||||
End Function
|
||||
Function GetCurrencyRateDate(_ocur As Xpo.XPObjectSpace, _TransactionType As eTransactionType, _LiquidAssets As LiquidAssets, _DateExecution As Date) As Double
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _Rate As Double = 0
|
||||
|
||||
Select Case _TransactionType
|
||||
Case eTransactionType.eNormalCredit, eTransactionType.ePartnerCredit
|
||||
'// Árfolyam lekérése először a pénzeszközre
|
||||
Dim _CurrencyRate_Collection As XPCollection(Of CurrencyRate)
|
||||
Dim _CurrencyRate As CurrencyRate
|
||||
|
||||
_CurrencyRate_Collection = New XPCollection(Of CurrencyRate) _
|
||||
(_ocur.Session, CriteriaOperator.Parse("CurrencyName=? and LiquidAssets=? and GetDate(DateValid)<=?", _
|
||||
_LiquidAssets.CurrencyName, _DateExecution.Date))
|
||||
_CurrencyRate_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
|
||||
|
||||
If _CurrencyRate_Collection.Count > 0 Then
|
||||
For Each _CurrencyRate In _CurrencyRate_Collection
|
||||
If _CurrencyRate.DateValid.Date = _DateExecution.Date Then
|
||||
_Rate = _CurrencyRate.RateAverage
|
||||
Exit For
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
'// MNB árfolyam lekérése
|
||||
_CurrencyRate_Collection = New XPCollection(Of CurrencyRate) _
|
||||
(_ocur.Session, CriteriaOperator.Parse("CurrencyName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_LiquidAssets.CurrencyName, _DateExecution.Date))
|
||||
_CurrencyRate_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
|
||||
If _CurrencyRate_Collection.Count > 0 Then
|
||||
For Each _CurrencyRate In _CurrencyRate_Collection
|
||||
If _CurrencyRate.DateValid.Date = _DateExecution.Date Then
|
||||
_Rate = _CurrencyRate.RateAverage
|
||||
Exit For
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
Throw New Exception("*Nincs beállítva sem a pénzeszköz árfolyama sem az MNB árfolyama !")
|
||||
End If
|
||||
End If
|
||||
|
||||
Case eTransactionType.eNormalDebit, eTransactionType.ePartnerDebit
|
||||
_Rate = _LiquidAssets.GetCurrencyRateAverage(_uow, _LiquidAssets, _DateExecution)
|
||||
End Select
|
||||
|
||||
Return _Rate
|
||||
End Function
|
||||
'// Readonly propertyk
|
||||
<Association("LiquidAssets-LiquidAssetsYear", GetType(LiquidAssetsYear)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property LiquidAssetsYear As XPCollection(Of LiquidAssetsYear)
|
||||
Get
|
||||
Return GetCollection(Of LiquidAssetsYear)("LiquidAssetsYear")
|
||||
End Get
|
||||
End Property
|
||||
<Association("LiquidAssets-LiquidAssetsRate", GetType(LiquidAssetsRate)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property LiquidAssetsRate As XPCollection(Of LiquidAssetsRate)
|
||||
Get
|
||||
Return GetCollection(Of LiquidAssetsRate)("LiquidAssetsRate")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Function GetChartOfAccounts(_AccountYear As Long, _Mode As Long) As ChartOfAccounts
|
||||
Dim _ChartOfAccounts As ChartOfAccounts = Nothing
|
||||
Dim _LiquidAssetsYear As LiquidAssetsYear
|
||||
Select Case _Mode
|
||||
Case 0
|
||||
_ChartOfAccounts = Me.ChartOfAccounts
|
||||
For Each _LiquidAssetsYear In Me.LiquidAssetsYear
|
||||
If _LiquidAssetsYear.AccountYear = _AccountYear Then
|
||||
_ChartOfAccounts = _LiquidAssetsYear.ChartOfAccounts
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Case 1
|
||||
_ChartOfAccounts = Me.ChartOfAccountsMinus
|
||||
For Each _LiquidAssetsYear In Me.LiquidAssetsYear
|
||||
If _LiquidAssetsYear.AccountYear = _AccountYear Then
|
||||
_ChartOfAccounts = _LiquidAssetsYear.ChartOfAccountsMinus
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Case 2
|
||||
_ChartOfAccounts = Me.ChartOfAccountsPlus
|
||||
For Each _LiquidAssetsYear In Me.LiquidAssetsYear
|
||||
If _LiquidAssetsYear.AccountYear = _AccountYear Then
|
||||
_ChartOfAccounts = _LiquidAssetsYear.ChartOfAccountsPlus
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
Return _ChartOfAccounts
|
||||
End Function
|
||||
|
||||
End Class
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("FinancialStock")> _
|
||||
<DefaultProperty("FullBankAccount")> _
|
||||
Public Class BankInformation '-- Bankok !
|
||||
Inherits BaseObject
|
||||
Private _LiquidAssets As LiquidAssets
|
||||
Private _SWIFT As String
|
||||
Private _IBAN As String
|
||||
Private _AccountNumber As String
|
||||
Private _CurrencyName As CurrencyName
|
||||
Private _GIROInfo As GIROInfo
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property LiquidAssests As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(ByVal value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssests", _LiquidAssets, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SWIFT As String
|
||||
Get
|
||||
Return _SWIFT
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("SWIFT", _SWIFT, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IBAN As String
|
||||
Get
|
||||
Return _IBAN
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("IBAN", _IBAN, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountNumber As String
|
||||
Get
|
||||
Return _AccountNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("AccountNumber", _AccountNumber, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
|
||||
GIROInfo = Session.FindObject(Of GIROInfo)(CriteriaOperator.Parse("GIROID=?", Mid(AccountNumber, 1, 8)))
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property CurrencyName As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(ByVal value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property GIROInfo As GIROInfo
|
||||
Get
|
||||
Return _GIROInfo
|
||||
End Get
|
||||
Set(value As GIROInfo)
|
||||
SetPropertyValue("GIROInfo", _GIROInfo, value)
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property FullBankAccount As String
|
||||
Get
|
||||
Return "IBAN: " & _IBAN & " " & _AccountNumber & " SWIFT: " & _SWIFT
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
|
||||
<RuleCriteria("RuleCriteria LiquidAssetsYear-ChartOfAccounts", DefaultContexts.Save, "ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
<RuleCriteria("RuleCriteria LiquidAssetsYear-ChartOfAccountsPlus", DefaultContexts.Save, "ChartOfAccountsPlus.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
<RuleCriteria("RuleCriteria LiquidAssetsYear-ChartOfAccountsMinus", DefaultContexts.Save, "ChartOfAccountsMinus.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
Public Class LiquidAssetsYear
|
||||
Inherits BaseObject
|
||||
|
||||
Private _LiquidAssets As LiquidAssets
|
||||
Private _AccountYear As Long
|
||||
Private _ChartOfAccounts As ChartOfAccounts
|
||||
Private _ChartOfAccountsPlus As ChartOfAccounts
|
||||
Private _ChartOfAccountsMinus As ChartOfAccounts
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
|
||||
End Sub
|
||||
|
||||
<Association("LiquidAssets-LiquidAssetsYear", GetType(LiquidAssets))> _
|
||||
Property LiquidAssets As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssets", _LiquidAssets, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountYear As Long
|
||||
Get
|
||||
Return _AccountYear
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AccountYear", _AccountYear, value)
|
||||
End Set
|
||||
End Property
|
||||
<DataSourceCriteria("AccountYear='@This.AccountYear'")> _
|
||||
Property ChartOfAccounts As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccounts
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
|
||||
End Set
|
||||
End Property
|
||||
<DataSourceCriteria("AccountYear='@This.AccountYear'")> _
|
||||
Property ChartOfAccountsPlus As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsPlus
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsPlus", _ChartOfAccountsPlus, value)
|
||||
End Set
|
||||
End Property
|
||||
<DataSourceCriteria("AccountYear='@This.AccountYear'")> _
|
||||
Property ChartOfAccountsMinus As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsMinus
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsMinus", _ChartOfAccountsMinus, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
<DefaultClassOptions()> _
|
||||
<DefaultProperty("ShortName")> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class GIROInfo
|
||||
Inherits BaseObject
|
||||
|
||||
Private _GIROID As String
|
||||
Private _ShortName As String
|
||||
Private _Address As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
|
||||
Property GIROID As String
|
||||
Get
|
||||
Return _GIROID
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("GIROID", _GIROID, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Address As String
|
||||
Get
|
||||
Return _Address
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Address", _Address, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<DeferredDeletion(False)> _
|
||||
Public Class LiquidAssetsBallanceHeader 'Pénzeszközök egyenlege
|
||||
Inherits BaseObject
|
||||
Private _DateExecution As Date 'Teljesítés dátuma
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
DateExecution = GetSQLTime(Session)
|
||||
End Sub
|
||||
<VisibleInListView(False)> _
|
||||
<Association("LiquidAssetsBallanceHeader-LiquidAssetsBallanceRows", GetType(LiquidAssetsBallanceRows))> _
|
||||
ReadOnly Property LiquidAssetsBallanceRows As XPCollection(Of LiquidAssetsBallanceRows)
|
||||
Get
|
||||
Return GetCollection(Of LiquidAssetsBallanceRows)("LiquidAssetsBallanceRows")
|
||||
End Get
|
||||
End Property
|
||||
Property DateExecution As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<DeferredDeletion(False)> _
|
||||
Public Class LiquidAssetsBallanceRows 'Pénzeszközök egyenlege
|
||||
Inherits BaseObject
|
||||
Private _LiquidAssetsBallanceHeader As LiquidAssetsBallanceHeader
|
||||
Private _CustomersFrom As CustomersFrom 'Saját cég
|
||||
Private _LiquidAssets As LiquidAssets 'Pénzeszköz
|
||||
Private _BallanceHUF As Double 'Egyenleg HUF
|
||||
Private _BallanceDEV As Double ' Egyenleg DEVIZA
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<Association("LiquidAssetsBallanceHeader-LiquidAssetsBallanceRows", GetType(LiquidAssetsBallanceHeader))> _
|
||||
Property LiquidAssetsBallanceHeader As LiquidAssetsBallanceHeader
|
||||
Get
|
||||
Return _LiquidAssetsBallanceHeader
|
||||
End Get
|
||||
Set(ByVal value As LiquidAssetsBallanceHeader)
|
||||
SetPropertyValue("LiquidAssetsBallanceHeader", _LiquidAssetsBallanceHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(ByVal value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property LiquidAssets As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(ByVal value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssets", _LiquidAssets, value)
|
||||
End Set
|
||||
End Property
|
||||
Property 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
|
||||
End Class
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
Partial Class LiquidAssetsBallanceVC
|
||||
|
||||
<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.aGetBallanceCassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGenerateCurrencyRateFIFO = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGenerateCurrencyRateAverage = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGenerateCurrencyRateAverageStart = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aGetBallanceCassa
|
||||
'
|
||||
Me.aGetBallanceCassa.Caption = "Get ballance cassa"
|
||||
Me.aGetBallanceCassa.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGetBallanceCassa.Id = "aGetBallance_Cassa"
|
||||
Me.aGetBallanceCassa.ImageName = "stopwatch_run"
|
||||
Me.aGetBallanceCassa.Shortcut = Nothing
|
||||
Me.aGetBallanceCassa.Tag = Nothing
|
||||
Me.aGetBallanceCassa.TargetObjectsCriteria = Nothing
|
||||
Me.aGetBallanceCassa.TargetViewId = "LiquidAssetsBallanceHeader_DetailView_Cassa"
|
||||
Me.aGetBallanceCassa.ToolTip = Nothing
|
||||
Me.aGetBallanceCassa.TypeOfView = Nothing
|
||||
'
|
||||
'aGenerateCurrencyRateFIFO
|
||||
'
|
||||
Me.aGenerateCurrencyRateFIFO.Caption = "aGenerate Currency Rate FIFO"
|
||||
Me.aGenerateCurrencyRateFIFO.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGenerateCurrencyRateFIFO.Id = "aGenerateCurrencyRateFIFO"
|
||||
Me.aGenerateCurrencyRateFIFO.ImageName = Nothing
|
||||
Me.aGenerateCurrencyRateFIFO.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGenerateCurrencyRateFIFO.Shortcut = Nothing
|
||||
Me.aGenerateCurrencyRateFIFO.Tag = Nothing
|
||||
Me.aGenerateCurrencyRateFIFO.TargetObjectsCriteria = Nothing
|
||||
Me.aGenerateCurrencyRateFIFO.TargetObjectType = GetType(SISBusiness.[Module].GLRows)
|
||||
Me.aGenerateCurrencyRateFIFO.TargetViewId = "GLRows_ListView_Regenerate"
|
||||
Me.aGenerateCurrencyRateFIFO.ToolTip = Nothing
|
||||
Me.aGenerateCurrencyRateFIFO.TypeOfView = Nothing
|
||||
'
|
||||
'aGenerateCurrencyRateAverage
|
||||
'
|
||||
Me.aGenerateCurrencyRateAverage.Caption = "aGenerate Currency Rate Average"
|
||||
Me.aGenerateCurrencyRateAverage.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGenerateCurrencyRateAverage.Id = "aGenerateCurrencyRateAverage"
|
||||
Me.aGenerateCurrencyRateAverage.ImageName = Nothing
|
||||
Me.aGenerateCurrencyRateAverage.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGenerateCurrencyRateAverage.Shortcut = Nothing
|
||||
Me.aGenerateCurrencyRateAverage.Tag = Nothing
|
||||
Me.aGenerateCurrencyRateAverage.TargetObjectsCriteria = Nothing
|
||||
Me.aGenerateCurrencyRateAverage.TargetObjectType = GetType(SISBusiness.[Module].GLRows)
|
||||
Me.aGenerateCurrencyRateAverage.TargetViewId = "GLRows_ListView_Regenerate"
|
||||
Me.aGenerateCurrencyRateAverage.ToolTip = Nothing
|
||||
Me.aGenerateCurrencyRateAverage.TypeOfView = Nothing
|
||||
'
|
||||
'aGenerateCurrencyRateAverageStart
|
||||
'
|
||||
Me.aGenerateCurrencyRateAverageStart.AcceptButtonCaption = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.CancelButtonCaption = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.Caption = "aGenerate Currency Rate Average Start"
|
||||
Me.aGenerateCurrencyRateAverageStart.ConfirmationMessage = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.Id = "aGenerateCurrencyRateAverageStart"
|
||||
Me.aGenerateCurrencyRateAverageStart.ImageName = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGenerateCurrencyRateAverageStart.Shortcut = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.Tag = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.TargetObjectsCriteria = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.TargetObjectType = GetType(SISBusiness.[Module].GLRows)
|
||||
Me.aGenerateCurrencyRateAverageStart.TargetViewId = "GLRows_ListView_Regenerate"
|
||||
Me.aGenerateCurrencyRateAverageStart.ToolTip = Nothing
|
||||
Me.aGenerateCurrencyRateAverageStart.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aGetBallanceCassa As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGenerateCurrencyRateFIFO As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGenerateCurrencyRateAverage As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGenerateCurrencyRateAverageStart As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
<?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="aGetBallanceCassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aGenerateCurrencyRateFIFO.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aGenerateCurrencyRateAverage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>374, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aGenerateCurrencyRateAverageStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>222, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+335
@@ -0,0 +1,335 @@
|
||||
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.Xpo
|
||||
|
||||
Imports System.Linq
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class LiquidAssetsBallanceVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||
Public Event DoWork()
|
||||
Public Event FinalWork
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Frame.GetController(Of LiquidAssetsBallanceVC).aGenerateCurrencyRateAverage.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LiquidAssetsBallanceVC).aGenerateCurrencyRateFIFO.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "LiquidAssetsBallanceHeader_LiquidAssetsBallanceRows_ListView_Cassa" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "LiquidAssetsBallanceHeader_DetailView_Cassa" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Dim _LiquidAssetsBallanceHeader As LiquidAssetsBallanceHeader
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_LiquidAssetsBallanceHeader = TryCast(View.SelectedObjects(0), LiquidAssetsBallanceHeader)
|
||||
If _LiquidAssetsBallanceHeader IsNot Nothing Then
|
||||
_LiquidAssetsBallanceHeader.DateExecution = GetSQLTime(_ocur.Session)
|
||||
_ocur.CommitChanges()
|
||||
Frame.GetController(Of LiquidAssetsBallanceVC).aGetBallanceCassa.DoExecute()
|
||||
End If
|
||||
End If
|
||||
If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnRows_ListView_Cassa" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "GLRows_ListView_Regenerate" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
End Sub
|
||||
Private Sub aGetBallance_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGetBallanceCassa.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _LiquidAssetsBallanceHeader As LiquidAssetsBallanceHeader
|
||||
Dim _LiquidAssetsBallanceRows As LiquidAssetsBallanceRows
|
||||
_LiquidAssetsBallanceHeader = TryCast(View.SelectedObjects(0), LiquidAssetsBallanceHeader)
|
||||
If _LiquidAssetsBallanceHeader IsNot Nothing Then
|
||||
_ocur.Delete(_LiquidAssetsBallanceHeader.LiquidAssetsBallanceRows)
|
||||
|
||||
Dim _GLRows_Collection As New XPQuery(Of GLRows)(_ocur.Session)
|
||||
|
||||
Dim query = From _GLRows In _GLRows_Collection _
|
||||
Where _GLRows.GLHeader.DateExecution <= DateAdd(DateInterval.Minute, 1439, _
|
||||
_LiquidAssetsBallanceHeader.DateExecution.Date) And _GLRows.LiquidAssets IsNot Nothing And _
|
||||
_GLRows.GLHeader.DocumentNumber <> "" And
|
||||
_GLRows.GLHeader.IsEditable = False And
|
||||
_GLRows.GLHeader IsNot Nothing
|
||||
Group _GLRows By _GLRows.GLHeader.CustomersFrom, _
|
||||
_GLRows.LiquidAssets Into g = Group _
|
||||
Select New With {Key .CustomersFrom = CustomersFrom, _
|
||||
Key .LiquidAssets = LiquidAssets, _
|
||||
Key .InAmountHUF = g.Sum(Function(inv) inv.InAmountHUF), _
|
||||
Key .OutAmountHUF = g.Sum(Function(inv) inv.OutAmountHUF), _
|
||||
Key .InAmountDEV = g.Sum(Function(inv) inv.InAmountDEV), _
|
||||
Key .OutAmountDEV = g.Sum(Function(inv) inv.OutAmountDEV)}
|
||||
RaiseEvent InitWork(1, 1, query.Count)
|
||||
For Each item In query
|
||||
RaiseEvent DoWork()
|
||||
If item.LiquidAssets.LiquidAssetsType = eLiquidAssetsType.NormalCheckout Or _
|
||||
item.LiquidAssets.LiquidAssetsType = eLiquidAssetsType.CurrencyCheckout Or _
|
||||
item.LiquidAssets.LiquidAssetsType = eLiquidAssetsType.DepositCheckout Then
|
||||
_LiquidAssetsBallanceRows = _ocur.CreateObject(Of LiquidAssetsBallanceRows)()
|
||||
_LiquidAssetsBallanceRows.LiquidAssetsBallanceHeader = _LiquidAssetsBallanceHeader
|
||||
_LiquidAssetsBallanceRows.CustomersFrom = item.CustomersFrom
|
||||
_LiquidAssetsBallanceRows.LiquidAssets = item.LiquidAssets
|
||||
_LiquidAssetsBallanceRows.BallanceHUF = item.InAmountHUF - item.OutAmountHUF
|
||||
_LiquidAssetsBallanceRows.BallanceDEV = item.InAmountDEV - item.OutAmountDEV
|
||||
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Structure GLRowsToModify_Amount
|
||||
Dim Oid As Guid
|
||||
Dim OutAmountHUF As Double
|
||||
Dim AmountHUF As Double
|
||||
Dim DebitAmountHUF As Double
|
||||
End Structure
|
||||
|
||||
Private Sub aGenerateCurrencyRateAverage_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGenerateCurrencyRateAverage.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
|
||||
|
||||
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, CriteriaOperator.Parse("LiquidAssets.Oid=? And OutAmountDEV>0 And GLHeader.IsEditable=False", _GLRows.LiquidAssets.Oid))
|
||||
Dim _Rate As Double
|
||||
Dim _GLRowsToModify_ArrayList As ArrayList = New ArrayList
|
||||
Dim _GLRowsToModify As GLRowsToModify_Amount = New GLRowsToModify_Amount
|
||||
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GLHeader.DateExecution", DB.SortingDirection.Ascending))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows_Element As GLRows In _GLRows_Collection
|
||||
RaiseEvent DoWork()
|
||||
|
||||
_Rate = _GLRows_Element.LiquidAssets.GetCurrencyRateAverage(_uow, _GLRows_Element.LiquidAssets, _GLRows_Element.GLHeader.DateExecution)
|
||||
|
||||
_GLRowsToModify.Oid = _GLRows_Element.Oid
|
||||
_GLRowsToModify.OutAmountHUF = Math.Round(_GLRows_Element.OutAmountDEV * _Rate, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRowsToModify.AmountHUF = Math.Round(_GLRows_Element.AmountDEV * _Rate, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRowsToModify.DebitAmountHUF = Math.Round(_GLRows_Element.DebitAmountDEV * _Rate, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRowsToModify_ArrayList.Add(_GLRowsToModify)
|
||||
Next
|
||||
|
||||
For Each _GLRowsToModify In _GLRowsToModify_ArrayList
|
||||
_GLRows = _uow.GetObjectByKey(Of GLRows)(_GLRowsToModify.Oid)
|
||||
_GLRows.OutAmountHUF = _GLRowsToModify.OutAmountHUF
|
||||
_GLRows.AmountHUF = _GLRowsToModify.AmountHUF
|
||||
_GLRows.DebitAmountHUF = _GLRowsToModify.DebitAmountHUF
|
||||
_GLRows.Save()
|
||||
Next
|
||||
|
||||
RaiseEvent FinalWork
|
||||
|
||||
_uow.CommitChanges()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aGenerateCurrencyRateFIFO_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGenerateCurrencyRateFIFO.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
|
||||
|
||||
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, CriteriaOperator.Parse("LiquidAssets.Oid=? And OutAmountDEV>0 And GLHeader.IsEditable=False", _GLRows.LiquidAssets.Oid))
|
||||
Dim _GLRows_CollectionToSetZero As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, CriteriaOperator.Parse("LiquidAssets.Oid=? And GLHeader.IsEditable=False", _GLRows.LiquidAssets.Oid))
|
||||
Dim _Rate As Double
|
||||
Dim _GLRowsToModify_ArrayList As ArrayList = New ArrayList
|
||||
Dim _GLRowsToModify As GLRowsToModify_Amount = New GLRowsToModify_Amount
|
||||
|
||||
For Each _GLRows_Element As GLRows In _GLRows_CollectionToSetZero
|
||||
_GLRows_Element.AmountDEVFIFO = 0
|
||||
_GLRows_Element.Save()
|
||||
Next
|
||||
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GLHeader.DateExecution", DB.SortingDirection.Ascending))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows_Element As GLRows In _GLRows_Collection
|
||||
RaiseEvent DoWork()
|
||||
|
||||
_Rate = _GLRows.LiquidAssets.GetCurrencyRateFIFO(_uow, _GLRows_Element.LiquidAssets, _GLRows_Element.OutAmountDEV, _GLRows_Element.GLHeader.DateExecution, _GLRows_Element.Oid)
|
||||
|
||||
_GLRowsToModify.Oid = _GLRows_Element.Oid
|
||||
_GLRowsToModify.OutAmountHUF = Math.Round(_GLRows_Element.OutAmountDEV * _Rate, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRowsToModify.AmountHUF = Math.Round(_GLRows_Element.AmountDEV * _Rate, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRowsToModify.DebitAmountHUF = Math.Round(_GLRows_Element.DebitAmountDEV * _Rate, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRowsToModify_ArrayList.Add(_GLRowsToModify)
|
||||
Next
|
||||
|
||||
For Each _GLRowsToModify In _GLRowsToModify_ArrayList
|
||||
_GLRows = _uow.GetObjectByKey(Of GLRows)(_GLRowsToModify.Oid)
|
||||
_GLRows.OutAmountHUF = _GLRowsToModify.OutAmountHUF
|
||||
_GLRows.AmountHUF = _GLRowsToModify.AmountHUF
|
||||
_GLRows.DebitAmountHUF = _GLRowsToModify.DebitAmountHUF
|
||||
_GLRows.Save()
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
|
||||
_uow.CommitChanges()
|
||||
End Sub
|
||||
|
||||
Private Sub aGenerateCurrencyRateAverageStart_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aGenerateCurrencyRateAverageStart.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _LiquidAssetsRegenerateCurrency As LiquidAssetsRegenerateCurrency
|
||||
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
|
||||
_LiquidAssetsRegenerateCurrency = _onew.CreateObject(Of LiquidAssetsRegenerateCurrency)()
|
||||
_LiquidAssetsRegenerateCurrency.DateFrom = New Date(Year(Now), 1, 1)
|
||||
_LiquidAssetsRegenerateCurrency.LiquidAssets = _onew.GetObject(_GLRows.LiquidAssets)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "LiquidAssetsRegenerateCurrency_DetailView", True, _LiquidAssetsRegenerateCurrency)
|
||||
End Sub
|
||||
|
||||
Private Sub aGenerateCurrencyRateAverageStart_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aGenerateCurrencyRateAverageStart.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _LiquidAssetsRegenerateCurrency As LiquidAssetsRegenerateCurrency = TryCast(e.PopupWindow.View.SelectedObjects(0), LiquidAssetsRegenerateCurrency)
|
||||
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows) _
|
||||
(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, _
|
||||
CriteriaOperator.Parse("LiquidAssets.Oid=? and GLHeader.IsEditable=False and GetDate(GLHeader.DateExecution)>=?", _
|
||||
_LiquidAssetsRegenerateCurrency.LiquidAssets.Oid, _LiquidAssetsRegenerateCurrency.DateFrom.Date))
|
||||
|
||||
Dim _GLRows As GLRows
|
||||
Dim _SumAmountDEV As Double = 0
|
||||
Dim _SumAmountHUF As Double = 0
|
||||
Dim _LiquidAssetsRate As LiquidAssetsRate = _uow.FindObject(Of LiquidAssetsRate)(CriteriaOperator.Parse("LiquidAssets.oid=? and GetYear(DateExecution)=?", _
|
||||
_LiquidAssetsRegenerateCurrency.LiquidAssets.Oid, _
|
||||
_LiquidAssetsRegenerateCurrency.DateFrom.Date.Year))
|
||||
If _LiquidAssetsRate IsNot Nothing Then
|
||||
_SumAmountDev = _LiquidAssetsRate.AmountDEV
|
||||
_SumAmountHUF = _LiquidAssetsRate.AmountHUF
|
||||
End If
|
||||
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GetDate(GLHeader.DateExecution)", DB.SortingDirection.Ascending))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("InAmountDEV", DB.SortingDirection.Descending))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
'// A deviza a fix és az MNB árfolyammal újra kell számolni mindent
|
||||
RaiseEvent DoWork()
|
||||
If _GLRows.InAmountDEV > 0 Then
|
||||
Dim _CurrencyRate_MNB_Collection = New XPCollection(Of CurrencyRate) _
|
||||
(_ocur.Session, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_LiquidAssetsRegenerateCurrency.LiquidAssets.CurrencyName.ShortName, _GLRows.GLHeader.DateExecution.Date))
|
||||
_CurrencyRate_MNB_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
|
||||
If _CurrencyRate_MNB_Collection.Count > 0 Then
|
||||
For Each _CurrencyRate_MNB In _CurrencyRate_MNB_Collection
|
||||
If _CurrencyRate_MNB.DateValid.Date = _GLRows.GLHeader.DateExecution.Date Then
|
||||
_GLRows.InAmountHUF = Math.Round(_CurrencyRate_MNB.RateAverage * _GLRows.InAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.InAmountHUF
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
_uow.CommitChanges()
|
||||
|
||||
_GLRows_Collection = New XPCollection(Of GLRows) _
|
||||
(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, _
|
||||
CriteriaOperator.Parse("LiquidAssets.Oid=? and GLHeader.IsEditable=False and GetDate(GLHeader.DateExecution)>=?", _
|
||||
_LiquidAssetsRegenerateCurrency.LiquidAssets.Oid, _LiquidAssetsRegenerateCurrency.DateFrom.Date))
|
||||
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GetDate(GLHeader.DateExecution)", DB.SortingDirection.Ascending))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("InAmountDEV", DB.SortingDirection.Descending))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("OutAmountDEV", DB.SortingDirection.Ascending))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
RaiseEvent DoWork()
|
||||
|
||||
'// Árfolyamok helyrerakása
|
||||
If _GLRows.OutAmountDEV > 0 Then
|
||||
If _SumAmountDEV <> 0 Then
|
||||
_GLRows.OutAmountHUF = Math.Round(_GLRows.OutAmountDEV * (_SumAmountHUF / _SumAmountDEV), 2, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.OutAmountHUF
|
||||
_GLRows.Save()
|
||||
_uow.CommitChanges()
|
||||
|
||||
If _GLRows.PartnerType <> ePartnerType.eNotSet Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
_uow.CommitChanges()
|
||||
End If
|
||||
Else
|
||||
Dim _CurrencyRate_MNB_Collection = New XPCollection(Of CurrencyRate) _
|
||||
(_ocur.Session, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_LiquidAssetsRegenerateCurrency.LiquidAssets.CurrencyName.ShortName, _GLRows.GLHeader.DateExecution.Date))
|
||||
_CurrencyRate_MNB_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
|
||||
If _CurrencyRate_MNB_Collection.Count > 0 Then
|
||||
For Each _CurrencyRate_MNB In _CurrencyRate_MNB_Collection
|
||||
If _CurrencyRate_MNB.DateValid.Date = _GLRows.GLHeader.DateExecution.Date Then
|
||||
_GLRows.OutAmountHUF = Math.Round(_CurrencyRate_MNB.RateAverage * _GLRows.OutAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.OutAmountHUF
|
||||
_GLRows.Save()
|
||||
_uow.CommitChanges()
|
||||
If _GLRows.PartnerType <> ePartnerType.eNotSet Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
_uow.CommitChanges()
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
_SumAmountDEV -= Math.Round(_GLRows.OutAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_SumAmountHUF -= Math.Round(_GLRows.OutAmountHUF, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If _SumAmountDEV < 0 Then _SumAmountDEV = 0
|
||||
If _SumAmountHUF < 0 Then _SumAmountHUF = 0
|
||||
Else
|
||||
_SumAmountDEV += Math.Round(_GLRows.InAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_SumAmountHUF += Math.Round(_GLRows.InAmountHUF, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
|
||||
RaiseEvent FinalWork
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
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 LiquidAssetsRate
|
||||
Inherits BaseObject
|
||||
Private _LiquidAssets As LiquidAssets
|
||||
Private _DateExecution As Date
|
||||
Private _AmountHUF As Double
|
||||
Private _AmountDEV As Double
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
<Association("LiquidAssets-LiquidAssetsRate", GetType(LiquidAssets))> _
|
||||
Property LiquidAssets As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssets", _LiquidAssets, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateExecution As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountHUF As Double
|
||||
Get
|
||||
Return _AmountHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountHUF", _AmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountDEV As Double
|
||||
Get
|
||||
Return _AmountDEV
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountDEV", _AmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
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 LiquidAssetsReturnDenomination
|
||||
Inherits BaseObject
|
||||
Private _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader
|
||||
Private _Idx As Long
|
||||
Private _Denomination As String
|
||||
Private _DenominationValue As Double
|
||||
Private _SumValue As Long
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
<Association("LiquidAssetsReturnHeader-LiquidAssetsReturnDenomination", GetType(LiquidAssetsReturnHeader))> _
|
||||
Property LiquidAssetsReturnHeader As LiquidAssetsReturnHeader
|
||||
Get
|
||||
Return _LiquidAssetsReturnHeader
|
||||
End Get
|
||||
Set(value As LiquidAssetsReturnHeader)
|
||||
SetPropertyValue("LiquidAssetsReturnHeader", _LiquidAssetsReturnHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Denomination As String
|
||||
Get
|
||||
Return _Denomination
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Denomination", _Denomination, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DenominationValue As Double
|
||||
Get
|
||||
Return _DenominationValue
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("DenominationValue", _DenominationValue, value)
|
||||
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
|
||||
Select Case Denomination
|
||||
Case "20 000" : SumValue = 20000 * DenominationValue
|
||||
Case "10 000" : SumValue = 10000 * DenominationValue
|
||||
Case "5 000" : SumValue = 5000 * DenominationValue
|
||||
Case "2 000" : SumValue = 2000 * DenominationValue
|
||||
Case "1 000" : SumValue = 1000 * DenominationValue
|
||||
Case "500" : SumValue = 500 * DenominationValue
|
||||
Case "200" : SumValue = 200 * DenominationValue
|
||||
Case "100" : SumValue = 100 * DenominationValue
|
||||
Case "50" : SumValue = 50 * DenominationValue
|
||||
Case "20" : SumValue = 20 * DenominationValue
|
||||
Case "10" : SumValue = 10 * DenominationValue
|
||||
Case "5" : SumValue = 5 * DenominationValue
|
||||
Case "2" : SumValue = 2 * DenominationValue
|
||||
Case "1" : SumValue = 1 * DenominationValue
|
||||
Case "50 cent" : SumValue = 0.5 * DenominationValue
|
||||
Case "20 cent" : SumValue = 0.2 * DenominationValue
|
||||
Case "10 cent" : SumValue = 0.1 * DenominationValue
|
||||
Case "5 cent" : SumValue = 0.05 * DenominationValue
|
||||
Case "2 cent" : SumValue = 0.02 * DenominationValue
|
||||
Case "1 cent" : SumValue = 0.01 * DenominationValue
|
||||
End Select
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property SumValue As Long
|
||||
Get
|
||||
Return _SumValue
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("SumValue", _SumValue, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Idx As Long
|
||||
Get
|
||||
Return _Idx
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Idx", _Idx, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+467
@@ -0,0 +1,467 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<DeferredDeletion(False)> _
|
||||
<Appearance("Hide DEV when HUF in ReturnHeade", AppearanceItemType.ViewItem, "LiquidAssets.CurrencyName.ShortName='HUF'", TargetItems:="BallanceFromDEV;BallanceToDEV", visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class LiquidAssetsReturnHeader 'Pénzeszközök egyenlege
|
||||
Inherits BaseObject
|
||||
Private _CustomersFrom As CustomersFrom 'Saját cég
|
||||
Private _LiquidAssets As LiquidAssets 'Pénzeszköz
|
||||
Private _DateFrom As Date 'Dátumtól
|
||||
Private _DateTo As Date 'Dátumig
|
||||
Private _BallanceFromHUF As Double = 0
|
||||
Private _BallanceFromDEV As Double = 0
|
||||
Private _BallanceToHUF As Double = 0
|
||||
Private _BallanceToDEV As Double = 0
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Private _GLClosingTime As GLClosingTime
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
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
|
||||
<VisibleInListView(False)> _
|
||||
<Association("LiquidAssetsReturnHeader-LiquidAssetsReturnRows", GetType(LiquidAssetsReturnRows)), Aggregated()> _
|
||||
ReadOnly Property LiquidAssetsReturnRows As XPCollection(Of LiquidAssetsReturnRows)
|
||||
Get
|
||||
Return GetCollection(Of LiquidAssetsReturnRows)("LiquidAssetsReturnRows")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property LiquidAssetsReturnRowsGLRows As XPCollection(Of GLRows)
|
||||
Get
|
||||
Dim _GLRows As GLRows
|
||||
Dim _LiquidAssetsReturnRowsGLRows As New XPCollection(Of GLRows)(Session, CriteriaOperator.Parse("1=2"))
|
||||
Dim _LiquidAssetsReturnRows As LiquidAssetsReturnRows
|
||||
For Each _LiquidAssetsReturnRows In Me.LiquidAssetsReturnRows
|
||||
For Each _GLRows In _LiquidAssetsReturnRows.GLCassa.GLRows
|
||||
_LiquidAssetsReturnRowsGLRows.Add(_GLRows)
|
||||
Next
|
||||
Next
|
||||
Return _LiquidAssetsReturnRowsGLRows
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Association("LiquidAssetsReturnHeader-LiquidAssetsReturnDenomination", GetType(LiquidAssetsReturnDenomination)), Aggregated()> _
|
||||
ReadOnly Property LiquidAssetsReturnDenomination As XPCollection(Of LiquidAssetsReturnDenomination)
|
||||
Get
|
||||
Return GetCollection(Of LiquidAssetsReturnDenomination)("LiquidAssetsReturnDenomination")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<ImmediatePostData(True)> _
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(ByVal value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True)> _
|
||||
<DataSourceCriteria("LiquidAssetsType in (0,2,4) AND CustomerFrom='@This.CustomersFrom'")> _
|
||||
Property LiquidAssets As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(ByVal value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssets", _LiquidAssets, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
Session.Delete(Me.LiquidAssetsReturnDenomination)
|
||||
'--- Forint címlet jegyzék
|
||||
If value.CurrencyName.ShortName = "HUF" Then
|
||||
If LiquidAssetsReturnDenomination.Count = 0 Then
|
||||
Dim _LiquidAssetsReturnDenomination As LiquidAssetsReturnDenomination
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 0
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "20 000"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 1
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "10 000"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 2
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "5 000"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 3
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "2 000"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 4
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "1 000"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 5
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "500"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 6
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "200"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 7
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "100"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 8
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "50"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 9
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "20"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 10
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "10"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 11
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "5"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
End If
|
||||
End If
|
||||
If value.CurrencyName.ShortName = "EUR" Then
|
||||
If LiquidAssetsReturnDenomination.Count = 0 Then
|
||||
Dim _LiquidAssetsReturnDenomination As LiquidAssetsReturnDenomination
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 1
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "500"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 2
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "200"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 3
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "100"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 4
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "50"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 5
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "20"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 6
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "10"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 7
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "5"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 8
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "2"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 9
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "1"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 10
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "50 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 11
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "20 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 12
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "10 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 13
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "5 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 14
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "2 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 15
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "1 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
End If
|
||||
End If
|
||||
If value.CurrencyName.ShortName = "CHF" Then
|
||||
If LiquidAssetsReturnDenomination.Count = 0 Then
|
||||
Dim _LiquidAssetsReturnDenomination As LiquidAssetsReturnDenomination
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 0
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "1000"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 2
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "200"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 3
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "100"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 4
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "50"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 5
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "20"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 6
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "10"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 7
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "5"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 8
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "2"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 9
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "1"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 10
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "50 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 11
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "20 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 12
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "10 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
_LiquidAssetsReturnDenomination = New LiquidAssetsReturnDenomination(Session)
|
||||
_LiquidAssetsReturnDenomination.Idx = 13
|
||||
_LiquidAssetsReturnDenomination.LiquidAssetsReturnHeader = Me
|
||||
_LiquidAssetsReturnDenomination.Denomination = "5 cent"
|
||||
_LiquidAssetsReturnDenomination.DenominationValue = 0
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property DateFrom As Date
|
||||
Get
|
||||
Return _DateFrom
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DateFrom", _DateFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateTo As Date
|
||||
Get
|
||||
Return _DateTo
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DateTo", _DateTo, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BallanceFromHUF As Double
|
||||
Get
|
||||
Return _BallanceFromHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("BallanceFromHUF", _BallanceFromHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BallanceToHUF As Double
|
||||
Get
|
||||
Return _BallanceToHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("BallanceToHUF", _BallanceToHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BallanceFromDEV As Double
|
||||
Get
|
||||
Return _BallanceFromDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("BallanceFromDEV", _BallanceFromDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BallanceToDEV As Double
|
||||
Get
|
||||
Return _BallanceToDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("BallanceToDEV", _BallanceToDEV, 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
|
||||
<Browsable(False)> _
|
||||
Property GLClosingTime As GLClosingTime
|
||||
Get
|
||||
Return _GLClosingTime
|
||||
End Get
|
||||
Set(value As GLClosingTime)
|
||||
SetPropertyValue("GLClosingTime", _GLClosingTime, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub RecalculateBallance()
|
||||
If LiquidAssets Is Nothing Then Exit Sub
|
||||
If DateFrom < #1/1/2000# Then Exit Sub
|
||||
BallanceFromHUF = 0
|
||||
BallanceFromDEV = 0
|
||||
BallanceToHUF = 0
|
||||
BallanceToDEV = 0
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows)(Session, CriteriaOperator.Parse("GetDate(GLHeader.DateExecution)<? and GLHeader.DocumentNumber<>'' and GLHeader.IsStorno=False", DateFrom.Date))
|
||||
Dim query = From _GLRows In _GLRows_Collection _
|
||||
Where _GLRows.GLHeader.DateExecution.Date < DateFrom.Date And _GLRows.LiquidAssets Is Me.LiquidAssets And
|
||||
_GLRows.GLHeader.IsEditable = False And
|
||||
String.IsNullOrEmpty(_GLRows.GLHeader.DocumentNumber) = False And
|
||||
_GLRows.GLHeader IsNot Nothing
|
||||
Group _GLRows By _GLRows.GLHeader.CustomersFrom, _
|
||||
_GLRows.LiquidAssets Into g = Group _
|
||||
Select New With {Key .CustomersFrom = CustomersFrom, _
|
||||
Key .LiquidAssets = LiquidAssets, _
|
||||
Key .InAmountHUF = g.Sum(Function(inv) inv.InAmountHUF), _
|
||||
Key .OutAmountHUF = g.Sum(Function(inv) inv.OutAmountHUF), _
|
||||
Key .InAmountDEV = g.Sum(Function(inv) inv.InAmountDEV), _
|
||||
Key .OutAmountDEV = g.Sum(Function(inv) inv.OutAmountDEV)}
|
||||
|
||||
For Each item In query
|
||||
BallanceFromHUF += item.InAmountHUF - item.OutAmountHUF
|
||||
BallanceFromDEV += item.InAmountDEV - item.OutAmountDEV
|
||||
Next
|
||||
Dim _LiquidAssetsReturnRows As LiquidAssetsReturnRows
|
||||
Dim _ReturnAmountHUF As Double = 0
|
||||
Dim _ReturnAmountDEV As Double = 0
|
||||
For Each _LiquidAssetsReturnRows In LiquidAssetsReturnRows
|
||||
_ReturnAmountHUF += (_LiquidAssetsReturnRows.GLCassa.TotalInAmountHUF - _LiquidAssetsReturnRows.GLCassa.TotalOutAmountHUF)
|
||||
_ReturnAmountDEV += (_LiquidAssetsReturnRows.GLCassa.TotalInAmountDEV - _LiquidAssetsReturnRows.GLCassa.TotalOutAmountDEV)
|
||||
Next
|
||||
Me.BallanceToHUF = Me.BallanceFromHUF + _ReturnAmountHUF
|
||||
Me.BallanceToDEV = Me.BallanceFromDEV + _ReturnAmountDEV
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<DeferredDeletion(False)> _
|
||||
Public Class LiquidAssetsReturnRows
|
||||
Inherits BaseObject
|
||||
Private _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader
|
||||
Private _GLCassa As GLCassa
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<Association("LiquidAssetsReturnHeader-LiquidAssetsReturnRows", GetType(LiquidAssetsReturnHeader))> _
|
||||
Property LiquidAssetsReturnHeader As LiquidAssetsReturnHeader
|
||||
Get
|
||||
Return _LiquidAssetsReturnHeader
|
||||
End Get
|
||||
Set(ByVal value As LiquidAssetsReturnHeader)
|
||||
SetPropertyValue("LiquidAssetsReturnHeader", _LiquidAssetsReturnHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
Property GLCassa As GLCassa
|
||||
Get
|
||||
Return _GLCassa
|
||||
End Get
|
||||
Set(ByVal value As GLCassa)
|
||||
SetPropertyValue("GLCassa", _GLCassa, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
Partial Class LiquidAssetsReturnVC
|
||||
|
||||
<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.aPrintLiquidAssetsReturn_Cassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGetReturn_Cassa = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGLCassaClose = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGLCassaCloseBack = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGLCassaClosePreviewPDF = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aPrintLiquidAssetsReturn_Cassa
|
||||
'
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.Caption = "aPrintLiquidAssetsReturn_Cassa"
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.ConfirmationMessage = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.Id = "aPrintLiquidAssetsReturn_Cassa"
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.ImageName = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.Shortcut = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.Tag = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.TargetObjectsCriteria = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.TargetViewId = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.ToolTip = Nothing
|
||||
Me.aPrintLiquidAssetsReturn_Cassa.TypeOfView = Nothing
|
||||
'
|
||||
'aGetReturn_Cassa
|
||||
'
|
||||
Me.aGetReturn_Cassa.Caption = "Get return cassa"
|
||||
Me.aGetReturn_Cassa.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGetReturn_Cassa.Id = "aGetReturn_Cassa"
|
||||
Me.aGetReturn_Cassa.ImageName = "stopwatch_run"
|
||||
Me.aGetReturn_Cassa.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGetReturn_Cassa.Shortcut = Nothing
|
||||
Me.aGetReturn_Cassa.Tag = Nothing
|
||||
Me.aGetReturn_Cassa.TargetObjectsCriteria = "isnull(GLClosingTime)=True"
|
||||
Me.aGetReturn_Cassa.TargetViewId = "LiquidAssetsReturnHeader_DetailView_Cassa"
|
||||
Me.aGetReturn_Cassa.ToolTip = Nothing
|
||||
Me.aGetReturn_Cassa.TypeOfView = Nothing
|
||||
'
|
||||
'aGLCassaClose
|
||||
'
|
||||
Me.aGLCassaClose.Caption = "aGLCassa Close"
|
||||
Me.aGLCassaClose.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGLCassaClose.Id = "aGLCassaClose"
|
||||
Me.aGLCassaClose.ImageName = Nothing
|
||||
Me.aGLCassaClose.Shortcut = Nothing
|
||||
Me.aGLCassaClose.Tag = Nothing
|
||||
Me.aGLCassaClose.TargetObjectsCriteria = "isnull(GLClosingTime)=True"
|
||||
Me.aGLCassaClose.TargetViewId = Nothing
|
||||
Me.aGLCassaClose.ToolTip = Nothing
|
||||
Me.aGLCassaClose.TypeOfView = Nothing
|
||||
'
|
||||
'aGLCassaCloseBack
|
||||
'
|
||||
Me.aGLCassaCloseBack.Caption = "aGLCassa Close Back"
|
||||
Me.aGLCassaCloseBack.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGLCassaCloseBack.Id = "aGLCassaCloseBack"
|
||||
Me.aGLCassaCloseBack.ImageName = Nothing
|
||||
Me.aGLCassaCloseBack.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGLCassaCloseBack.Shortcut = Nothing
|
||||
Me.aGLCassaCloseBack.Tag = Nothing
|
||||
Me.aGLCassaCloseBack.TargetObjectsCriteria = "isnull(GLClosingTime)=False"
|
||||
Me.aGLCassaCloseBack.TargetViewId = Nothing
|
||||
Me.aGLCassaCloseBack.ToolTip = Nothing
|
||||
Me.aGLCassaCloseBack.TypeOfView = Nothing
|
||||
'
|
||||
'aGLCassaClosePreviewPDF
|
||||
'
|
||||
Me.aGLCassaClosePreviewPDF.Caption = "aGLCassa Close Preview PDF"
|
||||
Me.aGLCassaClosePreviewPDF.ConfirmationMessage = Nothing
|
||||
Me.aGLCassaClosePreviewPDF.Id = "aGLCassaClosePreviewPDF"
|
||||
Me.aGLCassaClosePreviewPDF.ImageName = Nothing
|
||||
Me.aGLCassaClosePreviewPDF.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGLCassaClosePreviewPDF.Shortcut = Nothing
|
||||
Me.aGLCassaClosePreviewPDF.Tag = Nothing
|
||||
Me.aGLCassaClosePreviewPDF.TargetObjectsCriteria = "isnull(GLClosingTime)=False"
|
||||
Me.aGLCassaClosePreviewPDF.TargetViewId = Nothing
|
||||
Me.aGLCassaClosePreviewPDF.ToolTip = Nothing
|
||||
Me.aGLCassaClosePreviewPDF.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aPrintLiquidAssetsReturn_Cassa As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGetReturn_Cassa As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGLCassaClose As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGLCassaCloseBack As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGLCassaClosePreviewPDF As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
<?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="aPrintLiquidAssetsReturn_Cassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGetReturn_Cassa.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>227, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGLCassaClose.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>703, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGLCassaCloseBack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>370, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGLCassaClosePreviewPDF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>519, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
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.Data.Filtering
|
||||
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports System.Drawing.Printing
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.XtraPrinting
|
||||
'Imports DevExpress.XtraReports.UI
|
||||
Imports DevExpress.XtraPrinting.Preview
|
||||
|
||||
Public Class LiquidAssetsReturnVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||
Public Event DoWork()
|
||||
Public Event FinalWork
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClose.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaCloseBack.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClosePreviewPDF.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_ListView_Cassa" Then
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_DetailView_Cassa" Then
|
||||
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.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", True)
|
||||
|
||||
Dim _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader = TryCast(View.SelectedObjects(0), LiquidAssetsReturnHeader)
|
||||
If _LiquidAssetsReturnHeader IsNot Nothing Then
|
||||
If _LiquidAssetsReturnHeader.GLClosingTime IsNot Nothing Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClose.Active.SetItemValue("", True)
|
||||
End If
|
||||
End If
|
||||
AddHandler Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Executing, AddressOf LiquidAssetsReturnHeader_ListView_Cassa_PrintLiquidAssetsReturn_Cassa_Executing
|
||||
AddHandler Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClose.Executing, AddressOf LiquidAssetsReturnHeader_ListView_Cassa_GLCassaClose_Executing
|
||||
End If
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_ListView_Cassa_Closed" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().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 LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaCloseBack.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClosePreviewPDF.Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ExportController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.RecordsNavigationController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnDenomination_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ExportController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.RecordsNavigationController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_ListView_Cassa" Then
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
|
||||
End If
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_DetailView_Cassa" Then
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClose.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
RemoveHandler Frame.GetController(Of LiquidAssetsReturnVC).aPrintLiquidAssetsReturn_Cassa.Executing, AddressOf LiquidAssetsReturnHeader_ListView_Cassa_PrintLiquidAssetsReturn_Cassa_Executing
|
||||
RemoveHandler Frame.GetController(Of LiquidAssetsReturnVC).aGLCassaClose.Executing, AddressOf LiquidAssetsReturnHeader_ListView_Cassa_GLCassaClose_Executing
|
||||
End If
|
||||
If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ExportController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.RecordsNavigationController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnDenomination_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ExportController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.RecordsNavigationController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aGetReturn_Cassa_LiquidAssetsReturn_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGetReturn_Cassa.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader
|
||||
Dim _LiquidAssetsReturnRows As LiquidAssetsReturnRows
|
||||
Dim _GLCassa As GLCassa
|
||||
|
||||
_LiquidAssetsReturnHeader = _uow.GetObjectByKey(Of LiquidAssetsReturnHeader)(TryCast(View.SelectedObjects(0), LiquidAssetsReturnHeader).Oid)
|
||||
If _LiquidAssetsReturnHeader IsNot Nothing Then
|
||||
_uow.Delete(_LiquidAssetsReturnHeader.LiquidAssetsReturnRows)
|
||||
Dim _GLCassa_Collection As New XPCollection(Of GLCassa)(_uow, _
|
||||
CriteriaOperator.Parse("GetDate(DateExecution)>=? and GetDate(DateExecution)<=? and LiquidAssets_Cassa=? and DocumentNumber<>''", _
|
||||
_LiquidAssetsReturnHeader.DateFrom.Date, _LiquidAssetsReturnHeader.DateTo.Date, _LiquidAssetsReturnHeader.LiquidAssets))
|
||||
|
||||
_GLCassa_Collection.Sorting.Add(New SortProperty("DateExecution", DB.SortingDirection.Ascending))
|
||||
RaiseEvent InitWork(1, 1, _GLCassa_Collection.Count)
|
||||
For Each _GLCassa In _GLCassa_Collection
|
||||
RaiseEvent DoWork()
|
||||
_LiquidAssetsReturnRows = New LiquidAssetsReturnRows(_uow)
|
||||
_LiquidAssetsReturnRows.LiquidAssetsReturnHeader = _uow.GetObjectByKey(Of LiquidAssetsReturnHeader)(_LiquidAssetsReturnHeader.Oid)
|
||||
_LiquidAssetsReturnRows.GLCassa = _GLCassa
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
_LiquidAssetsReturnHeader.RecalculateBallance()
|
||||
_uow.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aPrintLiquidAssetsReturn_Cassa_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPrintLiquidAssetsReturn_Cassa.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader
|
||||
Dim _ReportData As ReportData
|
||||
|
||||
If e.SelectedObjects.Count > 0 Then
|
||||
_LiquidAssetsReturnHeader = e.SelectedObjects.Item(0)
|
||||
Dim _CS As New CollectionSource(_ocur, GetType(LiquidAssetsReturnRows))
|
||||
_CS.BeginUpdateCriteria()
|
||||
_CS.Criteria.Clear()
|
||||
_CS.Criteria.Add("Empty", CriteriaOperator.Parse("LiquidAssetsReturnHeader.Oid =?", _LiquidAssetsReturnHeader.Oid))
|
||||
_CS.EndUpdateCriteria()
|
||||
|
||||
'If _CS.List.Count = 0 Then
|
||||
' Dim _ReportData_new As ReportData
|
||||
' _ReportData_new = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid = '37'"))
|
||||
' If _LiquidAssetsReturnHeader.LiquidAssets.ReportData_Return Is Nothing Then
|
||||
' _ocur.Rollback()
|
||||
' Throw New Exception("*Nincs megadva a pénztári forgalmi nyomtatvány !")
|
||||
' End If
|
||||
' If _ReportData_new IsNot Nothing Or _LiquidAssetsReturnHeader IsNot Nothing Then
|
||||
' Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData_new, CriteriaOperator.Parse("Oid =?", _LiquidAssetsReturnHeader.Oid), True)
|
||||
' End If
|
||||
'Else
|
||||
If _LiquidAssetsReturnHeader.LiquidAssets.ReportData_Return Is Nothing Then
|
||||
_ocur.Rollback()
|
||||
Throw New Exception("*Nincs megadva a pénztári forgalmi nyomtatvány !")
|
||||
End If
|
||||
_ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _LiquidAssetsReturnHeader.LiquidAssets.ReportData_Return.Oid), True)
|
||||
If _ReportData Is Nothing Or _LiquidAssetsReturnHeader Is Nothing Then
|
||||
Else
|
||||
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("LiquidAssetsReturnHeader =?", _LiquidAssetsReturnHeader.Oid), True)
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aGLCassaClose_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGLCassaClose.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLCassa_Collection As New XPCollection(Of GLCassa)
|
||||
Dim _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader = TryCast(View.SelectedObjects(0), LiquidAssetsReturnHeader)
|
||||
Dim _GLClosingTime As GLClosingTime
|
||||
Dim _GLCassa As GLCassa
|
||||
If _LiquidAssetsReturnHeader IsNot Nothing Then
|
||||
_GLCassa_Collection = New XPCollection(Of GLCassa)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_ocur.Session, CriteriaOperator.Parse("isnull(GLClosingTime)=False and LiquidAssets_Cassa.Oid=? and DateExecution >=? and DateExecution<=?", _
|
||||
_LiquidAssetsReturnHeader.LiquidAssets.Oid, _
|
||||
_LiquidAssetsReturnHeader.DateFrom.Date, _
|
||||
DateAdd(DateInterval.Minute, 1439, _LiquidAssetsReturnHeader.DateTo.Date)))
|
||||
|
||||
If _GLCassa_Collection.Count > 0 Then
|
||||
Throw New Exception("*Van olyan pénztári tétel amely már ezen idõszakon belül le lett zárva !")
|
||||
End If
|
||||
|
||||
_GLCassa_Collection = New XPCollection(Of GLCassa)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_ocur.Session, CriteriaOperator.Parse("IsEditable=True and LiquidAssets_Cassa.Oid=? and DateExecution >=? and DateExecution<=?", _
|
||||
_LiquidAssetsReturnHeader.LiquidAssets.Oid, _
|
||||
_LiquidAssetsReturnHeader.DateFrom.Date, _
|
||||
DateAdd(DateInterval.Minute, 1439, _LiquidAssetsReturnHeader.DateTo.Date)))
|
||||
|
||||
If _GLCassa_Collection.Count > 0 Then
|
||||
Throw New Exception("*Van olyan pénztári tétel amely szerkeszthetõ ezen idõszakon belül !")
|
||||
End If
|
||||
|
||||
_GLClosingTime = _ocur.CreateObject(Of GLClosingTime)()
|
||||
_GLClosingTime.DateFrom = _LiquidAssetsReturnHeader.DateFrom
|
||||
_GLClosingTime.DateTo = _LiquidAssetsReturnHeader.DateTo
|
||||
_GLClosingTime.GLClosingType = eGLClosingType.eCassa
|
||||
|
||||
_LiquidAssetsReturnHeader.GLClosingTime = _GLClosingTime
|
||||
|
||||
_GLCassa_Collection = New XPCollection(Of GLCassa)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_ocur.Session, CriteriaOperator.Parse("LiquidAssets_Cassa.Oid=? and GetDate(DateExecution) >=? and GetDate(DateExecution) <=?", _
|
||||
_LiquidAssetsReturnHeader.LiquidAssets.Oid, _
|
||||
_LiquidAssetsReturnHeader.DateFrom.Date, _
|
||||
DateAdd(DateInterval.Minute, 1439, _LiquidAssetsReturnHeader.DateTo.Date)))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLCassa_Collection.Count)
|
||||
For Each _GLCassa In _GLCassa_Collection
|
||||
RaiseEvent DoWork()
|
||||
_GLCassa.GLClosingTime = _GLClosingTime
|
||||
Next
|
||||
|
||||
'-- Most PDF-be ki kell tolni a pénztári jelentést és azt el kell menteni mint csatolt filet. ----------------------------------------------------------------
|
||||
Dim _XafReport As XafReport = _LiquidAssetsReturnHeader.LiquidAssets.ReportData_Return.LoadReport(_ocur)
|
||||
_XafReport.FilterString = "[LiquidAssetsReturnHeader.Oid]='" & _LiquidAssetsReturnHeader.Oid.ToString & "'"
|
||||
Dim _FileName As String = Path.GetTempPath & "Report.pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
|
||||
_GLClosingTime.DocumentFile = New FileData(_ocur.Session)
|
||||
_GLClosingTime.DocumentFile.LoadFromStream("Report.pdf", _StreamFile) '_FileData
|
||||
_GLClosingTime.DocumentFile.FileName = "Report.pdf"
|
||||
'-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
_StreamFile.Close()
|
||||
|
||||
_ocur.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
View.Close()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aGLCassaCloseBack_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGLCassaCloseBack.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLCassa_Collection As New XPCollection(Of GLCassa)
|
||||
Dim _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader = TryCast(View.SelectedObjects(0), LiquidAssetsReturnHeader)
|
||||
Dim _GLCassa As GLCassa
|
||||
|
||||
_GLCassa_Collection = New XPCollection(Of GLCassa)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_ocur.Session, CriteriaOperator.Parse("LiquidAssets_Cassa.Oid=? and GLClosingTime.Oid=?", _
|
||||
_LiquidAssetsReturnHeader.LiquidAssets.Oid, _
|
||||
_LiquidAssetsReturnHeader.GLClosingTime.Oid))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLCassa_Collection.Count)
|
||||
For Each _GLCassa In _GLCassa_Collection
|
||||
RaiseEvent DoWork()
|
||||
_GLCassa.GLClosingTime = Nothing
|
||||
Next
|
||||
_LiquidAssetsReturnHeader.GLClosingTime = Nothing
|
||||
_ocur.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End Sub
|
||||
Private Sub LiquidAssetsReturnHeader_ListView_Cassa_PrintLiquidAssetsReturn_Cassa_Executing(sender As Object, e As CancelEventArgs)
|
||||
Dim CheckResult As Boolean = DenominationCheck()
|
||||
If Not CheckResult Then
|
||||
MsgBox("A pénztári pénzkészlet és a címletjegyzékben feltüntetett pénzkészlet értéke nem egyezik!")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub LiquidAssetsReturnHeader_ListView_Cassa_GLCassaClose_Executing(sender As Object, e As CancelEventArgs)
|
||||
Dim CheckResult As Boolean = DenominationCheck()
|
||||
If Not CheckResult Then
|
||||
Throw New Exception("*A pénztári pénzkészlet és a címletjegyzékben feltüntetett pénzkészlet értéke nem egyezik!")
|
||||
End If
|
||||
End Sub
|
||||
Private Function DenominationCheck() As Boolean
|
||||
If Frame.GetController(Of ModificationsController).SaveAction.Enabled = True Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.DoExecute()
|
||||
End If
|
||||
|
||||
Dim Valid As Boolean = False
|
||||
Dim _LARHSumValue As Double = 0
|
||||
Dim _uow As New UnitOfWork(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session.DataLayer)
|
||||
Dim _LiquidAssetsReturnHeader As LiquidAssetsReturnHeader = _uow.GetObjectByKey(Of LiquidAssetsReturnHeader)(TryCast(View.SelectedObjects(0), LiquidAssetsReturnHeader).Oid)
|
||||
For Each _LiquidAssetsReturnDenomination As LiquidAssetsReturnDenomination In _LiquidAssetsReturnHeader.LiquidAssetsReturnDenomination
|
||||
_LARHSumValue += _LiquidAssetsReturnDenomination.SumValue
|
||||
Next
|
||||
If _LiquidAssetsReturnHeader.LiquidAssets.CurrencyName.ShortName = "HUF" Then
|
||||
If _LARHSumValue = _LiquidAssetsReturnHeader.BallanceToHUF Then
|
||||
Valid = True
|
||||
End If
|
||||
Else
|
||||
If _LARHSumValue = _LiquidAssetsReturnHeader.BallanceToDEV Then
|
||||
Valid = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Valid
|
||||
End Function
|
||||
End Class
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
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(), NonPersistent(), NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class LiquidAssetsRegenerateCurrency
|
||||
Inherits BaseObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property LiquidAssets As LiquidAssets
|
||||
Property DateFrom As Date
|
||||
End Class
|
||||
Reference in New Issue
Block a user