Skip to content

Commit

Permalink
Correctly calculate weight for tier 1 rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar committed Jun 5, 2017
1 parent ee224ca commit 25eb73e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/admin/postal_costs_controller.rb
Expand Up @@ -51,7 +51,12 @@ def calculate_reward
next unless subscription.quantity > 0

issue_weight = weight
issue_weight += Issue::WEIGHT_PER_REWARD if subscription.reward == 1 # 1 is drawing reward

# 1 is drawing reward, they get 2 copies AND a reward
if subscription.reward == 1
issue_weight *= 2
issue_weight += Issue::WEIGHT_PER_REWARD
end

{
issue_weight: issue_weight,
Expand Down

0 comments on commit 25eb73e

Please sign in to comment.