Árfolyam 4 tizedesre kerekítés javítása
This commit is contained in:
+7
-7
@@ -925,7 +925,7 @@ Public Class GLCassaVC
|
||||
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
|
||||
@@ -950,7 +950,7 @@ Public Class GLCassaVC
|
||||
'// Á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()
|
||||
@@ -967,7 +967,7 @@ Public Class GLCassaVC
|
||||
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()
|
||||
@@ -981,14 +981,14 @@ Public Class GLCassaVC
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user