#NEWLINE# @ property #NEWLINE# def invoice_context( self ) : #NEWLINE# #INDENT# subscriber_domain = self . subscription . subscriber . domain #NEWLINE# invoice_report = InvoiceInterface ( self . request ) #NEWLINE# invoice_report . filter_by_subscription ( self . subscription ) #NEWLINE# encoded_params = urlencode ( { #NEWLINE# #INDENT# 'subscriber' : subscriber_domain , #NEWLINE# #UNINDENT# } ) #NEWLINE# invoice_report_url = '{}?{}' . format ( invoice_report . get_url ( ) , encoded_params ) #NEWLINE# invoice_export_url = '{}?{}' . format ( invoice_report . get_url ( render_as = 'export' ) , encoded_params ) #NEWLINE# return { #NEWLINE# #INDENT# 'invoice_headers' : invoice_report . headers , #NEWLINE# 'invoice_rows' : invoice_report . rows , #NEWLINE# 'invoice_export_url' : invoice_export_url , #NEWLINE# 'invoice_report_url' : invoice_report_url , #NEWLINE# 'adjust_balance_forms' : invoice_report . adjust_balance_forms , #NEWLINE# #UNINDENT# }