Árfolyam számolás javítás
This commit is contained in:
+22
-22
@@ -370,28 +370,28 @@ Public Class GLBankVC
|
||||
_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) _
|
||||
(_uow, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_GLBank.LiquidAssets_Main.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, 4, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.InAmountHUF
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
_uow.CommitChanges()
|
||||
'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) _
|
||||
' (_uow, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
' _GLBank.LiquidAssets_Main.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, 4, 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, _
|
||||
|
||||
+22
-22
@@ -913,28 +913,28 @@ Public Class GLCassaVC
|
||||
_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) _
|
||||
(_uow, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_GLCassa.LiquidAssets_Cassa.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, 4, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.InAmountHUF
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
_uow.CommitChanges()
|
||||
'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) _
|
||||
' (_uow, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
' _GLCassa.LiquidAssets_Cassa.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, 4, 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, _
|
||||
|
||||
Reference in New Issue
Block a user