From 1def145a4c0c3ffece0175e5854986a8e891ee8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szab=C3=B3=20Iv=C3=A1n?= Date: Wed, 27 Sep 2017 12:03:14 +0200 Subject: [PATCH] =?UTF-8?q?Deviz=C3=A1s=20bank=20kerek=C3=ADt=C3=A9si=20pr?= =?UTF-8?q?obl=C3=A9ma=20jav=C3=ADt=C3=A1sa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancialTransactions/Bank/GLBank.vb | 4 ++-- .../FinancialTransactions/Bank/GLBankVC.vb | 14 +++++++------- .../FinancialTransactions/Cassa/GLCassa.vb | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBank.vb b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBank.vb index 5b5ee1b..13093d4 100644 --- a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBank.vb +++ b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBank.vb @@ -279,11 +279,11 @@ Public Class GLBank If row_CurrencyRate <> 0 Then row_AmountDEV2 = Math.Round(row_AmountHUF / row_CurrencyRate, 2, MidpointRounding.AwayFromZero) End If If LiquidAssets_Main.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName = "HUF" Then - row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero) + row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 4, MidpointRounding.AwayFromZero) row_AmountDEV2 = row_AmountHUF End If If LiquidAssets_Main.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName <> "HUF" Then - row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero) + row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 4, MidpointRounding.AwayFromZero) End If End If diff --git a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb index 577f48b..285ba1e 100644 --- a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb +++ b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Bank/GLBankVC.vb @@ -382,7 +382,7 @@ Public Class GLBankVC 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.InAmountHUF = Math.Round(_CurrencyRate_MNB.RateAverage * _GLRows.InAmountDEV, 4, MidpointRounding.AwayFromZero) _GLRows.AmountHUF = _GLRows.InAmountHUF Exit For End If @@ -409,7 +409,7 @@ Public Class GLBankVC '// Árfolyamok helyrerakása If _GLRows.OutAmountDEV > 0 Then If _SumAmountDEV <> 0 Then - _GLRows.OutAmountHUF = Math.Round(_GLRows.OutAmountDEV * (_SumAmountHUF / _SumAmountDEV), 2, MidpointRounding.AwayFromZero) + _GLRows.OutAmountHUF = Math.Round(_GLRows.OutAmountDEV * (_SumAmountHUF / _SumAmountDEV), 4, MidpointRounding.AwayFromZero) _GLRows.AmountHUF = _GLRows.OutAmountHUF _GLRows.Save() _uow.CommitChanges() @@ -426,7 +426,7 @@ Public Class GLBankVC 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.OutAmountHUF = Math.Round(_CurrencyRate_MNB.RateAverage * _GLRows.OutAmountDEV, 4, MidpointRounding.AwayFromZero) _GLRows.AmountHUF = _GLRows.OutAmountHUF _GLRows.Save() _uow.CommitChanges() @@ -440,14 +440,14 @@ Public Class GLBankVC End If End If - _SumAmountDEV -= Math.Round(_GLRows.OutAmountDEV, 2, MidpointRounding.AwayFromZero) - _SumAmountHUF -= Math.Round(_GLRows.OutAmountHUF, 2, MidpointRounding.AwayFromZero) + _SumAmountDEV -= Math.Round(_GLRows.OutAmountDEV, 4, MidpointRounding.AwayFromZero) + _SumAmountHUF -= Math.Round(_GLRows.OutAmountHUF, 4, 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) + _SumAmountDEV += Math.Round(_GLRows.InAmountDEV, 4, MidpointRounding.AwayFromZero) + _SumAmountHUF += Math.Round(_GLRows.InAmountHUF, 4, MidpointRounding.AwayFromZero) End If Next _uow.CommitChanges() diff --git a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassa.vb b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassa.vb index fba770f..c3750f3 100644 --- a/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassa.vb +++ b/Nuvolar.Module/BusinessObjects/Financial/FinancialObjects/FinancialTransactions/Cassa/GLCassa.vb @@ -271,11 +271,11 @@ Public Class GLCassa If row_CurrencyRate <> 0 Then row_AmountDEV2 = Math.Round(row_AmountHUF / row_CurrencyRate, 2, MidpointRounding.AwayFromZero) End If If LiquidAssets_Cassa.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName = "HUF" Then - row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero) + row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 4, MidpointRounding.AwayFromZero) row_AmountDEV2 = row_AmountHUF End If If LiquidAssets_Cassa.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName <> "HUF" Then - row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero) + row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 4, MidpointRounding.AwayFromZero) End If End If