mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 15:18:44 +05:00
Revise balance blockers
This commit is contained in:
committed by
Dan Christian Bogos
parent
88ff4d9c4f
commit
7add01320e
@@ -412,6 +412,9 @@ func (acc *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun bo
|
||||
// check for blocker
|
||||
if balance.Blocker {
|
||||
if cd.GetDuration() != 0 {
|
||||
if !dryRun {
|
||||
return nil, utils.ErrInsufficientCreditBalanceBlocker
|
||||
}
|
||||
return
|
||||
}
|
||||
goto COMMIT // don't go to next balances
|
||||
@@ -448,6 +451,9 @@ func (acc *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun bo
|
||||
// check for blocker
|
||||
if balance.Blocker {
|
||||
if cd.GetDuration() != 0 {
|
||||
if !dryRun {
|
||||
return nil, utils.ErrInsufficientCreditBalanceBlocker
|
||||
}
|
||||
return
|
||||
}
|
||||
goto COMMIT // don't go to next balances
|
||||
|
||||
Reference in New Issue
Block a user