python-drafthorse
python-drafthorse copied to clipboard
add: support for multiple bank accounts
Changed TradeSettlement#payment_means to a MultiField thus now multiple banks can be added.
Usage example:
for bank in invoice_data.Seller.Banks:
payment_means = PaymentMeans()
payment_means.type_code = "ZZZ"
if bank.IBAN:
payment_means.payee_account.iban = bank.IBAN
if bank.BIC:
payment_means.payee_institution.bic = bank.BIC
if invoice_data.Seller.Name:
payment_means.payee_account.account_name = invoice_data.Seller.Name
if bank.BankName:
payment_means.information.value = bank.BankName
doc.trade.settlement.payment_means.add(payment_means)
results in (quba viewer):
Anything else you need so someone can review/approve this PR? Thanks.
While syntactically valid ZUGFeRD, it's not allowed by EN16931, so I'm not sure there's a practical use case for it? We could still add it, but I'm a little less enthusiastic about breaking changes in that case