Code review comment for lp:~acysos-team/banking-addons/banking-addons-spain-party-identifier

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

As you have added another condition, and to accomodate other countries, code can be refactored to:

if company:
    country_code = company_vat[0:2].upper()
    if country_code == 'BE':
        party_identifier = company_vat[2:].replace(' ', '')
    elif country_code == 'ES':
        party_identifier = company.sepa_creditor_identifier

Regards.

review: Needs Fixing (code review)

« Back to merge proposal