membershipworks: Rename Instructor Revenue column in invoices

This commit is contained in:
Adam Goldsmith 2024-03-04 15:35:37 -05:00
parent 8c29462588
commit 1ac1470d29
2 changed files with 7 additions and 6 deletions

View File

@ -471,7 +471,7 @@ class EventExtQuerySet(models.QuerySet["EventExt"]):
"amount",
"materials",
"amount_without_materials",
"instructor_fee",
"instructor_revenue",
"instructor_amount",
]
},
@ -615,12 +615,13 @@ class EventTicketTypeManager(models.Manager["EventTicketType"]):
amount_without_materials=ExpressionWrapper(
F("amount") - F("materials"), output_field=models.DecimalField()
),
instructor_fee=ExpressionWrapper(
instructor_revenue=ExpressionWrapper(
F("amount_without_materials") * F("event__instructor_percentage"),
output_field=models.DecimalField(),
),
instructor_amount=ExpressionWrapper(
F("instructor_fee") + F("materials"), output_field=models.DecimalField()
F("instructor_revenue") + F("materials"),
output_field=models.DecimalField(),
),
)

View File

@ -306,10 +306,10 @@ class InvoiceTable(tables.Table):
amount = InvoiceMoneyFooterColumn("Amount [A = P * Q]")
materials = InvoiceMoneyFooterColumn("CMS Collected Materials Fee [M = m * Q]")
amount_without_materials = InvoiceMoneyFooterColumn(
"Event Revenue Base [R = A - M]"
"Event Revenue Base [B = A - M]"
)
instructor_fee = InvoiceMoneyFooterColumn("Instructor Fee [F = R * I]")
instructor_amount = InvoiceMoneyFooterColumn("Amount Due to Instructor [F + M]")
instructor_revenue = InvoiceMoneyFooterColumn("Instructor Revenue [R = B * I]")
instructor_amount = InvoiceMoneyFooterColumn("Amount Due to Instructor [R + M]")
class Meta:
attrs = {