Skip to content

Commit

Permalink
Add daily booking support in PricePolicies
Browse files Browse the repository at this point in the history
  • Loading branch information
LeticiaErrandonea committed Mar 7, 2025
1 parent 456df60 commit 0d40122
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/concerns/price_policies/usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ def subsidized_hourly_usage_cost
hourly_usage_rate - hourly_usage_subsidy
end

def has_daily_rate?
usage_rate_daily && usage_rate_daily > -1
end

def subsidized_daily_usage_cost
usage_rate_daily - usage_subsidy_daily
usage_rate_daily - (usage_subsidy_daily || 0)
end

def minimum_cost_subsidy
Expand Down

0 comments on commit 0d40122

Please sign in to comment.