Revert "Updated EventCost rounding increment handling.Fixes #3018"

This reverts commit 4fabf8731b.
This commit is contained in:
Trial97
2021-08-26 17:31:42 +03:00
committed by Dan Christian Bogos
parent 20fbb9d678
commit 6f4e0775ef
5 changed files with 16 additions and 19 deletions

View File

@@ -308,7 +308,7 @@ func (ec *EventCost) GetCost() float64 {
if ec.Cost == nil {
var cost float64
for _, ci := range ec.Charges {
cost += ci.TotalCost(ec.Accounting)
cost += ci.TotalCost()
}
cost = utils.Round(cost, globalRoundingDecimals, utils.MetaRoundingMiddle)
ec.Cost = &cost
@@ -408,7 +408,7 @@ func (ec *EventCost) AsCallCost(tor string) *CallCost {
cc.Timespans = make(TimeSpans, len(ec.Charges))
for i, cIl := range ec.Charges {
ts := &TimeSpan{
Cost: cIl.Cost(ec.Accounting),
Cost: cIl.Cost(),
DurationIndex: *cIl.Usage(),
CompressFactor: cIl.CompressFactor,
}