mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 12:49:54 +05:00
EventCost - force creation of BalanceInfo when converting to CallCost since we got too many leftovers assuming BalanceInfo is not nil
This commit is contained in:
@@ -277,10 +277,10 @@ func (ec *EventCost) AsCallCost() *CallCost {
|
||||
ts.Increments = make(Increments, len(cIl.Increments))
|
||||
}
|
||||
for j, cInc := range cIl.Increments {
|
||||
incr := &Increment{Duration: cInc.Usage, Cost: cInc.Cost, CompressFactor: cInc.CompressFactor}
|
||||
incr := &Increment{Duration: cInc.Usage, Cost: cInc.Cost, CompressFactor: cInc.CompressFactor, BalanceInfo: new(DebitInfo)}
|
||||
if cInc.AccountingID != "" {
|
||||
cBC := ec.Accounting[cInc.AccountingID]
|
||||
incr.BalanceInfo = &DebitInfo{AccountID: cBC.AccountID}
|
||||
incr.BalanceInfo.AccountID = cBC.AccountID
|
||||
var balanceType string
|
||||
if cBC.BalanceUUID != "" {
|
||||
if ec.AccountSummary != nil {
|
||||
|
||||
Reference in New Issue
Block a user