mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-13 02:56:24 +05:00
started balance blocker flag
This commit is contained in:
@@ -316,6 +316,10 @@ func (ub *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun boo
|
||||
return
|
||||
}
|
||||
}
|
||||
// check for blocker
|
||||
if dryRun && balance.Blocker {
|
||||
return // don't go to next balances
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,6 +358,10 @@ func (ub *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun boo
|
||||
return
|
||||
}
|
||||
}
|
||||
// check for blocker
|
||||
if dryRun && balance.Blocker {
|
||||
return // don't go to next balances
|
||||
}
|
||||
}
|
||||
}
|
||||
//log.Printf("END CD: %+v", cd)
|
||||
|
||||
@@ -46,6 +46,7 @@ type Balance struct {
|
||||
TimingIDs utils.StringMap
|
||||
Disabled bool
|
||||
Factor ValueFactor
|
||||
Blocker bool
|
||||
precision int
|
||||
account *Account // used to store ub reference for shared balances
|
||||
dirty bool
|
||||
@@ -67,7 +68,9 @@ func (b *Balance) Equal(o *Balance) bool {
|
||||
b.RatingSubject == o.RatingSubject &&
|
||||
b.Categories.Equal(o.Categories) &&
|
||||
b.SharedGroups.Equal(o.SharedGroups) &&
|
||||
b.Disabled == o.Disabled
|
||||
b.Disabled == o.Disabled &&
|
||||
|
||||
b.Blocker == o.Blocker
|
||||
}
|
||||
|
||||
func (b *Balance) MatchFilter(o *Balance, skipIds bool) bool {
|
||||
|
||||
Reference in New Issue
Block a user