Add xref button to view equity payment in CORE

This commit is contained in:
Lance Edgar 2023-09-14 10:31:26 -05:00
parent a182b29fd7
commit 0b7f3d8dcc

View file

@ -138,6 +138,13 @@ class MemberEquityPaymentViewSupplement(ViewSupplement):
model = self.model
return [model.CoreMemberEquityPayment]
def get_xref_buttons(self, payment):
if payment.corepos_transaction_number and payment.corepos_card_number:
url = core_office_url(self.rattail_config)
if url:
url = f'{url}/reports/Equity/EquityReport.php?memNum={payment.corepos_card_number}'
return [{'url': url, 'text': "View in CORE Office"}]
def includeme(config):
MembershipTypeViewSupplement.defaults(config)