-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change host_fee calculation #506
Comments
One more bug there, we tried to find property by def property
@property ||= PropertyRepository.identified_by(property_id).first
end But |
oh man |
Also I don't get the point of this issue. Why do we need to change the formula? Looks like it really calculate the price without host_fee:
|
Ahhhh I see, the right answer is 1000 - 5% = 950 |
Here is the right formula: # The quotation without host fee
def net_rate
coefficient = 1 - host_fee_percentage.to_f / 100
(total * coefficient).round(2)
end Test:
|
Can I fix this? |
|
Actually yes sure! |
Fixed net_rate calculation and add new issue #509 for wrong property bug |
We need to change the way we calculate the "host fee" value.
Currently we use this formula:
net_rate = price / (1 + host_fee_percentage)
But we now need to change it to:
net_rate = price * host_fee_percentage
This applies to all the suppliers and all the hosts.
The text was updated successfully, but these errors were encountered: