diff --git a/rattail_corepos/config.py b/rattail_corepos/config.py index 8001866..1e3e9e9 100644 --- a/rattail_corepos/config.py +++ b/rattail_corepos/config.py @@ -62,3 +62,14 @@ def core_office_url(config, require=False, **kwargs): url = config.get(*args, **kwargs) if url: return url.rstrip('/') + + +def core_office_customer_account_url(config, card_number, office_url=None): + """ + Returns the CORE Office URL for the customer account with the given card + number. + """ + if not office_url: + office_url = core_office_url(config, require=True) + return '{}/mem/MemberEditor.php?memNum={}'.format( + office_url, card_number)