Skip to content

Commit

Permalink
fix result (#4238)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Nov 3, 2023
1 parent 26ba68b commit acd4ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/pkg/database/mongodb.go
Expand Up @@ -561,7 +561,7 @@ func (m *MongoDB) GenerateBillingData(startTime, endTime time.Time, prols *resou
for property := range result.Used {
if prop, ok := prols.EnumMap[property]; ok {
if prop.UnitPrice > 0 {
appCost.UsedAmount[property] = int64(math.Ceil(float64(result.Used[property]) / prop.UnitPrice))
appCost.UsedAmount[property] = int64(math.Ceil(float64(result.Used[property]) * prop.UnitPrice))
appCost.Amount += appCost.UsedAmount[property]
}
}
Expand Down

0 comments on commit acd4ae3

Please sign in to comment.