Update MaxCost for GetSuppliers

This commit is contained in:
TeoV
2018-03-30 02:52:24 -04:00
committed by Dan Christian Bogos
parent e6abae9fd4
commit 84e3ac80fe
2 changed files with 49 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ func (lcs *LeastCostSorter) SortSuppliers(prflID string,
return nil, err
}
utils.Logger.Debug(fmt.Sprintf("maxCost : %+v and cost costData[utils.Cost] %+v", float64(*lcs.spS.maxCost), cost))
if cost > float64(*lcs.spS.maxCost) {
if cost > *lcs.spS.maxCost && *lcs.spS.maxCost != 0 {
continue
}
srtData := map[string]interface{}{