Add account_holder_full_name for CORE -> Rattail customer import

This commit is contained in:
Lance Edgar 2023-11-15 11:38:33 -06:00
parent 5fa28a1843
commit 439bd50deb

View file

@ -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,