model = models.BankExportFeedbackLine
extra = 0
+class BankPaymentInline(admin.TabularInline):
+ model = models.Payment
+ extra = 0
@admin.register(models.DirectDebit)
class DirectDebitAdmin(admin.ModelAdmin):
list_display = [
'payment_id', 'acquisition_date',
'iban_valid',
+ 'latest_status',
'bank_submission_date',
'bank_acceptance_date',
'amount', 'first_name', 'last_name',
'fundraiser',
'campaign',
('cancelled_at', EmptyFieldListFilter),
+ 'latest_status',
'needs_redo',
'optout',
'amount',
'sex',
'is_consumer',
+ ('fundraiser_commission', EmptyFieldListFilter),
+ ('fundraiser_bonus', EmptyFieldListFilter),
]
fieldsets = [
(None, {
('postal_code', 'phone'),
'email',
('iban', 'iban_valid', 'iban_warning'),
- 'payment_id',
+ ('payment_id', 'latest_status'),
'agree_contact',
'agree_fundraising',
'agree_newsletter',
('cancelled_at', 'needs_redo', 'optout'),
'submission_date',
'fundraiser_commission',
+ 'fundraiser_bonus',
'fundraiser_bill',
'bank_submission_date',
'bank_acceptance_date',
]
})
]
- readonly_fields = ['agree_contact', 'iban_valid', 'iban_warning']
- inlines = [BankExportFeedbackLineInline]
+ readonly_fields = ['agree_contact', 'iban_valid', 'iban_warning', 'latest_status']
+ inlines = [BankExportFeedbackLineInline, BankPaymentInline]
def set_bank_submission(m, r, q):
q.update(bank_submission_date=now())
@admin.register(models.BankExportFeedback)
class BankExportFeedbackAdmin(admin.ModelAdmin):
- inlines = [BankExportFeedbackLineInline]
+ inlines = [BankExportFeedbackLineInline, BankPaymentInline]