Added test for monetary rating subject

This commit is contained in:
Trial97
2021-09-27 11:28:58 +03:00
committed by Dan Christian Bogos
parent c182ca65f5
commit 358d0bbabf
2 changed files with 230 additions and 1 deletions

View File

@@ -884,7 +884,7 @@ func (cd *CallDescriptor) refundIncrements() (acnt *Account, err error) {
// check money too
if increment.BalanceInfo.Monetary != nil && increment.BalanceInfo.Monetary.UUID != "" {
if balance = account.BalanceMap[utils.MetaMonetary].GetBalance(increment.BalanceInfo.Monetary.UUID); balance == nil {
utils.Logger.Warning(fmt.Sprintf("Could not get the balnce: <%s> to be refunded for account: <%s>", increment.BalanceInfo.Unit.UUID, increment.BalanceInfo.AccountID))
utils.Logger.Warning(fmt.Sprintf("Could not get the balnce: <%s> to be refunded for account: <%s>", increment.BalanceInfo.Monetary.UUID, increment.BalanceInfo.AccountID))
continue
}
balance.AddValue(increment.Cost)