diff --git a/membershipworks/tables.py b/membershipworks/tables.py index 8011be4..9718922 100644 --- a/membershipworks/tables.py +++ b/membershipworks/tables.py @@ -153,7 +153,7 @@ class CurrentAndUpcomingEventTable(EventTable): sequence = ("title", "start", "next_meeting") -class MoneyFooterColumn(MoneyColumn): +class MoneyFooterColumn(CurrencySymbolMoneyColumn): def render_footer(self, bound_column, table): value = getattr(table.event, bound_column.accessor) if value is not None: @@ -182,18 +182,16 @@ class InvoiceTable(tables.Table): _math_header("Quantity", "Q"), footer=lambda table: table.event.quantity, ) - amount = CurrencySymbolMoneyColumn(_math_header("Amount", "A=P*Q")) - materials = CurrencySymbolMoneyColumn( - _math_header("CMS Collected Materials Fee", "M=m*Q") - ) - amount_without_materials = CurrencySymbolMoneyColumn( + amount = MoneyFooterColumn(_math_header("Amount", "A=P*Q")) + materials = MoneyFooterColumn(_math_header("CMS Collected Materials Fee", "M=m*Q")) + amount_without_materials = MoneyFooterColumn( _math_header("Event Revenue Base", "B=A-M") ) - instructor_revenue = CurrencySymbolMoneyColumn( + instructor_revenue = MoneyFooterColumn( _math_header("Instructor Percentage Revenue", "R=B*I"), ) - instructor_amount = CurrencySymbolMoneyColumn( - _math_header("Amount Due to Instructor", "R+M") + instructor_amount = MoneyFooterColumn( + _math_header("Amount Due to Instructor", "R+M"), ) class Meta: