mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
GetTotalValue rounding
This commit is contained in:
@@ -349,7 +349,7 @@ func TestDmtAgentSendCCRTerminate(t *testing.T) {
|
||||
if err := apierRpc.Call("ApierV2.GetAccount", attrs, &acnt); err != nil {
|
||||
t.Error(err)
|
||||
} else if acnt.BalanceMap[utils.MONETARY].GetTotalValue() != eAcntVal { // Should also consider derived charges which double the cost of 6m10s - 2x0.7584
|
||||
t.Errorf("Expected: %f, received: %f", eAcntVal, acnt.BalanceMap[utils.MONETARY].GetTotalValue())
|
||||
t.Errorf("Expected: %v, received: %v", eAcntVal, acnt.BalanceMap[utils.MONETARY].GetTotalValue())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -617,6 +617,7 @@ func (bc Balances) GetTotalValue() (total float64) {
|
||||
total += b.GetValue()
|
||||
}
|
||||
}
|
||||
total = utils.Round(total, globalRoundingDecimals, utils.ROUNDING_MIDDLE)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user