From 439bd50debc7d7c7f173237efad1dfdb0476270c Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 15 Nov 2023 11:38:33 -0600 Subject: [PATCH] Add `account_holder_full_name` for CORE -> Rattail customer import --- rattail_corepos/importing/corepos/db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rattail_corepos/importing/corepos/db.py b/rattail_corepos/importing/corepos/db.py index 6017fa7..91d5fe6 100644 --- a/rattail_corepos/importing/corepos/db.py +++ b/rattail_corepos/importing/corepos/db.py @@ -173,6 +173,7 @@ class CustomerImporter(FromCOREPOS, corepos_importing.model.CustomerImporter): 'account_holder_uuid', 'account_holder_first_name', 'account_holder_last_name', + 'account_holder_full_name', 'email_address', 'phone_number', 'address_street', @@ -251,13 +252,15 @@ class CustomerImporter(FromCOREPOS, corepos_importing.model.CustomerImporter): street = (member.street or '').split('\n') + full_name = normalize_full_name(contact.first_name, contact.last_name) return { 'corepos_card_number': card_number, 'number': card_number, - 'name': normalize_full_name(contact.first_name, contact.last_name), + 'name': full_name, 'account_holder_uuid': person.uuid if person else None, 'account_holder_first_name': contact.first_name, 'account_holder_last_name': contact.last_name, + 'account_holder_full_name': full_name, 'email_address': (member.email or '').strip() or None, 'phone_number': self.app.format_phone_number((member.phone or '').strip() or None), 'address_street': street[0] or None,