diff --git a/components/usage/pkg/apiv1/billing.go b/components/usage/pkg/apiv1/billing.go index 4087123eff059e..792fca0e147948 100644 --- a/components/usage/pkg/apiv1/billing.go +++ b/components/usage/pkg/apiv1/billing.go @@ -6,6 +6,7 @@ package apiv1 import ( "context" + "github.com/gitpod-io/gitpod/usage/pkg/contentservice" "math" "time" @@ -48,7 +49,7 @@ func (s *BillingService) UpdateInvoices(ctx context.Context, in *v1.UpdateInvoic return nil, status.Errorf(codes.Internal, "Failed to download usage report with ID: %s", in.GetReportId()) } - credits, err := s.creditSummaryForTeams(report) + credits, err := s.creditSummaryForTeams(report, in.GetReportId()) if err != nil { log.Log.WithError(err).Errorf("Failed to compute credit summary.") return nil, status.Errorf(codes.InvalidArgument, "failed to compute credit summary")