Skip to content

Commit

Permalink
Fixed billing multiplier for third party AWS accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Bryant (mandatory) committed Jan 4, 2020
1 parent b502b1a commit 2232a7d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2281,9 +2281,16 @@ def _get_sub_account_billing_data( account_id, account_type, start_date, end_dat
"Elastic Compute Cloud",
"EC2"
]

markup_multiplier = 1 + ( int( os.environ.get( "mark_up_percent" ) ) / 100 )

# Markup multiplier
markup_multiplier = 1 + ( int( os.environ.get( "mark_up_percent" ) ) / 100 )
if account_type == "THIRDPARTY":
# For the self-hosted (THIRDPARTY) accounts the multiplier is just 1
# this is because we normally double the AWS pricing and pay half to AWS.
# In the THIRDPARTY situation, the customer pays AWS directly and we just
# take our cut off the top.
markup_multiplier = 1

# Check if this is the first billing month
is_first_account_billing_month = is_organization_first_month(
Expand Down

0 comments on commit 2232a7d

Please sign in to comment.