mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Adding deductConnectFee in test to create an increment for the connect fee
This commit is contained in:
@@ -532,7 +532,7 @@ func (ub *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun boo
|
||||
ts.createIncrementsSlice()
|
||||
}
|
||||
|
||||
if tsIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && ok {
|
||||
if tsIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && cc.deductConnectFee && ok {
|
||||
|
||||
inc := &Increment{
|
||||
Duration: 0,
|
||||
@@ -553,7 +553,7 @@ func (ub *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun boo
|
||||
|
||||
for incIndex, increment := range ts.Increments {
|
||||
|
||||
if tsIndex == 0 && incIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && ok {
|
||||
if tsIndex == 0 && incIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && cc.deductConnectFee && ok {
|
||||
// go to nextincrement
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ func (b *Balance) debitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
return nil, errors.New("timespan with no rate interval assigned")
|
||||
}
|
||||
|
||||
if tsIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && debitConnectFee && ok {
|
||||
if tsIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && debitConnectFee && cc.deductConnectFee && ok {
|
||||
|
||||
inc := &Increment{
|
||||
Duration: 0,
|
||||
@@ -433,7 +433,7 @@ func (b *Balance) debitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
maxCost, strategy := ts.RateInterval.GetMaxCost()
|
||||
for incIndex, inc := range ts.Increments {
|
||||
|
||||
if tsIndex == 0 && incIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && debitConnectFee && ok {
|
||||
if tsIndex == 0 && incIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && debitConnectFee && cc.deductConnectFee && ok {
|
||||
// go to nextincrement
|
||||
continue
|
||||
}
|
||||
@@ -569,7 +569,7 @@ func (b *Balance) debitMoney(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
return nil, errors.New("timespan with no rate interval assigned")
|
||||
}
|
||||
|
||||
if tsIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && debitConnectFee && ok {
|
||||
if tsIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && debitConnectFee && cc.deductConnectFee && ok {
|
||||
|
||||
inc := &Increment{
|
||||
Duration: 0,
|
||||
@@ -595,7 +595,7 @@ func (b *Balance) debitMoney(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
// check standard subject tags
|
||||
//log.Printf("INC: %+v", inc)
|
||||
|
||||
if tsIndex == 0 && incIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && ok {
|
||||
if tsIndex == 0 && incIndex == 0 && ts.RateInterval.Rating.ConnectFee > 0 && cc.deductConnectFee && ok {
|
||||
// go to nextincrement
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user