mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Added MMS in the balances order for BalanceSummary
This commit is contained in:
committed by
Dan Christian Bogos
parent
4d4b5e3dae
commit
307a1d4d54
@@ -1084,7 +1084,7 @@ func (acc *Account) AsAccountSummary() *AccountSummary {
|
||||
ad.ID = idSplt[1]
|
||||
}
|
||||
|
||||
for _, balanceType := range []string{utils.DATA, utils.SMS, utils.VOICE, utils.GENERIC, utils.MONETARY} {
|
||||
for _, balanceType := range []string{utils.DATA, utils.SMS, utils.MMS, utils.VOICE, utils.GENERIC, utils.MONETARY} {
|
||||
balances, has := acc.BalanceMap[balanceType]
|
||||
if !has {
|
||||
continue
|
||||
|
||||
@@ -2157,6 +2157,7 @@ func TestAccountAsAccountDigest(t *testing.T) {
|
||||
AllowNegative: true,
|
||||
BalanceMap: map[string]Balances{
|
||||
utils.SMS: Balances{&Balance{ID: "sms1", Value: 14}},
|
||||
utils.MMS: Balances{&Balance{ID: "mms1", Value: 140}},
|
||||
utils.DATA: Balances{&Balance{ID: "data1", Value: 1204}},
|
||||
utils.VOICE: Balances{
|
||||
&Balance{ID: "voice1", Weight: 20, DestinationIDs: utils.StringMap{"NAT": true}, Value: 3600},
|
||||
@@ -2169,6 +2170,7 @@ func TestAccountAsAccountDigest(t *testing.T) {
|
||||
ID: "account1",
|
||||
BalanceSummaries: []*BalanceSummary{
|
||||
&BalanceSummary{ID: "sms1", Type: utils.SMS, Value: 14, Disabled: false},
|
||||
&BalanceSummary{ID: "mms1", Type: utils.SMS, Value: 140, Disabled: false},
|
||||
&BalanceSummary{ID: "data1", Type: utils.DATA, Value: 1204, Disabled: false},
|
||||
&BalanceSummary{ID: "voice1", Type: utils.VOICE, Value: 1204, Disabled: false},
|
||||
&BalanceSummary{ID: "voice2", Type: utils.VOICE, Value: 1200, Disabled: false},
|
||||
|
||||
Reference in New Issue
Block a user