From 810913154183744df5ac624e2eba1a2074db444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szab=C3=B3=20Iv=C3=A1n?= Date: Wed, 27 Sep 2017 12:28:04 +0200 Subject: [PATCH] =?UTF-8?q?=C3=81rfolyam=20sz=C3=A1mol=C3=A1s=20jav=C3=ADt?= =?UTF-8?q?=C3=A1s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancialTransactions/Bank/GLBankVC.vb | 44 +++++++++---------- .../FinancialTransactions/Cassa/GLCassaVC.vb | 44 +++++++++---------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb index 285ba1e..1dab431 100644 --- a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb +++ b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb @@ -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, _ diff --git a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassaVC.vb b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassaVC.vb index e462bd6..f2669dc 100644 --- a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassaVC.vb +++ b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassaVC.vb @@ -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, _