Skip to content
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

Payment Calculator adjustments. Don't pay the fixed payment if the mi… #15393

Merged
merged 3 commits into from May 26, 2017

Conversation

mehalshah
Copy link
Contributor

…nimum isn't met, and use enrollments, not attendees when determining if the minimum was hit (but keep attendees for the maximum)

…nimum isn't met, and use enrollments, not attendees when determining if the minimum was hit (but keep attendees for the maximum)
@mehalshah mehalshah requested a review from aoby May 25, 2017 22:16
@@ -42,8 +42,8 @@ def calculate_workshop_payment(workshop)
payment_sum = payment_term.fixed_payment || 0

if payment_term.minimum_attendees_for_payment? &&
attending_teachers.size < payment_term.minimum_attendees_for_payment
return payment_sum
workshop.enrollments.size < payment_term.minimum_attendees_for_payment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is about enrollments now, should we rename the field mimimum_enrollments_for_payment?

@mehalshah mehalshah merged commit 927f5aa into staging May 26, 2017
@davidsbailey davidsbailey deleted the payment_calculator_changes branch January 17, 2018 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants