mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
updated negative balance to not give warning when AllowNegative set to true
This commit is contained in:
committed by
Dan Christian Bogos
parent
7f132f19e4
commit
d04cf1df44
@@ -685,7 +685,9 @@ func (b *Balance) debit(cd *CallDescriptor, ub *Account, moneyBalances Balances,
|
||||
}
|
||||
}
|
||||
if cost != 0 && moneyBal == nil && (!dryRun || ub.AllowNegative) { // Fix for issue #685
|
||||
utils.Logger.Warning(fmt.Sprintf("<RALs> Going negative on account %s with AllowNegative: false", cd.GetAccountKey()))
|
||||
if !ub.AllowNegative {
|
||||
utils.Logger.Warning(fmt.Sprintf("<RALs> Going negative on account %s with AllowNegative: false", cd.GetAccountKey()))
|
||||
}
|
||||
moneyBal = ub.GetDefaultMoneyBalance()
|
||||
}
|
||||
canDebitCost = b.GetValue() >= amount && (moneyBal != nil || cost == 0)
|
||||
|
||||
Reference in New Issue
Block a user