mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 07:08:45 +05:00
This commit is contained in:
committed by
Dan Christian Bogos
parent
c3f4846055
commit
734a551903
@@ -56,7 +56,8 @@ func (lcs *LeastCostSorter) SortSuppliers(prflID string, suppls []*Supplier,
|
||||
utils.SupplierS, prflID, s.ID))
|
||||
continue
|
||||
}
|
||||
if extraOpts.maxCost != 0 && costData[utils.Cost].(float64) > extraOpts.maxCost {
|
||||
if extraOpts.maxCost != 0 &&
|
||||
costData[utils.Cost].(float64) > extraOpts.maxCost {
|
||||
continue
|
||||
}
|
||||
srtData := map[string]interface{}{
|
||||
@@ -65,10 +66,11 @@ func (lcs *LeastCostSorter) SortSuppliers(prflID string, suppls []*Supplier,
|
||||
for k, v := range costData {
|
||||
srtData[k] = v
|
||||
}
|
||||
sortedSuppls.SortedSuppliers = append(sortedSuppls.SortedSuppliers, &SortedSupplier{
|
||||
SupplierID: s.ID,
|
||||
SortingData: srtData,
|
||||
SupplierParameters: s.SupplierParameters})
|
||||
sortedSuppls.SortedSuppliers = append(sortedSuppls.SortedSuppliers,
|
||||
&SortedSupplier{
|
||||
SupplierID: s.ID,
|
||||
SortingData: srtData,
|
||||
SupplierParameters: s.SupplierParameters})
|
||||
}
|
||||
if len(sortedSuppls.SortedSuppliers) == 0 {
|
||||
return nil, utils.ErrNotFound
|
||||
|
||||
Reference in New Issue
Block a user