Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: support for multiple bank accounts #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jo47011
Copy link

@jo47011 jo47011 commented Jan 29, 2025

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):
banks

@jo47011 jo47011 mentioned this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant