From 0b7f3d8dccf6d7f3ec98cecf6a8a2e60f8125452 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 14 Sep 2023 10:31:26 -0500 Subject: [PATCH] Add xref button to view equity payment in CORE --- tailbone_corepos/views/members.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tailbone_corepos/views/members.py b/tailbone_corepos/views/members.py index 879873e..8678619 100644 --- a/tailbone_corepos/views/members.py +++ b/tailbone_corepos/views/members.py @@ -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)