Devizás bank kerekítési probléma javítása
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
+7
-7
@@ -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()
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user