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 Accrual Report for Network Managers #384

Merged
merged 12 commits into from
Sep 18, 2024

Conversation

pxwxnvermx
Copy link
Contributor

@pxwxnvermx pxwxnvermx self-assigned this Aug 29, 2024
@pxwxnvermx pxwxnvermx changed the title Pkv/payment accrual report Payment Accrual Report for Network Managers Aug 29, 2024
@pxwxnvermx pxwxnvermx marked this pull request as ready for review August 29, 2024 08:12
Copy link
Collaborator

@calellowitz calellowitz left a 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)
Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Contributor Author

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 = (
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. a02109c

Base automatically changed from pkv/enterprise-user-visit-review to main September 18, 2024 07:59
@pxwxnvermx pxwxnvermx merged commit 083552a into main Sep 18, 2024
2 checks passed
@pxwxnvermx pxwxnvermx deleted the pkv/payment-accrual-report branch September 18, 2024 08:04
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.

3 participants