-
Notifications
You must be signed in to change notification settings - Fork 1
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 Accrual Report for Network Managers #384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment isn't blocking but curious how you feel about the model suggestion
@@ -400,6 +401,8 @@ class Payment(models.Model): | |||
) | |||
confirmed = models.BooleanField(default=False) | |||
confirmation_date = models.DateTimeField(null=True) | |||
# This is used to indicate Payments made to Network Manager organizations | |||
organization = models.ForeignKey(Organization, on_delete=models.DO_NOTHING, null=True, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can just be a boolean like org_payment
and it would be great to have a constraint to make sure opportnity access is always null when it is True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also is this set in this PR or a different one. I couldn't find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is set in this PR. #387
"PaymentReportData", ["payment_unit", "approved", "user_payment_accrued", "nm_payment_accrued"] | ||
) | ||
data = [] | ||
total_paid_users = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the queries may be cleaner in a helper function like the other big complex tables. I know those were single db queries, but i think its fine to have complex ones like this there too, becuase it separates it from the view code, making the view easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. a02109c
Ticket