sentier-dev / dds_registration

Django app for event registration and billing
MIT License
0 stars 1 forks source link

Invoice templates reconsideration #76

Closed cmutel closed 6 months ago

cmutel commented 7 months ago

I don't think we actually need invoice templates, or at least not year. This is because the differences across currencies only really change the incoming bank details, but not the layout or content of the invoice itself. Therefore, we can delete the template column.

The incoming bank account details will change based on the currency. Therefore, the invoice context can't hard-code these values. Instead of default_payment_details, we need a dictionary:

ACCOUNTS = {
    "USD": """
Account holder: Départ de Sentier
ACH and Wire routing number: 026073150
Account number: 8314283482
Account type: Checking
Bank address: 
    Wise
    30 W. 26th Street, Sixth Floor
    New York NY 10010
    United States
""",
    "CAD": """
Account holder: Départ de Sentier
Institution number: 621
Account number: 200110593807
Transit number: 16001
Bank address: 
    Wise
    99 Bank Street, Suite 1420
    Ottawa ON K1P 1H4
    Canada    
""",
    "EUR": """
Account holder: Départ de Sentier
BIC: TRWIBEB1XXX
IBAN: BE31 9673 6729 9455
Bank address: 
    Wise
    Rue du Trône 100, 3rd floor
    Brussels
    1050
    Belgium    
""",
    "CHF": """
Account holder: Départ de Sentier
IID (BC-Nr.): 80808
SWIFT-BIC: RAIFCH22
IBAN: CH14 8080 8009 3231 6387 3
Bank address:
    Raiffeisen
    Reusswehrstrasse 1
    5412 Gebenstorf
    Switzerland
""",
}
lilliputten commented 7 months ago

Fixed in commit #bcc5ff1 (as part of #65 -- can't cherry-pick it to a separated main-based branch to review independently due to conflicts).

A view of currency selection in the billing form:

2024-03-31-21-01-25

A stripe payment form with currency value, provided to the API:

2024-03-31-19-50-51

A fragment of a pdf with correct payment details and currency:

2024-03-31-21-05-52

lilliputten commented 7 months ago

Just realized that we, probably, have to use different stripe products for registrations and memberships. It'd be nice to have it as an issue (if it's necessary).