diff --git a/membershipworks/models.py b/membershipworks/models.py index 56835d2..97fb04a 100644 --- a/membershipworks/models.py +++ b/membershipworks/models.py @@ -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(), ), ) diff --git a/membershipworks/views.py b/membershipworks/views.py index 1e0a42e..ab20034 100644 --- a/membershipworks/views.py +++ b/membershipworks/views.py @@ -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 = {