mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
Warning for going negative for *data balance, only when not dryRun
This commit is contained in:
@@ -482,7 +482,8 @@ func (b *Balance) debitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
break
|
||||
}
|
||||
}
|
||||
if cost != 0 && moneyBal == nil { // Fix for issue #685
|
||||
if cost != 0 && moneyBal == nil && (!dryRun || ub.AllowNegative) { // Fix for issue #685
|
||||
utils.Logger.Err(fmt.Sprintf("<RALs> Going negative on account %s with AllowNegative: false", cd.GetAccountKey()))
|
||||
moneyBal = ub.GetDefaultMoneyBalance()
|
||||
}
|
||||
if (cost == 0 || moneyBal != nil) && b.GetValue() >= amount {
|
||||
|
||||
Reference in New Issue
Block a user