Separate invoice and payment
Maybe also because of semantics (an invoice is not a payment), but particularly it would enable the following scenarios:
- Pay multiple invoices (3 EUR + 5 EUR) in one payment (8 EUR)
- Using djp_sepa with future FinTS support, import bank transactions (payments) which can then be linked to invoices.
The new invoice model could be based on the German XRechnung standard.
The Payment model can probably be very minimalistic based on BasePayment
. Access to invoices linked to a payment is done via Invoice.payment's related_name.